Grammar-Kit

Compatible with  IntelliJ IDEA
07.12.2016
28 835
BNF Grammars and JFlex lexers editor. Readable parser/PSI code generator.

Download plugin

Recent change notes

  • Generator: grammar analysis and expression parsing fixes
  • Generator: include quoted tokens in token sequences
Full change log...

General usage instructions

1. Create grammar *.bnf file, see grammars/Grammar.bnf in the plugin code

2. Tune the grammar using Live Preview + Structure view (ctrl-alt-P / meta-alt-P)

3. Generate parser/ElementTypes/PSI classes (ctrl-shift-G / meta-shift-G)

4. Generate lexer *.flex file and then run JFlex generator (both via context menu)

5. Implement ParserDefinition and add the corresponding registrations to the plugin.xml

6. Mix-in resolve and other non-trivial functionality to PSI
01.07.2015
Could you extend it EBNF grammar?
23.11.2013
Thanks for this great plugin! It makes development of custom language parsers so much easier!
20.08.2013
Very helpful.
16.12.2011
Thank you. Left-recursion detection is added to 1.0.1 version.
15.12.2011
Thanks for the plugin, it's a very helpful plugin to simplify the development of custom parsers.
The generator accepts left-recursive rules, which do not make sense in PEG parsers (afaik). Is it possible to highlight this type of rules in the .bnf editor?
Please  sign in  to leave a comment.