Skip to content

Issue in using example from Grammarinator #284

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

Open
Hasask opened this issue Apr 27, 2025 · 1 comment
Open

Issue in using example from Grammarinator #284

Hasask opened this issue Apr 27, 2025 · 1 comment

Comments

@Hasask
Copy link

Hasask commented Apr 27, 2025

I'm currently trying to follow the example prompts given in the repository to install and run Grammarinator on the HTML example shown, but I keep coming across several errors in the bash terminal. Specifically, whenever I pip install grammarinator, it prompts me to install several packages that were installed, but all were older versions of grammarinator. Additionally, when I try running the example shown in this repository, I am met with this error:

ImportError: cannot import name 'UnparserRuleContext' from 'grammarinator.runtime'

When I try processing and running it with my own ANTLR4 grammar file, it also produces similar errors.

@renatahodovan
Copy link
Owner

@Hasask Thanks for the report! The ImportError you encountered is most likely due to using the latest examples from the documentation with an older version of Grammarinator. The version currently available on PyPI is quite outdated — we're in the process of preparing a new release. In the meantime, please try installing the latest version directly from the master branch on GitHub and see if that resolves the issue.

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