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

[new Grammer] web ful grammer #4404

Open
HanzoDev1375 opened this issue Feb 2, 2025 · 3 comments
Open

[new Grammer] web ful grammer #4404

HanzoDev1375 opened this issue Feb 2, 2025 · 3 comments

Comments

@HanzoDev1375
Copy link

hi @kaby76 Can you combine the 3 important grammars? HTML CSS JS

@kaby76
Copy link
Contributor

kaby76 commented Feb 2, 2025

We could merge the grammars but it's not practical yet. The problem is that Antlr4 doesn't have a good way to add different grammars together like this. Symbol names collide, and the lexer rules are all active, which is not what should be done. The plan is to see if we can get either Antlr-ng or Antlr5 to make this easier to do.

@HanzoDev1375
Copy link
Author

We could merge the grammars but it's not practical yet. The problem is that Antlr4 doesn't have a good way to add different grammars together like this. Symbol names collide, and the lexer rules are all active, which is not what should be done. The plan is to see if we can get either Antlr-ng or Antlr5 to make this easier to do.

Will everything change in antlr5?

@kaby76
Copy link
Contributor

kaby76 commented Feb 2, 2025

Not sure. I have to lobby for a change to do this. Antlr-ng, which is a rewrite of Antlr4 from Java to TypeScript, is coming along nicely. But just without extensions it will be several more months. Antlr5 hasn't had any progress since Feb 2024. If neither have an extension to handle what we want then I will extend the Trash Toolkit to add grammars together but it will not be native in either Antlr or Antlr-ng and it will result in a very large, combined grammar.

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