Open ris58h opened 1 year ago
Some lexers in the repo has error channel (https://github.com/search?q=repo%3Aantlr%2Fgrammars-v4+channels+%7B+ERROR+language%3AANTLR&type=code&l=ANTLR) and some of them produce such tokens in tests. For example https://github.com/ris58h/grammars-v4/blob/1966b6081dc49a24e6641259de0eaa483b8565da/javascript/javascript/examples/Generators.js#L38 where start token has ERROR channel (there are other places BTW). These test should fail.
start
ERROR
I couldn't find a settings in https://github.com/antlr/antlr4test-maven-plugin to do it. May be we can fix it, may be it requires upstream changes.
To make error rules fit in the trgen tester or the old Maven tester, the easiest is to just have the error reported using an Antlr error listener NotifyErrorListeners(). It seems wrong to not report the error.
Some lexers in the repo has error channel (https://github.com/search?q=repo%3Aantlr%2Fgrammars-v4+channels+%7B+ERROR+language%3AANTLR&type=code&l=ANTLR) and some of them produce such tokens in tests. For example https://github.com/ris58h/grammars-v4/blob/1966b6081dc49a24e6641259de0eaa483b8565da/javascript/javascript/examples/Generators.js#L38 where
start
token hasERROR
channel (there are other places BTW). These test should fail.I couldn't find a settings in https://github.com/antlr/antlr4test-maven-plugin to do it. May be we can fix it, may be it requires upstream changes.