From bc5f359a86e7d105a46c5bfae2e2c5b1b21bfbbc Mon Sep 17 00:00:00 2001 From: Kevin Day Date: Sun, 3 Nov 2024 21:11:25 -0600 Subject: [PATCH] Feature: Add EKI specification for EKI standard, a slightly updated IKI standard. Think of EKI as an extended IKI. This introduces a single change (and its accompanying requirements). Multiple IKI Vocabularies are now supported. I have been using IKI in practice for a while now. A need has risen up where I really want to be able to easily designate multiple IKI Vocabularies for a single IKI Variable. This new format allows for me to do something more similar to HTML. I have been using IKI as part of a templating process. With EKI, unlike IKI, I can now make something both bold and italic. Whereas with IKI, I would have to create a new type that combines them (like `bold_italic`). I would then have to create two types if I wanted to be order agnostic, such as `bold_italic` and `italic_bold`. This would get progressively worse if I added a third or more Vocabularies. With EKI, I don't add any new IKI Variables and the order does not necessarily matter. Example: `bold:italic:"My example"` (and `italic:bold:"My example"`). This would have `bold` and `italic`. The order should be preserved in case something does care about order. The order can be ignored if something does not care about order. --- specifications/eki-0000.txt | 16 +++++++++ specifications/eki-0001.txt | 27 ++++++++++++++ specifications/eki.txt | 88 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 131 insertions(+) create mode 100644 specifications/eki-0000.txt create mode 100644 specifications/eki-0001.txt create mode 100644 specifications/eki.txt diff --git a/specifications/eki-0000.txt b/specifications/eki-0000.txt new file mode 100644 index 0000000..b45077e --- /dev/null +++ b/specifications/eki-0000.txt @@ -0,0 +1,16 @@ +# fss-0002 iki-0000 +# +# license open-standard-license-1.0-or-later +# version 2024/11/03 +# +# This file (assumed to be named eki-0000.txt) can be more easily read using the following iki_read commands: +# iki_read eki-0000.txt +Q -w -WW character "'" "'" code '"' '"' +# +# To read the "EKI Specification: 0000 - Unrestricted" section of this file, use this command sequence: +# fss_basic_list_read eki-0000.txt +Q -cn "EKI Specification: 0000 - Unrestricted" | iki_read +Q -w -WW character "'" "'" code '"' '"' +# + +EKI Specification: 0000 - Unrestricted: + This specification provides no restrictions on the vocabulary. + + See the file:"eki.txt" specification file for details on the syntax rules. diff --git a/specifications/eki-0001.txt b/specifications/eki-0001.txt new file mode 100644 index 0000000..583b3fa --- /dev/null +++ b/specifications/eki-0001.txt @@ -0,0 +1,27 @@ +# fss-0002 iki-0000 +# +# license open-standard-license-1.0-or-later +# version 2024/11/03 +# +# This file (assumed to be named eki-0001.txt) can be more easily read using the following iki_read commands: +# iki_read eki-0001.txt +Q -w -rrr URI URI URL URL URN URN -WW character "'" "'" code '"' '"' +# +# To read the "EKI Specification: 0001 - Basic" section of this file, use this command sequence: +# fss_basic_list_read eki-0001.txt +Q -cn "EKI Specification: 0001 - Basic" | iki_read +Q -w -rrr URI URI URL URL URN URN -WW character "'" "'" code '"' '"' +# + +EKI Specification: 0001 - Basic: + This specification provides a small set of vocabulary names meant to be associated with common uses, such as e-mail addresses and URL:"Uniform Resource Locator"s. + + Vocabulary\: + - address: Any mailing address, except for e-mail and URI:"Uniform Resource Identifier". + - code: All text contained within represent code and should be presented as such. + - email: Any valid e-mail address. + - phone: Any valid phone number. + - quote: All text within represents some quote. + - uri: Any valid URI:"Uniform Resource Identifier" (allows URL:"Uniform Resource Locator" and URN:"Uniform Resource Name"). + - url: Any valid URL:"Uniform Resource Locator". + - urn: Any valid URN:"Uniform Resource Name". + - var: All text contained within represents some sort of variable. + + See the file:"eki.txt" specification file for details on the syntax rules. diff --git a/specifications/eki.txt b/specifications/eki.txt new file mode 100644 index 0000000..85905b0 --- /dev/null +++ b/specifications/eki.txt @@ -0,0 +1,88 @@ +# fss-0002 iki-0000 +# +# license open-standard-license-1.0-or-later +# version 2024/11/03 +# +# This file (assumed to be named eki.txt) can be more easily read using the following iki_read commands: +# iki_read eki.txt +Q -w -WWW character "'" "'" code '"' '"' italic '"' '"' +# +# To read the "EKI Specifications" section of this file, use this command sequence: +# fss_basic_list_read iki.txt +Q -cn "EKI Specifications" | iki_read +Q -w -WWW character "'" "'" code '"' '"' italic '"' '"' +# + +EKI Specifications: + EKI is an extended EKI format that introduces the ability to have multiple variable names (italic:"Objects") per variable value (italic:"Content"). + + The EKI syntax is identical to the EKI syntax and all of its rules apply except for the modification defined in this specification. + + This variable name, or italic:"Object", now supports an additional character, character:":" (unicode:"U+003A"), is used to separate each individual variable name. + Each variable name must follow the same requirements of a valid variable name as specified in the EKI specification. + Only the last character:":" (unicode:"U+003A") before the opening single quote (unicode:"U+0027"), double quote (unicode:"U+0022"), or grave (unicode:"U+0060") shall be a candidate for being escaped. + When this escape is in place of a valid EKI variable, then that would be variable is no longer considered an EKI variable. + + Key\: + code:"\o" = any printable word character, including character:"_", character:"-", character:"+" (and Unicode equivalents). + code:"\O" = any printable word character, including character:"_", character:"-", character:"+" (and Unicode equivalents) followed by a colon character:":" (unicode:"U+003A"). + code:"\c" = any character, including white space and non-printing, and any delimited quote (used as the opening quote) or a any quote (undelimited) not used as the opening quote. + code:"\q" = either a single quote character:"'" (unicode:"U+0027"), a double quote character:'"' (unicode:"U+0022"), or a grave character:'`' (unicode:"U+0060"). + code:"\x" = any character. + code:"\W" = any non-word character, discluding character:"_", character:"-", character:"+" (and Unicode equivalents). + code:"\e" = an optional escape sequence of any number of backslashes, such as character:"\\". + code:"[" = a single conditionally optional open bracket, character:"[" (unicode:"U+005B"). + code:"]" = a single conditionally optional close bracket, character:"]" (unicode:"U+005D"). + code:"*" = zero or more occurrences. + code:"~" = one or more occurrences, or zero if at start of file. + code:":" = The colon character:":" (unicode:"U+003A"). + + Before Structure\: + code:"\x*\W~\*:*" + + Structure\: + code:"[\O*\o]\e:\q\c\q" + + After Structure\: + code:"" + + Example\: + code:'# fss-000c iki-0000 + + This is my sentence, anything can go here but sometimes I want to italic\:"emphasize some text". + + Other times I want to render a url with bold such as this example url: bold:url\:\'http://www.example.com/url with space/\'. + + There are no comments, except for maybe the FSS\:"Featureless Settings Specification" header (which would not resolve to any EKI syntax anyway). + + Quotes may be included, such as: code\:"const char *string = \"My \\\"quoted\\\" C string.\";". + + The following bold:italic\:"is escaped to not be treated as EKI data". + + The conditionally optional open and close brackets allow for putting a variable directly next to another word character like: [context]\:"bold"this[context]\:"bold".' + + Multiple Objects within a bracket is also valid, like: before[bold:context]:"important"after. + + Objects (also called vocabulary or variable name) would be\: + 1.1) italic + 2.1) bold + 2.2) url + 3.1) FSS + 4.1) code + 5.1) bold + 5.2) italic + 6.1) context + 7.1) context + 8.1) bold + 8.2) context + + Contents (also called variable value) would be\: + 1.1) emphasize some text + 2.1) http://www.example.com/url with space/ + 3.1) Featureless Settings Specification + 4.1) const char *string = "My \"quoted\" C string."; + 5.1) is escaped to not be treated as EKI data + 6.1) bold + 7.1) bold + 8.1: important + + The following are core specifications (each with a common name associated with the specification number)\: + - eki-0000: Unrestricted + - eki-0001: Basic -- 1.8.3.1