%left '+' %left '*' %defaultaction { my $self = shift; my $class = $self->YYPrefix; $class .= $self->YYName; $class->action(@_); } %% exp: %name NUM NUM | %name PLUS exp '+' exp | %name TIMES exp '*' exp | '(' exp ')' { $_[2] } ; %% use base qw{CommonTail}; =head1 SYNOPSIS The default semantic action in this translation scheme is to delegate the execution in methods with names C, C, etc. where C is set via the C parameter and C, C stands for the name of the rhs. See files C, C =cut