[antlr-interest] nongreedy parsing, how Can I?

enriquebris at cimex.com.cu enriquebris at cimex.com.cu
Tue Mar 14 06:37:33 PST 2006


I´m trying to write a parser rule like this 

 

rule : (OTAG) (.)?{some code...} (CTAG)

 

The problem is that the (.)? eats all characters including CTAG (>). I try with (options greedy=false) but with no changes. What can I do to solve this?

 

 

in the lexer :

 

OTAG : '<';

CTAG : '>';

 

 

Enrique

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20060314/9af18984/attachment.html


More information about the antlr-interest mailing list