Fossil SCM

Clarified the double-quoting and {} quoting rules for TH1 in the docs.

wyoung 2021-08-02 08:49 trunk
Commit a1e415291c8be5ff69c061b11d2ff885e675eabda176c6b1e797ac224811e263
1 file changed +4 -3
+4 -3
--- www/th1.md
+++ www/th1.md
@@ -40,13 +40,14 @@
4040
is broken into space-separated tokens. The first token is the command
4141
name and subsequent tokens are the arguments. In this sense, TH1 syntax
4242
is similar to the familiar command-line shell syntax.
4343
4444
A token is any sequence of characters other than whitespace and semicolons.
45
-Or, all text without double-quotes is a single token even if it includes
46
-whitespace and semicolons. Or, all text within nested {...} pairs is a
47
-single token.
45
+Text inside double-quotes is a single token even if it includes
46
+whitespace and semicolons. Text within {...} pairs is also a
47
+single token, which is useful because curly braces are easier to “pair”
48
+and nest properly than doubloe-quotes.
4849
4950
The nested {...} form of tokens is important because it allows TH1 commands
5051
to have an appearance similar to C/C++. It is important to remember, though,
5152
that a TH1 script is really just a list of text commands, not a context-free
5253
language with a grammar like C/C++. This can be confusing to long-time
5354
--- www/th1.md
+++ www/th1.md
@@ -40,13 +40,14 @@
40 is broken into space-separated tokens. The first token is the command
41 name and subsequent tokens are the arguments. In this sense, TH1 syntax
42 is similar to the familiar command-line shell syntax.
43
44 A token is any sequence of characters other than whitespace and semicolons.
45 Or, all text without double-quotes is a single token even if it includes
46 whitespace and semicolons. Or, all text within nested {...} pairs is a
47 single token.
 
48
49 The nested {...} form of tokens is important because it allows TH1 commands
50 to have an appearance similar to C/C++. It is important to remember, though,
51 that a TH1 script is really just a list of text commands, not a context-free
52 language with a grammar like C/C++. This can be confusing to long-time
53
--- www/th1.md
+++ www/th1.md
@@ -40,13 +40,14 @@
40 is broken into space-separated tokens. The first token is the command
41 name and subsequent tokens are the arguments. In this sense, TH1 syntax
42 is similar to the familiar command-line shell syntax.
43
44 A token is any sequence of characters other than whitespace and semicolons.
45 Text inside double-quotes is a single token even if it includes
46 whitespace and semicolons. Text within {...} pairs is also a
47 single token, which is useful because curly braces are easier to “pair”
48 and nest properly than doubloe-quotes.
49
50 The nested {...} form of tokens is important because it allows TH1 commands
51 to have an appearance similar to C/C++. It is important to remember, though,
52 that a TH1 script is really just a list of text commands, not a context-free
53 language with a grammar like C/C++. This can be confusing to long-time
54

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button