Hi folks:

Could someone clue me in to the zen of whitespace (or where this is discussed 
in The Books or online)?  By that I mean as follows: 

I see that grammars generally have a lexer rule that specifies the pattern for 
whitespace, but what's the correspondence between that and what ANTLR does with 
lexer rules, where the WHITESPACE token is generally not used.

I'm assuming that ANTLR makes assumptions that whitespace either may or must 
appear between tokens that appear in lexer rules, right?  Either that or it's 
picking up something from lexer rules that's subtler than I've noticed.

To pick a simple example, suppose you're defining what a function call should 
look like:

functionCall
    : Identifier LParen args RParen -> ....

... what variations does one need in order to assert that whitespace is, or is 
not, permitted or required between Identifier and LParen?

Thanks!

Graham

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 [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/il-antlr-interest?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to