Open cyqw opened 1 year ago
It would be nice, but it's probably not going to happen anytime soon. https://github.com/antlr/antlr4/issues/2327 In the meanwhile, use the grammars-v4 version, which is used in a number of projects. https://github.com/antlr/grammars-v4/tree/master/antlr/antlr4
I will do the migrate,, maybe need some months.
Why do you need this? I have some developments in this topic.
Not only is the Antlr Tool is dependent on the Antlr3 tool and runtime, but also StringTemplate, which is Antlr3 tool and runtime dependent as well.
I want make some tool about embeded language. VTL in YAML, SQL in XML etc. The grammar is hard because I need copy embeded language's grammar to other container grammar's. I found the improve feature about import that discuss in https://github.com/antlr/antlr4/issues/256. import grammar under some mode.define tokens in few mode one time. When I browse the Antlr tool's code, I think antlr4 type is better than antlr3 type for add new feature to antlr4.
In the future, I plan to develop a new parser generator based on ANTLR. It will be almost compatible with ANTLR grammars and also will have some new features that I consider very useful. Maybe this info is useful for your.
It is a good news.
https://github.com/antlr/antlr4/blob/master/tool/src/org/antlr/v4/parse/ANTLRLexer.g