Parrot Compiler Tools Running Your Programming Language on Parrot #11

Define a grammar - "abc example"

grammar ABC::Grammar;

token TOP { <statement> }

rule statement { <term> <addop> <term> }

token term { \d+ }

token addop { '+' | '-' }
continued...
Copyright © 2007 chromatic and Patrick Michaud