Open NickStrupat opened 2 years ago
Thanks, we've fixed escaping for some cases, see https://github.com/antlr/antlr4/pull/3451 But another part is ongoing. It looks like your case is already covered in master (reserved string
and base
for labels).
It seems the keyword escaping is not working in this example grammar. I believe the left recursion is to blame. Demonstration code is below. I suspect it's around here but not sure: https://github.com/antlr/antlr4/blob/master/tool/resources/org/antlr/v4/tool/templates/codegen/CSharp/CSharp.stg#L934
Just run
dotnet build
and you'll see the syntax errors of the ANTLR-generated code.Grammar.g4
A.cs
(blank file)A.csproj