[antlr-interest] lexer state and SMILES strings
Andrew Dalke
dalke at dalkescientific.com
Wed Nov 7 13:21:46 PST 2007
On Nov 7, 2007, at 7:05 PM, Austin Hastings wrote:
> I'm not loving the language, but I guess you can't change it. :(
No I can't. Though I'm rather fond of it. It's a very
malleable notation and has been around for about 20 years.
I can definitely point to worse ;)
> My first recommendation would be to use antlr2 -- antlr3 wants to
> be able to support all that stuff, but can't at the moment.
Ahh, didn't know that. Figured I'ld go for the latest and greatest.
> Next: go ahead and use the parser as a lexer,
> and then use a tree parser to handle the output.
> Don't get hung up on the names, just work with what works.
> For parsing the insides of square brackets, have a look at
> the book's section on emitting multiple tokens.
Ahh, hmm. Yeah, that part of the language is simple and I can
drop in code from other lexers, like re2c, in that section.
I think. Error reporting/handling won't be nice, but I don't
need that for now.
Thanks!
Andrew
dalke at dalkescientific.com
More information about the antlr-interest
mailing list