• Using ANTLRv3 with C/C++

    Introduction

    Recently I had to build a parser and lexer as part of a compilers group project in college. Out group had read around a bit, and decided we would use ANTLR for our project. We also wanted to write our compiler in C++. However, although the documentation for using ANTLR with C was fairly decent, concrete examples of using ANTLR with C or C++ are few and far between. Hopefully this short guide will help you do what we found very difficult - taking the first steps towards creating a powerful lexer and parser using ANTLR in C++.

    A few notes before we get into the actual code:

    • This example will use ANTLRv3.2. Although this is not the latest version, it works very well with the C target and tools like ANTLRWorks and the ANTLR Eclipse plugin. Some functions and keywords...

    Tags: antlr3  c++  antlrv3.2 

  • Hello!

    Hey, I'm Owen and this is my blog.

    I'm not planning on posting too regularly, but whenever I come up with anything that I think will interest people or that I spontaneously feel like sharing with the world then I'll be sure to put it on here.

    If you want me to blog on anything that you would find interesting to read, then drop me a line on owen [at] odavi [dot] es, or message me on twitter or facebook (which can be reached at the top of any page on the blog).

    Tags: introduction  contact