Parrot/PGE, parsers Parsers, Perl 6 Rules, and the Parrot Grammar Engine #30

Calling other rules -- the "parsed" trait

The "parsed" trait allows an operator to specify that another subrule should be called to perform its parsing:

proto term: is tighter('infix:**') 
            is parsed(&term) { ... }

The "is parsed(&term)" trait says to call the <term> subrule in the grammar when a term is required.

token term { <variable> | <number> | ( <expression> )}
Copyright © 2006 Patrick Michaud