[antlr-interest] Is it possible to treat a non-literal like a literal?
    weitzman_d 
    weitzman_d at yahoo.com
       
    Sat Sep 28 15:39:38 PDT 2002
    
    
  
I'm still working on that IMAP nonsense.
Basically my problem is parsing something like this:
001 UID FETCH 1:* (BLAH UID BLAH)
The first appearnces of 'UID' is a command, the second is a string.  
The way I've been doing things so far, 'UID' is a literal (as are all 
commands).  It looks like I need to do something else, because I want 
any appearence of a command name after the actual command name to be 
treated as a string.
I suppose I could replace every reference to UID and other commands 
in the 
parser with some sort of ugly lookahead that verifies the text 
says 'UID' and than parse it as a string instead of a literal (the 
command names 
just get discarded anyway).
That sounds pretty ugly, though.  Is there another way?
Thanks.
 
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 
    
    
More information about the antlr-interest
mailing list