[antlr-interest] Spaces in names
Oti
ohumbel at gmail.com
Thu Aug 16 02:07:16 PDT 2007
Hi,
Vasek recently posted (in the thread 'How to stop lexer reporting
errors to standard output?') an example of an ASCIIStringLiteral which
might get you started:
fragment
StringRun :
(~ '\'' )+
;
ASCIIStringLiteral :
'\'' { text = ""; }
( s = StringRun { text = $s.text; } )? '\''
( '\'' {
text = text + "\'";
} ( s = StringRun { text = text + $s.text; } )? '\''
)*
;
best wishes,
Oti.
On 8/16/07, Dave Raskin <dave.raskin at rimage.com> wrote:
> I am back on this and have spent a day trying different things, looking
> at the sample that you suggested, but no luck with recognizing the ' '
> as part of the string.
>
> I made all changes in the lexer.
> I got rid of WS lexer rule.
>
> When I pass in an expression like this:
>
> daver='some thing'
>
> I get an error back:
More information about the antlr-interest
mailing list