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

Unable do generate recursive grammars #6

Closed
marcospassos opened this issue Jul 10, 2017 · 2 comments
Closed

Unable do generate recursive grammars #6

marcospassos opened this issue Jul 10, 2017 · 2 comments

Comments

@marcospassos
Copy link

In continuation of issue #5, we're still getting the following errors trying to generate tests for a grammar with recursive rules:

> grammarinator-process TestLexer.g4 TestParser.g4 -o test
> grammarinator-generate -l test/TestUnlexer.py -p test/TestUnparser.py -r domain -d 1 -n 1 -o output/tests/test_%d.ccl
domain cannot be generated within the given depth (min needed: 5).
> clean grammarinator-generate -l test/TestUnlexer.py -p test/TestUnparser.py -r domain -d 1 -n 5 -o output/tests/test_%d.ccl
domain cannot be generated within the given depth (min needed: 5).
domain cannot be generated within the given depth (min needed: 5).
domain cannot be generated within the given depth (min needed: 5).
domain cannot be generated within the given depth (min needed: 5).
domain cannot be generated within the given depth (min needed: 5).
> clean grammarinator-generate -l test/TestUnlexer.py -p test/TestUnparser.py -r domain -d 1 -n 10 -o output/tests/test_%d.ccl
domain cannot be generated within the given depth (min needed: 5).
domain cannot be generated within the given depth (min needed: 5).
domain cannot be generated within the given depth (min needed: 5).
domain cannot be generated within the given depth (min needed: 5).
domain cannot be generated within the given depth (min needed: 5).
domain cannot be generated within the given depth (min needed: 5).
domain cannot be generated within the given depth (min needed: 5).
domain cannot be generated within the given depth (min needed: 5).
domain cannot be generated within the given depth (min needed: 5).
domain cannot be generated within the given depth (min needed: 5).

Now seems the warning is reported up to the max depth.

@renatahodovan
Copy link
Owner

-n defines the number of tests to generate. You should increase -d to change the expected depth.

@marcospassos
Copy link
Author

Sorry, my fault! It worked, thank you!

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