Tutorials and issues on all aspects of creating software to analyse code

Building and testing a parser with ANTLR and Kotlin

Building and testing a parser with ANTLR and Kotlin

This post is the part of a series. The goal of the series is to describe how to create a useful language and all the supporting tools. Building a lexer Building a parser Creating an editor with syntax highlighting Build an editor with autocompletion Mapping the parse tree to the abstract syntax tree Model to model […]

Getting started with ANTLR: building a simple expression language

Getting started with ANTLR: building a simple expression language

This post is the part of a series. The goal of the series is to describe how to create a useful language and all the supporting tools. Building a lexer Building a parser Creating an editor with syntax highlighting Build an editor with autocompletion Mapping the parse tree to the abstract syntax tree Model to model […]

On the need of a generic library around ANTLR_ using reflection to build a metamodel

On the need of a generic library around ANTLR: using reflection to build a metamodel

I am a Language Engineer: I use several tools to define and process languages. Among other tools I use ANTLR: it is simple, it is flexible, I can build things around it. However I find myself rebuilding similar tools around ANTLR for different projects. I see two problems with that: ANTLR is a very good […]

ANTLR and Jetbrains MPS: Parsing files and display the AST using the tree notation

Itemis did it again: they just released a new very cool plugin for Jetbrains MPS. This one permits to define new tree editors. They look like this: In this post we are going to see: how to use ANTLR parsers inside MPS how to represent the parsed AST using the tree notation In particular we are […]

Turin Programming Language for the JVM: building advanced lexers with ANTLR

Turin Programming Language for the JVM: building advanced lexers with ANTLR

As I wrote in my last post, I recently started working on a new programming language named Turin. A working compiler for an initial version of the languag is available on GitHub. I am currently improving the language and working on a Maven and an IntelliJ plugins. Here and in the next posts I will go over the […]

Develop DSLs for Eclipse and IntelliJ using Xtext

Develop DSLs for Eclipse and IntelliJ using Xtext

In this post we are going to see how to develop a simple language. We will aim to get: a parser for the language an editor for IntelliJ. The editor should have syntax highlighting, validation and auto-completion We would also get for free an editor for Eclipse and web editor, but please contain your excitement, we […]