An Introduction to Nitra
Just over a year ago we announced that we’d brought on board some members of the Nemerle team, along with its lead Vlad. They have been working very hard over the past year to develop a technology named Nitra, something we spoke about briefly during JetBrains Day.
Before explaining what Nitra is, let’s address the question of why it is we’ve been investing into this project.
At JetBrains we make tools for languages and frameworks. We support dozens of languages and the number of frameworks is probably close to 100, if not over. Every time a new language appears, be it a programming language, be it some new syntax for templates, we need to study it, learn it, implement the corresponding parser and then provide support for analysis and refactoring.
It’s not an easy task, and at the pace technology is moving and expectations increasing, it becomes more complicated. While we are coping, we could definitely make things easier. That’s WHY Nitra.
What is Nitra
Take a look at the following
This syntax module is defined using Nitra. Add it to a project, and combined with a parser that also ships with Nitra, you can now parse Cucumber files, obtaining an Abstract Syntax Tree. This means that simply defining some grammar you get parsing capabilities.
But there’s more…
This is not just another parser generator
Nitra is not merely just another parser generator. There are a few key characteristics that make Nitra different and much more powerful.
Nitra is about extensibility
Nitra provides the ability to extend existing grammar either statically or dynamically. By not using scanning techniques it dramatically increases extensibility. This in essence allows us to not only define new languages but also extend existing ones. For instance, here’s an example of extending C# with a new .? operator.
Nitra is about tooling
Nitra is not only about creating and extending existing languages, but it also about tooling. Defining a syntax module will also provide features such as syntax highlighting, code folding, static analysis, refactoring, navigation and symbol lookup, effectively all the features that we provide in our existing tools and IDEs.
How does this help you, our users
Nitra leads to a much faster turnaround in providing support for new languages and frameworks. It will allow us to build support faster.
Instead of manually having to create parsers and language / tooling support for every new technology, Nitra will provide us with this with very little effort, in essence merely defining a syntax module.
This translates into a quicker turnaround with emphasis on quality, which ultimately provides you, our users, a better experience.
In addition, there is also the possibility of allowing end users to create their own DSLs without having to be experts in parsing or language implementations, and at the same time obtain capabilities such as error checking, syntax highlighting and more.
As mentioned initially, Nitra has been under development for over a year. While there is a lot left to do, we have reached a point where we are comfortable enough to provide you with a status update, something we have owed you for some time.
But it’s not done yet. It’s still cooking.
For more information and updates, follow the Nitra Twitter account.
Subscribe to Blog updates
Thanks, we've got you!
Ready For an Update? The 2023.3 Versions of JetBrains Coding Tools Are Out!
The last release of the year brings a plethora of new features to empower you with an even more exceptional developer experience. You can find the summaries of JetBrains desktop tool updates below and dive deeper for a more detailed look. Introducing JetBrains AI Besides yourself, who knows yo…
Introducing JetBrains AI and the In-IDE AI Assistant
With the rise of generative AI and large language models (LLMs) this year, the landscape of not just the development industry but the creative industry as a whole has begun a transformation. Using this new technology to augment JetBrains tools was a no-brainer for us, and we see it as a logical n…
AI Assistant Update – October 2023
This summer we announced a new AI Assistant for IntelliJ-based IDEs which integrates the power of large language models into the daily workflows of developers. Since then, we’ve expanded the list of supported use cases and enhanced existing features. The AI Assistant is still in the technical pre…
AI Assistant Update – August 2023
AI Assistant is a major new feature of the JetBrains IDE family in the 2023.2 release, offering integration of large language models into the IDE development workflow. The AI Assistant plugin is not bundled with the IDEs and needs to be installed separately from JetBrains Marketplace. One of the pri…