Perl 6 Compiler Perl 6 Compiler Status and the Parrot Compiler Toolkit #25

Terms (top-down)

At the lowest level of expressions, we have terms like constants, variable, subroutines, etc.

These are easiest to specify using a regex syntax.

The operator precedence parser identifies a term token:

proto 'term:' is precedence('22=')
    is parsed(&term)
    is pastrule('past_term') { ... }

The "is parsed" trait says to call the &term regex to parse the terms, and the "is pastrule" trait indicates the PAST rule to use for transforming the term (described later).

Copyright © 2006 Patrick Michaud