From 4f2a4866eddceac491da0e02d868916316e32c9c Mon Sep 17 00:00:00 2001 From: Kevin Day Date: Sun, 5 Mar 2023 19:37:30 -0600 Subject: [PATCH] Update: Clarify FSS specifications in regards to quote behavior. I noticed a problem where something that is quoted with an immediate character after it does not get processed. Example Object and Content pair following FSS-0001: Object "Content". In the above example, notice how there is a period after the quotes. Also notice how the content has no spaces. The current behavior would treat the "Content". as invalid. I reviewed the specifications and found them lacking in regards to this dilemma. I updated the specification to clarify the behavior. With this change the FSS read functions will need to be updated. Another example (FSS-0001): "Object 1" "Content 1" Content2 and_3 "Object 2": Content. In the above example for an FSS-001, the first row is straight-forward. The second row is a problem. Because there is non-white space after the quote, this cannot be treated as a quoted Object. The behavior would then be to treat this as not quoted. This means for row two, the object name is: "Object The first Content is 2": The second Content is Content. --- specifications/fss-0000.txt | 6 ++++-- specifications/fss-0001.txt | 6 ++++-- specifications/fss-0005.txt | 2 +- specifications/fss-0009.txt | 6 ++++-- specifications/fss-000a.txt | 6 ++++-- 5 files changed, 17 insertions(+), 9 deletions(-) diff --git a/specifications/fss-0000.txt b/specifications/fss-0000.txt index 6bd51cd..e00e36d 100644 --- a/specifications/fss-0000.txt +++ b/specifications/fss-0000.txt @@ -14,7 +14,9 @@ Featureless Settings Specification: 0000 - Basic: White space separates an Object from the Content. An Object may be preceded by a newline, in which case means that the Object has no Content. If only printing white spaces or non-printable characters follow a valid Object, then that Object is considered to have no Content. - An Object may be quoted to include whitespace where a single quote character:"'" (unicode:"U+0027"), a double quote character:'"' (unicode:"U+0022"), or a backtick character:'`' (unicode:"U+0060") are used to quote. + An Object may be quoted to include white space where a single quote character:"'" (unicode:"U+0027"), a double quote character:'"' (unicode:"U+0022"), or a backtick character:'`' (unicode:"U+0060") are used to quote. + An Object is only considered quoted if the first and last character of the Object are the same quote. + Any quote characters in a non-quoted Object are treated as part of the Object rather than as a quote. Content exists on the same line as the Object. Content is represented as a single Content column terminated by a newline. @@ -26,7 +28,7 @@ Featureless Settings Specification: 0000 - Basic: Key\: code:"\s" = White space, except newline. code:"\b" = Either white space or printable, except newline. - code:"\q" = Non-white space or quoted white space (and non-whitespace) with no white space outside of the quotes. + code:"\q" = Non-white space or quoted white space (and non-white space) with no white space outside of the quotes. code:"\n" = Newline. code:"*" = Zero or more occurrences. code:"+" = One or more occurrences. diff --git a/specifications/fss-0001.txt b/specifications/fss-0001.txt index 20cac45..a366605 100644 --- a/specifications/fss-0001.txt +++ b/specifications/fss-0001.txt @@ -14,7 +14,9 @@ Featureless Settings Specification: 0001 - Extended: White space separates an Object from the Content. An Object may be followed by a newline, in which case means that the Object has no Content. If only printing white spaces or non-printable characters follow a valid Object, then that Object is considered to have no Content. - An Object may be quoted to include whitespace where a single quote character:"'" (unicode:"U+0027"), a double quote character:'"' (unicode:"U+0022"), or a backtick character:'`' (unicode:"U+0060") are used to quote. + An Object may be quoted to include white space where a single quote character:"'" (unicode:"U+0027"), a double quote character:'"' (unicode:"U+0022"), or a backtick character:'`' (unicode:"U+0060") are used to quote. + An Object is only considered quoted if the first and last character of the Object are the same quote. + Any quote characters in a non-quoted Object are treated as part of the Object rather than as a quote. Content exists on the same line as the Object. Content is represented as multiple Content columns. @@ -24,7 +26,7 @@ Featureless Settings Specification: 0001 - Extended: Key\: code:"\s" = White space, except newline. code:"\b" = Either white space or printable, except newline. - code:"\q" = Non-white space or quoted white space (and non-whitespace) with no white space outside of the quotes. + code:"\q" = Non-white space or quoted white space (and non-white space) with no white space outside of the quotes. code:"\n" = Newline. code:"*" = Zero or more occurrences. code:"+" = One or more occurrences. diff --git a/specifications/fss-0005.txt b/specifications/fss-0005.txt index eac68fd..0a82867 100644 --- a/specifications/fss-0005.txt +++ b/specifications/fss-0005.txt @@ -10,7 +10,7 @@ # Featureless Settings Specification: 0005 - Somewhat Basic List: - This is a code"fss-0002 (Basic List)" whose Content is then processed as code:"FSS-0001 (Extended)". + This is a code:"FSS-0002 (Basic List)" whose Content is then processed as code:"FSS-0001 (Extended)". All code:"FSS-0002 (Basic List)" escapes are applied before any code:"FSS-0001 (Extended)" is identified. diff --git a/specifications/fss-0009.txt b/specifications/fss-0009.txt index b9852a3..d447578 100644 --- a/specifications/fss-0009.txt +++ b/specifications/fss-0009.txt @@ -16,7 +16,9 @@ Featureless Settings Specification: 0009 - Reverse Mapping: White space separates an Object from the Content. An Object may be preceded by a newline, in which case means that the Object has no Content. If only printing white spaces or non-printable characters precedes a valid Object, then that Object is considered to have no Content. - An Object may be quoted to include whitespace where a single quote character:"'" (unicode:"U+0027"), a double quote character:'"' (unicode:"U+0022"), or a backtick character:'`' (unicode:"U+0060") are used to quote. + An Object may be quoted to include white space where a single quote character:"'" (unicode:"U+0027"), a double quote character:'"' (unicode:"U+0022"), or a backtick character:'`' (unicode:"U+0060") are used to quote. + An Object is only considered quoted if the first and last character of the Object are the same quote. + Any quote characters in a non-quoted Object are treated as part of the Object rather than as a quote. Content exists on the same line as the Object. Content is represented as a single Content column that begins at a newline. @@ -28,7 +30,7 @@ Featureless Settings Specification: 0009 - Reverse Mapping: Key\: code:"\s" = White space, except newline. code:"\b" = Either white space or printable, except newline. - code:"\q" = Non-white space or quoted white space (and non-whitespace) with no white space outside of the quotes. + code:"\q" = Non-white space or quoted white space (and non-white space) with no white space outside of the quotes. code:"\n" = Newline. code:"*" = Zero or more occurrences. code:"+" = One or more occurrences. diff --git a/specifications/fss-000a.txt b/specifications/fss-000a.txt index a44a215..2a30d66 100644 --- a/specifications/fss-000a.txt +++ b/specifications/fss-000a.txt @@ -16,7 +16,9 @@ Featureless Settings Specification: 000A - Extended Reverse Mapping: White space separates an Object from the Content. An Object may be followed by a newline, in which case means that the Object has no Content. If only printing white spaces or non-printable characters follow a valid Object, then that Object is considered to have no Content. - An Object may be quoted to include whitespace where a single quote character:"'" (unicode:"U+0027"), a double quote character:'"' (unicode:"U+0022"), or a backtick character:'`' (unicode:"U+0060") are used to quote. + An Object may be quoted to include white space where a single quote character:"'" (unicode:"U+0027"), a double quote character:'"' (unicode:"U+0022"), or a backtick character:'`' (unicode:"U+0060") are used to quote. + An Object is only considered quoted if the first and last character of the Object are the same quote. + Any quote characters in a non-quoted Object are treated as part of the Object rather than as a quote. Content exists on the same line as the Object. Content is represented as multiple Content columns. @@ -26,7 +28,7 @@ Featureless Settings Specification: 000A - Extended Reverse Mapping: Key\: code:"\s" = White space, except newline. code:"\b" = Either white space or printable, except newline. - code:"\q" = Non-white space or quoted white space (and non-whitespace) with no white space outside of the quotes. + code:"\q" = Non-white space or quoted white space (and non-white space) with no white space outside of the quotes. code:"\n" = Newline. code:"*" = Zero or more occurrences. code:"+" = One or more occurrences. -- 1.8.3.1