This option specifies the GraphViz2 object to use. This allows you to configure it as desired.

The default is GraphViz2 -> new. The default attributes are the same as in the synopsis, above, except for the graph label of course.

This key is optional.

Methods

create(stt => $state_transition_table)

Creates the graph, which is accessible via the graph() method, or via the graph object you passed to new().

Returns $self for method chaining.

$state_transition_table is a list of arrayrefs, each with 3 elements.

That is, it is the contents of the arrayref 'transitions', which is one of the keys in the parameter list to Set::FA::Element's new().

A quick summary of each element of this list, where each element is an arrayref with 3 elements:

o [0] A state name

o [1] A regexp

o [2] Another state name (which may be the same as the first)

The DFA in Set::FA::Element tests the 'current' state against the state name ([0]), and for each state name which matches, tests the regexp ([1]) against the next character in the input stream. The first regexp to match causes the DFA to transition to the state named in the 3rd element of the arrayref ([2]).

See t/sample.stt.1.dat for an example.

graph()

Returns the graph object, either the one supplied to new() or the one created during the call to new().

Author

Copyright

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