1COMPILE_P6GRAMMAR(1)  User Contributed Perl Documentation COMPILE_P6GRAMMAR(1)
2
3
4

NAME

6       compile_p6grammar.pl - Compile Perl 6 Grammars to Perl 5 Modules
7

SYNOPSIS

9           $ util/compile_p6grammar.pl examples/adder.grammar > Adder.pm
10           $ perl -MAdder -e 'print Adder->add("3 + 23")->(), "\n"'
11           $ cat examples/adder.grammar
12             grammar Adder;
13
14             token add {
15                 (\d+) <?ws>? '+' <?ws>? (\d+) { return $/[0] + $/[1] }
16             }
17           $
18

OPTIONS

20           -D      Specify the safe mode in which no action blocks are allowed
21                   in the grammar spec.
22           -T      Specify the tracing mode in which the parser generated will
23                   emit tracing info to stdout.
24

DESCRIPTION

26       Used to convert grammars in Perl 6 syntax into Perl 5 modules.
27

AUTHORS

29       The Pugs Team <perl6-compiler@perl.org>.
30

SEE ALSO

32       The Perl 6 Rules Spec:
33       <http://dev.perl.org/perl6/doc/design/syn/S05.html>
34
36       Copyright 2006, 2007 by Nathan Gray and Agent Zhang
37       (<agentzh@yahoo.cn>).
38
39       This program is free software; you can redistribute it and/or modify it
40       under the same terms as Perl itself.
41
42       See <http://www.perl.com/perl/misc/Artistic.html>
43

SEE ALSO

45       "A graphical tracer for Perl 6 regexes based on PCR"
46       http://pugs.blogs.com/pugs/2007/10/a-graphical-tra.html
47       <http://pugs.blogs.com/pugs/2007/10/a-graphical-tra.html>.
48
49       Pugs::Compiler::Grammar, Pugs::Compiler::Rule, Pugs::Compiler::Regex,
50       <http://perlcabal.org/syn/S05.html>.
51
52
53
54perl v5.12.1                      2008-07-29              COMPILE_P6GRAMMAR(1)
Impressum