Sophie

Sophie

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

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

%left   '+'
%left   '*'

%token NUM = /([0-9]+(?:\.[0-9]+)?)/

%defaultaction { 
  my $self = shift;

  my $action = $self->YYName;
  
  $self->$action(@_);
}

%%
exp:        %name NUM
              NUM 
        |   %name PLUS
              exp '+' exp         
        |   %name TIMES
              exp '*' exp         
        |   '(' exp ')'
              { $_[2] }
;

%%

=head1 SYNOPSIS

Both C<icalcu.pl> and C<ipostf.pl> inherit and recycle
this grammar 

Do:

       eyapp NoacInh
       icalcu.pl
       ipostf.pl
      
=cut