Authors:
gregsh

Grammar-Kit

Products: IntelliJ IDEA

Vendor: Greg Shrago

Email:

Website: https://github.com/JetBrains/Grammar-Kit

Source code: https://github.com/JetBrains/Grammar-Kit

License: http://www.apache.org/licenses/LICENSE-2.0

Bugtracker page

Forum page

BNF Grammars and JFlex lexers editor. Readable parser/PSI code generator.
Downloads: 15770
Rating:
Participated in rating: 3
Version Compatible builds Date
1.2.0.3 140.2285 13.02.2015 Download
1.2.0.1 135 — 136 23.11.2014 Download
1.2.0.1 139 23.11.2014 Download
1.1.10_13 135.1230 — 138 08.08.2014 Download
1.1.10 138.1029 04.08.2014 Download
1.1.7 133.696 03.02.2014 Download
1.1.5 133.93 26.11.2013 Download
1.1.4 130.1365 13.09.2013 Download
1.1.2 129 24.05.2013 Download
1.1.0 123.45 12.02.2013 Download
1.0.9 116.108 05.10.2012 Download
1.0.3 111.222 02.02.2012 Download
1.0.1 111.14 16.12.2011 Download
12 updates are hidden show all updates
Screenshot #14648

Recent change notes

1.2.0

  • Generator: mixin-class methods can be used as method-mixin's to populate rule PSI interface
  • Generator: output directories detection for JFlex/BNF generators
  • Generator: "generate" attribute supersedes global "generateXXX" attributes
  • Generator: compact local variables names by default to improve code readability
  • Generator: better PSI generation in complex "extends" / "elementType" cases
  • Generator: improved rule content calculation leading to more correct PSI classes
  • Generator/Pratt: no more explicit PsiBuilder.Marker manipulations in generated code
  • LivePreview: pre-configured tokens are dropped, numbers/strings/whitespaces detected
  • BNF: allow "-" in rule names and other identifiers
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

Comments:

ligasgr
Rated:
2013-11-23 05:20:15
Thanks for this great plugin! It makes development of custom language parsers so much easier!
.
nicoulaj
Rated:
2013-08-20 18:57:56
Very helpful.
.
gregsh
2011-12-16 17:28:35
Thank you. Left-recursion detection is added to 1.0.1 version.
.
wallaby
Rated:
2011-12-15 15:28:43
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?
.