tags:

views:

80

answers:

3

Hi,

I am learning Antlr from the book 'The Definitive Antlr reference'. I am still in the beginning stages. I like to do hands on stuff, so I was thinking it would be a great learning experience to do a good sample project. I am looking for a decently sized project, not too big. But just big and complicated enough to help me learn Antlr well.

Your inputs will be greatly appreciated!

Thanks!

+1  A: 

Write yourself a grammar for a rules engine. Then write the Rete algorithm implementation to use them.

duffymo
if/then expressions needs a whole book? not so.
duffymo
Accidentally remove my previous comment, sorry. Anyway, true, it needn't be complicated.
Bart Kiers
+2  A: 

Write a CSS parser and macro system. Yea there are several of these already but that doesn't make the project less interesting to do, plus you can apply it much more quickly, you know if it's "right" or not.

For fun, port it to JS so you can load them on the fly in the web pages.

Will Hartung
ANTLR even has a JavaScript target, so porting isn't necessary: the generated parser- and lexer classes are already `.js` files!
Bart Kiers
A: 

I'm implementing my own programming language as an ANTLR learning exercise. I found it works well if working on a single project and watching it evolve complements your learning style.

My language project started off doing nothing useful at all, just playing about with lexer and parser syntax. Inputting variables and printing them back came next. As knowledge increases, one can build on this, adding further things like control structures etc.

etheros