Example #1
0
        public PropositionContext proposition()
        {
            PropositionContext _localctx = new PropositionContext(_ctx, State);

            EnterRule(_localctx, 10, RULE_proposition);
            try {
                State = 60;
                _errHandler.Sync(this);
                switch (Interpreter.AdaptivePredict(_input, 5, _ctx))
                {
                case 1:
                    EnterOuterAlt(_localctx, 1);
                    {
                        State = 58; instruction();
                    }
                    break;

                case 2:
                    EnterOuterAlt(_localctx, 2);
                    {
                        State = 59; directive();
                    }
                    break;
                }
            }
            catch (RecognitionException re) {
                _localctx.exception = re;
                _errHandler.ReportError(this, re);
                _errHandler.Recover(this, re);
            }
            finally {
                ExitRule();
            }
            return(_localctx);
        }
Example #2
0
        public PropositionContext proposition()
        {
            PropositionContext _localctx = new PropositionContext(Context, State);

            EnterRule(_localctx, 10, RULE_proposition);
            try {
                State = 58;
                ErrorHandler.Sync(this);
                switch (TokenStream.LA(1))
                {
                case PROPOSITION:
                    EnterOuterAlt(_localctx, 1);
                    {
                        State = 52; Match(PROPOSITION);
                    }
                    break;

                case VARIABLE:
                    EnterOuterAlt(_localctx, 2);
                    {
                        State = 53; Match(VARIABLE);
                    }
                    break;

                case LPAREN:
                    EnterOuterAlt(_localctx, 3);
                    {
                        State = 54; Match(LPAREN);
                        State = 55; ltl();
                        State = 56; Match(RPAREN);
                    }
                    break;

                default:
                    throw new NoViableAltException(this);
                }
            }
            catch (RecognitionException re) {
                _localctx.exception = re;
                ErrorHandler.ReportError(this, re);
                ErrorHandler.Recover(this, re);
            }
            finally {
                ExitRule();
            }
            return(_localctx);
        }