At 21:31 8/07/2009, Bob Night wrote:
>Thanks! That solved my problem.
>
>But to be honest I still don't understand what causes the change 
>of behaviour.

Maybe you need to read the book :)  Or possibly just the wiki.

Lexer rules start with an uppercase letter.  Parser rules start 
with a lowercase letter.  Lexer rules turn characters into 
tokens.  Parser rules turn tokens into trees, or generate 
templated output, or carry out other actions.

The spaces were disappearing because they were turning into WS 
tokens (which were hidden), since to the parser, all lexer rules 
are equal.  By making a lexer rule that outputs a single token, it 
preserves everything in the quotes regardless of any other lexer 
rules.


List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe: 
http://www.antlr.org/mailman/options/antlr-interest/your-email-address

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"il-antlr-interest" group.
To post to this group, send email to il-antlr-interest@googlegroups.com
To unsubscribe from this group, send email to 
il-antlr-interest+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/il-antlr-interest?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to