| parrotcode: base grammar with useful rules | |
| Contents | Compilers | 

PCT::Grammar - base grammar with useful rules

    grammar MyGrammar is PCT::Grammar;
    rule abc { [ word | <panic: word not found> ] }
    rule quote {
        [ \' <string_literal: '> \'
        | \" <string_literal: "> \"
        ]
    }

This file implements PCT::Grammar, which is a basic grammar object with a few useful methods for parsing thrown in.

<?after \w><?before \w> except it's much quicker. In particular, <!ww> can be used by :sigspace rules to enforce whitespace between lexical words.
|  |   |