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

[CSS] Missing tokens on invalid input #3574

Merged
merged 2 commits into from
Jul 2, 2023

Conversation

ris58h
Copy link
Contributor

@ris58h ris58h commented Jun 30, 2023

No description provided.

@ris58h
Copy link
Contributor Author

ris58h commented Jun 30, 2023

I would like to add a test but it seems like antlr4test-maven-plugin can't check output tokens, only trees.

I've created corresponding issue antlr/antlr4test-maven-plugin#88

@KvanTTT KvanTTT added example New example of file(s) parsed by grammar-generated parser css and removed example New example of file(s) parsed by grammar-generated parser labels Jun 30, 2023
@kaby76
Copy link
Contributor

kaby76 commented Jul 1, 2023

antlr4test-maven-plugin isn't used in CI testing because it does not test across the other seven targets besides Java.

But, this can be added to CI testing, with not much effort.

  • Update the templates, specifically */test.{sh,ps1}. Add a -tokens option. All drivers have this option, but the code does not output to a .tokens file. In addition, some of the targets don't have a Reset() API in the runtime. (I keep telling Antlr folks that the runtimes are incomplete, but no one listens.)
  • Update the driver programs to output to a .tokens file. The code is there for outputting to .tree, and only needs a similar adjustment for tokens. "Diffing" is already performed, so there's nothing more to do to add the feature.

I'll create an issue to track the "to do" task, and implement it next week.

@teverett
Copy link
Member

teverett commented Jul 2, 2023

@ris58h thanks!

@teverett teverett merged commit 73cf2cc into antlr:master Jul 2, 2023
@ris58h ris58h deleted the css-missing-tokens branch July 2, 2023 08:18
@kaby76 kaby76 mentioned this pull request Jul 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants