Index: ossp-pkg/cfg/TODO RCS File: /v/ossp/cvs/ossp-pkg/cfg/TODO,v rcsdiff -q -kk '-r1.5' '-r1.6' -u '/v/ossp/cvs/ossp-pkg/cfg/TODO,v' 2>/dev/null --- TODO 2004/11/27 19:44:03 1.5 +++ TODO 2004/11/28 13:54:13 1.6 @@ -10,224 +10,24 @@ o finish/fix implementation of cfg_node_select() o implement cfg_node_find() - o fix internal linkage with "left sibling" pointer o support for prefixes of all non-static symbols to better support embedding o finish cfg.pod manual page (function description!) o add ts-based test suite + o cleanup: token vs. option/argument nomenclature + + CANDO + + o Problem: \x00 oder \x{00} results in NUL-terminator, so better use ptr+len instead? + o optimize internal linkage with an additional "left sibling" pointer? o add line tracking support o add pre-processor with at least includes - o add config tree verification! + o add config tree syntax verification! o cfg.tok: in scanner: use an combination of dynamic buffer and atomic symbol/token sub-library to allow first tokens of mostly arbitrary size and then to store the tokens redundancy-free. - o named parameters [--]name=value (options) -- token vs. argument nomenclature -- arguments/options vs. just token - - ================================================================================== - -- Problem: \x00 oder \x{00} wird zu NUL-terminator -> use ptr+len instead -- caStr/cpStr durch yyless/yymore?? -- syntax verification -- command line query tool -- error checking in scanner? -- OSSP ex support -- wieso geht sample.cfg nicht als Arg bei "make check"? - -- newline in error message -$ ./cfg_test sample2.cfg -ERROR: quu'> - -- cfg_t - -rewrite-uri { } -rewrite-uri ^/(.*) /path/$1 --redirect=permanent q{ - %{SOURCE} != "x" -}; - - -Directory [--foo=A] - -Argument: - - type: - - keyword ("foo") via name - - option ("--foo=BAR") via name & regex - - argument ("foo") via regex - - amount: - - 1 - - 0/1 ? - - 0..n * - - 1..n + - - location: - - by position - - by name - - lookup via: - - name - - position - - regex match - -foo * bar -foo = bar|quux|... -foo (bar baz quux) - -foo ::= bar* ; kleene closure -foo ::= bar|baz|quux ; union -foo ::= bar baz quux ; concatenation - -foo ::= {foo;...} ; sequence of ... -foo ::= (...) ; grouping -foo ::= "bar" ; fixed terminal -foo ::= /bar/ ; regex terminal -foo ::= ; arbitrary argument -foo ::= ; arbitrary option - -SEQ ::= "{" DIR DIR* "}" -DIR ::= TOK (" " TOK)* ";" -TOK ::= ... - -SEQ ::= DIR* SEQ(dir,dir,...) -DIR ::= TOK+ DIR(tok,tok,...) -TOK ::= string "..." - -config ::= SEQ(directory|user|rewrite|access) -directory ::= DIR("directory",*,) -dir_options ::= -user ::= DIR("user",/^[a-z]$/) -rewrite ::= -access ::= "access" ("allow"|"deny"):action SEQ(access_list):acl -access_list ::= m/^!?%{ID}$/ - -acl ::= "acl" TOK:name acl_list -acl_list ::= SEQ(acl_entry) -acl_entry ::= acl_action "from" net-addr:src "to" net-addr:dst -acl_action ::= "allow"|"deny" -net_addr ::= net_hostname | net_ipv4addr | net_ipv6addr - -sequence all { - directive --class 1; -}; -directive --class 1 "foo" { - option "bar" --occur=1 -}; - ---------------------------------------------------------------------------- - -foo on; -bar /bla { - foo off; - baz --fuck { - b1; b2 --nase=baer; b3; b4; b5; - } --fuck2; -}; -quux a1 a2 a3 a4; -quux; - ---------------------------------------------------------------------------- - -sequence ROOT { - directive foo; - directive bar; - directive quux --count=1:oo; -}; -sequence bar-seq { - directive foo --count=0:1; - directive baz --count=1:oo; -}; -directive foo { - token - on|off|yes|no; -}; -directive bar { - token path /.*; - sequence bar-seq; -}; -directive baz { - option fuck; - option fuck2; - sequence { - directive foo { - option nase (baer|hugo); - option foo [0-9]; - token ip-address; - }; - }; -}; -directive quux { - token --count=0:oo a.*; -}; -token ip-address b1|b2|b3|b4|b5; - -------------------------------------------------------------------------------- - - ::= "sequence" ? ; - | "sequence" ? ? "{" * "}"; - ::= "directive" ? ; - | "directive" ? ? "{"