Compatible with: IntelliJ IDEA PhpStorm WebStorm PyCharm RubyMine AppCode CLion GoLand DataGrip Rider MPS Android Studio
May 25, 2018
47 143
BNF Grammars and JFlex lexers editor. Readable parser/PSI code generator.

Download plugin

Recent change notes

  • Editor: inject Regexp in BNF and Java in JFlex files
  • Generator: less markers & less lines in generated code
  • Generator: improve target dir detection, refresh files faster
  • Generator: FIRST check external rules with non-external predicates
  • GPUB: cleanup and error reporting tweaks
  • GPUB: re-check recoverWhile condition after advance when recovering
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