user855
user855

Reputation: 19918

An interesting project to implement to learn Antlr

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!

Upvotes: 6

Views: 440

Answers (4)

Alon Gubkin
Alon Gubkin

Reputation: 57119

Write a cron utility that is configurable with syntax such as:

every 12 hours
every 5 minutes from 10:00 to 14:00
2nd,third mon,wed,thu of march 17:00
every monday 09:00
1st monday of sep,oct,nov 17:00
every day 00:00

Upvotes: 1

etheros
etheros

Reputation: 2783

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.

Upvotes: 0

Will Hartung
Will Hartung

Reputation: 118593

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.

Upvotes: 2

duffymo
duffymo

Reputation: 308743

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

Upvotes: 1

Related Questions