Hi all,
I'm getting reportAttemptingFullContext problems which it dies from, the "error" report is (it does actually report a stack overflow):
line 13:34 reportAttemptingFullContext d=22 (opt_negated_predicate), input='notexists(select111asdd)'
Stack overflow.but this <
https://stackoverflow.com/questions/71056312/antlr-how-to-avoid-reportattemptingfullcontext-and-reportambiguity> says
"reportAmbiguity and reportAttemptingFullContext are not an indication that there was a syntax error. You can listen in on these events to know if they happen, but ANTLR has a deterministic approach to resolving this ambiguity (it uses the first alternative). If you do not treat those as errors, you will get a proper parse tree out of your parse."
and there is a definite ambiguity there (harmless, or should be but for ANTLR blowing up).
I don't think I've done anything clever with error handler (as seems to have happened in <
https://github.com/antlr/antlr4/issues/2623>), I'm not advanced enough to do anything smart, code is simply this:
var str = new AntlrInputStream(input);
var lexer = new LDBLexer(str);
var tokens = new CommonTokenStream(lexer);
var parser = new LDBParser(tokens);
var listener = new ErrorListener<IToken>(parser, lexer, tokens);
parser.AddErrorListener(listener);
parser.AddErrorListener(new DiagnosticErrorListener(false));
lexer.AddErrorListener(new ErrorListener<int>(parser, lexer, tokens));
parser.Interpreter.PredictionMode = PredictionMode.LL_EXACT_AMBIG_DETECTION;
var tree = parser.start_parse();so why is it erroring out? This is not critical but is a bit of a blocker for me.
thanks
jan