summaryrefslogtreecommitdiffstats
path: root/txr.1
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2012-02-26 03:01:10 -0800
committerKaz Kylheku <kaz@kylheku.com>2012-02-26 03:01:10 -0800
commit7649d799041454321809da89a5716afc19c34f3d (patch)
treea3d1e0c24558c9c5e7842bc14327a1fe88afc5a6 /txr.1
parentcdd51a57490deb19a0bd3d1b77d2e2aac4d6316b (diff)
downloadtxr-7649d799041454321809da89a5716afc19c34f3d.tar.gz
txr-7649d799041454321809da89a5716afc19c34f3d.tar.bz2
txr-7649d799041454321809da89a5716afc19c34f3d.zip
Bug #35625
* parser.l (BSCHR, BSYM, BTOK): New lexical definitions. (BRACED): New state. (grammar): Refactored so that braced variables are now handled in the BRACED state, allowing for lexical differences between braced variables and Lisp. This allows us to have the /regex/ syntax in braces, but /regex/ is just a symbol in the Lisp. The new #/ token is recognized and returned as HASH_SLASH. All rules reformatted to a more easily maintainble convention. * parser.y (HASH_SLASH): New token. (modifiers, lisp_regex): New nonterminals. (var): Grammar changed to use modifiers nonterminal instead of exprs. (var_op): Rule moved closer to var. (expr): Produces lisp_regex rather than regex. (yybadtoken): Handle HASH_SLASH in the switch statement. Bugfix: HASH_BACKSLASH was not handled. * txr.1: Documented #/regex/ syntax.
Diffstat (limited to 'txr.1')
-rw-r--r--txr.16
1 files changed, 6 insertions, 0 deletions
diff --git a/txr.1 b/txr.1
index 275a6e8a..34f34bcd 100644
--- a/txr.1
+++ b/txr.1
@@ -4499,6 +4499,12 @@ according to a modified namespace lookup rule.
More details are given in the documentation for the dwim operator.
+.SS Regular Expressions
+
+In TXR Lisp, the / character can occur in symbol names, and the / token
+is a symbol. Therefore the /regex/ syntax is absent, replaced with the
+#/regex/ syntax.
+
.SS Lisp Operators
When the first element of a compound expression is an operator symbol,