diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2012-03-30 21:06:01 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2012-03-30 21:06:01 -0700 |
commit | b7f1f4c5bbea86e288b6a4d68595c1d2d07217bd (patch) | |
tree | c41a7031839213a9877a51976cb3b7c0a2e20154 /txr.1 | |
parent | b44fb80d62fa16c8ac844fa79bfc206fa9e34129 (diff) | |
download | txr-b7f1f4c5bbea86e288b6a4d68595c1d2d07217bd.tar.gz txr-b7f1f4c5bbea86e288b6a4d68595c1d2d07217bd.tar.bz2 txr-b7f1f4c5bbea86e288b6a4d68595c1d2d07217bd.zip |
* match.c (h_var): Disallow the variable named by the symbol t
by throwing an exception. Allow nil, but wherever nil occurs,
do not produce a binding.
* txr.1: State the restrictions against using t in the section
on Variables and also describe the nil ignore feature.
Diffstat (limited to 'txr.1')
-rw-r--r-- | txr.1 | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -572,6 +572,11 @@ The forms with an * indicate a long match, see Longest Match below. The last two forms with the embedded regexp /RE/ or number have special semantics, see Positive Match below. +The identifier t cannot be used as a name; it is a reserved symbol which +denotes the value true. An attempt to use the variable @t will result +in an exception. The symbol nil can be used as a variable name, +but it has special semantics, described in a section below. + When the @NAME form is used, the name itself may consist of any combination of one or more letters, numbers, and underscores. It may not look like a number, so that for instance 123 is not a valid name, but 12A is valid. Case is @@ -820,6 +825,13 @@ This syntax is processed without consideration of what other syntax follows. A positive match may be directly followed by an unbound variable. +.SS Symbol nil as a Variable + +If the symbol nil is used as a variable, it behaves like a variable which +has no binding. Furthermore, no binding is created. @nil allows the +variable matching syntax to be used to skip material, in ways different +from and complementary to @(skip). + .SS Regular Expressions Regular expressions are a language for specifying sets of character strings. |