Learning ANTLR – Language Implementation Patterns

The first thing I learned about ANTLR: the best place to start is with Terence Parr’s books.

I ordered them online last week, and they finally came in the mail on Monday. I was in bed when there was a knock at the door – I knew it was the mail man with my ANTLR books. I couldn’t kick my blankets off fast enough.

I said I would start with Parr’s second book in my Initial Project Plan. One of the problems I listed in my project plan is my learning style. I planned to only read the chapters of the book I need. So here’s the problem:

The book lists 4 language application categories:

  1. Readers – builds a data struct from input streams
  2. Generators – walks an internal data struct & emits output
  3. Translators – a combined reader & generator
  4. Interpreters – reads, decodes, executes instructions

What I need to write is a translator(#3). Which means I need to write a generator(#2), which won’t work without the internal data structure created by the reader(#1). Since I have no prior language application experience, I’ll be reading most of this book – starting at the front and going from there.

When I started with the front of all fronts – the Preface – I was still looking for the ANTLR community. Where are they besides the mailing lists and their wiki? Turns out this book has a little forum. Only 12 topics and 32 posts, but the last post was written 10 hours ago and some of those topics have 400, 600, 900 + views. Good to know it’s alive.

The preface also mentioned ANTLR’s support page. Which I’ve visited before, but I must have missed almost EVERYTHING they had written on there. It’s like finding gold:

I’ll be back after I read a few chapters.
Toodle-loo for now!

Advertisement

One thought on “Learning ANTLR – Language Implementation Patterns

  1. [...] plan is to locate and utilize tutorials. I’ve learned in the past that reading is nice, but actually working with the stuff (aka. just jumping right in) is a lot more [...]

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.