Backtracking control -- tokens
regex TOP { <integer> <addop> <integer> {*} } regex integer { \d+ {*} } regex addop { [ '+' | '-' ] {*} }
The use of \d+ can be very inefficient
continued...Parrot | Perl6Grammar compiler and parsers | #23 |
regex TOP { <integer> <addop> <integer> {*} } regex integer { \d+ {*} } regex addop { [ '+' | '-' ] {*} }
The use of \d+ can be very inefficient
continued...
Copyright © 2009 http://www.pmichaud.com/2009/pres/ |