antlr / antlr5

BSD 3-Clause "New" or "Revised" License
57 stars 5 forks source link

Rename grammars suffix from g4 to g5 #13

Open ericvergnaud opened 10 months ago

ericvergnaud commented 10 months ago

Since we'll be evolving grammar syntax, there is a need to prevent false bugs in antlr4, caused by antlr5 syntax unsupported in antlr4. This is easy to achieve by changing the grammar file extension from g5 to g5.

KvanTTT commented 10 months ago

I suggest postponing this change unless we introduce breaking changes. It would be great if we can parse old grammars without additional effort (there are a lot of grammars in grammars-v4 repository). Moreover some features are back-compatible, for instance, Token value comparators doesn't break compatibility.

ericvergnaud commented 10 months ago

Does antlr4 support the proposed syntax get=ID=='get', without curly braces ?

KvanTTT commented 10 months ago

ANTLR 4 doesn't support. But if support of this feature is introduced, the old grammars also will be still supported without changes.