aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/sdp/ao_abstract_doc_source.d
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2016-12-07 17:48:06 -0500
committerRalph Amissah <ralph@amissah.com>2019-04-10 15:14:13 -0400
commitd5cfec536fa3817e33a6bbe8607b67cc67ad621e (patch)
tree4afc9e856c7eb462d0848cb0dfce542d9334ffd7 /src/sdp/ao_abstract_doc_source.d
parent0.9.5 org files reorganized, tangles (code structure) to top of file (diff)
0.9.6 node info, and output continueddoc-reform_v0.0.9
Diffstat (limited to 'src/sdp/ao_abstract_doc_source.d')
-rw-r--r--src/sdp/ao_abstract_doc_source.d751
1 files changed, 380 insertions, 371 deletions
diff --git a/src/sdp/ao_abstract_doc_source.d b/src/sdp/ao_abstract_doc_source.d
index 944a720..b89c1e1 100644
--- a/src/sdp/ao_abstract_doc_source.d
+++ b/src/sdp/ao_abstract_doc_source.d
@@ -63,8 +63,8 @@ template SiSUdocAbstraction() {
/+ ocn +/
int obj_cite_number, obj_cite_number_;
auto object_citation_number = OCNemitter();
- int obj_cite_number_emit(int obj_cite_number_status_flag) {
- return object_citation_number.obj_cite_number_emitter(obj_cite_number_status_flag);
+ int ocn_emit(int ocn_status_flag) {
+ return object_citation_number.ocn_emitter(ocn_status_flag);
}
/+ book index variables +/
string book_idx_tmp;
@@ -77,8 +77,8 @@ template SiSUdocAbstraction() {
return bookindex_extract_hash.bookindex_nugget_hash(bookindex_section, obj_cite_number);
}
/+ node +/
- string[string] _node_str;
- int[string] _node_int;
+ string[string] _node_heading_str;
+ int[string] _node_heading_int;
auto node_construct = NodeStructureMetadata();
/+ ↓ abstract marked up document +/
auto abstract_doc_source(
@@ -101,8 +101,10 @@ template SiSUdocAbstraction() {
destroy(processing);
destroy(biblio_arr_json);
}
- auto node_int_ = node_metadata_int;
- auto node_str_ = node_metadata_str;
+ auto node_heading_int_ = node_metadata_heading_int;
+ auto node_heading_str_ = node_metadata_heading_str;
+ auto node_para_int_ = node_metadata_para_int;
+ auto node_para_str_ = node_metadata_para_str;
line_occur = [
"heading" : 0,
"para" : 0,
@@ -160,20 +162,20 @@ template SiSUdocAbstraction() {
string toc_txt_;
an_object["glossary_nugget"] = "";
an_object["blurb_nugget"] = "";
- node_str_["is"] = "heading";
- node_str_["ocn"] = "0";
- node_str_["segment_anchor_tag"] = "toc";
- node_str_["attrib"] = "";
- node_str_["marked_up_lev"] = "1";
- node_int_["heading_lev_markup"] = 4;
- node_int_["heading_lev_collapsed"] = 2;
- node_int_["parent_ocn"] = 1;
- node_int_["parent_lev_markup"] = 0;
+ node_heading_str_["is"] = "heading";
+ node_heading_str_["ocn"] = "0";
+ node_heading_str_["segment_anchor_tag"] = "toc";
+ node_heading_str_["attrib"] = "";
+ node_heading_str_["marked_up_lev"] = "1";
+ node_heading_int_["heading_lev_markup"] = 4;
+ node_heading_int_["heading_lev_collapsed"] = 2;
+ node_heading_int_["parent_ocn"] = 1;
+ node_heading_int_["parent_lev_markup"] = 0;
auto toc_head =
set_abstract_object.contents_heading(
"Table of Contents", // nugget/object
- node_str_,
- node_int_,
+ node_heading_str_,
+ node_heading_int_,
["toc"], // anchor tag
);
the_table_of_contents_section = [
@@ -213,7 +215,7 @@ template SiSUdocAbstraction() {
}
}
if (!line.empty) {
- _check_obj_cite_number_status_(line, type);
+ _check_ocn_status_(line, type);
}
if (type["code"] == TriState.on) {
/+ block object: code +/
@@ -263,53 +265,56 @@ template SiSUdocAbstraction() {
line_occur["para"] = State.off;
an_object_key="glossary_nugget"; //
if (matchFirst(line, rgx.heading_glossary)) {
- node_str_["is"] = "heading";
- node_str_["ocn"] = "0";
- node_str_["segment_anchor_tag"] = "";
- node_str_["attrib"] = "";
- node_str_["marked_up_lev"] = "B";
- node_int_["heading_lev_markup"] = 1;
- node_int_["heading_lev_collapsed"] = 1;
- node_int_["parent_ocn"] = 1;
- node_int_["parent_lev_markup"] = 0;
+ node_heading_str_["is"] = "heading";
+ node_heading_str_["ocn"] = "0";
+ node_heading_str_["segment_anchor_tag"] = "";
+ node_heading_str_["attrib"] = "";
+ node_heading_str_["marked_up_lev"] = "B";
+ node_heading_int_["heading_lev_markup"] = 1;
+ node_heading_int_["heading_lev_collapsed"] = 1;
+ node_heading_int_["parent_ocn"] = 1;
+ node_heading_int_["parent_lev_markup"] = 0;
the_glossary_section ~=
set_abstract_object.contents_heading(
"Glossary", // nugget/object
- node_str_,
- node_int_,
+ node_heading_str_,
+ node_heading_int_,
[""], // anchor tag
);
- node_str_["is"] = "heading";
- node_str_["ocn"] = "0";
- node_str_["segment_anchor_tag"] = "glossary";
- node_str_["attrib"] = "";
- node_str_["marked_up_lev"] = "1";
- node_int_["heading_lev_markup"] = 4;
- node_int_["heading_lev_collapsed"] = 2;
- node_int_["parent_ocn"] = 1;
- node_int_["parent_lev_markup"] = 0;
+ node_heading_str_["is"] = "heading";
+ node_heading_str_["ocn"] = "0";
+ node_heading_str_["segment_anchor_tag"] = "glossary";
+ node_heading_str_["attrib"] = "";
+ node_heading_str_["marked_up_lev"] = "1";
+ node_heading_int_["heading_lev_markup"] = 4;
+ node_heading_int_["heading_lev_collapsed"] = 2;
+ node_heading_int_["parent_ocn"] = 1;
+ node_heading_int_["parent_lev_markup"] = 0;
the_glossary_section ~=
set_abstract_object.contents_heading(
"Glossary", // nugget/object
- node_str_,
- node_int_,
+ node_heading_str_,
+ node_heading_int_,
["glossary"], // anchor tag
);
// } else if (matchFirst(line, rgx.heading)) {
// _heading_matched_(line, line_occur, an_object, an_object_key, lv, collapsed_lev, type, dochead_meta_aa); // levels?
} else {
_para_match_(line, an_object, an_object_key, indent, bullet, type, line_occur);
+ node_para_str_["is"] = "para";
+ node_para_str_["attrib"] = "";
+ node_para_int_["ocn"] = 0;
+ node_para_int_["indent_hang"] = indent["hang_position"];
+ node_para_int_["indent_base"] = indent["base_position"];
+ node_para_int_["bullet"] = (bullet) ? 1 : 0;
the_glossary_section ~=
set_abstract_object.contents_para(
- "para", // an_object["is"],
to!string(line), // an_object["substantive"],
- "", // attrib
- 0, // obj_cite_number,
- indent,
- bullet
+ node_para_str_,
+ node_para_int_,
);
}
- type["obj_cite_number_status"] = TriState.off;
+ type["ocn_status"] = TriState.off;
}
continue;
} else if ((matchFirst(line, rgx.heading_blurb)
@@ -336,70 +341,73 @@ template SiSUdocAbstraction() {
line_occur["para"] = State.off;
an_object_key="blurb_nugget";
if (matchFirst(line, rgx.heading_blurb)) {
- node_str_["is"] = "heading";
- node_str_["ocn"] = "0";
- node_str_["segment_anchor_tag"] = "";
- node_str_["attrib"] = "";
- node_str_["marked_up_lev"] = "B";
- node_int_["heading_lev_markup"] = 1;
- node_int_["heading_lev_collapsed"] = 1;
- node_int_["parent_ocn"] = 1;
- node_int_["parent_lev_markup"] = 0;
+ node_heading_str_["is"] = "heading";
+ node_heading_str_["ocn"] = "0";
+ node_heading_str_["segment_anchor_tag"] = "";
+ node_heading_str_["attrib"] = "";
+ node_heading_str_["marked_up_lev"] = "B";
+ node_heading_int_["heading_lev_markup"] = 1;
+ node_heading_int_["heading_lev_collapsed"] = 1;
+ node_heading_int_["parent_ocn"] = 1;
+ node_heading_int_["parent_lev_markup"] = 0;
the_blurb_section ~=
set_abstract_object.contents_heading(
"Blurb", // nugget/object
- node_str_,
- node_int_,
+ node_heading_str_,
+ node_heading_int_,
[""], // anchor tag
);
- node_str_["is"] = "heading";
- node_str_["ocn"] = "0";
- node_str_["segment_anchor_tag"] = "blurb";
- node_str_["attrib"] = "";
- node_str_["marked_up_lev"] = "1";
- node_int_["heading_lev_markup"] = 4;
- node_int_["heading_lev_collapsed"] = 2;
- node_int_["parent_ocn"] = 1;
- node_int_["parent_lev_markup"] = 0;
+ node_heading_str_["is"] = "heading";
+ node_heading_str_["ocn"] = "0";
+ node_heading_str_["segment_anchor_tag"] = "blurb";
+ node_heading_str_["attrib"] = "";
+ node_heading_str_["marked_up_lev"] = "1";
+ node_heading_int_["heading_lev_markup"] = 4;
+ node_heading_int_["heading_lev_collapsed"] = 2;
+ node_heading_int_["parent_ocn"] = 1;
+ node_heading_int_["parent_lev_markup"] = 0;
the_blurb_section ~=
set_abstract_object.contents_heading(
"Blurb", // nugget/object
- node_str_,
- node_int_,
+ node_heading_str_,
+ node_heading_int_,
["blurb"], // anchor tag
);
} else if ((matchFirst(line, rgx.heading))
&& (opt_action_bool["backmatter"] && opt_action_bool["section_blurb"])) {
_heading_matched_(line, line_occur, an_object, an_object_key, lv, collapsed_lev, type, dochead_meta_aa); // levels?
- node_str_["is"] = "heading";
- node_str_["ocn"] = "0";
- node_str_["segment_anchor_tag"] = "blurb";
- node_str_["attrib"] = "";
- node_str_["marked_up_lev"] = to!string(an_object["lev"]);
- node_int_["heading_lev_markup"] = to!int(an_object["lev_markup_number"]); // make int, remove need to conv
- node_int_["heading_lev_collapsed"] = to!int(an_object["lev_collapsed_number"]); // make int, remove need to conv
- node_int_["parent_ocn"] = 1;
- node_int_["parent_lev_markup"] = 0;
+ node_heading_str_["is"] = "heading";
+ node_heading_str_["ocn"] = "0";
+ node_heading_str_["segment_anchor_tag"] = "blurb";
+ node_heading_str_["attrib"] = "";
+ node_heading_str_["marked_up_lev"] = to!string(an_object["lev"]);
+ node_heading_int_["heading_lev_markup"] = to!int(an_object["lev_markup_number"]); // make int, remove need to conv
+ node_heading_int_["heading_lev_collapsed"] = to!int(an_object["lev_collapsed_number"]); // make int, remove need to conv
+ node_heading_int_["parent_ocn"] = 1;
+ node_heading_int_["parent_lev_markup"] = 0;
the_blurb_section ~=
set_abstract_object.contents_heading(
to!string(line), // an_object["substantive"],
- node_str_,
- node_int_,
+ node_heading_str_,
+ node_heading_int_,
[""], // anchor tag
);
} else {
_para_match_(line, an_object, an_object_key, indent, bullet, type, line_occur);
+ node_para_str_["is"] = "para";
+ node_para_str_["attrib"] = "";
+ node_para_int_["ocn"] = obj_cite_number;
+ node_para_int_["indent_hang"] = indent["hang_position"];
+ node_para_int_["indent_base"] = indent["base_position"];
+ node_para_int_["bullet"] = (bullet) ? 1 : 0;
the_blurb_section ~=
set_abstract_object.contents_para(
- "para", // an_object["is"],
to!string(line), // an_object["substantive"],
- "", // attrib
- obj_cite_number,
- indent,
- bullet
+ node_para_str_,
+ node_para_int_,
);
}
- type["obj_cite_number_status"] = TriState.off;
+ type["ocn_status"] = TriState.off;
}
continue;
} else if (type["poem"] == TriState.on) {
@@ -540,15 +548,14 @@ template SiSUdocAbstraction() {
the_document_body_section,
bookindex_unordered_hashes,
obj_cite_number,
- _node_str,
- _node_int,
+ _node_heading_str,
+ _node_heading_int,
cntr,
type,
obj_cite_number_poem,
dochead_make_aa
); // watch
} else {
- /+ line empty +/
/+ line.empty, post contents, empty variables: +/
assert(
line.empty,
@@ -561,7 +568,7 @@ template SiSUdocAbstraction() {
if ((type["heading"] == State.on)
&& (line_occur["heading"] > State.off)) {
/+ heading object (current line empty) +/
- obj_cite_number = obj_cite_number_emit(type["obj_cite_number_status"]);
+ obj_cite_number = ocn_emit(type["ocn_status"]);
an_object["bookindex_nugget"] =
("bookindex_nugget" in an_object) ? an_object["bookindex_nugget"] : "";
bookindex_unordered_hashes =
@@ -602,10 +609,10 @@ template SiSUdocAbstraction() {
an_object["is"], // string
html_segnames_ptr, // int
);
- _node_str = _node_t[0];
- _node_int = _node_t[1];
+ _node_heading_str = _node_t[0];
+ _node_heading_int = _node_t[1];
an_object["attrib"] =
- obj_att.obj_attributes(an_object["is"], an_object[an_object_key], _node_str, _node_int);
+ obj_att.obj_attributes(an_object["is"], an_object[an_object_key], _node_heading_str, _node_heading_int);
++heading_ptr;
debug(segments) {
writeln(an_object["lev_markup_number"]);
@@ -614,8 +621,8 @@ template SiSUdocAbstraction() {
the_document_body_section ~=
set_abstract_object.contents_heading(
an_object["substantive"],
- _node_str,
- _node_int,
+ _node_heading_str,
+ _node_heading_int,
anchor_tags,
);
// track previous heading and make assertions
@@ -629,7 +636,7 @@ template SiSUdocAbstraction() {
++cntr;
} else if ((type["para"] == State.on) && (line_occur["para"] > State.off)) {
/+ paragraph object (current line empty) +/
- obj_cite_number = obj_cite_number_emit(type["obj_cite_number_status"]);
+ obj_cite_number = ocn_emit(type["ocn_status"]);
an_object["bookindex_nugget"] =
("bookindex_nugget" in an_object) ? an_object["bookindex_nugget"] : "";
bookindex_unordered_hashes =
@@ -644,22 +651,25 @@ template SiSUdocAbstraction() {
heading_ptr-1,
an_object["is"],
);
- _node_str = _node_t[0];
- _node_int = _node_t[1];
+ _node_heading_str = _node_t[0];
+ _node_heading_int = _node_t[1];
auto substantive_object_and_anchor_tags_tuple =
obj_im.obj_inline_markup_and_anchor_tags(an_object, an_object_key, dochead_make_aa); // ...
an_object["substantive"] = substantive_object_and_anchor_tags_tuple[0];
anchor_tags = substantive_object_and_anchor_tags_tuple[1];
an_object["attrib"] =
- obj_att.obj_attributes(an_object["is"], an_object[an_object_key], _node_str, _node_int);
+ obj_att.obj_attributes(an_object["is"], an_object[an_object_key], _node_heading_str, _node_heading_int);
+ node_para_str_["is"] = an_object["is"];
+ node_para_str_["attrib"] = an_object["attrib"];
+ node_para_int_["ocn"] = obj_cite_number;
+ node_para_int_["indent_hang"] = indent["hang_position"];
+ node_para_int_["indent_base"] = indent["base_position"];
+ node_para_int_["bullet"] = (bullet) ? 1 : 0;
the_document_body_section ~=
set_abstract_object.contents_para(
- an_object["is"],
an_object["substantive"],
- an_object["attrib"],
- obj_cite_number,
- indent,
- bullet
+ node_para_str_,
+ node_para_int_,
);
_common_reset_(line_occur, an_object, type);
indent=[
@@ -738,20 +748,20 @@ template SiSUdocAbstraction() {
}
if (an_object["glossary_nugget"].length == 0) {
writeln("no gloss");
- node_str_["is"] = "heading";
- node_str_["ocn"] = "0";
- node_str_["segment_anchor_tag"] = "";
- node_str_["attrib"] = "";
- node_str_["marked_up_lev"] = "B";
- node_int_["heading_lev_markup"] = 1;
- node_int_["heading_lev_collapsed"] = 1;
- node_int_["parent_ocn"] = 1;
- node_int_["parent_lev_markup"] = 0;
+ node_heading_str_["is"] = "heading";
+ node_heading_str_["ocn"] = "0";
+ node_heading_str_["segment_anchor_tag"] = "";
+ node_heading_str_["attrib"] = "";
+ node_heading_str_["marked_up_lev"] = "B";
+ node_heading_int_["heading_lev_markup"] = 1;
+ node_heading_int_["heading_lev_collapsed"] = 1;
+ node_heading_int_["parent_ocn"] = 1;
+ node_heading_int_["parent_lev_markup"] = 0;
the_glossary_section ~=
set_abstract_object.contents_heading(
"(skip) there is no Glossary section", // nugget/object
- node_str_,
- node_int_,
+ node_heading_str_,
+ node_heading_int_,
[""], // anchor tag
);
} else {
@@ -768,53 +778,53 @@ template SiSUdocAbstraction() {
auto biblio_ordered =
biblio._bibliography_(biblio_unsorted_incomplete, bib_arr_json);
if (biblio_ordered.length > 0) {
- node_str_["is"] = "heading";
- node_str_["ocn"] = "0";
- node_str_["segment_anchor_tag"] = "";
- node_str_["attrib"] = "";
- node_str_["marked_up_lev"] = "B";
- node_int_["heading_lev_markup"] = 1;
- node_int_["heading_lev_collapsed"] = 1;
- node_int_["parent_ocn"] = 1;
- node_int_["parent_lev_markup"] = 0;
+ node_heading_str_["is"] = "heading";
+ node_heading_str_["ocn"] = "0";
+ node_heading_str_["segment_anchor_tag"] = "";
+ node_heading_str_["attrib"] = "";
+ node_heading_str_["marked_up_lev"] = "B";
+ node_heading_int_["heading_lev_markup"] = 1;
+ node_heading_int_["heading_lev_collapsed"] = 1;
+ node_heading_int_["parent_ocn"] = 1;
+ node_heading_int_["parent_lev_markup"] = 0;
the_bibliography_section ~=
set_abstract_object.contents_heading(
"Bibliography", // nugget/object
- node_str_,
- node_int_,
+ node_heading_str_,
+ node_heading_int_,
[""], // anchor tag
);
- node_str_["is"] = "heading";
- node_str_["ocn"] = "0";
- node_str_["segment_anchor_tag"] = "bibliography";
- node_str_["attrib"] = "";
- node_str_["marked_up_lev"] = "1";
- node_int_["heading_lev_markup"] = 4;
- node_int_["heading_lev_collapsed"] = 2;
- node_int_["parent_ocn"] = 1;
- node_int_["parent_lev_markup"] = 0;
+ node_heading_str_["is"] = "heading";
+ node_heading_str_["ocn"] = "0";
+ node_heading_str_["segment_anchor_tag"] = "bibliography";
+ node_heading_str_["attrib"] = "";
+ node_heading_str_["marked_up_lev"] = "1";
+ node_heading_int_["heading_lev_markup"] = 4;
+ node_heading_int_["heading_lev_collapsed"] = 2;
+ node_heading_int_["parent_ocn"] = 1;
+ node_heading_int_["parent_lev_markup"] = 0;
the_bibliography_section ~=
set_abstract_object.contents_heading(
"Bibliography",
- node_str_,
- node_int_,
+ node_heading_str_,
+ node_heading_int_,
["bibliography"], // anchor tag
);
} else {
- node_str_["is"] = "heading";
- node_str_["ocn"] = "0";
- node_str_["segment_anchor_tag"] = "";
- node_str_["attrib"] = "";
- node_str_["marked_up_lev"] = "B";
- node_int_["heading_lev_markup"] = 1;
- node_int_["heading_lev_collapsed"] = 1;
- node_int_["parent_ocn"] = 1;
- node_int_["parent_lev_markup"] = 0;
+ node_heading_str_["is"] = "heading";
+ node_heading_str_["ocn"] = "0";
+ node_heading_str_["segment_anchor_tag"] = "";
+ node_heading_str_["attrib"] = "";
+ node_heading_str_["marked_up_lev"] = "B";
+ node_heading_int_["heading_lev_markup"] = 1;
+ node_heading_int_["heading_lev_collapsed"] = 1;
+ node_heading_int_["parent_ocn"] = 1;
+ node_heading_int_["parent_lev_markup"] = 0;
the_bibliography_section ~=
set_abstract_object.contents_heading(
"(skip) there is no Bibliography", // nugget/object
- node_str_,
- node_int_,
+ node_heading_str_,
+ node_heading_int_,
[""], // anchor tag
);
}
@@ -834,14 +844,17 @@ template SiSUdocAbstraction() {
((entry["place"].str.empty) ? "" : ", " ~ entry["place"].str),
((entry["url"].str.empty) ? "" : ", [" ~ entry["url"].str ~ "]"),
);
+ node_para_str_["is"] = "bibliography";
+ node_para_str_["attrib"] = "";
+ node_para_int_["ocn"] = 0;
+ node_para_int_["indent_hang"] = 0;
+ node_para_int_["indent_base"] = 1;
+ node_para_int_["bullet"] = 0;
the_bibliography_section ~=
set_abstract_object.contents_para(
- "bibliography",
out_, // nugget/object
- "", // attrib
- 0, // obj_cite_number
- ([ "hang_position" : 0, "base_position" : 1, ]), // indent
- false
+ node_para_str_,
+ node_para_int_,
);
}
debug(bibliosection) {
@@ -867,20 +880,20 @@ template SiSUdocAbstraction() {
}
if (an_object["blurb_nugget"].length == 0) {
writeln("no blurb");
- node_str_["is"] = "heading";
- node_str_["ocn"] = "0";
- node_str_["segment_anchor_tag"] = "";
- node_str_["attrib"] = "";
- node_str_["marked_up_lev"] = "B";
- node_int_["heading_lev_markup"] = 1;
- node_int_["heading_lev_collapsed"] = 1;
- node_int_["parent_ocn"] = 1;
- node_int_["parent_lev_markup"] = 0;
+ node_heading_str_["is"] = "heading";
+ node_heading_str_["ocn"] = "0";
+ node_heading_str_["segment_anchor_tag"] = "";
+ node_heading_str_["attrib"] = "";
+ node_heading_str_["marked_up_lev"] = "B";
+ node_heading_int_["heading_lev_markup"] = 1;
+ node_heading_int_["heading_lev_collapsed"] = 1;
+ node_heading_int_["parent_ocn"] = 1;
+ node_heading_int_["parent_lev_markup"] = 0;
the_blurb_section ~=
set_abstract_object.contents_heading(
"(skip) there is no Blurb section", // nugget/object
- node_str_,
- node_int_,
+ node_heading_str_,
+ node_heading_int_,
[""], // anchor tag
);
} else {
@@ -1111,44 +1124,44 @@ template SiSUdocAbstraction() {
type["para"] = State.off;
object_reset(an_object);
}
- void _check_obj_cite_number_status_(
+ void _check_ocn_status_(
char[] line,
ref int[string] type
) {
- if ((!line.empty) && (type["obj_cite_number_status_multi_obj"] == TriState.off)) {
+ if ((!line.empty) && (type["ocn_status_multi_obj"] == TriState.off)) {
/+ not multi-line object, check whether obj_cite_number is on or turned off +/
if (matchFirst(line, rgx.obj_cite_number_block_marks)) {
/+ switch off obj_cite_number +/
if (matchFirst(line, rgx.obj_cite_number_off_block)) {
- type["obj_cite_number_status_multi_obj"] = TriState.on;
+ type["ocn_status_multi_obj"] = TriState.on;
debug(ocnoff) {
writeln(line);
}
}
if (matchFirst(line, rgx.obj_cite_number_off_block_dh)) {
- type["obj_cite_number_status_multi_obj"] = TriState.closing;
+ type["ocn_status_multi_obj"] = TriState.closing;
debug(ocnoff) {
writeln(line);
}
}
} else {
- if (type["obj_cite_number_status_multi_obj"] == TriState.off) {
+ if (type["ocn_status_multi_obj"] == TriState.off) {
if (matchFirst(line, rgx.obj_cite_number_off)) {
- type["obj_cite_number_status"] = TriState.on;
+ type["ocn_status"] = TriState.on;
} else if (matchFirst(line, rgx.obj_cite_number_off_dh)) {
- type["obj_cite_number_status"] = TriState.closing;
+ type["ocn_status"] = TriState.closing;
} else {
- type["obj_cite_number_status"] = TriState.off;
+ type["ocn_status"] = TriState.off;
}
} else {
- type["obj_cite_number_status"] =
- type["obj_cite_number_status_multi_obj"];
+ type["ocn_status"] =
+ type["ocn_status_multi_obj"];
}
}
- } else if ((!line.empty) && (type["obj_cite_number_status_multi_obj"] > TriState.off)) {
+ } else if ((!line.empty) && (type["ocn_status_multi_obj"] > TriState.off)) {
if (matchFirst(line, rgx.obj_cite_number_off_block_close)) {
- type["obj_cite_number_status_multi_obj"] = TriState.off;
- type["obj_cite_number_status"] = TriState.off;
+ type["ocn_status_multi_obj"] = TriState.off;
+ type["ocn_status"] = TriState.off;
debug(ocnoff) {
writeln(line);
}
@@ -1513,7 +1526,7 @@ template SiSUdocAbstraction() {
an_object["substantive"] = substantive_object_and_anchor_tags_tuple[0];
anchor_tags = substantive_object_and_anchor_tags_tuple[1];
an_object["attrib"] =
- obj_att.obj_attributes(an_object["is"], an_object[an_object_key], _node_str, _node_int);
+ obj_att.obj_attributes(an_object["is"], an_object[an_object_key], _node_heading_str, _node_heading_int);
the_document_body_section ~=
set_abstract_object.contents_block(
an_object["is"],
@@ -1534,7 +1547,7 @@ template SiSUdocAbstraction() {
processing["verse"] ~= line ~= "\n";
if (type["verse_new"] == State.on) {
obj_cite_number =
- obj_cite_number_emit(type["obj_cite_number_status"]);
+ ocn_emit(type["ocn_status"]);
type["verse_new"] = State.off;
} else if (matchFirst(line, rgx.newline_eol_delimiter_only)) {
verse_line = TriState.off;
@@ -1560,14 +1573,14 @@ template SiSUdocAbstraction() {
heading_ptr-1,
an_object["is"]
);
- _node_str = _node_t[0];
- _node_int = _node_t[1];
+ _node_heading_str = _node_t[0];
+ _node_heading_int = _node_t[1];
auto substantive_object_and_anchor_tags_tuple =
obj_im.obj_inline_markup_and_anchor_tags(an_object, an_object_key, dochead_make_aa);
an_object["substantive"] = substantive_object_and_anchor_tags_tuple[0];
anchor_tags = substantive_object_and_anchor_tags_tuple[1];
an_object["attrib"] =
- obj_att.obj_attributes(an_object["is"], an_object[an_object_key], _node_str, _node_int);
+ obj_att.obj_attributes(an_object["is"], an_object[an_object_key], _node_heading_str, _node_heading_int);
the_document_body_section ~=
set_abstract_object.contents_block(
an_object["is"],
@@ -1604,7 +1617,7 @@ template SiSUdocAbstraction() {
an_object["substantive"] = substantive_object_and_anchor_tags_tuple[0];
anchor_tags = substantive_object_and_anchor_tags_tuple[1];
an_object["attrib"] =
- obj_att.obj_attributes(an_object["is"], an_object[an_object_key], _node_str, _node_int);
+ obj_att.obj_attributes(an_object["is"], an_object[an_object_key], _node_heading_str, _node_heading_int);
the_document_body_section ~=
set_abstract_object.contents_block(
an_object["is"],
@@ -1624,7 +1637,7 @@ template SiSUdocAbstraction() {
processing["verse"] ~= line ~= "\n";
if (type["verse_new"] == State.on) {
obj_cite_number =
- obj_cite_number_emit(type["obj_cite_number_status"]);
+ ocn_emit(type["ocn_status"]);
type["verse_new"] = State.off;
} else if (matchFirst(line, rgx.newline_eol_delimiter_only)) {
type["verse_new"] = State.on;
@@ -1651,14 +1664,14 @@ template SiSUdocAbstraction() {
heading_ptr-1,
an_object["is"]
);
- _node_str = _node_t[0];
- _node_int = _node_t[1];
+ _node_heading_str = _node_t[0];
+ _node_heading_int = _node_t[1];
auto substantive_object_and_anchor_tags_tuple =
obj_im.obj_inline_markup_and_anchor_tags(an_object, an_object_key, dochead_make_aa);
an_object["substantive"] = substantive_object_and_anchor_tags_tuple[0];
anchor_tags = substantive_object_and_anchor_tags_tuple[1];
an_object["attrib"] =
- obj_att.obj_attributes(an_object["is"], an_object[an_object_key], _node_str, _node_int);
+ obj_att.obj_attributes(an_object["is"], an_object[an_object_key], _node_heading_str, _node_heading_int);
the_document_body_section ~=
set_abstract_object.contents_block(
an_object["is"],
@@ -1819,8 +1832,8 @@ template SiSUdocAbstraction() {
ref ObjComposite[] the_document_body_section,
ref string[][string][string] bookindex_unordered_hashes,
ref int obj_cite_number,
- ref string[string] _node_str,
- ref int[string] _node_int,
+ ref string[string] _node_heading_str,
+ ref int[string] _node_heading_int,
ref int cntr,
ref int[string] type,
string[string] obj_cite_number_poem,
@@ -1838,7 +1851,7 @@ template SiSUdocAbstraction() {
assertions_flag_types_block_status_none_or_closed(type);
if (type["code"] == TriState.closing) {
obj_cite_number =
- obj_cite_number_emit(type["obj_cite_number_status"]);
+ ocn_emit(type["ocn_status"]);
an_object["bookindex_nugget"] =
("bookindex_nugget" in an_object) ? an_object["bookindex_nugget"] : "";
bookindex_unordered_hashes =
@@ -1853,14 +1866,14 @@ template SiSUdocAbstraction() {
heading_ptr-1,
an_object["is"]
);
- _node_str = _node_t[0];
- _node_int = _node_t[1];
+ _node_heading_str = _node_t[0];
+ _node_heading_int = _node_t[1];
auto substantive_object_and_anchor_tags_tuple =
obj_im.obj_inline_markup_and_anchor_tags(an_object, an_object_key, dochead_make_aa);
an_object["substantive"] = substantive_object_and_anchor_tags_tuple[0];
anchor_tags = substantive_object_and_anchor_tags_tuple[1];
an_object["attrib"] =
- obj_att.obj_attributes(an_object["is"], an_object[an_object_key], _node_str, _node_int);
+ obj_att.obj_attributes(an_object["is"], an_object[an_object_key], _node_heading_str, _node_heading_int);
the_document_body_section ~=
set_abstract_object.contents_block_code(
an_object["is"],
@@ -1888,15 +1901,15 @@ template SiSUdocAbstraction() {
heading_ptr-1,
an_object["is"]
);
- _node_str = _node_t[0];
- _node_int = _node_t[1];
+ _node_heading_str = _node_t[0];
+ _node_heading_int = _node_t[1];
the_document_body_section ~=
set_abstract_object.contents_block_obj_cite_number_string(
"poem",
"",
(obj_cite_number_poem["start"], obj_cite_number_poem["end"]),
- _node_str,
- _node_int,
+ _node_heading_str,
+ _node_heading_int,
); // bookindex
object_reset(an_object);
processing.remove("verse");
@@ -1904,7 +1917,7 @@ template SiSUdocAbstraction() {
type["poem"] = TriState.off;
} else if (type["table"] == TriState.closing) {
obj_cite_number =
- obj_cite_number_emit(type["obj_cite_number_status"]);
+ ocn_emit(type["ocn_status"]);
an_object["bookindex_nugget"] =
("bookindex_nugget" in an_object) ? an_object["bookindex_nugget"] : "";
bookindex_unordered_hashes =
@@ -1919,14 +1932,14 @@ template SiSUdocAbstraction() {
heading_ptr-1,
an_object["is"]
);
- _node_str = _node_t[0];
- _node_int = _node_t[1];
+ _node_heading_str = _node_t[0];
+ _node_heading_int = _node_t[1];
auto substantive_object_and_anchor_tags_tuple =
obj_im.obj_inline_markup_and_anchor_tags(an_object, an_object_key, dochead_make_aa);
an_object["substantive"] = substantive_object_and_anchor_tags_tuple[0];
anchor_tags = substantive_object_and_anchor_tags_tuple[1];
an_object["attrib"] =
- obj_att.obj_attributes(an_object["is"], an_object[an_object_key], _node_str, _node_int);
+ obj_att.obj_attributes(an_object["is"], an_object[an_object_key], _node_heading_str, _node_heading_int);
the_document_body_section ~=
set_abstract_object.contents_block(
an_object["is"],
@@ -1941,7 +1954,7 @@ template SiSUdocAbstraction() {
type["table"] = TriState.off;
} else if (type["group"] == TriState.closing) {
obj_cite_number =
- obj_cite_number_emit(type["obj_cite_number_status"]);
+ ocn_emit(type["ocn_status"]);
an_object["bookindex_nugget"] =
("bookindex_nugget" in an_object) ? an_object["bookindex_nugget"] : "";
bookindex_unordered_hashes =
@@ -1956,14 +1969,14 @@ template SiSUdocAbstraction() {
heading_ptr-1,
an_object["is"]
);
- _node_str = _node_t[0];
- _node_int = _node_t[1];
+ _node_heading_str = _node_t[0];
+ _node_heading_int = _node_t[1];
auto substantive_object_and_anchor_tags_tuple =
obj_im.obj_inline_markup_and_anchor_tags(an_object, an_object_key, dochead_make_aa);
an_object["substantive"] = substantive_object_and_anchor_tags_tuple[0];
anchor_tags = substantive_object_and_anchor_tags_tuple[1];
an_object["attrib"] =
- obj_att.obj_attributes(an_object["is"], an_object[an_object_key], _node_str, _node_int);
+ obj_att.obj_attributes(an_object["is"], an_object[an_object_key], _node_heading_str, _node_heading_int);
the_document_body_section ~=
set_abstract_object.contents_block(
an_object["is"],
@@ -1977,7 +1990,7 @@ template SiSUdocAbstraction() {
type["blocks"] = TriState.off;
type["group"] = TriState.off;
} else if (type["block"] == TriState.closing) {
- obj_cite_number = obj_cite_number_emit(type["obj_cite_number_status"]);
+ obj_cite_number = ocn_emit(type["ocn_status"]);
an_object["bookindex_nugget"] =
("bookindex_nugget" in an_object) ? an_object["bookindex_nugget"] : "";
bookindex_unordered_hashes =
@@ -1992,14 +2005,14 @@ template SiSUdocAbstraction() {
heading_ptr-1,
an_object["is"]
);
- _node_str = _node_t[0];
- _node_int = _node_t[1];
+ _node_heading_str = _node_t[0];
+ _node_heading_int = _node_t[1];
auto substantive_object_and_anchor_tags_tuple =
obj_im.obj_inline_markup_and_anchor_tags(an_object, an_object_key, dochead_make_aa);
an_object["substantive"] = substantive_object_and_anchor_tags_tuple[0];
anchor_tags = substantive_object_and_anchor_tags_tuple[1];
an_object["attrib"] =
- obj_att.obj_attributes(an_object["is"], an_object[an_object_key], _node_str, _node_int);
+ obj_att.obj_attributes(an_object["is"], an_object[an_object_key], _node_heading_str, _node_heading_int);
the_document_body_section ~=
set_abstract_object.contents_block(
an_object["is"],
@@ -2014,7 +2027,7 @@ template SiSUdocAbstraction() {
type["block"] = TriState.off;
} else if (type["quote"] == TriState.closing) {
obj_cite_number =
- obj_cite_number_emit(type["obj_cite_number_status"]);
+ ocn_emit(type["ocn_status"]);
an_object["bookindex_nugget"] =
("bookindex_nugget" in an_object) ? an_object["bookindex_nugget"] : "";
bookindex_unordered_hashes =
@@ -2029,14 +2042,14 @@ template SiSUdocAbstraction() {
heading_ptr-1,
an_object["is"]
);
- _node_str = _node_t[0];
- _node_int = _node_t[1];
+ _node_heading_str = _node_t[0];
+ _node_heading_int = _node_t[1];
auto substantive_object_and_anchor_tags_tuple =
obj_im.obj_inline_markup_and_anchor_tags(an_object, an_object_key, dochead_make_aa);
an_object["substantive"] = substantive_object_and_anchor_tags_tuple[0];
anchor_tags = substantive_object_and_anchor_tags_tuple[1];
an_object["attrib"] =
- obj_att.obj_attributes(an_object["is"], an_object[an_object_key], _node_str, _node_int);
+ obj_att.obj_attributes(an_object["is"], an_object[an_object_key], _node_heading_str, _node_heading_int);
the_document_body_section ~=
set_abstract_object.contents_block(
an_object["is"],
@@ -2437,10 +2450,10 @@ template SiSUdocAbstraction() {
/+ ↓ abstraction function emitters +/
struct OCNemitter {
int obj_cite_number, obj_cite_number_;
- int obj_cite_number_emitter(int obj_cite_number_status_flag)
- in { assert(obj_cite_number_status_flag <= 2); }
+ int ocn_emitter(int ocn_status_flag)
+ in { assert(ocn_status_flag <= 2); }
body {
- obj_cite_number=(obj_cite_number_status_flag == 0)
+ obj_cite_number=(ocn_status_flag == 0)
? ++obj_cite_number_
: 0;
assert(obj_cite_number >= 0);
@@ -3092,16 +3105,16 @@ template SiSUdocAbstraction() {
string obj_attributes(
string obj_is_,
string obj_raw,
- string[string] _node_str,
- int[string] _node_int
+ string[string] _node_heading_str,
+ int[string] _node_heading_int
)
in { }
body {
scope(exit) {
destroy(obj_is_);
destroy(obj_raw);
- destroy(_node_str);
- destroy(_node_int);
+ destroy(_node_heading_str);
+ destroy(_node_heading_int);
}
_obj_attrib.remove("json");
_obj_attrib["json"] ="{";
@@ -3141,7 +3154,7 @@ template SiSUdocAbstraction() {
break;
}
_obj_attrib["json"] ~=" }";
- _obj_attrib["json"]=_set_additional_values_parse_as_json(_obj_attrib["json"], obj_is_, _node_str, _node_int); // check
+ _obj_attrib["json"]=_set_additional_values_parse_as_json(_obj_attrib["json"], obj_is_, _node_heading_str, _node_heading_int); // check
debug(structattrib) {
if (oa_j["is"].str() == "heading") {
writeln(_obj_attrib["json"]);
@@ -3277,24 +3290,24 @@ template SiSUdocAbstraction() {
string _set_additional_values_parse_as_json(
string _obj_attrib,
string obj_is_,
- string[string] _node_str,
- int[string] _node_int
+ string[string] _node_heading_str,
+ int[string] _node_heading_int
) { //
JSONValue oa_j = parseJSON(_obj_attrib);
assert(
(oa_j.type == JSON_TYPE.OBJECT)
);
if (obj_is_ == "heading") {
- oa_j.object["obj_cite_number"] = _node_str["ocn"];
- oa_j.object["lev_markup_number"] = _node_int["heading_lev_markup"];
- oa_j.object["lev_collapsed_number"] = _node_int["heading_lev_collapsed"];
+ oa_j.object["obj_cite_number"] = _node_heading_str["ocn"];
+ oa_j.object["lev_markup_number"] = _node_heading_int["heading_lev_markup"];
+ oa_j.object["lev_collapsed_number"] = _node_heading_int["heading_lev_collapsed"];
oa_j.object["heading_ptr"] =
- _node_int["ptr_heading"];
+ _node_heading_int["ptr_heading"];
oa_j.object["doc_object_ptr"] =
- _node_int["ptr_doc_object"];
+ _node_heading_int["ptr_doc_object"];
}
- oa_j.object["parent_obj_cite_number"] = _node_int["parent_ocn"];
- oa_j.object["parent_lev_markup_number"] = _node_int["parent_lev_markup"];
+ oa_j.object["parent_obj_cite_number"] = _node_heading_int["parent_ocn"]; //
+ oa_j.object["parent_lev_markup_number"] = _node_heading_int["parent_lev_markup"]; //
_obj_attrib = oa_j.toString();
return _obj_attrib;
}
@@ -3436,7 +3449,7 @@ template SiSUdocAbstraction() {
bool[string] opt_action_bool,
) {
mixin SiSUnode;
- string type;
+ string type_is;
string lev;
int lev_int_markup, lev_int_collapsed;
string attrib;
@@ -3445,59 +3458,60 @@ template SiSUdocAbstraction() {
auto mainkeys =
bookindex_unordered_hashes.byKey.array.sort().release;
ObjComposite[][string] bookindex_section;
- auto node_int_ = node_metadata_int;
- auto node_str_ = node_metadata_str;
+ auto node_heading_int_ = node_metadata_heading_int;
+ auto node_heading_str_ = node_metadata_heading_str;
+ auto node_para_int_ = node_metadata_para_int;
+ auto node_para_str_ = node_metadata_para_str;
if ((mainkeys.length > 0)
&& (opt_action_bool["backmatter"] && opt_action_bool["section_bookindex"])) {
string bi_tmp_seg, bi_tmp_scroll;
- node_str_["is"] = "heading";
- node_str_["ocn"] = "0";
- node_str_["segment_anchor_tag"] = "";
- node_str_["attrib"] = "";
- node_str_["marked_up_lev"] = "B";
- node_int_["heading_lev_markup"] = 1;
- node_int_["heading_lev_collapsed"] = 1;
- node_int_["parent_ocn"] = 1;
- node_int_["parent_lev_markup"] = 0;
+ node_heading_str_["is"] = "heading";
+ node_heading_str_["ocn"] = "0";
+ node_heading_str_["segment_anchor_tag"] = "";
+ node_heading_str_["attrib"] = "";
+ node_heading_str_["marked_up_lev"] = "B";
+ node_heading_int_["heading_lev_markup"] = 1;
+ node_heading_int_["heading_lev_collapsed"] = 1;
+ node_heading_int_["parent_ocn"] = 1;
+ node_heading_int_["parent_lev_markup"] = 0;
bookindex_section["scroll"] ~=
set_abstract_object.contents_heading(
"Book Index",
- node_str_,
- node_int_,
+ node_heading_str_,
+ node_heading_int_,
[],
);
bookindex_section["seg"] ~=
set_abstract_object.contents_heading(
"Book Index",
- node_str_,
- node_int_,
+ node_heading_str_,
+ node_heading_int_,
[],
);
++obj_cite_number;
++mkn;
- // 1~ Index
- node_str_["is"] = "heading";
- node_str_["ocn"] = "0";
- node_str_["segment_anchor_tag"] = "bookindex";
- node_str_["attrib"] = "";
- node_str_["marked_up_lev"] = "1";
- node_int_["heading_lev_markup"] = 4;
- node_int_["heading_lev_collapsed"] = 2;
- node_int_["parent_ocn"] = 1;
- node_int_["parent_lev_markup"] = 0;
+ node_heading_str_["is"] = "heading";
+ node_heading_str_["ocn"] = "0";
+ node_heading_str_["segment_anchor_tag"] = "bookindex";
+ node_heading_str_["attrib"] = "";
+ node_heading_str_["marked_up_lev"] = "1";
+ node_heading_int_["heading_lev_markup"] = 4;
+ node_heading_int_["heading_lev_collapsed"] = 2;
+ node_heading_int_["parent_ocn"] = 1;
+ node_heading_int_["parent_lev_markup"] = 0;
bookindex_section["scroll"] ~=
set_abstract_object.contents_heading(
"Index",
- node_str_,
- node_int_,
- ["book_index"],
+ node_heading_str_,
+ node_heading_int_,
+ ["bookindex"],
);
bookindex_section["seg"] ~=
set_abstract_object.contents_heading(
"Index",
- node_str_,
- node_int_,
- ["book_index"],
+ node_heading_str_,
+ node_heading_int_,
+ ["bookindex"],
);
++obj_cite_number;
++mkn;
@@ -3532,55 +3546,50 @@ template SiSUdocAbstraction() {
}
bi_tmp_scroll = replaceFirst(bi_tmp_scroll, rgx.trailing_linebreak, "");
bi_tmp_seg = replaceFirst(bi_tmp_seg, rgx.trailing_linebreak, "");
- type="para";
- attrib="";
- indent=[
- "hang_position" : 0,
- "base_position" : 1,
- ];
+ indent=[ "hang_position" : 0, "base_position" : 1, ];
+ node_para_str_["is"] = "para";
+ node_para_str_["attrib"] = "";
+ node_para_int_["ocn"] = obj_cite_number;
+ node_para_int_["indent_hang"] = 0;
+ node_para_int_["indent_base"] = 1;
+ node_para_int_["bullet"] = 0;
bookindex_section["scroll"] ~=
set_abstract_object.contents_para(
- type,
bi_tmp_scroll,
- attrib,
- obj_cite_number,
- indent,
- false
+ node_para_str_,
+ node_para_int_,
);
bookindex_section["seg"] ~=
set_abstract_object.contents_para(
- type,
bi_tmp_seg,
- attrib,
- obj_cite_number,
- indent,
- false
+ node_para_str_,
+ node_para_int_,
);
++obj_cite_number;
++mkn;
}
} else { // no book index, (figure out what to do here)
- node_str_["is"] = "heading";
- node_str_["ocn"] = "0";
- node_str_["segment_anchor_tag"] = "";
- node_str_["attrib"] = "";
- node_str_["marked_up_lev"] = "B";
- node_int_["heading_lev_markup"] = 1;
- node_int_["heading_lev_collapsed"] = 1;
- node_int_["parent_ocn"] = 1;
- node_int_["parent_lev_markup"] = 0;
+ node_heading_str_["is"] = "heading";
+ node_heading_str_["ocn"] = "0";
+ node_heading_str_["segment_anchor_tag"] = "";
+ node_heading_str_["attrib"] = "";
+ node_heading_str_["marked_up_lev"] = "B";
+ node_heading_int_["heading_lev_markup"] = 1;
+ node_heading_int_["heading_lev_collapsed"] = 1;
+ node_heading_int_["parent_ocn"] = 1;
+ node_heading_int_["parent_lev_markup"] = 0;
bookindex_section["scroll"] ~=
set_abstract_object.contents_heading(
"(skip) there is no Book Index",
- node_str_,
- node_int_,
+ node_heading_str_,
+ node_heading_int_,
[""],
);
bookindex_section["seg"] ~=
set_abstract_object.contents_heading(
"(skip) there is no Book Index",
- node_str_,
- node_int_,
+ node_heading_str_,
+ node_heading_int_,
[""],
);
}
@@ -3673,86 +3682,86 @@ template SiSUdocAbstraction() {
auto set_abstract_object = ObjectAbstractSet();
ObjComposite[][string] the_endnotes_section;
auto endnotes_ = gathered_notes();
- string type;
+ string type_is;
string lev, lev_markup_number, lev_collapsed_number;
string attrib;
int[string] indent;
- auto node_int_ = node_metadata_int;
- auto node_str_ = node_metadata_str;
+ auto node_heading_int_ = node_metadata_heading_int;
+ auto node_heading_str_ = node_metadata_heading_str;
if ((endnotes_["seg"].length > 0)
&& (opt_action_bool["backmatter"] && opt_action_bool["section_endnotes"])) {
- node_str_["is"] = "heading";
- node_str_["ocn"] = "0";
- node_str_["segment_anchor_tag"] = "";
- node_str_["attrib"] = "";
- node_str_["marked_up_lev"] = "B";
- node_int_["heading_lev_markup"] = 1;
- node_int_["heading_lev_collapsed"] = 1;
- node_int_["parent_ocn"] = 1;
- node_int_["parent_lev_markup"] = 0;
+ node_heading_str_["is"] = "heading";
+ node_heading_str_["ocn"] = "0";
+ node_heading_str_["segment_anchor_tag"] = "";
+ node_heading_str_["attrib"] = "";
+ node_heading_str_["marked_up_lev"] = "B";
+ node_heading_int_["heading_lev_markup"] = 1;
+ node_heading_int_["heading_lev_collapsed"] = 1;
+ node_heading_int_["parent_ocn"] = 1;
+ node_heading_int_["parent_lev_markup"] = 0;
the_endnotes_section["seg"] ~=
set_abstract_object.contents_heading(
"Endnotes",
- node_str_,
- node_int_,
+ node_heading_str_,
+ node_heading_int_,
[],
);
the_endnotes_section["scroll"] ~=
set_abstract_object.contents_heading(
"Endnotes",
- node_str_,
- node_int_,
+ node_heading_str_,
+ node_heading_int_,
[],
);
++obj_cite_number;
++mkn;
- node_str_["is"] = "heading";
- node_str_["ocn"] = "0";
- node_str_["segment_anchor_tag"] = "endnotes";
- node_str_["attrib"] = "";
- node_str_["marked_up_lev"] = "1";
- node_int_["heading_lev_markup"] = 4;
- node_int_["heading_lev_collapsed"] = 2;
- node_int_["parent_ocn"] = 1;
- node_int_["parent_lev_markup"] = 0;
+ node_heading_str_["is"] = "heading";
+ node_heading_str_["ocn"] = "0";
+ node_heading_str_["segment_anchor_tag"] = "endnotes";
+ node_heading_str_["attrib"] = "";
+ node_heading_str_["marked_up_lev"] = "1";
+ node_heading_int_["heading_lev_markup"] = 4;
+ node_heading_int_["heading_lev_collapsed"] = 2;
+ node_heading_int_["parent_ocn"] = 1;
+ node_heading_int_["parent_lev_markup"] = 0;
the_endnotes_section["seg"] ~=
set_abstract_object.contents_heading(
"Endnotes",
- node_str_,
- node_int_,
+ node_heading_str_,
+ node_heading_int_,
["endnotes"],
);
the_endnotes_section["scroll"] ~=
set_abstract_object.contents_heading(
"Endnotes",
- node_str_,
- node_int_,
+ node_heading_str_,
+ node_heading_int_,
["endnotes"],
);
++obj_cite_number;
++mkn;
} else {
- node_str_["is"] = "heading";
- node_str_["ocn"] = "0";
- node_str_["segment_anchor_tag"] = "";
- node_str_["attrib"] = "";
- node_str_["marked_up_lev"] = "B";
- node_int_["heading_lev_markup"] = 1;
- node_int_["heading_lev_collapsed"] = 1;
- node_int_["parent_ocn"] = 1;
- node_int_["parent_lev_markup"] = 0;
+ node_heading_str_["is"] = "heading";
+ node_heading_str_["ocn"] = "0";
+ node_heading_str_["segment_anchor_tag"] = "";
+ node_heading_str_["attrib"] = "";
+ node_heading_str_["marked_up_lev"] = "B";
+ node_heading_int_["heading_lev_markup"] = 1;
+ node_heading_int_["heading_lev_collapsed"] = 1;
+ node_heading_int_["parent_ocn"] = 1;
+ node_heading_int_["parent_lev_markup"] = 0;
the_endnotes_section["seg"] ~=
set_abstract_object.contents_heading(
"(skip) there are no Endnotes",
- node_str_,
- node_int_,
+ node_heading_str_,
+ node_heading_int_,
[""],
);
the_endnotes_section["scroll"] ~=
set_abstract_object.contents_heading(
"(skip) there are no Endnotes",
- node_str_,
- node_int_,
+ node_heading_str_,
+ node_heading_int_,
[""],
);
}
@@ -3888,14 +3897,14 @@ template SiSUdocAbstraction() {
p_["lev_markup_number"] = DocStructMarkupHeading.h_text_1;
p_["obj_cite_number"] = lv4;
}
- string[string] _node_str = [
+ string[string] _node_heading_str = [
"is" : is_,
"ocn" : to!string(obj_cite_number_),
"marked_up_lev" : "",
"segment_anchor_tag" : to!string(segment_anchor_tag),
"attrib" : "",
];
- int[string] _node_int = [
+ int[string] _node_heading_int = [
"ocn" : obj_cite_number_,
"ptr_doc_object" : 0,
"ptr_html_segnames" : 0,
@@ -3912,12 +3921,12 @@ template SiSUdocAbstraction() {
writeln("- ", to!string(_node));
}
}
- assert(_node_int["parent_lev_markup"] >= 4); //
- assert(_node_int["parent_lev_markup"] <= 7); //
- assert(_node_int["parent_ocn"] >= 0); // hmm, perhaps //
+ assert(_node_heading_int["parent_lev_markup"] >= 4); //
+ assert(_node_heading_int["parent_lev_markup"] <= 7); //
+ assert(_node_heading_int["parent_ocn"] >= 0); // hmm, perhaps //
auto t = tuple(
- _node_str,
- _node_int,
+ _node_heading_str,
+ _node_heading_int,
);
return t;
}
@@ -4031,14 +4040,14 @@ template SiSUdocAbstraction() {
default:
break;
}
- string[string] _node_str = [
+ string[string] _node_heading_str = [
"is" : is_,
"ocn" : to!string(obj_cite_number_),
"marked_up_lev" : lev,
"segment_anchor_tag" : to!string(segment_anchor_tag),
"attrib" : "",
];
- int[string] _node_int = [
+ int[string] _node_heading_int = [
"ocn" : obj_cite_number_,
"ptr_doc_object" : cntr_,
"ptr_html_segnames" : ((lev_markup_number == "4") ? html_segnames_ptr : 0),
@@ -4058,42 +4067,42 @@ template SiSUdocAbstraction() {
writeln("* ", to!string(_node));
}
}
- assert(_node_int["parent_lev_markup"] <= 7);
- assert(_node_int["parent_ocn"] >= 0);
+ assert(_node_heading_int["parent_lev_markup"] <= 7);
+ assert(_node_heading_int["parent_ocn"] >= 0);
if (match(lev_markup_number, rgx.levels_numbered_headings)) {
- assert(_node_int["heading_lev_markup"] <= 7); // issues
- assert(to!int(_node_str["ocn"]) >= 0);
- if (_node_int["parent_lev_markup"] > 0) {
- assert(_node_int["parent_lev_markup"] < _node_int["heading_lev_markup"]);
- if (to!int(_node_str["ocn"]) != 0) {
- assert(_node_int["parent_ocn"] < to!int(_node_str["ocn"]));
+ assert(_node_heading_int["heading_lev_markup"] <= 7); // issues
+ assert(to!int(_node_heading_str["ocn"]) >= 0);
+ if (_node_heading_int["parent_lev_markup"] > 0) {
+ assert(_node_heading_int["parent_lev_markup"] < _node_heading_int["heading_lev_markup"]);
+ if (to!int(_node_heading_str["ocn"]) != 0) {
+ assert(_node_heading_int["parent_ocn"] < to!int(_node_heading_str["ocn"]));
}
}
- if (_node_int["heading_lev_markup"] == 0) {
- assert(_node_int["parent_lev_markup"] == DocStructMarkupHeading.h_sect_A);
- } else if (_node_int["heading_lev_markup"] == DocStructMarkupHeading.h_sect_B) {
- assert(_node_int["parent_lev_markup"] == DocStructMarkupHeading.h_sect_A);
- } else if (_node_int["heading_lev_markup"] == DocStructMarkupHeading.h_sect_C) {
- assert(_node_int["parent_lev_markup"] == DocStructMarkupHeading.h_sect_B);
- } else if (_node_int["heading_lev_markup"] == DocStructMarkupHeading.h_sect_D) {
- assert(_node_int["parent_lev_markup"] == DocStructMarkupHeading.h_sect_C);
- } else if (_node_int["heading_lev_markup"] == DocStructMarkupHeading.h_text_1) {
- assert(_node_int["parent_lev_markup"] <= DocStructMarkupHeading.h_sect_D);
- } else if (_node_int["heading_lev_markup"] == DocStructMarkupHeading.h_text_2) {
- assert(_node_int["parent_lev_markup"] == DocStructMarkupHeading.h_text_1);
- } else if (_node_int["heading_lev_markup"] == DocStructMarkupHeading.h_text_3) {
- assert(_node_int["parent_lev_markup"] == DocStructMarkupHeading.h_text_2);
- } else if (_node_int["heading_lev_markup"] == DocStructMarkupHeading.h_text_4) {
- assert(_node_int["parent_lev_markup"] == DocStructMarkupHeading.h_text_3);
- } else if (_node_int["heading_lev_markup"] == DocStructMarkupHeading.h_text_5) {
- // // writeln(to!int(_node_int["parent_lev_markup"]));
- // // assert(to!int(_node_int["parent_lev_markup"]) >= 4);
- // // assert(to!int(_node_int["parent_lev_markup"]) <= 7);
+ if (_node_heading_int["heading_lev_markup"] == 0) {
+ assert(_node_heading_int["parent_lev_markup"] == DocStructMarkupHeading.h_sect_A);
+ } else if (_node_heading_int["heading_lev_markup"] == DocStructMarkupHeading.h_sect_B) {
+ assert(_node_heading_int["parent_lev_markup"] == DocStructMarkupHeading.h_sect_A);
+ } else if (_node_heading_int["heading_lev_markup"] == DocStructMarkupHeading.h_sect_C) {
+ assert(_node_heading_int["parent_lev_markup"] == DocStructMarkupHeading.h_sect_B);
+ } else if (_node_heading_int["heading_lev_markup"] == DocStructMarkupHeading.h_sect_D) {
+ assert(_node_heading_int["parent_lev_markup"] == DocStructMarkupHeading.h_sect_C);
+ } else if (_node_heading_int["heading_lev_markup"] == DocStructMarkupHeading.h_text_1) {
+ assert(_node_heading_int["parent_lev_markup"] <= DocStructMarkupHeading.h_sect_D);
+ } else if (_node_heading_int["heading_lev_markup"] == DocStructMarkupHeading.h_text_2) {
+ assert(_node_heading_int["parent_lev_markup"] == DocStructMarkupHeading.h_text_1);
+ } else if (_node_heading_int["heading_lev_markup"] == DocStructMarkupHeading.h_text_3) {
+ assert(_node_heading_int["parent_lev_markup"] == DocStructMarkupHeading.h_text_2);
+ } else if (_node_heading_int["heading_lev_markup"] == DocStructMarkupHeading.h_text_4) {
+ assert(_node_heading_int["parent_lev_markup"] == DocStructMarkupHeading.h_text_3);
+ } else if (_node_heading_int["heading_lev_markup"] == DocStructMarkupHeading.h_text_5) {
+ // // writeln(to!int(_node_heading_int["parent_lev_markup"]));
+ // // assert(to!int(_node_heading_int["parent_lev_markup"]) >= 4);
+ // // assert(to!int(_node_heading_int["parent_lev_markup"]) <= 7);
}
}
auto t = tuple(
- _node_str,
- _node_int,
+ _node_heading_str,
+ _node_heading_int,
);
return t;
}