Backtracking control -- tokens
regex TOP { <integer> <addop> <integer> {*} } regex integer { \d+: {*} } regex addop { [ '+' | '-' ] {*} }
For modern one-pass languages, non-backtracking regexes are very common
continued...Parrot | Perl6Grammar compiler and parsers | #24 |
regex TOP { <integer> <addop> <integer> {*} } regex integer { \d+: {*} } regex addop { [ '+' | '-' ] {*} }
For modern one-pass languages, non-backtracking regexes are very common
continued...
Copyright © 2009 http://www.pmichaud.com/2009/pres/ |