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

Statement-level rules (top-down)

token program {
    ^ <statement_list> <?ws> [ $ | <?syntax_error> ]
}

token statement_list {
    <statement> [ <?statement_end> <statement> ]* <?statement_end>?
}

token statement {
    | <statement_control>
    | <block>
    | <use_statement>
    | <expression:  ;> <statement_modifier>?
}

token statement_end {
    | [ <?ws> ; ]+
    | <after \}> :: \h* [ \#\N* ]? \n
}
Copyright © 2006 Patrick Michaud