[antlr-interest] Re: Tokens and context
    lgcraymer 
    lgc at mail1.jpl.nasa.gov
       
    Mon Jul 15 17:17:37 PDT 2002
    
    
  
One minor addendum to Monty's comments:  also look at the 
"qualifiedID" rule in antlr.g.
The one problem with the "qualifiedID" type of solution is that it 
ignores whitespace (a.b.c.d and a . b.c.d are not the same).  For your 
problem, you may prefer to have a "STAR_IDENTIFIER" in addition to 
STAR and IDENTIFIER:  "*" followed by whitespace is a "STAR", while 
"*"(<identifier>)? or <identifier>("*"(<identifier2>)?)+ is a 
STAR_IDENTIFIER.  ANTLR lexers can make the distinction, and probably 
only two lexer rules are affected.
--Loring
 
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 
    
    
More information about the antlr-interest
mailing list