diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2014-10-14 08:13:31 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2014-10-14 08:13:31 -0700 |
commit | 68e4d78cf9f153871d9a3c07c8ce3e43eb517c3b (patch) | |
tree | 69b3947cb8bd09b49cb3015af70fc9034efadd6d /ChangeLog | |
parent | 851ffd5c85901f1609742c162e2f992099e4b848 (diff) | |
download | txr-68e4d78cf9f153871d9a3c07c8ce3e43eb517c3b.tar.gz txr-68e4d78cf9f153871d9a3c07c8ce3e43eb517c3b.tar.bz2 txr-68e4d78cf9f153871d9a3c07c8ce3e43eb517c3b.zip |
C++ upkeep.
TXR's support for compiling as C++ pays off: C++ compiler finds
serious bugs introduced in August 2 ("Big switch to reentrant lexing
and parsing"). The yyerror function was being misused; some of
the calls reversed the scanner and parser arguments. Since one
of the two parameters is void *, this reversal wasn't caught.
* parser.l (yyerror): Fix first two arguments being
reversed.
(num_esc): Change previously correct call to yyerror to follow reversed
arguments, so that it stays correct.
* parser.y (%parse-param): Change order of these directives
so that the scnr parameter is before the parser parameter.
This causes the yacc-generated calls to yyerror to have
the arguments in the correct order. It also has the
effect of changing the signature of yyparse, reversing its parameters.
(parse): Update call to yyparse to new argument order.
* parser.h (yyparse): Declaration removed.
(yyerror): Declaration updated.
* regex.c (regex_kind_t): New enum typedef.
(struct regex): Use regex_kind_t rather than an enum
inside the struct, which has different scoping rules
under C++.
* txr.c (get_self_path): Fix signed/unsigned warning.
Diffstat (limited to 'ChangeLog')
-rw-r--r-- | ChangeLog | 32 |
1 files changed, 32 insertions, 0 deletions
@@ -1,5 +1,37 @@ 2014-10-14 Kaz Kylheku <kaz@kylheku.com> + C++ upkeep. + + TXR's support for compiling as C++ pays off: C++ compiler finds + serious bugs introduced in August 2 ("Big switch to reentrant lexing + and parsing"). The yyerror function was being misused; some of + the calls reversed the scanner and parser arguments. Since one + of the two parameters is void *, this reversal wasn't caught. + + * parser.l (yyerror): Fix first two arguments being + reversed. + (num_esc): Change previously correct call to yyerror to follow reversed + arguments, so that it stays correct. + + * parser.y (%parse-param): Change order of these directives + so that the scnr parameter is before the parser parameter. + This causes the yacc-generated calls to yyerror to have + the arguments in the correct order. It also has the + effect of changing the signature of yyparse, reversing its parameters. + (parse): Update call to yyparse to new argument order. + + * parser.h (yyparse): Declaration removed. + (yyerror): Declaration updated. + + * regex.c (regex_kind_t): New enum typedef. + (struct regex): Use regex_kind_t rather than an enum + inside the struct, which has different scoping rules + under C++. + + * txr.c (get_self_path): Fix signed/unsigned warning. + +2014-10-14 Kaz Kylheku <kaz@kylheku.com> + * txr.1: Round of fixes. 2014-10-13 Kaz Kylheku <kaz@kylheku.com> |