%lexer {
m{\G([ \t\n]*(\#.*)?\s*)}gc and $self->tokenline($1 =~ tr/\n//);
m{\G([0-9]+(?:\.[0-9]+)?)}gc and return ('NUM', $1);
m{\G([A-Za-z][A-Za-z0-9_]*)}gc and return ('VAR', $1);
m{\G(.)}gc and return ($1, $1);
}
%%
def: param_spec return_spec ','
;
param_spec:
type
| name_list ':' type
;
return_spec:
type
| name ':' type
;
type: VAR
;
name: VAR
;
name_list:
name
| name ',' name_list
;
%%
=head1 SYNOPSIS
Compile it with:
eyapp -NC reducereduceconflict.eyp
See the C<.output> file. Run it with this options:
./reducereduceconflict.pm -d -c 'a,b:c d:e,'
=cut