MarpaX::Repa::Actions - set of actions to begin with
Some actions to start with that just present rules as various perl structures. Just to help you concentrate on grammar at the beginning.
Marpa at the moment doesn't use inheritance to lookup actions, so instead of subclassing this module exports all actions and new method, but only if '-base' is passed:
package MyActions; use MarpaX::Repa::Actions '-base';
Just returns a new hash based instance of the class. See 'action_object' in Marpa::R2::Grammar.
Returns:
{ rule => 'rule name', value => $child || \@children }
{ rule => 'rule name', value => join '', @children }
join '', @children
\@children
$child || \@children
Returns (pseudo code):
[ map @$_||%$_||$_, grep defined, @_ ]
undef
To install MarpaX::Repa, copy and paste the appropriate command in to your terminal.
cpanm
cpanm MarpaX::Repa
CPAN shell
perl -MCPAN -e shell install MarpaX::Repa
For more information on module installation, please visit the detailed CPAN module installation guide.