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

How to avoid endless loops in generated grammar? #16

Open
johannes-riecken opened this issue Sep 15, 2020 · 0 comments
Open

How to avoid endless loops in generated grammar? #16

johannes-riecken opened this issue Sep 15, 2020 · 0 comments

Comments

@johannes-riecken
Copy link

johannes-riecken commented Sep 15, 2020

I find this a really great and impressive module and was amazed that it could directly generate a syntactically correct Perl6 grammar for a large ANTLR4 grammar (I took the golang grammar from the example grammars repo, moved the grammar and lexer into one file and removed the extra function calls by requiring statements to be semicolon-terminated). While that grammar still works with ANTLR4, I get seemingly endless loops in the Perl6 grammar. Are there any simple steps for me to mechanically rewrite the Perl6 grammar manually so that it runs in a reasonable time?

Here's the grammar and example input text I've used.

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