BT

New Early adopter or innovator? InfoQ has been working on some new features for you. Learn more

Nitra: Open Source Language Tooling For CLR

| by Roopesh Shenoy on May 29, 2014. Estimated reading time: 1 minute |

JetBrains recently open sourced Nitra, a set of tooling for working with programming languages on the CLR. Developers can define grammers using Nemerle, which Nitra then uses to build parsers and generate classes to represent and navigate the AST.

An interesting feature in Nitra is the ability to build block grammers and reusing them across languages. Modules such as Whitespaces and CStyleComments ship with Nitra and can easily be reused in defining your own language grammer.

There are three parts to using Nitra -

Once you define the syntax along with AST and parsers, you also get syntax highlighting, code folding and errors higlighting within Visual Studio. Other features such as static analysis, refactoring, navigation and symbol lookup will be available shortly.  

The project is quite ambitious - Nemerle developers (who are also the developers behind Nitra) are planning to rewrite Nemerle using Nitra once it is done. However, Nitra is still in preview, and it will take some time before it is fully ready, especially with features such as compilation currently missing.

JetBrains famously decided against using Roslyn for powering their Resharper features, especially because Resharper supports many other languages, whereas Roslyn is limited to C# and VB. Nitra seems to be a step in making this multi-lingual architecture even more extensible. Enabling language services by just defining the grammer in Nitra will allow JetBrains to support new languages faster, which is one of the key drivers for the project.

You can have a look at the Nitra source code or the documentation to know more. 

Rate this Article

Adoption Stage
Style

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Tell us what you think

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread
Community comments

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Discuss

Login to InfoQ to interact with what matters most to you.


Recover your password...

Follow

Follow your favorite topics and editors

Quick overview of most important highlights in the industry and on the site.

Like

More signal, less noise

Build your own feed by choosing topics you want to read about and editors you want to hear from.

Notifications

Stay up-to-date

Set up your notifications and dont miss out on content that matters to you

BT