State Transition Table for Graph::Easy::Marpa::Lexer

# State Transition Table for Graph::Easy::Marpa V 1.01

This is the STT for the dialect of Graph::Easy's graph description language recognized by Graph::Easy::Marpa V 1.01.

This table has been exported from an OpenOffice Calc spreadsheet as a CSV file, with the latter being incorporated into this HTML.

The lexer which reads the STT does not use the last 2 columns, Regexp and Interpretation.

The Regexp column is referred to in the spreadsheet by formulas, and the Interpretation column is just for the reader.

Clearly, this table does not quite cover all of the syntax supported by Graph::Easy.

Graph::Easy::Marpa::Lexer reads this STT, and outputs tokens in an intermediary language.

The STT is actually at the end of Lexer.pm, but options to new() allow you to override that source for the STT.

The lexer uses Set::FA::Element to actually process the graph definition.

Graph::Easy::Marpa::Parser reads lexed tokens and builds a data structure in memory representing the graph.

Lastly, the default rendering engine Graph::Easy::Marpa::Renderer::GraphViz2 uses this data structure to create input for GraphViz2.

Note: The regexp for attribute values simply means the real processing takes place in sub validate_attribute_value within Graph::Easy::Marpa::Lexer::DFA, and, specifically, attribute values can be quoted with either "..." or '...'. Such quotes are stripped.

Start | Accept | State | Event | Next | Entry | Exit | Regexp | Interpretation
Yes | . | global | (?:edge|global|graph|group|node)(?:\.[a-z]+)? | class | . | save_class_name | [a-z]+\s*: | Attribute name
. | . | . | (?:->|--) | start_edge | . | . | [^}]+} | Attribute value
. | . | . | \( | start_group | . | . | (?:edge|global|graph|group|node)(?:\.[a-z]+)? | Class name
. | . | . | \[ | start_node | . | . | (?:->|--) | Edge name
. | . | . | \s+ | global | . | . | [a-zA-Z_][a-zA-Z_0-9]* | Event name
. | . | . | . | . | . | . | [a-zA-Z_.][a-zA-Z_0-9. ]*: | Group name
. | . | . | . | . | . | . | [^\]]*] | Node name
. | . | class | , | daisy_chain_class | validate_class_name | . | [a-zA-Z_][a-zA-Z_0-9]* | State name
. | . | . | { | start_class_attribute | . | . | . | .
. | . | . | \( | start_group | . | . | [a-zA-Z_0-9. ] | Real node name
. | . | . | \[ | start_node | . | . | . | .
. | . | . | (?:->|--) | start_edge | . | . | . | .
. | . | . | \s+ | class | . | . | . | .
. | . | . | . | . | . | . | . | .
. | . | start_class_attribute | [a-z]+\s*: | class_attribute_value | . | save_class_attribute_name | . | .
. | . | . | . | . | . | . | . | .
. | . | class_attribute_value | [^}]+} | post_class_attribute | validate_class_attribute_name | save_class_attribute_value | . | .
. | . | . | . | . | . | . | . | .
. | . | daisy_chain_class | (?:edge|global|graph|group|node)(?:\.[a-z]+)? | class | . | save_class_name | . | .
. | . | . | \s+ | daisy_chain_class | . | . | . | .
. | . | . | . | . | . | . | . | .
. | . | post_class_attribute | (?:edge|global|graph|group|node)(?:\.[a-z]+)? | class | validate_class_attribute_value | save_class_name | . | .
. | . | . | \( | start_group | . | . | . | .
. | . | . | \[ | start_node | . | . | . | .
. | . | . | (?:->|--) | start_edge | . | . | . | .
. | . | . | \s+ | post_class_attribute | . | . | . | .
. | . | . | . | . | . | . | . | .
. | . | start_group | [a-zA-Z_.][a-zA-Z_0-9. ]*: | group | push_group | save_group_name | . | .
. | . | . | (?:->|--) | start_edge | . | . | . | .
. | . | . | \) | post_group | . | . | . | .
. | . | . | \s+ | start_group | . | . | . | .
. | . | . | . | . | . | . | . | .
. | . | group | (?:edge|global|graph|group|node)(?:\.[a-z]+)? | class | validate_group_name | . | . | .
. | . | . | \[ | start_node | . | . | . | .
. | . | . | (?:->|--) | start_edge | . | . | . | .
. | . | . | \s+ | group | . | . | . | .
. | . | . | . | . | . | . | . | .
. | Yes | post_group | { | start_attribute | pop_group | . | . | .
. | . | . | \[ | start_node | . | . | . | .
. | . | . | \( | start_group | . | . | . | .
. | . | . | (?:->|--) | start_edge | . | . | . | .
. | . | . | \s+ | post_group | . | . | . | .
. | . | . | . | . | . | . | . | .
. | Yes | start_node | [^\]]*] | post_node | . | save_node_name | . | .
. | . | . | \s+ | start_node | . | . | . | .
. | . | . | . | . | . | . | . | .
. | Yes | post_node | { | start_attribute | validate_node_name | . | . | .
. | . | . | \( | start_group | . | . | . | .
. | . | . | \) | post_group | . | . | . | .
. | . | . | \[ | start_node | . | . | . | .
. | . | . | (?:->|--) | start_edge | . | . | . | .
. | . | . | , | daisy_chain_node | . | . | . | .
. | . | . | \s+ | post_node | . | . | . | .
. | . | . | . | . | . | . | . | .
. | . | start_attribute | [a-z]+\s*: | attribute_value | . | save_attribute_name | . | .
. | . | . | \s+ | start_attribute | . | . | . | .
. | . | . | . | . | . | . | . | .
. | . | attribute_value | [^}]+} | post_attribute | validate_attribute_name | save_attribute_value | . | .
. | . | . | . | . | . | . | . | .
. | Yes | post_attribute | \( | start_group | validate_attribute_value | . | . | .
. | . | . | \) | post_group | . | . | . | .
. | . | . | \[ | start_node | . | . | . | .
. | . | . | (?:->|--) | start_edge | . | . | . | .
. | . | . | , | post_attribute | . | . | . | .
. | . | . | \s+ | post_attribute | . | . | . | .
. | . | . | . | . | . | . | . | .
. | Yes | start_edge | { | start_attribute | save_edge_name | validate_edge_name | . | .
. | . | . | \( | start_group | . | . | . | .
. | . | . | \) | post_group | . | . | . | .
. | . | . | \[ | start_node | . | . | . | .
. | . | . | , | daisy_chain_edge | . | . | . | .
. | . | . | \s+ | start_edge | . | . | . | .
. | . | . | . | . | . | . | . | .
. | Yes | daisy_chain_node | \[ | start_node | . | . | . | .
. | . | . | \s+ | daisy_chain_node | . | . | . | .
. | . | . | . | . | . | . | . | .
. | Yes | daisy_chain_edge | (?:->|--) | start_edge | . | . | . | .
. | . | . | \s+ | daisy_chain_edge | . | . | . | .
Start | Accept | State | Event | Next | Entry | Exit | Regexp | Interpretation