Issue 17821: String concrete syntax is missing (uml25-ftf) Source: Nomos Software (Dr. Edward Willink, ed(at)willink.me.uk) Nature: Revision Severity: Minor Summary: Specifying a Concrete Syntax requires just that. It must provide a solution to expressing all characters in a predictable fashion. So given the constraint of "..." encapsulation, how are internal " represented? How are Unicode and newlines expressed? Suggest reusing the OCL 2.3 clarification of backslashes. The concrete syntax comprises a sequence of zero or more characters or escape sequences surrounded by single quote characters. The [B] form with adjacent strings allows a long string literal to be split into fragments or to be written across multiple lines.[A] StringLiteralExpCS ::= #x27 StringChar* #x27 [B] StringLiteralExpCS[1] ::= StringLiteralExpCS[2] WhiteSpaceChar* #x27 StringChar* #x27 where StringChar ::= Char | EscapeSequence WhiteSpaceChar ::= #x09 | #x0a | #x0c | #x0d | #x20 Char ::= [#x20-#x26] | [#x28-#x5B] | [#x5D-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF] EscapeSequence ::= '\' 'b' -- #x08: backspace BS | '\' 't' -- #x09: horizontal tab HT | '\' 'n' -- #x0a: linefeed LF | '\' 'f' -- #x0c: form feed FF | '\' 'r' -- #x0d: carriage return CR | '\' '"' -- #x22: double quote " | '\' ''' -- #x27: single quote ' | '\' '\' -- #x5c: backslash \ | '\' 'x' Hex Hex -- #x00 to #xFF | '\' 'u' Hex Hex Hex Hex -- #x0000 to #xFFFF Hex ::= [0-9] | [A-F] | [a-f] A minor change could share the syntax definition and define the body as above prohibiting un-escaped usage of the character used as the surrounding quotes. Resolution: Revised Text: Actions taken: September 26, 2012: received issue Discussion: End of Annotations:===== s is issue # 17821 Problem: 8.007 Severity: Medium Type: Structural Location: 8.2.4 Notation 2nd bullet p 76 Title: String concrete syntax is missing Description Specifying a Concrete Syntax requires just that. It must provide a solution to expressing all characters in a predictable fashion. So given the constraint of "..." encapsulation, how are internal " represented? How are Unicode and newlines expressed? Suggest reusing the OCL 2.3 clarification of backslashes. The concrete syntax comprises a sequence of zero or more characters or escape sequences surrounded by single quote characters. The [B] form with adjacent strings allows a long string literal to be split into fragments or to be written across multiple lines.[A] StringLiteralExpCS ::= #x27 StringChar* #x27 [B] StringLiteralExpCS[1] ::= StringLiteralExpCS[2] WhiteSpaceChar* #x27 StringChar* #x27 where StringChar ::= Char | EscapeSequence WhiteSpaceChar ::= #x09 | #x0a | #x0c | #x0d | #x20 Char ::= [#x20-#x26] | [#x28-#x5B] | [#x5D-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF] EscapeSequence ::= '\' 'b' -- #x08: backspace BS | '\' 't' -- #x09: horizontal tab HT | '\' 'n' -- #x0a: linefeed LF | '\' 'f' -- #x0c: form feed FF | '\' 'r' -- #x0d: carriage return CR | '\' '"' -- #x22: double quote " | '\' ''' -- #x27: single quote ' | '\' '\' -- #x5c: backslash \ | '\' 'x' Hex Hex -- #x00 to #xFF | '\' 'u' Hex Hex Hex Hex -- #x0000 to #xFFFF Hex ::= [0-9] | [A-F] | [a-f] A minor change could share the syntax definition and define the body as above prohibiting un-escaped usage of the character used as the surrounding quotes. Source: Edward Willink