diff options
Diffstat (limited to 'src/sdp/ao_rgx.d')
-rw-r--r-- | src/sdp/ao_rgx.d | 46 |
1 files changed, 26 insertions, 20 deletions
diff --git a/src/sdp/ao_rgx.d b/src/sdp/ao_rgx.d index 1245a71..4e282ee 100644 --- a/src/sdp/ao_rgx.d +++ b/src/sdp/ao_rgx.d @@ -32,18 +32,36 @@ template RgxInit() { static src_fn_find_inserts = ctRegex!(`^(?P<path>[a-zA-Z0-9._-]+/)*(?P<filename>[a-zA-Z0-9._-]+[.]ss[im])$`); static insert_src_fn_ssi_or_sst = ctRegex!(`^<<\s*(?P<path>[a-zA-Z0-9._-]+/)*(?P<filename>[a-zA-Z0-9._-]+[.]ss[ti])$`); // static insert_ssi_or_sst_fn = ctRegex!(`^<<\s*[a-zA-Z0-9._-]+[.]ss[ti]`); + // static ssm_fn = ctRegex!(`^[a-zA-Z0-9._-]+[.]ssm$`); + /+ insert markup file +/ + // static insert_src_fn_ssi_or_sst = ctRegex!(`^<<\s*([a-zA-Z0-9._-]+/)*(?P<filename>[a-zA-Z0-9._-]+[.]ss[ti])$`); /+ comments +/ static comment = ctRegex!(`^%+ `); static comments = ctRegex!(`^%+ |^%+$`); /+ header +/ - static header = ctRegex!(`^@([a-z_]+):(?:\s|$)`); - static header_make = ctRegex!(`^@(make):(?:\s|$)`); - static header_meta = ctRegex!(`^@([a-z_]+):(?:\s|$)`); - static header_sub = ctRegex!(`^[ ]+:([a-z_]+):\s`); - static head_main = ctRegex!(`^@(?P<header>[a-z_]+):\s*(?P<content>.*)`, "m"); - static head_sub = ctRegex!(`^[ ]*:(?P<subheader>[a-z_]+):\s+(?P<content>.+)`, "m"); - static head_value_title = ctRegex!(`@title`); - static head_value_author = ctRegex!(`@author`); + static main_headers = + ctRegex!(`^(?:creator|title|rights|date|original|classify|identifier|notes|publisher|make|links)$`, "m"); + static native_header = ctRegex!(`^@([a-z_]+):(?:\s|$)`); + static native_header_make = ctRegex!(`^@(make):(?:\s|$)`); + static native_header_meta = + ctRegex!(`^@(?:creator|title|rights|date|original|classify|identifier|notes|publisher|links):(?:\s|$)`); + static native_header_main = ctRegex!(`^@(?P<header>[a-z_]+):\s*(?P<content>.*)`, "m"); + static native_header_sub = ctRegex!(`^[ ]*:(?P<subheader>[a-z_]+):\s+(?P<content>.+)`, "m"); + // static native_header_sub = ctRegex!(`^[ ]+:([a-z_]+):\s`); + static native_header_meta_title = ctRegex!(`^@title:\s`, "m"); + static variable_doc_title = ctRegex!(`@title`); + static variable_doc_author = ctRegex!(`@author`); + /+ head +/ + static native_subhead_creator = ctRegex!(`^(?:author|translator|illustrator)$`, "m"); + static native_subhead_title = ctRegex!(`^(?:main|sub(?:title)?|full|language|edition|note)$`, "m"); + static native_subhead_rights = ctRegex!(`^(?:copyright|illustrations|license|cover)$`, "m"); + static native_subhead_date = ctRegex!(`^(?:published|created|issued|available|valid|modified|added_to_site)$`, "m"); + static native_subhead_original = ctRegex!(`^(?:title|language|source)$`, "m"); + static native_subhead_classify = ctRegex!(`^(?:topic_register|subject|keywords|loc|dewey)$`, "m"); + static native_subhead_identifier = ctRegex!(`^(?:oclc|pg|isbn)$`, "m"); + static native_subhead_notes = ctRegex!(`^(?:abstract|description)$`, "m"); + static native_subhead_publisher = ctRegex!(`^(?:name)$`, "m"); + static native_subhead_make = ctRegex!(`^(?:cover_image|home_button_image|home_button_text|footer|headings|num_top|breaks|substitute|bold|italics|emphasis|texpdf_font|css)$`, "m"); /+ heading & paragraph operators +/ static heading_a = ctRegex!(`^:?[A][~] `, "m"); static heading = ctRegex!(`^:?([A-D1-4])[~]([a-z0-9_.-]*[?]?) `); @@ -160,18 +178,6 @@ template RgxInit() { static parent = ctRegex!(`([0-7]):([0-9]+)`); /+ json +/ static tailing_comma = ctRegex!(`,$`, "m"); - /+ head +/ - static main_headers = ctRegex!(`^(?:creator|title|rights|date|original|classify|identifier|notes|publisher|make|links)$`, "m"); - static subhead_creator = ctRegex!(`^(?:author|translator|illustrator)$`, "m"); - static subhead_title = ctRegex!(`^(?:main|sub(?:title)?|full|language|edition|note)$`, "m"); - static subhead_rights = ctRegex!(`^(?:copyright|illustrations|license|cover)$`, "m"); - static subhead_date = ctRegex!(`^(?:published|created|issued|available|valid|modified|added_to_site)$`, "m"); - static subhead_original = ctRegex!(`^(?:title|language|source)$`, "m"); - static subhead_classify = ctRegex!(`^(?:topic_register|subject|keywords|loc|dewey)$`, "m"); - static subhead_identifier = ctRegex!(`^(?:oclc|pg|isbn)$`, "m"); - static subhead_notes = ctRegex!(`^(?:abstract|description)$`, "m"); - static subhead_publisher = ctRegex!(`^(?:name)$`, "m"); - static subhead_make = ctRegex!(`^(?:cover_image|home_button_image|home_button_text|footer|headings|num_top|breaks|substitute|bold|italics|emphasis|texpdf_font|css)$`, "m"); /+ biblio tags +/ static biblio_tags = ctRegex!(`^(is|au|author_raw|author|author_arr|editor_raw|ed|editor_arr|ti|title|subtitle|fulltitle|lng|language|trans|src|jo|journal|in|vol|volume|edn|edition|yr|year|pl|place|pb|pub|publisher|url|pg|pages|note|short_name|id):\s+(.+)`); static biblio_abbreviations = ctRegex!(`^(au|ed|ti|lng|jo|vol|edn|yr|pl|pb|pub|pg|pgs|sn)$`); |