There are two ways to specify rules:
1. Hashes (key/value pairs)
{ lhs => 'Term', rhs => [qw/Term Add Term/], action => 'do_add' }
2. Arrays with short form syntax.
https://metacpan.org/module/Marpa::R2::Grammar#Rule-descriptors-as-arrays
[ 'Term', [qw/Term Add Term/], 'do_add' ]
So that would be:
[ lhs, rhs, action ]
where both rhs and action are optional. The rhs part should be an
array ref. You can't include more key/value type options in this
syntax. If you want that, you have to use the first method.
--
Peter Stuifzand |
peterstuifzand.nl | @pstuifzand