Action methods
We go from this...
grammar Calc::Grammar; regex integer { \d+ {{ print "found an integer " say match }} } regex addop { [ '+' | '-' ] {{ print "found an addop " say match }} }
Parrot | Perl6Grammar compiler and parsers | #16 |
We go from this...
grammar Calc::Grammar; regex integer { \d+ {{ print "found an integer " say match }} } regex addop { [ '+' | '-' ] {{ print "found an addop " say match }} }
Copyright © 2009 http://www.pmichaud.com/2009/pres/ |