Boo.Lang.Parser.BooParserBase.array_type_reference C# (CSharp) Method

array_type_reference() protected method

protected array_type_reference ( ) : ArrayTypeReference
return ArrayTypeReference
        protected ArrayTypeReference array_type_reference()
        {
            ArrayTypeReference atr;

            IToken  lparen = null;
            IToken  rparen = null;

                TypeReference tr = null;
                atr = null;
                IntegerLiteralExpression rank = null;

            try {      // for error handling
            lparen = LT(1);
            match(LPAREN);
            if (0==inputState.guessing)
            {

                        atr = new ArrayTypeReference(ToLexicalInfo(lparen));

            }
            {
                tr=type_reference();
                if (0==inputState.guessing)
                {
                    atr.ElementType = tr;
                }
                {
                    switch ( LA(1) )
                    {
                    case COMMA:
                    {
                        match(COMMA);
                        rank=integer_literal();
                        if (0==inputState.guessing)
                        {
                            atr.Rank = rank;
                        }
                        break;
                    }
                    case RPAREN:
                    {
                        break;
                    }
                    default:
                    {
                        throw new NoViableAltException(LT(1), getFilename());
                    }
                     }
                }
            }
            rparen = LT(1);
            match(RPAREN);
            }
            catch (RecognitionException ex)
            {
            if (0 == inputState.guessing)
            {
                reportError(ex, "array_type_reference");
                recover(ex,tokenSet_41_);
            }
            else
            {
                throw ex;
            }
            }
            return atr;
        }
BooParserBase