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

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

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?



Attachment(s):
LivePreview on Grammar-Kit plugin version 1.1.10_13.png
LivePreview on Grammar-Kit plugin version 1.2.0.1.png
2 comments
Comment actions Permalink

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

If we look at GrammarKit's page in plugin repository here :  http://plugins.jetbrains.com/plugin/6606?pr=

Recent change notes:


1.2.0

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

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

0
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.

0

Please sign in to leave a comment.