Ingy döt Net > Pegex-0.21 > Pegex::Module

Download:
Pegex-0.21.tar.gz

Dependencies

Annotate this POD

Website

CPAN RT

Open  0
View/Report Bugs
Source  

SYNOPSIS ^

    package MyLanguage;
    use Pegex::Base;
    extends 'Pegex::Module';

    has grammar => 'MyLanguage::Grammar';
    has receiver => 'MyLanguage::AST';

    1;

DESCRIPTION ^

The module in the SYNOPSIS above is a complete language parsing module. It just inherits from Pegex::Module, and then overrides the grammar and receiver properties. Pegex::Module provides the parse() method.

syntax highlighting: