summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog11
-rw-r--r--parser.l7
2 files changed, 17 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 09b4be30..feb36da0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,16 @@
2015-06-26 Kaz Kylheku <kaz@kylheku.com>
+ Second round of quasiliteral-related fixes.
+
+ * parser.l: Only shift to QSPECIAL state when @ is followed
+ by a trailing context consisting of certain characters.
+ Not every kind of Lisp object syntax can be introduced
+ with @ in a quasiliteral. Adding a rule to produce an
+ error when @ appears that is not followed by an allowed
+ character.
+
+2015-06-26 Kaz Kylheku <kaz@kylheku.com>
+
First round of quasiliteral-related fixes.
* parser.l: Do not try to recognize floating-point literals
diff --git a/parser.l b/parser.l
index 4a133836..7ec31991 100644
--- a/parser.l
+++ b/parser.l
@@ -895,11 +895,16 @@ UONLY {U2}{U}|{U3}{U}{U}|{U4}{U}{U}{U}
return ' ';
}
-<QSILIT,QWLIT>@ {
+<QSILIT,QWLIT>@/([[({'^,@]|{TOK}) {
yy_push_state(QSPECIAL, yyscanner);
return yytext[0];
}
+<QSILIT,QWLIT>@ {
+ yyerrprepf(yyg, lit("malformed @ expression in quasiliteral"), nao);
+ return ERRTOK;
+}
+
<WLIT,QWLIT>{WS} {
return ' ';
}