Subrule matches
regex TOP { <integer> <addop> <integer> {*} } regex integer { \d+ {*} } regex addop { [ '+' | '-' ] {*} } method TOP($/) { say("found an expression ", $/); }continued...
Parrot | Perl6Grammar compiler and parsers | #20 |
regex TOP { <integer> <addop> <integer> {*} } regex integer { \d+ {*} } regex addop { [ '+' | '-' ] {*} } method TOP($/) { say("found an expression ", $/); }continued...
Copyright © 2009 http://www.pmichaud.com/2009/pres/ |