Open SKalt opened 3 years ago
I agree. This seems like it's Antlr4 specific knowledge, and the rules should be added to the converter, as well as tranalyze.
Several months ago, I started to make changes to the grammars-v4 repo so they can be used with all supported targets (e.g., Java, C#, Python, Go, Javascript, etc). Unfortunately, most problems were these symbol conflicts. Initially, I made the manually, but after a few months of manual changes, I decided to write trrename to automate the process.
The actual list of renames is currently enumerated in the script here. It should be added to the converter itself.
Note, I was working on modifying Antlr4 to eliminate these symbol conflicts, so renaming would be unnecessary, but I just hadn't had time to complete it.
I've got a token named
SKIP
, which is an ANTLR keyword. Do you think it would be appropriate fortrconvert
to postfix tokens that collide with ANTLR keywords with a '_'?