0

I made a parser with ANTLR, and I got the following error message, line 1:8 mismatched input '.' expecting {'[', '.', FROM, AS, '+', '-', '*', '/', '%', '&', '|', ',', '^', ID} as you can see the input is equal to one of the expected options, I'm hours away and I can understand why, if I extract the part that should be entered and call the respective method it recognizes without problems, any suggestions?

  • There are 2 (or more) lexer rules that match `.` (a dot). And one of the parser rules tries to match the DOT lexer rule that was not matched. Same issue as this one: https://stackoverflow.com/questions/29777778/antlr-4-5-mismatched-input-x-expecting-x – Bart Kiers Nov 16 '21 at 16:19
  • there was a previous rule that could be boiled down to one point and I didn't get it, thanks. – Mauricio Galvao Nov 16 '21 at 18:53
  • You're welcome @Mauricio – Bart Kiers Nov 16 '21 at 19:23

0 Answers0