Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename grammars suffix from g4 to g5 #13

Open
ericvergnaud opened this issue Jan 28, 2024 · 3 comments
Open

Rename grammars suffix from g4 to g5 #13

ericvergnaud opened this issue Jan 28, 2024 · 3 comments

Comments

@ericvergnaud
Copy link
Contributor

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
Copy link
Member

KvanTTT commented Jan 31, 2024

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
Copy link
Contributor Author

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

@KvanTTT
Copy link
Member

KvanTTT commented Jan 31, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants