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

ERROR AssertionError occured in the case of not operator used in parser #517

Open
donaldxdonald opened this issue Nov 23, 2021 · 0 comments

Comments

@donaldxdonald
Copy link

Situation

Recently I had built a project with Antlr 4.9.2. It is all good when I made lexer and parser and it didn't show any errors from the IDE plugin. But when I run a demo and test, the error ERROR AssertionError [ERR_ASSERTION]: false == true has been showed on the console.

image

It ran when I retried the steps again tho...

Trace

I noticed that it points to the rule nonsenseParam in my project while other rules are fine. And the definition of nonsenseParam rule is as follows.

image

It used not operator in parser.

This operator is rarely used in the parser but is available. via antlr4/parser-rules

My project was used for three target languages --- TypeScript, Swift and Java. The Swift and Java version of generated parser and lexer are fine. Cuz they were generated by the official antlr4 runtime. So I reckon it is the issue of antlr4ts.

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