aboutsummaryrefslogtreecommitdiffhomepage
path: root/org/ao_conf_make_meta.org
diff options
context:
space:
mode:
Diffstat (limited to 'org/ao_conf_make_meta.org')
-rw-r--r--org/ao_conf_make_meta.org199
1 files changed, 100 insertions, 99 deletions
diff --git a/org/ao_conf_make_meta.org b/org/ao_conf_make_meta.org
index d3413de..bf39340 100644
--- a/org/ao_conf_make_meta.org
+++ b/org/ao_conf_make_meta.org
@@ -13,7 +13,93 @@
#+TAGS: assert(a) class(c) debug(d) mixin(m) sdp(s) tangle(T) template(t) WEB(W) noexport(n)
[[./sdp.org][sdp]] [[./][org/]]
-* 0. sdlang to AA
+* 0. Code Outline / Structure (tangles) :tangle:
+** 1. Header Hub :ao_markup_header_extract:
+
+#+BEGIN_SRC d :tangle ../src/sdp/ao_conf_make_meta.d
+/++
+ extract native/orig header return associative array<BR>
+
+ the header is passed as text (lopped off top of a sisu markup file until the
+ required first heading ^A~), determine whether is a native header or sdlang one
+ with a regex check if whether it contains the "native header" required tag/field
+ @title: then process accordingly as a "native header" or "sdlang header"
+ converting the metadata and make instructions to a common json format used by
+ program internally. Moved to associative array.
++/
+template SiSUheaderExtractHub() {
+ private import
+ std.regex;
+ private import
+ ao_rgx;
+ struct HeaderDocMetadataAndMake {
+ mixin SiSUheaderExtractNative;
+ mixin SiSUheaderExtractSDLang;
+ auto rgx = Rgx();
+ private auto headerContentAA(char[] header_src, string[string][string] conf_doc_make_aa) {
+ auto head_native = HeaderDocMetadataAndMakeNativeToAA();
+ auto head_sdlang = HeaderExtractSDL();
+ auto header_make_and_meta_tuple = (match(header_src, rgx.native_header_meta_title))
+ ? (head_native.headerNativeToAA(header_src))
+ : (head_sdlang.headerSDLangToAA(header_src, conf_doc_make_aa));
+ static assert(!isTypeTuple!(header_make_and_meta_tuple));
+ static assert(header_make_and_meta_tuple.length==2);
+ return header_make_and_meta_tuple;
+ }
+ }
+}
+#+END_SRC
+
+** 2a. Header Native :ao_markup_header_extract_native:
+
+#+BEGIN_SRC d :tangle ../src/sdp/ao_conf_make_meta_native.d
+/++
+ native headers using<br>@title:<BR>:subtitle:<BR>type tags<BR>
+ extract native/orig header return associative array
++/
+template SiSUheaderExtractNative() {
+ private import
+ std.exception,
+ std.regex,
+ std.utf,
+ std.conv : to;
+ private import
+ ao_rgx;
+ struct HeaderDocMetadataAndMakeNativeToAA {
+ mixin SiSUregisters;
+ mixin SiSUrgxInitFlags;
+ mixin RgxInit;
+ auto rgx = Rgx();
+ enum State { off, on }
+ string hm, hs;
+ <<ao_markup_header_extract_native>>
+ }
+}
+#+END_SRC
+
+** 2b. Header SDLang :ao_markup_header_extract_sdlang:
+
+#+BEGIN_SRC d :tangle ../src/sdp/ao_conf_make_meta_sdlang.d
+/++
+ sdlang headers<BR>
+ extract sdlang header return sdlang
++/
+template SiSUheaderExtractSDLang() {
+ private import
+ std.regex;
+ private import
+ ao_rgx;
+ struct HeaderExtractSDL {
+ mixin SiSUregisters;
+ mixin RgxInit;
+ auto rgx = Rgx();
+ <<ao_conf_make_meta_sdl>>
+ <<ao_conf_make_meta_sdl_to_aa>>
+ }
+}
+#+END_SRC
+
+* A. sdlang to AA
#+name: ao_conf_make_meta_sdl
#+BEGIN_SRC d
@@ -36,7 +122,7 @@ private auto sdlangToAAmake(string[string][string] conf, Tag conf_sdlang) {
}
#+END_SRC
-* A. conf settings sdlang
+* B. conf settings sdlang
#+name: ao_conf_make_meta_sdl
#+BEGIN_SRC d
@@ -46,7 +132,7 @@ private auto configSettingsSDLangToAAmake(Tag conf_sdlang) {
}
#+END_SRC
-* B. conf make sdlang
+* C. conf make sdlang
#+name: ao_conf_make_meta_sdl
#+BEGIN_SRC d
@@ -191,9 +277,10 @@ private auto documentMakeSDLangToAAmake(Tag document_make_sdlang) {
}
#+END_SRC
-* C.a. header native :header:native:
+* D. header :header:
+** a. header native :header:native:
-** native header document metadata in associative array :aa:
+*** native header document metadata in associative array :aa:
#+name: ao_markup_header_extract_native
#+BEGIN_SRC d
@@ -385,7 +472,7 @@ body {
}
#+END_SRC
-** native header extract to string object :string:
+*** native header extract to string object :string:
#+name: ao_markup_header_extract_native
#+BEGIN_SRC d
@@ -429,7 +516,7 @@ private auto native_header_extract(
}
#+END_SRC
-** native header reset states :reset:
+*** native header reset states :reset:
#+name: ao_markup_header_extract_native
#+BEGIN_SRC d
@@ -447,7 +534,7 @@ auto header_reset_states_common(
}
#+END_SRC
-** hub: native header start :hub:
+*** hub: native header start :hub:
#+name: ao_markup_header_extract_native
#+BEGIN_SRC d
@@ -502,8 +589,8 @@ private auto headerNativeToAA(in char[] src_header) {
}
#+END_SRC
-* C.b. header sdlang :header:sdl:
-** sdlang header parse and extract root Tag :sdlang:root:tag:
+** b. header sdlang :header:sdl:
+*** sdlang header parse and extract root Tag :sdlang:root:tag:
#+name: ao_conf_make_meta_sdl
#+BEGIN_SRC d
@@ -535,7 +622,7 @@ final private auto headerMakeSDLang(in string src_header) {
}
#+END_SRC
-** sdlang header get :sdlang:get:src:
+*** sdlang header get :sdlang:get:src:
#+name: ao_conf_make_meta_sdl
#+BEGIN_SRC d
@@ -564,7 +651,7 @@ private auto headerSDLangGet(in char[] src_header) {
}
#+END_SRC
-** sdlang header to associative array make sdlTag in :sdlang:aa:
+*** sdlang header to associative array make sdlTag in :sdlang:aa:
#+name: ao_conf_make_meta_sdl
#+BEGIN_SRC d
@@ -602,7 +689,7 @@ private auto headerSDLangToAAmake(Tag header_sdlang, string[string][string] doch
}
#+END_SRC
-** hub: get sdlang header and convert to associative array :hub:sdlang:aa:
+*** hub: get sdlang header and convert to associative array :hub:sdlang:aa:
#+name: ao_conf_make_meta_sdl
#+BEGIN_SRC d
@@ -612,89 +699,3 @@ private auto headerSDLangToAA(char[] header_sdlang_src, string[string][string] c
return header_aa_tuple;
}
#+END_SRC
-
-* tangles (code structure) :tangle:
-** 1. Header Hub :ao_markup_header_extract:
-
-#+BEGIN_SRC d :tangle ../src/sdp/ao_conf_make_meta.d
-/++
- extract native/orig header return associative array<BR>
-
- the header is passed as text (lopped off top of a sisu markup file until the
- required first heading ^A~), determine whether is a native header or sdlang one
- with a regex check if whether it contains the "native header" required tag/field
- @title: then process accordingly as a "native header" or "sdlang header"
- converting the metadata and make instructions to a common json format used by
- program internally. Moved to associative array.
-+/
-template SiSUheaderExtractHub() {
- private import
- std.regex;
- private import
- ao_rgx;
- struct HeaderDocMetadataAndMake {
- mixin SiSUheaderExtractNative;
- mixin SiSUheaderExtractSDLang;
- auto rgx = Rgx();
- private auto headerContentAA(char[] header_src, string[string][string] conf_doc_make_aa) {
- auto head_native = HeaderDocMetadataAndMakeNativeToAA();
- auto head_sdlang = HeaderExtractSDL();
- auto header_make_and_meta_tuple = (match(header_src, rgx.native_header_meta_title))
- ? (head_native.headerNativeToAA(header_src))
- : (head_sdlang.headerSDLangToAA(header_src, conf_doc_make_aa));
- static assert(!isTypeTuple!(header_make_and_meta_tuple));
- static assert(header_make_and_meta_tuple.length==2);
- return header_make_and_meta_tuple;
- }
- }
-}
-#+END_SRC
-
-** 2a. Header Native :ao_markup_header_extract_native:
-
-#+BEGIN_SRC d :tangle ../src/sdp/ao_conf_make_meta_native.d
-/++
- native headers using<br>@title:<BR>:subtitle:<BR>type tags<BR>
- extract native/orig header return associative array
-+/
-template SiSUheaderExtractNative() {
- private import
- std.exception,
- std.regex,
- std.utf,
- std.conv : to;
- private import
- ao_rgx;
- struct HeaderDocMetadataAndMakeNativeToAA {
- mixin SiSUregisters;
- mixin SiSUrgxInitFlags;
- mixin RgxInit;
- auto rgx = Rgx();
- enum State { off, on }
- string hm, hs;
- <<ao_markup_header_extract_native>>
- }
-}
-#+END_SRC
-
-** 2b. Header SDLang :ao_markup_header_extract_sdlang:
-
-#+BEGIN_SRC d :tangle ../src/sdp/ao_conf_make_meta_sdlang.d
-/++
- sdlang headers<BR>
- extract sdlang header return sdlang
-+/
-template SiSUheaderExtractSDLang() {
- private import
- std.regex;
- private import
- ao_rgx;
- struct HeaderExtractSDL {
- mixin SiSUregisters;
- mixin RgxInit;
- auto rgx = Rgx();
- <<ao_conf_make_meta_sdl>>
- <<ao_conf_make_meta_sdl_to_aa>>
- }
-}
-#+END_SRC