[antlr-interest] Migrating a PCCTS grammar to ANTRL 3.0
Loring Craymer
lgcraymer at yahoo.com
Fri Mar 7 22:15:53 PST 2008
dlg lexers are very different from ANTLR 2 or ANTLR 3 lexers (IIRC, dlg does LR recognition). Lexer states (lexclasses) are on the "TO DO" list for ANTLR 3, but I doubt that they will appear anytime soon.
Your best bet is to find some similar lexing problem that has been solved in ANTLR 3 and adapting that grammar for your specific problem (if that is possible). This is one of those cases where direct translation is not likely to be as easy as developing a lexer from scratch.
--Loring
----- Original Message ----
> From: Charles McKnight <cmcknight at pheonic.com>
> To: antlr-interest at antlr.org
> Sent: Friday, March 7, 2008 1:44:02 PM
> Subject: Re: [antlr-interest] Migrating a PCCTS grammar to ANTRL 3.0
>
> Hi Andy,
>
> I'd certainly be interested in taking a look. I'm getting errors with
> the #lexclass directive which I believe was dropped at some point from
> ANTLR (although I haven't found any references to support why/etc.). I
> haven't worked with ANTLR 3.0 very much (yet), so it's like breaking new
> ground (and I'm looking for a Rosetta Stone). :-)
>
> Regards,
>
> Chuck
>
> Andy Tripp wrote:
> > Charles McKnight wrote:
> >> I've got an old grammar written for PCCTS and I'm attempting to
> >> migrate it to ANTLR 3.0 with as little additional rework as possible.
> >> Are there any tips/references/etc. about doing this?
> >>
> >> Thanks in advance.
> >>
> > I have a very basic tool I wrote in ANTLR3 that converts a JavaCC
> > grammar to ANTLR3, if that helps.
> > If your grammar is big (at least several thousand lines), you might
> > want to adapt this tool to convert PCCTS to
> > ANTLR3, to help you avoid a lot of gruntwork up front.
> >
> > Even with this tool, there's still a lot that needs to be done manually.
> > If you're interested, please post to the antlr mailing list, as I'm
> > filtering out any direct mail to this address.
> >
> > Andy
>
____________________________________________________________________________________
Looking for last minute shopping deals?
Find them fast with Yahoo! Search. http://tools.search.yahoo.com/newsearch/category.php?category=shopping
More information about the antlr-interest
mailing list