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

Invalid words while using NOT #46

Closed
38b394ce01 opened this issue Mar 22, 2022 · 1 comment
Closed

Invalid words while using NOT #46

38b394ce01 opened this issue Mar 22, 2022 · 1 comment

Comments

@38b394ce01
Copy link

38b394ce01 commented Mar 22, 2022

Hey,

I'm writing a converter from ANTLR to another format. To test this converter I used Grammarinator and a parser generator to fuzz my conversion and verify if it can parse every word.

I have encountered the following problem:
When using the NOT feature of ANTLR, Grammarinator generates invalid words.

Consider the following ANTLR grammar not.g4

grammar not;

start: '>' No_comma '<';
No_comma: ~',';

Now all possible words should come out like >a< or >6<, but the word >,< is not valid because we don't allow a comma with the NOT feature.
I tested different variants for the No_comma rule to match the ANTLR documentation both as lexer and parser rules, in every run Grammarinator still outputs invalid words.

Finding this error took me a lot of time, because I first looked for the error in my converter. Even if it is not fixed, it would be very nice to confirm it so that I can be sure.

Used versions:
Grammarinator19.3
antlr-4.9.3-complete.jar
Python 3.7

Thanks a lot,
38b394ce01

@38b394ce01
Copy link
Author

Sorry, just tested the version of the master branch. There it works.

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

1 participant