This is a problem I come up against over and over again:
action start_text { printf("start_text") }
action end_text {printf("end_text")}
text = any**;
Text = text >start_text %end_text;
Element = Text;
main := Element*;
Essentially, the start_text and end_text actions get called for every
character. If I take the star operator off of Element, it works fine, but
if Element has a star operator, ragel is preferring to repeat the Element
over repeating the any** in 'text'.
Is there some way I am not aware of to get it to prefer the inner
repitition?
--
Alex Laslavic
Lead Engineer - Turner DMT
_______________________________________________
ragel-users mailing list
[email protected]
http://www.complang.org/mailman/listinfo/ragel-users