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

Part of the input ignored in creating parse tree (in IntelliJ plugin) #536

Closed
aivarannamaa opened this issue Apr 6, 2014 · 2 comments
Closed

Comments

@aivarannamaa
Copy link

Here is a grammar (http://pastebin.com/Higjrcrb) where I accidentally misdefined variable names (rule Nimi), so that it doesn't allow single character names.

To my surprise when I tested rule "avaldis" in ANTRL4 IntelliJ plugin (plugin version 1.0.2, IntelliJ version 13.1.1) with input 1+a+2+2, it gave me nice and wrong parse tree which was simply missing the a:

parsetree

@aivarannamaa
Copy link
Author

When I add a space after a, so that input becomes 1+a +2+2, it shows me the error in parse tree. The result is same whether I define separate skippable whitespace rule or not.

@parrt
Copy link
Member

parrt commented Apr 6, 2014

interesting. it should skip the a and space as bad tokens not to appear in the tree. I guess there is no error printed for you to see. This is a plugin issue not antlr :) I will add issue there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants