Graph::Easy::Marpa::Lexer::DFA - A Set::FA::Element-based lexer for Graph::Easy
See "Data and Script Interaction" in Graph::Easy::Marpa.
Graph::Easy::Marpa::Lexer::DFA provides a Set:FA::Element-based lexer for Graph::Easy-style graph definitions.
Install Graph::Easy::Marpa as you would for any Perl module:
Perl
Run:
cpanm Graph::Easy::Marpa
or run:
sudo cpan Graph::Easy::Marpa
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
new() is called as my($dfa) = Graph::Easy::Marpa::Lexer::DFA -> new(k1 => v1, k2 => v2, ...).
new()
my($dfa) = Graph::Easy::Marpa::Lexer::DFA -> new(k1 => v1, k2 => v2, ...)
It returns a new object of type Graph::Easy::Marpa::Lexer::DFA.
Graph::Easy::Marpa::Lexer::DFA
Key-value pairs accepted in the parameter list (see corresponding methods for details [e.g. graph_text()]):
Specify a string for the graph definition.
Default: ''.
Specify a logger object to use.
Get or set the value which determines whether or not to report the parsed state transition table (STT).
Default: 0.
Specify the state transition table.
There is no default. The code dies if a value is not supplied.
Specify the name of the start state.
Specify the verbosity level when calling Set::FA::Element.
Dedault: 0.
Returns a object of type Set::Array, which is an arrayref of items output by the state machine.
These items are not the same as the arrayref of items returned by the items() method in Graph::Easy::Marpa::Parser, but they are the same as in Graph::Easy::Marpa::Lexer.
Each element is a hashref with these keys:
The name of the thing (attribute, class, edge, node or subclass) found.
The type of the name.
The value of $string is one of: attribute, class, class_attribute, edge, group, node, pop_group or subclass.
The code does not distinguish between attributes for a class, subclass, edge or node.
The value pop_group is for the ')' token at the end of the definition of a group.
The value, if the type is attribute or class_attribute.
Calls $self -> logger -> $level($s).
Here, the [] indicate an optional parameter.
Get or set the logger object.
To disable logging, just set logger to the empty string.
Get or set the value used by the logger object.
This option is only used if Graph::Easy::Marpa:::Lexer or Graph::Easy::Marpa::Parser create an object of type Log::Handler. See Log::Handler::Levels.
Runs the state machine.
Afterwards, you call "items()" to retrieve the arrayref of results.
Get or set the verbosity level when calling Set::FA::Element.
The file CHANGES was converted into Changelog.ini by Module::Metadata::Changes.
Version numbers < 1.00 represent development versions. From 1.00 up, they are production versions.
Email the author, or log a bug on RT:
https://rt.cpan.org/Public/Dist/Display.html?Name=Graph::Easy::Marpa.
Graph::Easy::Marpa was written by Ron Savage <ron@savage.net.au> in 2011.
Home page: http://savage.net.au/index.html.
Australian copyright (c) 2011, 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
To install Graph::Easy::Marpa, copy and paste the appropriate command in to your terminal.
cpanm
CPAN shell
perl -MCPAN -e shell install Graph::Easy::Marpa
For more information on module installation, please visit the detailed CPAN module installation guide.