antlr / grammars-v4

Grammars written for ANTLR v4; expectation that the grammars are free of actions.
MIT License
10.15k stars 3.7k forks source link

[csharp grammar] CSharp and Java producing different error messages for expected tokens #4088

Closed kaby76 closed 5 months ago

kaby76 commented 5 months ago

Someone was trying to use the CSharp port of the csharp grammar (even though the port is not listed in the desc.xml).

The port of the grammar is fine, the error recovery reporting code in the CSharp and Java Antlr runtime are not the same. See https://github.com/antlr/antlr4/issues/3700#issuecomment-2102551486 . The solution is to add the port to the desc.xml and remove the test for now.

kaby76 commented 5 months ago

Completed. https://github.com/antlr/grammars-v4/pull/4089