Resources¶
Official Resources¶
Grammar-Kit is developed and maintained by JetBrains. These are the primary sources for code, releases, and issue tracking.
| Resource | Link |
|---|---|
| GitHub repository | JetBrains/Grammar-Kit |
| Issue tracker | GitHub Issues |
| Plugin marketplace | Grammar-Kit on JetBrains Marketplace |
| Gradle plugin | gradle-grammar-kit-plugin |
| Maven Central | org.jetbrains:Grammar-Kit |
The repository includes several documentation files worth reading directly:
| File | Contents |
|---|---|
README.md | Feature overview, syntax reference, and attribute documentation |
TUTORIAL.md | Step-by-step guide using Live Preview |
HOWTO.md | Advanced topics including expression parsing, stubs, and code patterns |
CHANGELOG.md | Version history from 1.0 through 2023.3 |
IntelliJ Platform Documentation¶
Grammar-Kit generates code that integrates with the IntelliJ Platform's PSI framework. These resources cover the platform side of language plugin development.
| Resource | Link |
|---|---|
| IntelliJ Platform SDK documentation | plugins.jetbrains.com/docs/intellij |
| Implementing a parser and PSI | Parser and PSI guide |
| Custom language support tutorial | Custom Language Support |
| Plugin structure | Plugin Structure |
| Stub indexes | Stub Indexes |
| IntelliJ plugin template | intellij-platform-plugin-template |
The SDK documentation recommends Grammar-Kit as the standard approach for implementing parsers and PSI in language plugins.
JFlex Resources¶
Grammar-Kit uses JFlex for lexer generation. JFlex 1.9.2 is downloaded automatically when you run the JFlex generator from the IDE.
| Resource | Link |
|---|---|
| JFlex manual | jflex.de/manual.html |
| JFlex GitHub | jflex-de/jflex |
Grammar-Kit uses a custom idea-flex.skeleton file extracted from the JFlex jar, which adapts JFlex output for use with the IntelliJ Platform lexer API. See Lexer Integration for details.
Build Tools¶
These tools are relevant if you automate parser generation in a build pipeline rather than generating from the IDE.
| Resource | Link |
|---|---|
| Gradle | gradle.org |
| IntelliJ Platform Gradle Plugin | Gradle IntelliJ Plugin |
| Gradle Changelog Plugin | gradle-changelog-plugin |
For Gradle-based parser generation setup, see Gradle Setup.
Example Projects¶
Several production IntelliJ plugins use Grammar-Kit for their parsers. These repositories are useful as real-world references for grammar design, PSI customization, and plugin structure:
| Plugin | Language | Repository |
|---|---|---|
| intellij-rust | Rust | intellij-rust |
| intellij-plugins/Dart | Dart | Dart |
| intellij-erlang | Erlang | intellij-erlang |
| intellij-elixir | Elixir | intellij-elixir |
| Perl5-IDEA | Perl | Perl5-IDEA |
| intellij-haxe | Haxe | intellij-haxe |
| intellij-elm | Elm | intellij-elm |
| Clojure-Kit | Clojure | Clojure-Kit |
Parsing Theory¶
These references cover the parsing algorithms and techniques that Grammar-Kit builds on.
- Top Down Operator Precedence by Douglas Crockford, describing the Pratt parsing approach that Grammar-Kit uses for expression parsing.
- Grammar-Kit's own
testData/generator/ExprParser.bnf, a complete working example of Pratt-style expression parsing (included in Example Grammars).
Community¶
Grammar-Kit development happens on GitHub. File bug reports and feature requests through GitHub Issues. Contributions are accepted as pull requests. The project is maintained by Greg Shrago (gregsh) at JetBrains and licensed under Apache 2.0.
Version Requirements¶
The current Grammar-Kit development version targets the following platform:
| Component | Version |
|---|---|
| Grammar-Kit | 2023.3-dev |
| IntelliJ IDEA (minimum) | 2023.3 (build 233) |
| Java | 17 |
| Gradle | 8.14.2 |
For installation instructions, see Installation and Setup.