[antlr-interest] Same symbols, but two parsed terms

Сергій Карпенко bergschloss at ukr.net
Fri Aug 8 07:10:55 PDT 2008


Hi, all.    
    
For example, we have an expression  "--".   It must be parsed as NOT '-'-symbol.    
    
And we have a gramar:    
    
  expr : NOT? WORD+;    
  NOT : '-';    
  WORD: '-'+;    
    
input string is "--"    
    
result is "--" term.    
    
Warious combinations of parenthesis didnt help.    
    
Thanks.    
    
    
  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20080808/f8c93770/attachment.html 


More information about the antlr-interest mailing list