summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog8
-rw-r--r--parser.l4
2 files changed, 10 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 1f34a010..8e548a89 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
2014-03-09 Kaz Kylheku <kaz@kylheku.com>
+ * parser.l: Syntactic tweak. Do not allow the "extra"
+ constituent chars # or ^ to start the symbol name after an @.
+ Prior to this change @^a is a "meta-symbol" whose name is "^a",
+ but ^a is the ^ quasiquote notation followed by symbol a.
+ After this change @^a is meta, applied to quasiquote-a.
+
+2014-03-09 Kaz Kylheku <kaz@kylheku.com>
+
* lib.c (lazy_sub_str): Bugfix: "from" was mistakenly used
in the adjustment of the "to" value.
diff --git a/parser.l b/parser.l
index 1d2d5525..0e569980 100644
--- a/parser.l
+++ b/parser.l
@@ -164,13 +164,13 @@ ID_END [^a-zA-Z0-9!$%&*+\-<=>?\\_~/]
EXTRA [#^]
TOK {SYM}
BT0 {BSCHR}({BSCHR}|{EXTRA})*
-BT1 @({BSCHR}|{EXTRA})+
+BT1 @{BT0}+
BT2 ({BSCHR}|{EXTRA})+
BTREG (({BT0}|{BT1})?:{BT2}|({BT0}|{BT1})(:{BT2})?|:)
BTKEY @?:{BT2}?
BTOK {BTREG}|{BTKEY}
NT0 {NSCHR}({NSCHR}|{EXTRA})*
-NT1 @({NSCHR}|{EXTRA})+
+NT1 @{NT0}+
NT2 ({NSCHR}|{EXTRA})+
NTREG (({NT0}|{NT1})?:{NT2}|({NT0}|{NT1})(:{NT2})?|:)
NTKEY @?:{NT2}?