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

Still more operator traits

The "assoc" trait can be used to set associativity:

proto infix:= is assoc('right') is looser('infix:||') { ... }

proto infix:| is assoc('list') { ... }

The "nullterm" trait describes operators that allowed to be missing a final term:

proto infix:, is looser('infix:=')
              is assoc('list') 
              is nullterm { ... }

proto prefix:abs is nullterm { ... }

proto "circumfix:( )" is nullterm { ... }
Copyright © 2006 Patrick Michaud