summaryrefslogtreecommitdiffstats
path: root/parser.l
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2014-03-09 21:24:55 -0700
committerKaz Kylheku <kaz@kylheku.com>2014-03-09 21:24:55 -0700
commitde2624b04b91359337d4cd5e29b97720ed61df1b (patch)
treef22f51b06dd8ab87b534b4ddbadbe7efed63aad2 /parser.l
parent6d962407c0ea219214c752a7a63fac83adab0301 (diff)
downloadtxr-de2624b04b91359337d4cd5e29b97720ed61df1b.tar.gz
txr-de2624b04b91359337d4cd5e29b97720ed61df1b.tar.bz2
txr-de2624b04b91359337d4cd5e29b97720ed61df1b.zip
* 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.
Diffstat (limited to 'parser.l')
-rw-r--r--parser.l4
1 files changed, 2 insertions, 2 deletions
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}?