Skip to content

Instantly share code, notes, and snippets.

@maestroviktorin
Last active November 12, 2024 23:48
Show Gist options
  • Select an option

  • Save maestroviktorin/588adf3fe9211cf6ab81e711dd88bbf3 to your computer and use it in GitHub Desktop.

Select an option

Save maestroviktorin/588adf3fe9211cf6ab81e711dd88bbf3 to your computer and use it in GitHub Desktop.
digraph Automata {
// Default parameters for all nodes and edges.
node [shape=circle fontname="Arial"];
edge [fontname="Arial"]
{rank=same 2 3}
// Identifier.
S -> 2 [label=" a...z0...9"]
2 -> 2 [label=" a...z0...9"]
2 -> 3 [label=" ["]
2 -> 11 [label=" _"]
3 -> 3 [label=" _"]
3 -> 4 [label=" 1...9"]
3 -> 7 [label="a...z"]
4 -> 4 [label="0...9"]
4 -> 6 [label=" _"]
4 -> 8 [label=" ,"]
4 -> 9 [label=" ]"]
6 -> 6 [label=" _"]
6 -> 8 [label=" ,"]
6 -> 9 [label=" ]"]
7 -> 6 [label=" _"]
7 -> 7 [label="a...z0...9"]
7 -> 8 [label=" ,"]
7 -> 9 [label=" ]"]
8 -> 3 [label=" _"]
8 -> 4 [label="1...9"]
8 -> 7 [label="a...z"]
9 -> 10 [label=" _"]
9 -> 12 [label=" :="]
10 -> 10 [label=" _"]
10 -> 12 [label=" :="]
11 -> 3 [label=" ["]
11 -> 11 [label=" _"]
11 -> 12 [label=" :="]
// After :=
12 -> 12 [label=" _"]
12 -> 13 [label=" a-z"]
12 -> 14 [label="1-9"]
13 -> 12 [label=" <op>"]
13 -> 13 [label=" a-z0-9"]
13 -> 15 [label=" ;"]
13 -> 17 [label=" _"]
14 -> 12 [label=" <op>"]
14 -> 14 [label="0-9"]
14 -> 15 [label=" ;"]
14 -> 17 [label=" _"]
17 -> 12 [label= " <op>"]
17 -> 15 [label=" ;"]
17 -> 17 [label=" _"]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment