in reply to Re^5: Cannot get Marpa::R2 to prioritise one rule over another
in thread Cannot get Marpa::R2 to prioritise one rule over another

This is Perl. Hack around!
<ipv4> ::= NUMBER ('.') NUMBER ('.') NUMBER ('.') NUMBER act +ion => joindot <hostname> ::= NAMECH+ separator => DOT act +ion => joindot <hostaddr4> ::= <ipv4> act +ion => add_ip | <hostname> act +ion => add_host ... # There should be a semicolon, not a comma. # | # v sub joindot { shift; join '.', @_ } sub AUTOLOAD { die 'Invalid action' unless $::AUTOLOAD =~ /^add_(ip|host)$/; {type => $1, $1 => $_[1]} }

map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]