Actually I found solution:
action start { System.out.println("start. fpc = " + fpc); }
action end { System.out.println("end. fpc = " + fpc); }
content = (any+ -- '||') >start ;
main := content . '||' @end . '\n'?;
But the problem is my original rules are more complex:
content = '||' . (any+ -- '||') >start ;
main := content+ . '||' @end . '\n'?;
For input: "||abc||efg||" they work fine:
start. fpc = 2
end. fpc = 6
start. fpc = 7
end. fpc = 11
start. fpc = 12
Consumed all: true
But for input: "||abc|||" I am getting unxpected calls:
start. fpc = 2
end. fpc = 6
start. fpc = 7
end. fpc = 7
start. fpc = 8
Consumed all: true
_______________________________________________
ragel-users mailing list
[email protected]
http://www.complang.org/mailman/listinfo/ragel-users