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

exponentiation() protected method

protected exponentiation ( ) : Expression
return Expression
        protected Expression exponentiation()
        {
            Expression e;

            IToken  t = null;
            IToken  c = null;
            IToken  token = null;

                e = null;
                Expression r = null;
                TypeReference tr = null;

            try {      // for error handling
            e=unary_expression();
            {
                if ((LA(1)==AS))
                {
                    t = LT(1);
                    match(AS);
                    tr=type_reference();
                    if (0==inputState.guessing)
                    {
                        e = new TryCastExpression(ToLexicalInfo(t)) { Target = e, Type = tr };
                    }
                }
                else if ((LA(1)==CAST) && (tokenSet_43_.member(LA(2)))) {
                    c = LT(1);
                    match(CAST);
                    tr=type_reference();
                    if (0==inputState.guessing)
                    {
                        e = new CastExpression(ToLexicalInfo(c)) { Target = e, Type = tr };
                    }
                }
                else if ((tokenSet_121_.member(LA(1))) && (tokenSet_15_.member(LA(2)))) {
                }
                else
                {
                    throw new NoViableAltException(LT(1), getFilename());
                }

            }
            {    // ( ... )*
                for (;;)
                {
                    if ((LA(1)==EXPONENTIATION) && (tokenSet_114_.member(LA(2))))
                    {
                        token = LT(1);
                        match(EXPONENTIATION);
                        r=exponentiation();
                        if (0==inputState.guessing)
                        {

                                        e = new BinaryExpression(ToLexicalInfo(token)) { Operator = BinaryOperatorType.Exponentiation, Left = e, Right = r };

                        }
                    }
                    else
                    {
                        goto _loop539_breakloop;
                    }

                }
            _loop539_breakloop:				;
            }    // ( ... )*
            }
            catch (RecognitionException ex)
            {
            if (0 == inputState.guessing)
            {
                reportError(ex, "exponentiation");
                recover(ex,tokenSet_121_);
            }
            else
            {
                throw ex;
            }
            }
            return e;
        }
BooParserBase