GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
COMPILE_P6GRAMMAR(1) User Contributed Perl Documentation COMPILE_P6GRAMMAR(1)

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

    $ util/compile_p6grammar.pl examples/adder.grammar > Adder.pm
    $ perl -MAdder -e 'print Adder->add("3 + 23")->(), "\n"'
    $ cat examples/adder.grammar
      grammar Adder;

      token add {
          (\d+) <?ws>? '+' <?ws>? (\d+) { return $/[0] + $/[1] }
      }
    $

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

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

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

The Perl 6 Rules Spec: <http://dev.perl.org/perl6/doc/design/syn/S05.html>

Copyright 2006, 2007 by Nathan Gray and Agent Zhang (<agentzh@yahoo.cn>).

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>

"A graphical tracer for Perl 6 regexes based on PCR" <http://pugs.blogs.com/pugs/2007/10/a-graphical-tra.html>.

Pugs::Compiler::Grammar, Pugs::Compiler::Rule, Pugs::Compiler::Regex, <http://perlcabal.org/syn/S05.html>.

2008-07-29 perl v5.32.1

Search for    or go to Top of page |  Section 1 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.