[antlr-interest] Altering antlr tool

Johannes Luber JALuber at gmx.de
Mon May 19 09:26:42 PDT 2008


> Hi,
> 
> I've got a couple of ideas that I want to try out that would involve
> modifying the antlr grammar and altering what's generated.  What I was
> wondering is are there any resources that explain where to start with
> this,
> or do I basically just have to snoop around until I figure out how it
> works.

While I commend your spirit there is one big hindrance for doing modifications: ANTLR 3.x is still implemented in ANTLR 2.7.7. This version has some limitations which are causing grief for many newbies. I suppose that changing ANTLR 3.x means that any implementation change to get rid of the old version will break your changes, too. Maybe you are interested in assisting Ter in this task, as I don't know if ANTLR 3.2 will manage the jump or not. At least you'll know the internals like the insides of your pocket. ;)

Johannes
> 
> I basically want to add an extra bit to lexer token definitions and then
> generate some code based on that.  Also, I was thinking of modifying the
> semantic predicate syntax to add a "type" plus arguments to it (and once
> again generate code based on that).
> 
> Cheers,
> Adam

-- 
249 Spiele für nur 1 Preis. Die GMX Spieleflatrate schon ab 9,90 Euro.
Neu: Asterix bei den Olympischen Spielen: http://flat.games.gmx.de


More information about the antlr-interest mailing list