NAME
Pugs::Runtime::Grammar
SYNOPSIS
my $grammar = Pugs::Runtime::Grammar->new('Foo');
$grammar->add_rule(bar => '((.).).');
# or
Foo->grammar->add_rule(bar => '((.).).');
my $match = Foo->bar->match( 'abc' );
if ($match) { # true
print $match; # "abc"
print $match->from; # 0
print $match->to; # 3
print $match->[0]; # "ab"
print $match->[0][0]; # "a"
}
DESCRIPTION
AUTHORS
The Pugs Team <perl6-compiler@perl.org>.
SEE ALSO
The Perl 6 Rules Spec: http://dev.perl.org/perl6/doc/design/syn/S05.html
COPYRIGHT
Copyright 2006 by Stevan Little and others.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.