Open oridool opened 4 years ago
Hi,
please move this to the google discussion group.
Thanks
Le 30 avr. 2020 à 06:02, Ori notifications@github.com a écrit :
Hi, I'm using the attached grammar. Query.txt https://github.com/antlr/antlr4/files/4554900/Query.txt The parser is entering an infinite loop and eventually I get java.lang.OutOfMemoryError.
When trying to parse the text: releaseDate GE 2020-04-28T00:00:00 (without double quotes surrounding the date), the parser enters infinite loop.
When I parse the text: releaseDate "GE 2020-04-28T00:00:00" , (with double quotes surrounding the date), everything is OK.
I'm using latest antlr-4.8 and Java 11.
The infinite loop is in DefaultErrorStrategy.consumeUntil:
while (ttype != Token.EOF && !set.contains(ttype) ) { //System.out.println("consume during recover LA(1)="+getTokenNames()[input.LA(1)]);
// recognizer.getInputStream().consume(); recognizer.consume(); ttype = recognizer.getInputStream().LA(1); } Thank you.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/antlr/antlr4/issues/2815, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAZNQJHIIIQZABHVQXOM5QTRPCPZHANCNFSM4MUDHIZQ.
Hi, I'm using the attached grammar. Query.txt
The parser is entering an infinite loop and eventually I get java.lang.OutOfMemoryError.
When trying to parse the text:
releaseDate GE 2020-04-28T00:00:00
(without double quotes surrounding the date), the parser enters infinite loop.When I parse the text:
releaseDate "GE 2020-04-28T00:00:00"
, (with double quotes surrounding the date), everything is OK.I'm using latest antlr-4.8 and Java 11.
The infinite loop is in
DefaultErrorStrategy.consumeUntil
:Thank you.