calc example - grammar
grammar Calc::Grammar; token TOP { <statement> } rule statement { <term> <addop> <term> } token term { \d+ } token addop { '+' | '-' }
Place the above in src/pct/grammar.pg
'make'
Parrot | Parrot Compiler Toolkit | #31 |
grammar Calc::Grammar; token TOP { <statement> } rule statement { <term> <addop> <term> } token term { \d+ } token addop { '+' | '-' }
Place the above in src/pct/grammar.pg
'make'
Copyright © 2009 http://www.pmichaud.com/2009/pres/ |