[antlr-interest] A proposal for keywords
Kay Roepke
kroepke at dolphin-services.de
Wed May 24 20:46:05 PDT 2006
On 25. May 2006, at 1:00 Uhr, shmuel siegel wrote:
> Are you saying that you recommend creating my own AST class rather
> than use "!" in a lexer rule? Do you believe that the following
> rule is bad form?
>
> STRING: '"'! ( ESCAPE | ~('"'|'\\') )* '"'! ;
I wouldn't say that this is bad practice. Indeed I submitted a patch
to Ter middle of February to make it working again in v3.
Altough that it is currently always copying the text, we could
probably optimize for the case of leading/trailing bang modifiers.
Incidentally, Ter and me were talking about this very thing a week
ago or so, so I think it will be in an upcoming release, in the depot
soon.
-k
More information about the antlr-interest
mailing list