Sophie

Sophie

distrib > Mageia > 4 > x86_64 > by-pkgid > ddfdf0b0f2e10c06cbb5bbb1f4ee8dd8 > files > 107

perl-Parse-Eyapp-1.182.0-3.mga4.x86_64.rpm

#!/usr/bin/perl -w
use strict;
use Parse::Eyapp::Node;

use Data::Dumper;
$Data::Dumper::Indent = 1;
$Data::Dumper::Purity = 1;

my $string = shift || 'ASSIGN(VAR(TERMINAL), TIMES(NUM(TERMINAL),NUM(TERMINAL)))  ';
my @t = Parse::Eyapp::Node->new(
           $string, 
           sub { my $i = 0; $_->{n} = $i++ for @_ }
        );

print "****************\n";
print Dumper(\@t);