summaryrefslogtreecommitdiffstats
path: root/ChangeLog
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2015-07-10 07:31:55 -0700
committerKaz Kylheku <kaz@kylheku.com>2015-07-10 07:31:55 -0700
commit5c4e844c2c9c25324c3c1cb6d47b2967f65c633d (patch)
treefa96ee3aedbc243b16c011268bd5d99df9759b2e /ChangeLog
parent4fa8bbcb93d76caa7e599c60952ee06c45f55bd2 (diff)
downloadtxr-5c4e844c2c9c25324c3c1cb6d47b2967f65c633d.tar.gz
txr-5c4e844c2c9c25324c3c1cb6d47b2967f65c633d.tar.bz2
txr-5c4e844c2c9c25324c3c1cb6d47b2967f65c633d.zip
Bugfix: lexer loses unmatched "hold char" between top-level forms.
Test case: file containing 4(prinl 3). Scanner consumes 4 and (. The ( is lost when the scanner is reset for the next call to yyparse, resulting in jut prinl being read and interpreted as a variable. * parser.c (prime_parser): If present, append hold byte to priming string. Takes parser_t * instead of parser, and returns void now. * parser.l (reset_scanner): Now returns int value, the value of the scanner's yy_hold_char variable which is nonzero when the scanner is hanging on to an unmatched byte of input. * parser.h (reset_scanner, prime_parser): Declarations updated. * parser.y (parse): Pass hold byte returned by reset_scanner to prime_parser.
Diffstat (limited to 'ChangeLog')
-rw-r--r--ChangeLog20
1 files changed, 20 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index bab4ca13..ade86529 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,25 @@
2015-07-10 Kaz Kylheku <kaz@kylheku.com>
+ Bugfix: lexer loses unmatched "hold char" between top-level forms.
+
+ Test case: file containing 4(prinl 3). Scanner consumes 4 and (.
+ The ( is lost when the scanner is reset for the next call to yyparse,
+ resulting in jut prinl being read and interpreted as a variable.
+
+ * parser.c (prime_parser): If present, append hold byte to priming
+ string. Takes parser_t * instead of parser, and returns void now.
+
+ * parser.l (reset_scanner): Now returns int value, the value
+ of the scanner's yy_hold_char variable which is nonzero when
+ the scanner is hanging on to an unmatched byte of input.
+
+ * parser.h (reset_scanner, prime_parser): Declarations updated.
+
+ * parser.y (parse): Pass hold byte returned by reset_scanner to
+ prime_parser.
+
+2015-07-10 Kaz Kylheku <kaz@kylheku.com>
+
* stream.c (byte_in_unget_byte): Wrong function name in error message.
2015-07-10 Kaz Kylheku <kaz@kylheku.com>