[antlr-interest] valid grammar does not compile
Bart Kiers
bkiers at gmail.com
Thu Nov 17 01:22:10 PST 2011
On Thu, Nov 17, 2011 at 10:14 AM, D. Frej <dieter_frej at gmx.net> wrote:
> and still: the compilation error stays even if I do not quote the
> question mark
>
Ah, hold on, you're using the `..` (range) operator inside a parser rule
(horef). Either create a lexer rule matching '?' 'a'..'z':
Horef
: '?' 'a'..'z'
;
, or move 'a'..'z' to a lexer rule:
horef
: '?' Letter
;
Letter
: 'a'..'z'
;
But still, the question mark should not be escaped.
Regards,
Bart.
More information about the antlr-interest
mailing list