public Answer_setContext answer_set() { Answer_setContext _localctx = new Answer_setContext(Context, State); EnterRule(_localctx, 0, RULE_answer_set); int _la; try { EnterOuterAlt(_localctx, 1); { State = 14; Match(START); State = 15; model(); State = 17; ErrorHandler.Sync(this); _la = TokenStream.LA(1); if (_la == COST_LABEL) { { State = 16; cost(); } } } } catch (RecognitionException re) { _localctx.exception = re; ErrorHandler.ReportError(this, re); ErrorHandler.Recover(this, re); } finally { ExitRule(); } return(_localctx); }
public Answer_setContext answer_set() { Answer_setContext _localctx = new Answer_setContext(Context, State); EnterRule(_localctx, 0, RULE_answer_set); try { EnterOuterAlt(_localctx, 1); { State = 10; Match(START); State = 11; model(); } } catch (RecognitionException re) { _localctx.exception = re; ErrorHandler.ReportError(this, re); ErrorHandler.Recover(this, re); } finally { ExitRule(); } return(_localctx); }
public Answer_setContext answer_set() { Answer_setContext _localctx = new Answer_setContext(Context, State); EnterRule(_localctx, 0, RULE_answer_set); int _la; try { State = 46; ErrorHandler.Sync(this); switch (Interpreter.AdaptivePredict(TokenStream, 4, Context)) { case 1: _localctx = new GroundQueryContext(_localctx); EnterOuterAlt(_localctx, 1); { State = 16; Match(IDENTIFIER); State = 21; ErrorHandler.Sync(this); _la = TokenStream.LA(1); while (_la == COMMA) { { { State = 17; Match(COMMA); State = 18; Match(IDENTIFIER); } } State = 23; ErrorHandler.Sync(this); _la = TokenStream.LA(1); } State = 24; Match(GROUND_QUERY_BEGIN); State = 25; Match(REASONING); State = 26; Match(BOOLEAN); State = 29; ErrorHandler.Sync(this); switch (TokenStream.LA(1)) { case DOT: { State = 27; Match(DOT); } break; case WITNESS_LABEL: { State = 28; witness(); } break; default: throw new NoViableAltException(this); } } break; case 2: _localctx = new SimpleModelContext(_localctx); EnterOuterAlt(_localctx, 2); { State = 31; model(); } break; case 3: _localctx = new NonGroundQueryContext(_localctx); EnterOuterAlt(_localctx, 3); { State = 32; term(); State = 37; ErrorHandler.Sync(this); _la = TokenStream.LA(1); while (_la == COMMA) { { { State = 33; Match(COMMA); State = 34; term(); } } State = 39; ErrorHandler.Sync(this); _la = TokenStream.LA(1); } } break; case 4: _localctx = new WeightedModelContext(_localctx); EnterOuterAlt(_localctx, 4); { State = 41; ErrorHandler.Sync(this); _la = TokenStream.LA(1); if (_la == WEIGHTED_MODEL_LABEL) { { State = 40; Match(WEIGHTED_MODEL_LABEL); } } State = 43; model(); State = 44; cost(); } break; } } catch (RecognitionException re) { _localctx.exception = re; ErrorHandler.ReportError(this, re); ErrorHandler.Recover(this, re); } finally { ExitRule(); } return(_localctx); }
public NonGroundQueryContext(Answer_setContext context) { CopyFrom(context); }
public WeightedModelContext(Answer_setContext context) { CopyFrom(context); }
public SimpleModelContext(Answer_setContext context) { CopyFrom(context); }
public virtual void CopyFrom(Answer_setContext context) { base.CopyFrom(context); }
public Answer_setContext answer_set() { Answer_setContext _localctx = new Answer_setContext(Context, State); EnterRule(_localctx, 0, RULE_answer_set); int _la; try { State = 32; ErrorHandler.Sync(this); switch (TokenStream.LA(1)) { case IDENTIFIER: _localctx = new GroundQueryContext(_localctx); EnterOuterAlt(_localctx, 1); { State = 16; Match(IDENTIFIER); State = 21; ErrorHandler.Sync(this); _la = TokenStream.LA(1); while (_la == COMMA) { { { State = 17; Match(COMMA); State = 18; Match(IDENTIFIER); } } State = 23; ErrorHandler.Sync(this); _la = TokenStream.LA(1); } State = 24; Match(GROUND_QUERY_BEGIN); State = 25; Match(REASONING); State = 26; Match(BOOLEAN); State = 29; ErrorHandler.Sync(this); switch (TokenStream.LA(1)) { case DOT: { State = 27; Match(DOT); } break; case WITNESS_LABEL: { State = 28; witness(); } break; default: throw new NoViableAltException(this); } } break; case ANSWER_SET_BEGIN: _localctx = new ModelContext(_localctx); EnterOuterAlt(_localctx, 2); { State = 31; atoms(); } break; default: throw new NoViableAltException(this); } } catch (RecognitionException re) { _localctx.exception = re; ErrorHandler.ReportError(this, re); ErrorHandler.Recover(this, re); } finally { ExitRule(); } return(_localctx); }