Skip to content

Commit f2b8691

Browse files
committed
Updated inline text to include Unicode identifiers
1 parent 1b0a045 commit f2b8691

3 files changed

Lines changed: 146 additions & 107 deletions

File tree

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,10 @@ sequence, and must be contiguous (e.g. days-minutes-seconds is not allowed).
112112

113113
### Text
114114

115-
Text strings are enclosed in double quotes. Multi-line (block) text is
116-
enclosed in triple-double quotes.
115+
Text strings are generally enclosed in double quotes. Simple text strings that
116+
match the [Unicode identifier](https://www.unicode.org/reports/tr31/) pattern
117+
may be used unquoted. Multi-line (block) text is enclosed in triple-double
118+
quotes.
117119

118120
All valid JSON strings are also valid STEF inline text strings. STEF also
119121
allows extended Unicode escaping (e.g. `\u{1F600}`) and ASCII escaping

diagrams/README.md

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -278,19 +278,27 @@ Diagram(
278278
![Text (inline)](text-inline.svg)
279279

280280
```
281-
Diagram(Group(Sequence(
282-
"\"",
283-
ZeroOrMore(
284-
Choice(1,
285-
NonTerminal("any of \\\" \\\\ \\b \\f \\n \\r \\t"),
286-
NonTerminal("ASCII 32..126 except \" or \\"),
287-
NonTerminal(" Unicode U+0080..U+10FFFF "),
288-
Sequence("\\uXXXX", Comment(" U+XXXX")),
289-
Sequence("\\u{XXXXXX}", Comment("U+XXXXXX")),
290-
Sequence("\\xXX", Comment(" ASCII char XX")),
281+
Diagram(Group(Stack(
282+
Choice(1,
283+
Sequence(
284+
NonTerminal("IDENTIFIER"),
285+
Comment("see Unicode TR #31"),
291286
),
292-
),
293-
"\"",
287+
Sequence(
288+
"\"",
289+
ZeroOrMore(
290+
Choice(1,
291+
NonTerminal("any of \\\" \\\\ \\b \\f \\n \\r \\t"),
292+
NonTerminal("ASCII 32..126 except \" or \\"),
293+
NonTerminal(" Unicode U+0080..U+10FFFF "),
294+
Sequence("\\uXXXX", Comment(" U+XXXX")),
295+
Sequence("\\u{XXXXXX}", Comment("U+XXXXXX")),
296+
Sequence("\\xXX", Comment(" ASCII char XX")),
297+
),
298+
),
299+
"\"",
300+
)
301+
)
294302
), "Text (inline)"))
295303
```
296304

diagrams/text-inline.svg

Lines changed: 122 additions & 93 deletions
Loading

0 commit comments

Comments
 (0)