aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorKarel Kočí <cynerd@email.cz>2016-11-06 13:19:56 +0100
committerKarel Kočí <cynerd@email.cz>2016-11-06 13:19:56 +0100
commit91407994092ae93ce09f5bec049b8662d0db27a5 (patch)
tree6789ec6a466e4c4d3c2dd9c52ecb3719b348896f /docs
parent7bad049c2f1775e79e40162ccfd41110c80ae509 (diff)
downloadgeml-91407994092ae93ce09f5bec049b8662d0db27a5.tar.gz
geml-91407994092ae93ce09f5bec049b8662d0db27a5.tar.bz2
geml-91407994092ae93ce09f5bec049b8662d0db27a5.zip
Add escape states to parser states graph
Diffstat (limited to 'docs')
-rw-r--r--docs/parser-states.dot19
1 files changed, 15 insertions, 4 deletions
diff --git a/docs/parser-states.dot b/docs/parser-states.dot
index 16d714f..2d48e50 100644
--- a/docs/parser-states.dot
+++ b/docs/parser-states.dot
@@ -12,9 +12,12 @@ disabled -> Parser [label="_EVAEN located"];
Parser {
nomacro [label="No macro"];
+nomacro_escape [label="No macro escaped"];
macro_start [label="Macro/command start"];
macro [label="Macro/command located"];
+macro_escape [label="Macro/command located arguments escaped"];
args [label="Arguments"];
+args_escaped [label="Arguments escaped"];
expansion [label="Macro/command expansion (Secondary parser)"];
Parser -> nomacro [style="dotted"];
@@ -23,12 +26,20 @@ nomacro -> macro_start [label="_INIT located"];
macro_start -> macro [label="_MACR matches text after _INIT"];
macro_start -> error [label="else"];
macro -> args [label="_ARGST matches after _MACR"];
-args -> args [label="_ARGSE localted"];
-args -> macro_start [label="_INIT located"];
+args -> args [label="_ARGSE located"];
+args -> macro_start [label="_INIT located\nPush macro/commands buffer"];
args -> expansion [label="_ARGEN located"];
macro -> expansion [label="else"];
-expansion -> args [label="If some macro arguments are still opened"];
-expansion -> nomacro [label="If last opened macro argument was closed"];
+expansion -> args [label="Pop macro/commands buffer"];
+expansion -> nomacro [label="Macro/commans buffer empty"];
+nomacro -> nomacro_escape [label="_ESCAP located"];
+nomacro_escape -> nomacro [label="_INIT matches text after _ESCAP"];
+nomacro_escape -> error [label="else"];
+macro -> macro_escape [label="_ESCAP matches text after _MACR"];
+macro_escape -> expansion;
+args -> args_escaped [label="_ESCAP located"];
+args_escaped -> args [label="_ARGSE, _ARGEN or _INIT matches text after _ESCAP"];
+args_escaped -> error [lavel="else"];
}