NAME
MarpaX::Demo::StringParser::Actions - Actions called from MarpaX::Demo::StringParser
Synopsis
End-users do not need to call the methods in this module.
Only Marpa::R2 does that, under certain conditions as specified in the grammar declared in MarpaX::Demo::StringParser.
Description
MarpaX::Demo::StringParser::Actions provides a namespace for action methods used by MarpaX::Demo::StringParser.
This module is a cut-down version of Graph::Easy::Marpa V 2.00's Actions.pm module.
The language parsed is a cut-down version of the DOT
language used by AT&T's dot
program. See http://graphviz.org.
Installation
Install MarpaX::Demo::StringParser as you would for any Perl
module:
Run:
cpanm MarpaX::Demo::StringParser
or run:
sudo cpan MarpaX::Demo::StringParser
or unpack the distro, and then either:
perl Build.PL
./Build
./Build test
sudo ./Build install
or:
perl Makefile.PL
make (or dmake or nmake)
make test
make install
Constructor and Initialization
End-users do not call the methods in the module.
Methods
edge($edge_name)
Returns a string being the name of the edge detected by Marpa::R2 in the input stream.
Pushes this edge onto a stack declared in MarpaX::Demo::StringParser.
The stack's elements are documented in "How is the parsed graph stored in RAM?" in MarpaX::Demo::StringParser.
graph($graph)
Returns the result of Marpa::R2's parse.
The result is a data structure of arrayrefs of arrayrefs nested very deeply, with the depth of nesting depending on which rules in the grammar were triggered for a given input.
Machine-Readable Change Log
The file Changes was converted into Changelog.ini by Module::Metadata::Changes.
Version Numbers
Version numbers < 1.00 represent development versions. From 1.00 up, they are production versions.
Support
Email the author, or log a bug on RT:
https://rt.cpan.org/Public/Dist/Display.html?Name=MarpaX::Demo::StringParser.
Author
MarpaX::Demo::StringParser was written by Ron Savage <ron@savage.net.au> in 2013.
Home page: http://savage.net.au/index.html.
Copyright
Australian copyright (c) 2013, Ron Savage.
All Programs of mine are 'OSI Certified Open Source Software';
you can redistribute them and/or modify them under the terms of
The Artistic License, a copy of which is available at:
http://www.opensource.org/licenses/index.html