in nlpcraft/src/main/scala/org/apache/nlpcraft/internal/intent/compiler/antlr4/NCIDLParser.java [189:238]
private IdlDeclsContext idlDecls(int _p) throws RecognitionException {
ParserRuleContext _parentctx = _ctx;
int _parentState = getState();
IdlDeclsContext _localctx = new IdlDeclsContext(_ctx, _parentState);
IdlDeclsContext _prevctx = _localctx;
int _startState = 2;
enterRecursionRule(_localctx, 2, RULE_idlDecls, _p);
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
{
setState(74);
idlDecl();
}
_ctx.stop = _input.LT(-1);
setState(80);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,0,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
if ( _parseListeners!=null ) triggerExitRuleEvent();
_prevctx = _localctx;
{
{
_localctx = new IdlDeclsContext(_parentctx, _parentState);
pushNewRecursionContext(_localctx, _startState, RULE_idlDecls);
setState(76);
if (!(precpred(_ctx, 1))) throw new FailedPredicateException(this, "precpred(_ctx, 1)");
setState(77);
idlDecl();
}
}
}
setState(82);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,0,_ctx);
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
unrollRecursionContexts(_parentctx);
}
return _localctx;
}