diff options
author | Laurent Bercot <ska-skaware@skarnet.org> | 2019-12-30 23:27:32 +0000 |
---|---|---|
committer | Laurent Bercot <ska-skaware@skarnet.org> | 2019-12-30 23:27:32 +0000 |
commit | ed9dadb2778ab4ff7683622907e22ed8c561bfda (patch) | |
tree | 59d4341aa2d885d6928e1e30ab6f5f57916c09ee /src/config/s6-frontend-config-preprocess.txt | |
download | s6-frontend-ed9dadb2778ab4ff7683622907e22ed8c561bfda.tar.xz |
Initial commit.
Diffstat (limited to 'src/config/s6-frontend-config-preprocess.txt')
-rw-r--r-- | src/config/s6-frontend-config-preprocess.txt | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/src/config/s6-frontend-config-preprocess.txt b/src/config/s6-frontend-config-preprocess.txt new file mode 100644 index 0000000..e81c86e --- /dev/null +++ b/src/config/s6-frontend-config-preprocess.txt @@ -0,0 +1,38 @@ + + Automaton for the preprocessor: + + +class | 0 1 2 3 4 +st\ev | \0 \n ! space other + +START | print print print +0 | END START CMD NORMAL NORMAL + +NORMAL | print print print print +1 | END START NORMAL NORMAL NORMAL + +CMD | add +2 | END START IGNORE CMD1 CMD2 + +IGNORE | +3 | END START IGNORE IGNORE IGNORE + +CMD1 | add +4 | X X X CMD1 CMD2 + +CMD2 | idcmd add +5 | X X X ARG CMD2 + +ARG | add +6 | X X ARG1 ARG ARG1 + +ARG1 | proc proc add add add +7 | END START ARG1 ARG1 ARG1 + +states: 0-7 plus END and X -> 4 bits +actions: 4. -> 8 bits total, fits in a char. + +print 0x10 copies the character to stdout +add 0x20 adds the character to the processing string +idcmd 0x40 ids the processing string for an !include cmd +proc 0x80 gets the filename and procs the include |