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

paren_expression() protected method

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

            IToken  lparen = null;

            e = null;
            Expression condition = null;
            Expression falseValue = null;

            try {      // for error handling
            bool synPredMatched563 = false;
            if (((LA(1)==LPAREN) && (LA(2)==OF)))
            {
                int _m563 = mark();
                synPredMatched563 = true;
                inputState.guessing++;
                try {
                    {
                        match(LPAREN);
                        match(OF);
                    }
                }
                catch (RecognitionException)
                {
                    synPredMatched563 = false;
                }
                rewind(_m563);
                inputState.guessing--;
            }
            if ( synPredMatched563 )
            {
                e=typed_array();
            }
            else if ((LA(1)==LPAREN) && (tokenSet_68_.member(LA(2)))) {
                {
                    lparen = LT(1);
                    match(LPAREN);
                    e=array_or_expression();
                    {
                        switch ( LA(1) )
                        {
                        case IF:
                        {
                            match(IF);
                            condition=boolean_expression();
                            match(ELSE);
                            falseValue=array_or_expression();
                            if (0==inputState.guessing)
                            {

                                                ConditionalExpression ce = new ConditionalExpression(ToLexicalInfo(lparen));
                                                ce.Condition = condition;
                                                ce.TrueValue = e;
                                                ce.FalseValue = falseValue;

                                                e = ce;

                            }
                            break;
                        }
                        case RPAREN:
                        {
                            break;
                        }
                        default:
                        {
                            throw new NoViableAltException(LT(1), getFilename());
                        }
                         }
                    }
                    match(RPAREN);
                }
            }
            else
            {
                throw new NoViableAltException(LT(1), getFilename());
            }

            }
            catch (RecognitionException ex)
            {
            if (0 == inputState.guessing)
            {
                reportError(ex, "paren_expression");
                recover(ex,tokenSet_41_);
            }
            else
            {
                throw ex;
            }
            }
            return e;
        }
BooParserBase