[antlr-interest] basic question
    gidadoifiok 
    gidadoifiok at yahoo.com
       
    Wed Jan 23 09:40:01 PST 2002
    
    
  
I'm very new to antlr (and lexing/parsing).  I wanted
to define a rule for a quote-string.
I tried:
    STRING_LITERAL_SINGLE_QUOTE
	:	'\''! ( ~'\'' )* '\''!
	;
However, I kept getting errors that it did not like the
'.' in the example below:
   'good.stuff'
So I changed the rule to:
    STRING_LITERAL_SINGLE_QUOTE
	:	'\''! ( '.' | ~'\'' )* '\''!
	;
Now it works fine.  Perhaps ~'\' does not include '.'?
I'm trying to get a grasp on all the rules, any help
or pointers to doc is greatly appreciated.
Thanks,
Gidado
 
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 
    
    
More information about the antlr-interest
mailing list