I introduced in my "Mouse" two "a until b" expressions: a*+b and a++b, meaning (!ba)*b and (!ba) (!ba)*b. They have an efficient implementation with Java "while" and are useful, among other things, to skip a bad portion of input.
Regards
Roman

On 2017-05-28 23:02, a3m...@uwaterloo.ca wrote:
With regard to the "skip to" expression, if it's helpful, I got good performance results implementing x -> t as a fresh non-terminal (like repetition):

N := t / x N

It uses the ordered choice property of PEGs to avoid double-testing t as in (!t x)* t

Regards,
Aaron Moss

_______________________________________________
PEG mailing list
PEG@lists.csail.mit.edu
https://lists.csail.mit.edu/mailman/listinfo/peg

Reply via email to