[antlr-interest] paraphrase without lexer

Silvain Piree s.piree at enneya.com
Mon Apr 15 08:05:25 PDT 2002


Ric,

extending Antlr would probably be the best solution (and not that difficult
to implement, although we'd have to agree on the syntax), but ... the
process
of getting changes into the Antlr codebase is very unclear to me, so I
usually create workarounds outside Antlr.

As such, I really like your solution of overriding reportError. Thank you
for that suggestion!

Silvain

> I see 2 or 3 options. Override reportError and do search and replace on
> error strings. Generate your parser and use some script to search and
> replace in the parsers tokenNames section.
>
> Third option (I'm currently making an educated guess after having looked
at
> the code (cppcodegen)) hack antlr a little to make it settable from the
> parser. I suspect that it can be done in under 30 lines of code.



 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 



More information about the antlr-interest mailing list