Authors:
gregsh
opensource software

Grammar-Kit

Products: IntelliJ IDEA

Vendor: Greg Shrago

Email:

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

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

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

Bugtracker page

Forum page

Description:

BNF Grammars and JFlex lexers editor. Readable parser/PSI code generator.
Downloads: 7797
Rating:
Participated in rating: 3
Version Since Build Until Build File/URL Size (Kb) Date Details
1.1.7. 133.696. . Download 612.71 2014-02-03 19:38:45 details
1.1.5. 133.93. . Download 596.09 2013-11-26 18:58:09 details
1.1.4. 130.1365. . Download 590.83 2013-09-13 03:03:14 details
1.1.2. 129. . Download 450.5 2013-05-24 18:16:46 details
1.1.0. 123.45. . Download 446.05 2013-02-12 03:52:42 details
1.0.9. 116.108. . Download 335.07 2012-10-05 18:38:37 details
1.0.3. 111.222. . Download 231.99 2012-02-02 17:26:45 details
1.0.1. 111.14. . Download 209.7 2011-12-16 17:20:42 details
. .
8 updates are hidden show all updates
Screenshot #13956

Recent change notes:

1.1.7/1.1.6

  • PSI generator: Improve methods attribute semantics: rename/add new PSI tree accessors
  • PSI generator: Drop obsolete methodRenames attribute and add generateTokenAccessors
  • Live Preview: Auto-generate tokens from usage (no more BAD_TOKEN)
  • Editor: Examples added to attributes documentation (Ctrl-Q)
  • Editor: Turn grammar spell-check

1.1.5

  • Historical typo fixed: "recoverUntil" attribute renamed to "recoverWhile" (indeed it always meant "while")
  • Editor: recoverable rule highlighting, help improved for "pin" and "recoverWhile"
  • GPUB: cleanup and OOM protection
  • Generator: parser size reduced, fragment parsing fixed, empty tokens support (lexer-based preprocessors)
  • Generator: simple #auto recovery predicate generation

1.1.4

  • JFlex language support: highlighting/navigation/completion/rename
  • Generator: parser size reduced (most of PsiBuilder-specific logic moved to GPUB)

1.1.3

  • Extensibility: "extends" hooks in GPUB
  • Generator: compact token sequence parsing

1.1.2

  • Context menu: Generate JFlex *.flex file
  • Context menu: Run JFlex generator
  • Context menu: Create custom parser util class

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