How to Use ANTLR on .NET, Part I

This will be a series of several articles, as ANTLR 3 is really a complex system. Therefore, please be patience.

ANTLR 3 will be the focus of this series, as ANTLR 2 is too old.

Start from ANTLR on Java

ANTLR is an open source parser/compiler generator. By providing grammar files (.g) to it as input, it can output compiler source code in your preference (Java, C#, and so on). Its homepage is at

You might take a look at the sample grammar files here, Don’t panic if you find the syntax hard to learn, as bit by bit you will get familiar with it.

OK. Though this series focus on how to use ANTLR 3 on .NET, please make sure you get familiar with how to use it on Java first (ANTLR is built on Java primarily). The best guide I found is the video clips here, The clips are hosted on Vimeo.

The rest of the series will assume you have watched the above clips and already familiar with ANTLR on Java. In part II I am going to introduce how to set up the environment.

Stay tuned.

© Lex Li. All rights reserved. The code included is licensed under CC BY 4.0 unless otherwise noted.

© - Lex Li. All rights reserved.

Using the Chirpy theme for Jekyll.

Last updated on May 01, 2024