Flávio Soibelmann Glock > Pugs-Compiler-Rule-0.37 > Pugs::Emitter::Grammar::Perl5

Download:
Pugs-Compiler-Rule-0.37.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  2
Open  0
Stalled  1
View/Report Bugs
Module Version: 0.28   Source  

NAME ^

Pugs::Emitter::Grammar::Perl5 - Perl 5 emitter for grammar ASTs

SYNOPSIS ^

    use Pugs::Compiler::Grammar;
    use Pugs::Emitter::Grammar::Perl5;

    my $ast = Pugs::Grammar::Rule->grammar(q{

        grammar MyLang;

        token def {
            <type> <?ws> <var_list> <?ws>? ';'
        }

        token type { int | float | double | char }

        token var_list { <ident> <?ws>? [ ',' <?ws>? <ident> ]* }

    })->();
    my $perl5 = Pugs::Emitter::Grammar::Perl5::emit($ast);
    print $perl5;

FUNCTIONS ^

$perl5 = Pugs::Emitter::Grammar::Perl5::emit($ast)

Generate Perl 5 source code from the grammar AST returned by Pugs::Grammar::Rule's grammar parser.

AUTHOR ^

The Pugs contributors <perl6-compiler@perl.org>.

COPYRIGHT ^

Copyright (c) 2007 by Agent Zhang (<agentzh@agentzh.org>) and others.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

See http://www.perl.com/perl/misc/Artistic.html

SEE ALSO ^

Pugs::Compiler::Grammar, compile_p6grammar.pl.

syntax highlighting: