[antlr-interest] Buglet in literal escaping
Jim Idle
jimi at temporal-wave.com
Thu Feb 12 08:35:09 PST 2009
C. Scott Ananian wrote:
> Using '\\"' as a literal in an ANTLR grammar causes ANTLRv3.1.1 to emit:
> match("\\"")
> which is an unterminated string constant. Oops!
>
>
This catches us all at some point I think. The junit test wasn't quite
right (or maybe it was and I discovered that the codegen was not quite
right), but anyway, you will be pleased to know that I fixed this some
time ago in the current development source. So you could use the latest
snapshot from Hudson.
Please don't forget to say which target your using. I am assuming Java
here of course.
Jim
PS, I am also assuming that you were trying to match '\' followed by '"'
and don't have your spec wrong ;-)
More information about the antlr-interest
mailing list