[antlr-interest] lexing expression ('a'..'z')+ not matching single character input
Jim Idle
jimi at intersystems.com
Wed Dec 13 08:54:14 PST 2006
I think that your input text holds the clue here probably. Your CR lexer rule will return a CR token if the end of line is: '\r' '\n' and will skip it if it is just '\n'. If you are running your test on Windows, then your substituent rule will fail immediately if your input text starts with one or more blank lines.
What is the input and what error (if any) are you getting when trying to run the parser?
Jim
-----Original Message-----
> ~~~
> The offending parser rule is as following:
>
> substituent
>
> : IDENTIFIER
>
> (HYPHEN IDENTIFIER)*
>
> ;
>
>
> CR
>
> : ( '\r' '\n' )
This will return token CR...
>
> | '\n' { newline();
> $setType( Token.SKIP ); }
This will skip UNIX style end of line
>
> ;
>
--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.432 / Virus Database: 268.15.18/584 - Release Date: 12/12/2006 11:17 PM
More information about the antlr-interest
mailing list