[antlr-interest] Upgrading ANTLR (v2 -> v3)

Gavin Lambert antlr at mirality.co.nz
Tue Sep 2 14:02:00 PDT 2008


At 08:47 3/09/2008, Bryan Ewbank wrote:
>Is there any way to swag an estimate for v2 --> v3 conversion of 
>an existing ANTLR pipeline targetting C++ code?  I could just say 
>"two months", but that is usually wrong.

Depends how complicated it is :)

There's a conversion program that will do *most* of the v2->v3 
work, but it doesn't do everything.  So it still helps if you've 
had experience putting together a v3 grammar from scratch, or at 
the very least have read the Book, and so are familiar with the v3 
syntax and design.

Your target language code may also need to be changed.  There is 
no C++ runtime in v3, although you can use the C runtime -- 
naturally, there are some significant differences.  The driver 
code at the very least will need to be significantly altered; it's 
likely you'll need to make some changes to code within the 
grammars as well.

You also really ought to write a metric ton of unit tests for your 
current v2 grammar (assuming you don't already have them).  That 
will help you in determining when you've got the v3 grammar up to 
snuff.



More information about the antlr-interest mailing list