3 @ reference about arch of ShellCheck, it implement a language Parser.
4 @ reference about regex-tdfa, mtl, parsec
5 # DSL(ÁìÓòÌض¨ÓïÑÔ)(Domain Specific Languages)
7 # EBNF(Extended Backus Naur Form)
8 @ http://vlpp.codeplex.com/, vczh, a runtime parser & data-proc lib.
18 # srcfmt(lang)/srcfile/iptsrc
20 @ Token (word/punct/rsvwd, cmntblock/strblock, subst(word/str)/codeblock/envar/subst)
27 =========================================================================
29 @ token stick code(word/str/subst/env/exprblock/scriptblock)
30 = # concept trim to designdoc
31 # subst-stick() in TokenParser.c
34 - define vtoken id for desc.
35 - DESC_xxx replaced with token id.
36 - use SUBST_STR_DESC for codeblock & subst. maybe this name should
37 be modified to TXT_BLK_DESC.
39 - combinable token(flag)
42 - token data is TokenDesc in state data
43 - token data is strbuff
44 - token data is state data
45 - on_sh_cmnt_proc()@cmntblock.c, OnSeqTokenProc()@TokenProc.c,
46 token data with strbuff translate to state data,
47 for some token like comment/`cmd`/$'string'.
48 + ??? use BLOCK_DESC instead of STR_BUFF, decrease token data type.
49 + due to the modification of token data from state to parser, the
50 original code invoke FREE_DESC() for state data.
54 retval(T_WORD/T_SUBST_STR/T_SKIP/T_ENVAR/T_SCRIPT/T_EXPR)
55 # token-stick(word/str/subst)
58 # recognize "%" punct in code state.
60 @ subst parsing(envar/codeblock)
62 # code trim: state, memfree, dbgout-info
67 # ENTER/EXIT token gen
70 # Fundamental/MacroCmnt/Subst testing
71 + c89 cmnt (blank, strbuff)
73 =========================================================================
77 + define misc token for desc. desc type use token to set.
78 + same token in different lang-set(group) by setting lang flag.
79 + use ':=' for envar assignment, instead of '='.
81 @ token(tokendef, group, type, flag ...)
82 @ define flag in runtime
85 =========================================================================
89 @ token output format (token-print/colorfull/syntax)
91 # -vh ... opt proc func.
95 + charset/input/strbuff/AQStack
98 # compiler bit width detect/MACRO
101 @ arch(srcfmt/lang/IptSrc)