Parse::Token::Lite::Rule - Rule class
version 0.200
A name of the rule object. It is called also as 'type' or 'tag'.
A regexp to match on text for extract token.
A callback function for beging executed after re matching.
sub{ my ($parser, $token) = @_; ... return @somevalues; }
The return values are passed by Parse::Token::Lite::nextToken(), after token object.
Describe an array reference of chanined actions for changing a state of a parser. Actions are invoked when the rule which contains them is matched.
An action begins '+' or '-'. '+' means start(). '-' means end().
{ state=>['+INTAG'], ...} # start INTAG; push() { state=>['-INTAG'], ...} # end INTAG; pop() { state=>['+PROP','+PROP_NAME'], ...} # start PROP, start PROP_NAME; push()->push() { state=>['-INTAG','+CONTENT'], ...} # end INTAG, start CONTENT; pop()->push()
khs <sng2nara@gmail.com>
This software is copyright (c) 2013 by khs.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Parse::Token::Lite, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Parse::Token::Lite
CPAN shell
perl -MCPAN -e shell install Parse::Token::Lite
For more information on module installation, please visit the detailed CPAN module installation guide.