-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfsm.dot
More file actions
29 lines (26 loc) · 1.01 KB
/
fsm.dot
File metadata and controls
29 lines (26 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
digraph finite_state_machine {
rankdir=LR;
size="8,5"
node [shape = doublecircle]; ROW_DONE ERROR;
node [shape = point]; IN;
node [shape = circle];
IN -> START;
START -> READ_COLUMN;
START -> ERROR [ label="EOF" ];
READ_COLUMN -> UNQUOTED;
UNQUOTED -> READ_COLUMN [ label = "','" ];
UNQUOTED -> UNQUOTED [ label = "^',',line_end" ];
UNQUOTED -> ROW_DONE [ label = "line_end,EOF" ];
READ_COLUMN -> QUOTED [ label = "quote_char" ];
QUOTED -> QUOTED [ label = "^quote_char,escape_char" ];
QUOTED -> ESCAPED [ label = "escape_char if escape_char != quote_char" ];
ESCAPED -> QUOTED [ label = "quote_char" ];
ESCAPED -> ERROR;
QUOTED -> QUOTED_END [ label = "quote_char if escape_char != quote_char" ];
QUOTED_END -> READ_COLUMN [ label = "','" ];
QUOTED_END -> ROW_DONE [ label = "line_end,EOF" ];
QUOTED_END -> ERROR;
QUOTED -> END_OR_ESCAPED [ label = "escape_char,quote_char" ];
END_OR_ESCAPED -> QUOTED_END;
END_OR_ESCAPED -> ESCAPED;
}