From: Kevin Day Date: Mon, 13 Jul 2020 03:09:05 +0000 (-0500) Subject: Update: specifications in regards to IKI, adding new ones. X-Git-Tag: 0.5.0~88 X-Git-Url: https://git.kevux.org/?a=commitdiff_plain;h=163e97ce4ba7cdeff5b3100f9b249f90a57e2678;p=fll Update: specifications in regards to IKI, adding new ones. --- diff --git a/level_0/f_iki/c/iki-common.h b/level_0/f_iki/c/iki-common.h index dfd9e2a..10d3f2d 100644 --- a/level_0/f_iki/c/iki-common.h +++ b/level_0/f_iki/c/iki-common.h @@ -28,16 +28,22 @@ extern "C" { #endif //_di_f_iki_syntax_ #ifndef _di_iki_vocabulary_0001_ - #define iki_vocabulary_0001_emphasis "emphasis" + #define iki_vocabulary_0001_address "address" #define iki_vocabulary_0001_code "code" + #define iki_vocabulary_0001_email "email" + #define iki_vocabulary_0001_name "name" + #define iki_vocabulary_0001_phone "phone" #define iki_vocabulary_0001_quote "quote" #define iki_vocabulary_0001_uri "uri" #define iki_vocabulary_0001_url "url" #define iki_vocabulary_0001_urn "urn" #define iki_vocabulary_0001_variable "var" - #define iki_vocabulary_0001_emphasis_length 8 + #define iki_vocabulary_0001_address_length 7 #define iki_vocabulary_0001_code_length 4 + #define iki_vocabulary_0001_email_length 5 + #define iki_vocabulary_0001_name_length 4 + #define iki_vocabulary_0001_phone_length 5 #define iki_vocabulary_0001_quote_length 5 #define iki_vocabulary_0001_uri_length 3 #define iki_vocabulary_0001_url_length 3 @@ -53,6 +59,8 @@ extern "C" { #define iki_vocabulary_0002_parameter_length 9 #endif // _di_iki_vocabulary_0002_ +// @todo: consider IKI-0003 = vocabulary based on context from HTML5 and accessibility-related? + /** * This holds an array of string ranges that represent the entire vocabulary name, content, and syntax. * diff --git a/specifications/fss-000D.txt b/specifications/fss-000D.txt index 3d1ccac..db1b6a4 100644 --- a/specifications/fss-000D.txt +++ b/specifications/fss-000D.txt @@ -1,28 +1,29 @@ # fss-0002 Featureless Settings Specification: 000D - Iki Text: - Iki is an unstructured WIKI-like syntax meant to be simpler than WIKI syntax. + IKI is an unstructured WIKI-like syntax meant to be simpler than WIKI syntax. This fss specification represents a plain text file not following any special FSS structure but instead supports the IKI syntax. The IKI syntax may be used in any FSS specification and the specific vocabulary is defined by appending + For compatibility with the FSS terminology, the Vocabulary Name is to be considered the Object and the Vocabulary value is to be considered the Content. + There is no requirement for any specific IKI vocabulary by this standard only that the given syntax is supported. To specify the IKI vocabulary being used append the IKI vocabulary header immediately after the fss header like such: "# fss-000d iki-0001". The IKI syntax provides a vocabulary name with specific context associated with it followed by quoted code that is represented by the given vocabulary name. + The vocabulary represents a list of allowed object names that may also have specific contextual meaning defined by a given IKI specification. When IKI is encapsulated inside any FSS format, the parent FSS format rules apply and must take precedence. Therefore additional escaping may be required. As for this FSS format (FSS-000D), there is no structure and therefore only the IKI syntax rules apply. - For compatibility with the FSS terminology, the Vocabulary Name is to be considered the Object and the Vocabulary value is to be considered the Content. + The IKI format will use IKI-0000 to represent an IKI with no explicitly defined vocabulary. + Whereas IKI-0001 and beyond represent a specific IKI vocabulary. Whitespace, non-word (and non "_", "-", "+") character punctuations, or the start of file must exist before any valid variable name. Whitespace and non-word (and non "_", "-", "+") character punctuations may not exist as part of the variable name. The only Unicode dash-like characters allowed as a "dash" are those intended to connect, such as the Unicode hyphens (U+2010 and U+2011). - The IKI format will use IKI-0000 to represent an IKI with no explicitly defined vocabulary. - Whereas IKI-0001 and beyond represent a specific IKI vocabulary. - Unicode punctuation connector characters are supported just like "_", except when they connect outside the current line (such as U+FE33 "︳"). Unicode invisible punctuations (such as invisible plus: U+2064) are not considered a punctuations in this standard (because they a zero-width characters), therefore they are not to be considered a valid '_', '-', or '+' Unicode equivalents. diff --git a/specifications/iki-0000.txt b/specifications/iki-0000.txt new file mode 100644 index 0000000..65f7cef --- /dev/null +++ b/specifications/iki-0000.txt @@ -0,0 +1,6 @@ +# fss-0002 + +IKI Specification: 0000 - Unrestricted: + This specification provides no restrictions on the vocabulary. + + See the iki.txt specification file for details on the syntax rules. diff --git a/specifications/iki-0001.txt b/specifications/iki-0001.txt new file mode 100644 index 0000000..fa8dc1e --- /dev/null +++ b/specifications/iki-0001.txt @@ -0,0 +1,17 @@ +# fss-0002 + +IKI 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 URLs. + + Vocabulary\: + - address: any mailing address, except for e-mail and URI. + - 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 (allows URL and URN). + - url: any valid URL. + - urn: any valid URN. + - var: all text contained within represents some sort of variable. + + See the iki.txt specification file for details on the syntax rules. diff --git a/specifications/iki-0002.txt b/specifications/iki-0002.txt new file mode 100644 index 0000000..d2b183c --- /dev/null +++ b/specifications/iki-0002.txt @@ -0,0 +1,13 @@ +# fss-0002 + +IKI Specification: 0002 - Simple Script: + This specification provides a small set of vocabulary names meant to be used for substitution in simple scripts. + + This specification only loosely defines the vocabulary context. + Flexibility on interpretation is intended so that the context can be more fine-tuned for a given script design. + + Vocabulary\: + - define: intended to be used for global properties, much like a C/C++ #define. + - parameter: intended to be used for parameters or variables. + + See the iki.txt specification file for details on the syntax rules. diff --git a/specifications/iki.txt b/specifications/iki.txt new file mode 100644 index 0000000..1deba77 --- /dev/null +++ b/specifications/iki.txt @@ -0,0 +1,50 @@ +# fss-0002 + +IKI Specifications: + IKI is an unstructured WIKI-like syntax meant to be simpler than WIKI syntax. + + The IKI syntax provides a vocabulary name with specific context associated with it followed by quoted code that is represented by the given vocabulary name. + The vocabulary represents a list of allowed object names that may also have specific contextual meaning defined by a given IKI specification. + + The IKI format will use IKI-0000 to represent an IKI with no explicitly defined vocabulary. + Whereas IKI-0001 and beyond represent a specific IKI vocabulary. + + Whitespace, non-word (and non "_", "-", "+") character punctuations, or the start of file must exist before any valid variable name. + Whitespace and non-word (and non "_", "-", "+") character punctuations may not exist as part of the variable name. + The only Unicode dash-like characters allowed as a "dash" are those intended to connect, such as the Unicode hyphens (U+2010 and U+2011). + + Unicode punctuation connector characters are supported just like "_", except when they connect outside the current line (such as U+FE33 "︳"). + Unicode invisible punctuations (such as invisible plus: U+2064) are not considered a punctuations in this standard (because they a zero-width characters), therefore they are not to be considered a valid '_', '-', or '+' Unicode equivalents. + + Key\: + \o = any printable word character, including "_", "-", "+" (and Unicode equivalents). + \c = any character, including whitespace and non-printing, and any delimited quote (used as the opening quote) or a any quote (undelimited) not used as the opening quote. + \q = either a single quote (') or a double quote ("). + \x = any character. + \W = any non-word character, discluding "_", "-", "+" (and Unicode equivalents). + * = 0 or more occurrences. + ~ = one or more occurrences, or 0 if at start of file. + + Structure\: + \x*\W~\o:\q\c\q + + Example\: + # fss-000d iki-0000 + + This is my sentence, anything can go here but sometimes I want to emphasis:"emphasize some text". + + Other times I want to render a url such as this example url: url:'http://www.example.com/url with space/'. + + There are no comments, except for maybe the FSS header (which would not resolve to any IKI syntax anyway). + + Quotes may be included, such as: code:"const char *string = \"My \\\"quoted\\\" C string.\";". + + Objects would be\: + 1) emphasis + 2) url + 3) code + + Contents would be\: + 1.1) emphasize some text + 2.1) http://www.example.com/url with space/ + 3.1) const char *string = "My \"quoted\" C string.";