aboutsummaryrefslogtreecommitdiffhomepage
path: root/org/ao_abstract_doc_source.org
diff options
context:
space:
mode:
Diffstat (limited to 'org/ao_abstract_doc_source.org')
-rw-r--r--org/ao_abstract_doc_source.org105
1 files changed, 53 insertions, 52 deletions
diff --git a/org/ao_abstract_doc_source.org b/org/ao_abstract_doc_source.org
index bfda427..ea334a9 100644
--- a/org/ao_abstract_doc_source.org
+++ b/org/ao_abstract_doc_source.org
@@ -1,4 +1,4 @@
-+TITLE: Emacs config file written in org-mode
+#+TITLE: sdp document abstraction
#+AUTHOR: Ralph Amissah
#+EMAIL: ralph.amissah@gmail.com
#+STARTUP: indent
@@ -9,15 +9,16 @@
#+OPTIONS: ^:nil _:nil
#+EXPORT_SELECT_TAGS: export
#+EXPORT_EXCLUDE_TAGS: noexport
-#+TAGS: Amissah(A) Class(c) tangle(T) template(t) WEB(W) noexport(n)
#+FILETAGS: :sdp:ao:
+#+TAGS: assert(a) class(c) debug(d) mixin(m) sdp(s) tangle(T) template(t) WEB(W) noexport(n)
-* document abstraction
+* document abstraction :abstract:
+[[./sdp.org][sdp]]
Process markup document, create document abstraction.
** initialize
#+name: abs_init
#+BEGIN_SRC d :exports none
-/* initialize */
+/+ initialize +/
mixin ObjectSetters;
mixin AssertionsOnMarkupDocumentStructure;
mixin AssertionsOnBlocks;
@@ -34,7 +35,7 @@ string biblio_tag_name, biblio_tag_entry, book_idx_tmp, st;
string[1024] biblio_arr_json = biblio_entry_tags_jsonstr;
JSONValue[1024] bib_arr_json;
uint[string] line_occur;
-int counter, previous_count, count_biblio_entry, ocn, ocn_, verse_line, bib_entry, heading_pointer, notepoint;
+uint counter, previous_count, count_biblio_entry, ocn, ocn_, verse_line, bib_entry, heading_pointer, notepoint;
string indent_first, indent_second;
string[][string][string] bookindex_unordered_hashes;
bool bullet = true;
@@ -149,7 +150,7 @@ auto dochead_metadata = parseJSON(header_metadata_jsonstr).object;
#+END_SRC
** loop: process document body [+7]
-*** scope
+*** scope :scope:
#+name: abs_loop_body_00
#+BEGIN_SRC d :exports none
/* scope */
@@ -174,7 +175,7 @@ debug(srclines) {
}
}
#+END_SRC
-*** check whether ocn is on or turned off
+*** check whether ocn is on or turned off :ocn:
#+name: abs_loop_body_00
#+BEGIN_SRC d :exports none
if ((!line.empty) && (ft["ocn_status_multi_obj"] == 0)) {
@@ -218,7 +219,7 @@ if ((!line.empty) && (ft["ocn_status_multi_obj"] == 0)) {
}
#+END_SRC
*** separate regular markup text from code blocks [+6]
-**** code blocks
+**** code blocks :block:code:
#+name: abs_loop_body_00
#+BEGIN_SRC d :exports none
if (ft["code"] == 1) {
@@ -253,14 +254,14 @@ if (ft["code"] == 1) {
}
}
#+END_SRC
-**** non code objects (other blocks or regular text) [+5]
+**** non code objects (other blocks or regular text) [+5] :non_code:
#+name: abs_loop_body_00
#+BEGIN_SRC d :exports none
} else if (!match(line, rgx.regular_parse_skip)) {
/* object other than code block object (includes regular text paragraph) */
#+END_SRC
-***** within block group [+1]
-****** within block group: biblio
+***** within block group [+1] :block:active:
+****** within block group: biblio :biblio:
#+name: abs_loop_body_non_code_obj
#+BEGIN_SRC d :exports none
if (((match(line, rgx.heading_biblio)
@@ -348,7 +349,7 @@ if (((match(line, rgx.heading_biblio)
biblio_tag_entry="";
}
#+END_SRC
-****** within block group: poem
+****** within block group: poem :poem:
#+name: abs_loop_body_non_code_obj
#+BEGIN_SRC d :exports none
} else if (ft["poem"] == 1) {
@@ -549,7 +550,7 @@ if (((match(line, rgx.heading_biblio)
}
}
#+END_SRC
-****** within block group: group
+****** within block group: group :group:
#+name: abs_loop_body_non_code_obj
#+BEGIN_SRC d :exports none
/* within block object: group */
@@ -584,7 +585,7 @@ if (((match(line, rgx.heading_biblio)
}
}
#+END_SRC
-****** within block group: block
+****** within block group: block :block:
#+name: abs_loop_body_non_code_obj
#+BEGIN_SRC d :exports none
} else if (ft["block"] == 1) {
@@ -619,7 +620,7 @@ if (((match(line, rgx.heading_biblio)
}
}
#+END_SRC
-****** within block group: quote
+****** within block group: quote :quote:
#+name: abs_loop_body_non_code_obj
#+BEGIN_SRC d :exports none
} else if (ft["quote"] == 1) {
@@ -654,7 +655,7 @@ if (((match(line, rgx.heading_biblio)
}
}
#+END_SRC
-****** within block group: table
+****** within block group: table :table:
#+name: abs_loop_body_non_code_obj
#+BEGIN_SRC d :exports none
} else if (ft["table"] == 1) {
@@ -689,7 +690,7 @@ if (((match(line, rgx.heading_biblio)
}
}
#+END_SRC
-***** not within block group [+4]
+***** not identified as being within block group [+4]
#+name: abs_loop_body_non_code_obj
#+BEGIN_SRC d :exports none
} else {
@@ -705,8 +706,8 @@ assert(
);
assertions_flag_types_block_status_none_or_closed(ft);
#+END_SRC
-****** open curly block group [+1]
-******* open block group: code
+****** open curly block group [+1] :block:curly:open:
+******* open block group: code :code:
#+name: abs_loop_body_open_block_obj
#+BEGIN_SRC d :exports none
if (auto m = match(line, rgx.block_curly_code_open)) {
@@ -723,7 +724,7 @@ if (auto m = match(line, rgx.block_curly_code_open)) {
ft["code"] = 1;
ft["curly_code"] = 1;
#+END_SRC
-******* open block group: poem
+******* open block group: poem :poem:
#+name: abs_loop_body_open_block_obj
#+BEGIN_SRC d :exports none
} else if (auto m = match(line, rgx.block_curly_poem_open)) {
@@ -748,7 +749,7 @@ if (auto m = match(line, rgx.block_curly_code_open)) {
ft["poem"] = 1;
ft["curly_poem"] = 1;
#+END_SRC
-******* open block group: group
+******* open block group: group :group:
#+name: abs_loop_body_open_block_obj
#+BEGIN_SRC d :exports none
} else if (auto m = match(line, rgx.block_curly_group_open)) {
@@ -765,7 +766,7 @@ if (auto m = match(line, rgx.block_curly_code_open)) {
ft["group"] = 1;
ft["curly_group"] = 1;
#+END_SRC
-******* open block group: block
+******* open block group: block :block:
#+name: abs_loop_body_open_block_obj
#+BEGIN_SRC d :exports none
} else if (auto m = match(line, rgx.block_curly_block_open)) {
@@ -782,7 +783,7 @@ if (auto m = match(line, rgx.block_curly_code_open)) {
ft["block"] = 1;
ft["curly_block"] = 1;
#+END_SRC
-******* open block group: quote
+******* open block group: quote :quote:
#+name: abs_loop_body_open_block_obj
#+BEGIN_SRC d :exports none
} else if (auto m = match(line, rgx.block_curly_quote_open)) {
@@ -799,7 +800,7 @@ if (auto m = match(line, rgx.block_curly_code_open)) {
ft["quote"] = 1;
ft["curly_quote"] = 1;
#+END_SRC
-******* open block group: table
+******* open block group: table :table:
#+name: abs_loop_body_open_block_obj
#+BEGIN_SRC d :exports none
} else if (auto m = match(line, rgx.block_curly_table_open)) {
@@ -816,8 +817,8 @@ if (auto m = match(line, rgx.block_curly_code_open)) {
ft["table"] = 1;
ft["curly_table"] = 1;
#+END_SRC
-****** open tic block group [+1]
-******* open block group: code
+****** open tic block group [+1] :block:tic:open:
+******* open block group: code :code:
#+name: abs_loop_body_open_block_obj
#+BEGIN_SRC d :exports none
} else if (auto m = match(line, rgx.block_tic_code_open)) {
@@ -834,7 +835,7 @@ if (auto m = match(line, rgx.block_curly_code_open)) {
ft["code"] = 1;
ft["tic_code"] = 1;
#+END_SRC
-******* open block group: poem
+******* open block group: poem :poem:
#+name: abs_loop_body_open_block_obj
#+BEGIN_SRC d :exports none
} else if (auto m = match(line, rgx.block_tic_poem_open)) {
@@ -859,7 +860,7 @@ if (auto m = match(line, rgx.block_curly_code_open)) {
ft["poem"] = 1;
ft["tic_poem"] = 1;
#+END_SRC
-******* open block group: group
+******* open block group: group :group:
#+name: abs_loop_body_open_block_obj
#+BEGIN_SRC d :exports none
} else if (auto m = match(line, rgx.block_tic_group_open)) {
@@ -876,7 +877,7 @@ if (auto m = match(line, rgx.block_curly_code_open)) {
ft["group"] = 1;
ft["tic_group"] = 1;
#+END_SRC
-******* open block group: block
+******* open block group: block :block:
#+name: abs_loop_body_open_block_obj
#+BEGIN_SRC d :exports none
} else if (auto m = match(line, rgx.block_tic_block_open)) {
@@ -893,7 +894,7 @@ if (auto m = match(line, rgx.block_curly_code_open)) {
ft["block"] = 1;
ft["tic_block"] = 1;
#+END_SRC
-******* open block group: quote
+******* open block group: quote :quote:
#+name: abs_loop_body_open_block_obj
#+BEGIN_SRC d :exports none
} else if (auto m = match(line, rgx.block_tic_quote_open)) {
@@ -910,7 +911,7 @@ if (auto m = match(line, rgx.block_curly_code_open)) {
ft["quote"] = 1;
ft["tic_quote"] = 1;
#+END_SRC
-******* open block group: table
+******* open block group: table :table:
#+name: abs_loop_body_open_block_obj
#+BEGIN_SRC d :exports none
} else if (auto m = match(line, rgx.block_tic_table_open)) {
@@ -934,7 +935,7 @@ if (auto m = match(line, rgx.block_curly_code_open)) {
/* line not empty */
/* non blocks (headers, paragraphs) & closed blocks */
#+END_SRC
-******* asserts
+******* asserts :assert:
#+name: abs_loop_body_not_block_obj
#+BEGIN_SRC d :exports none
assert(
@@ -959,7 +960,7 @@ if (auto m = match(line, rgx.block_curly_code_open)) {
);
}
#+END_SRC
-******* book index
+******* book index :bookindex:
#+name: abs_loop_body_not_block_obj
#+BEGIN_SRC d :exports none
if (auto m = match(line, rgx.book_index)) {
@@ -1008,7 +1009,7 @@ if (auto m = match(line, rgx.block_curly_code_open)) {
} else {
/* not book_index */
#+END_SRC
-******** matched: comment
+******** matched: comment :comment:match:
#+name: abs_loop_body_not_block_obj
#+BEGIN_SRC d :exports none
if (auto m = match(line, rgx.comment)) {
@@ -1036,7 +1037,7 @@ if (auto m = match(line, rgx.block_curly_code_open)) {
ft["para"] = 0;
counter++;
#+END_SRC
-******** matched: header make
+******** matched: header make :header:make:match:
#+name: abs_loop_body_not_block_obj
#+BEGIN_SRC d :exports none
} else if (auto m = match(line, rgx.header_make)) {
@@ -1052,7 +1053,7 @@ if (auto m = match(line, rgx.block_curly_code_open)) {
line_occur["header_make"]++;
object["obj"] ~= line ~= "\n";
#+END_SRC
-******** matched: header metadata
+******** matched: header metadata :header:metadata:match:
#+name: abs_loop_body_not_block_obj
#+BEGIN_SRC d :exports none
} else if (auto m = match(line, rgx.header_metadata)) {
@@ -1068,7 +1069,7 @@ if (auto m = match(line, rgx.block_curly_code_open)) {
line_occur["header_metadata"]++;
object["obj"] ~= line ~= "\n";
#+END_SRC
-******** flag set: header make
+******** flag set: header make :header:make:flag:
#+name: abs_loop_body_not_block_obj
#+BEGIN_SRC d :exports none
} else if (ft["header_make"] == 1
@@ -1083,7 +1084,7 @@ if (auto m = match(line, rgx.block_curly_code_open)) {
object["obj"] ~= line ~= "\n";
}
#+END_SRC
-******** flag set: header metadata
+******** flag set: header metadata :header:metadata:flag:
#+name: abs_loop_body_not_block_obj
#+BEGIN_SRC d :exports none
} else if (ft["header_metadata"] == 1
@@ -1107,7 +1108,7 @@ if (auto m = match(line, rgx.block_curly_code_open)) {
&& (ft["heading"] == 0))) {
/* heading or para but neither flag nor line exists */
#+END_SRC
-********* headings found
+********* headings found :heading:
#+name: abs_loop_body_not_block_obj
#+BEGIN_SRC d :exports none
if ((to!string(dochead_make["make"]["headings"]).length > 2)
@@ -1177,7 +1178,7 @@ if (auto m = match(line, rgx.block_curly_code_open)) {
ft["make_headings"] = 1;
}
#+END_SRC
-********* headings make set
+********* headings make set :heading:
#+name: abs_loop_body_not_block_obj
#+BEGIN_SRC d :exports none
if ((ft["make_headings"] == 1)
@@ -1230,7 +1231,7 @@ if (auto m = match(line, rgx.block_curly_code_open)) {
}
}
#+END_SRC
-********* headings match
+********* headings match :heading:
#+name: abs_loop_body_not_block_obj
#+BEGIN_SRC d :exports none
if (auto m = match(line, rgx.heading)) {
@@ -1357,7 +1358,7 @@ if (auto m = match(line, rgx.block_curly_code_open)) {
tell_l("yellow", strip(line));
}
#+END_SRC
-********* para matches
+********* para matches :para:
#+name: abs_loop_body_not_block_obj
#+BEGIN_SRC d :exports none
} else if (line_occur["para"] == 0) {
@@ -1408,7 +1409,7 @@ if (auto m = match(line, rgx.block_curly_code_open)) {
line_occur["para"]++;
}
#+END_SRC
-******** line exist: header make
+******** line exist: header make :header:make:
#+name: abs_loop_body_not_block_obj
#+BEGIN_SRC d :exports none
} else if (line_occur["header_make"] > 0) {
@@ -1420,7 +1421,7 @@ if (auto m = match(line, rgx.block_curly_code_open)) {
object["obj"] ~= line ~= "\n";
line_occur["header_make"]++;
#+END_SRC
-******** line exist: header metadata
+******** line exist: header metadata :header:metadata:
#+name: abs_loop_body_not_block_obj
#+BEGIN_SRC d :exports none
} else if (line_occur["header_metadata"] > 0) {
@@ -1432,7 +1433,7 @@ if (auto m = match(line, rgx.block_curly_code_open)) {
object["obj"] ~= line ~= "\n";
line_occur["header_metadata"]++;
#+END_SRC
-******** line exist: heading
+******** line exist: heading :heading:
#+name: abs_loop_body_not_block_obj
#+BEGIN_SRC d :exports none
} else if (line_occur["heading"] > 0) {
@@ -1443,7 +1444,7 @@ if (auto m = match(line, rgx.block_curly_code_open)) {
object["obj"] ~= line ~= "\n";
line_occur["heading"]++;
#+END_SRC
-******** line exist: para
+******** line exist: para :para:
#+name: abs_loop_body_not_block_obj
#+BEGIN_SRC d :exports none
} else if (line_occur["para"] > 0) {
@@ -1677,7 +1678,7 @@ if (auto m = match(line, rgx.block_curly_code_open)) {
} else {
/* line empty */
#+END_SRC
-******* assert line empty
+******* assert line empty :assert:
#+name: abs_loop_body_not_block_obj_line_empty
#+BEGIN_SRC d :exports none
/* line.empty, post contents, empty variables: */
@@ -1690,7 +1691,7 @@ assert(
"code block status: none"
);
#+END_SRC
-******* header_make instructions
+******* header_make instructions :header:make:instructions:
#+name: abs_loop_body_not_block_obj_line_empty
#+BEGIN_SRC d :exports none
if ((ft["header_make"] == 1)
@@ -1715,7 +1716,7 @@ if ((ft["header_make"] == 1)
object.remove("bookindex");
processing.remove("verse");
#+END_SRC
-******* header_metadata
+******* header_metadata :header:metadata:
#+name: abs_loop_body_not_block_obj_line_empty
#+BEGIN_SRC d :exports none
} else if ((ft["header_metadata"] == 1)
@@ -1742,7 +1743,7 @@ if ((ft["header_make"] == 1)
object.remove("bookindex");
processing.remove("verse");
#+END_SRC
-******* heading object
+******* heading object :heading:object:
#+name: abs_loop_body_not_block_obj_line_empty
#+BEGIN_SRC d :exports none
} else if ((ft["heading"] == 1)
@@ -1800,7 +1801,7 @@ if ((ft["header_make"] == 1)
processing.remove("verse");
counter++;
#+END_SRC
-******* paragraph object
+******* paragraph object :paragraph:object:
#+name: abs_loop_body_not_block_obj_line_empty
#+BEGIN_SRC d :exports none
} else if ((ft["para"] == 1) && (line_occur["para"] > 0)) {
@@ -1985,7 +1986,7 @@ auto t =
return t;
#+END_SRC
-* tangles
+* tangles :tangle:
** code structure: :ao_abstract_doc_source.d:
#+name: tangle_ao_abstract_doc_source
#+BEGIN_SRC d :tangle ../lib/sdp/ao_abstract_doc_source.d :padline no :exports none :noweb yes