Actually I found solution:<div><div><span class="Apple-tab-span" style="white-space:pre"> </span>action start { System.out.println("start. fpc = " + fpc); }</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>action end { System.out.println("end. fpc = " + fpc); }</div>
<div><br></div><div><span class="Apple-tab-span" style="white-space:pre"> </span>content = (any+ -- '||') >start ;</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>main := content . '||' @end . '\n'?;</div>
</div><div><br></div><div>But the problem is my original rules are more complex:</div><div><div><span class="Apple-tab-span" style="white-space:pre"> </span>content = '||' . (any+ -- '||') >start ;</div>
<div><span class="Apple-tab-span" style="white-space:pre"> </span>main := content+ . '||' @end . '\n'?;</div></div><div><br></div><div>For input: "||abc||efg||" they work fine:</div><div><div>start. fpc = 2</div>
<div>end. fpc = 6</div><div>start. fpc = 7</div><div>end. fpc = 11</div><div>start. fpc = 12</div></div><div><meta http-equiv="content-type" content="text/html; charset=utf-8">Consumed all: true</div><div><br></div><div>But for input: "||abc|||" I am getting unxpected calls:</div>
<div><div>start. fpc = 2</div><div>end. fpc = 6</div><div>start. fpc = 7</div><div>end. fpc = 7</div><div>start. fpc = 8</div><div>Consumed all: true</div></div><meta http-equiv="content-type" content="text/html; charset=utf-8">