Problem with PsiElement WhiteSpace in LivePreview for Grammar.bnf in plugin GrammarKit version

My version IDEA UltimateEdition 13.1.5.  I install plugin Grammar-Kit version

I copy Grammar.bnf from Grammar-Kit to my project. Run LivePreview.

PsiViewer don't understand PsiElement WhiteSpace.

This problem during until I was install plugin Grammar-Kit version 1.1.10_13.

What problem was happened?

LivePreview on Grammar-Kit plugin version 1.1.10_13.png
LivePreview on Grammar-Kit plugin version
Comment actions Permalink

Yes, I have the same situation.
In Grammar-Kit in IDEA 14.0.2

If we look at GrammarKit's page in plugin repository here :

Recent change notes:


-- LivePreview: pre-configured tokens are dropped, numbers/strings/whitespaces detected

What does this change note mean? May be Gregsh answered?

Comment actions Permalink

I've added missing space token grammar.bnf and TUTORIAL example (issues #56 and #58 on github).

Implicitly supported tokens (WHITESPACE, ID) were good for one languages and bad for others (Markdown, Python).
The worst part is that they confused newcomers so I decided to drop them altogether.

LivePreview now detects standard tokens like strings, numbers and whitespaces by patterns to
properly setup ParserDefinition and provide basic token highlighting,

To fix grammars just add space='regexp:\s+' token to the tokens attribute.


Please sign in to leave a comment.