[antlr-interest] Help with a production rule
    alexworden 
    aworden at pacbell.net
       
    Fri Feb  8 16:16:25 PST 2002
    
    
  
Hi,
Can anyone help me. I'm trying to write an ANTLR rule that will match 
something like
<x1:y2> blah blah blah </x2:y2>
where x1==x2 and y1==y2 but I have not prior knowledge what these 
tokens might be. e.g.
<foo:bar>
 some other stuff
</foo:bar>
I've tried something like:
  : "<" x:WORD ":" y:WORD ">" MATCH_ALL "<" x.getText() ":" y.getText
() ">"
but ANTLR doesn't like it. Does anyone know how to do this please?
Thanks,
Alex
 
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 
    
    
More information about the antlr-interest
mailing list