in nlpcraft/src/main/scala/org/apache/nlpcraft/internal/intent/compiler/antlr4/NCIDLParser.java [987:1082]
public final JsonValContext jsonVal() throws RecognitionException {
JsonValContext _localctx = new JsonValContext(_ctx, getState());
enterRule(_localctx, 30, RULE_jsonVal);
int _la;
try {
setState(173);
_errHandler.sync(this);
switch (_input.LA(1)) {
case SQSTRING:
case DQSTRING:
enterOuterAlt(_localctx, 1);
{
setState(158);
qstring();
}
break;
case MINUS:
case INT:
enterOuterAlt(_localctx, 2);
{
setState(160);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==MINUS) {
{
setState(159);
match(MINUS);
}
}
setState(162);
match(INT);
setState(164);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==REAL) {
{
setState(163);
match(REAL);
}
}
setState(167);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==EXP) {
{
setState(166);
match(EXP);
}
}
}
break;
case LBRACE:
enterOuterAlt(_localctx, 3);
{
setState(169);
jsonObj();
}
break;
case LBR:
enterOuterAlt(_localctx, 4);
{
setState(170);
jsonArr();
}
break;
case BOOL:
enterOuterAlt(_localctx, 5);
{
setState(171);
match(BOOL);
}
break;
case NULL:
enterOuterAlt(_localctx, 6);
{
setState(172);
match(NULL);
}
break;
default:
throw new NoViableAltException(this);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}