]>
Commit | Line | Data |
---|---|---|
d0829076 PE |
1 | 2003-05-24 Paul Eggert <eggert@twinsun.com> |
2 | ||
3 | Switch from 'int' to 'bool' where that makes sense. | |
4 | ||
5 | * lib/abitset.c (abitset_test, abitset_empty_p, abitset_equal_p, | |
6 | abitset_subset_p, abitset_disjoint_p, abitset_and_cmp, | |
7 | abitset_andn_cmp, abitset_or_cmp, abitset_xor_cmp, abitset_and_or, | |
8 | abitset_and_or_cmp, abitset_andn_or_cmp, abitset_or_and_cmp): | |
9 | Return or accept bool, not int. All callers changed. | |
10 | * lib/bbitset.h: (bitset_toggle_, bitset_copy_, bitset_and_or_cmp_, | |
11 | bitset_andn_or_cmp_, bitset_or_and_cmp_): Likewise. | |
12 | * lib/bitset.c (bitset_only_set_p, bitset_print, bitset_toggle_, | |
13 | bitset_copy_, bitset_op4_cmp, bitset_and_or_cmp_, bitset_andn_or_cmp_, | |
14 | bitset_or_and_cmp_): Likewise. | |
15 | * lib/bitset.h (bitset_test, bitset_only_set_p): Likewise. | |
16 | * lib/bitset_stats.c (bitset_stats_print, bitset_stats_toggle, | |
17 | bitset_stats_test, bitset_stats_empty_p, bitset_stats_disjoint_p, | |
18 | bitset_stats_equal_p, bitset_stats_subset_p, bitset_stats_and_cmp, | |
19 | bitset_stats_andn_cmp, bitset_stats_or_cmp, bitset_stats_xor_cmp, | |
20 | bitset_stats_and_or_cmp, bitset_stats_andn_or_cmp, | |
21 | bitset_stats_or_and_cmp): Likewise. | |
22 | * lib/ebitset.c (ebitset_elt_zero_p, ebitset_equal_p, ebitset_copy_cmp, | |
23 | ebitset_test, ebitset_empty_p, ebitset_subset_p, ebitset_disjoint_p, | |
24 | ebitset_op3_cmp, ebitset_and_cmp, ebitset_andn_cmp, ebitset_or_cmp, | |
25 | ebitset_xor_cmp): Likewise. | |
26 | * lib/lbitset.c (lbitset_elt_zero_p, lbitset_equal_p, lbitset_copy_cmp, | |
27 | lbitset_test, lbitset_empty_p, lbitset_subset_p, lbitset_disjoint_p, | |
28 | lbitset_op3_cmp, lbitset_and_cmp, lbitset_andn_cmp, lbitset_or_cmp, | |
29 | lbitset_xor_cmp): Likewise. | |
30 | * lib/bbitset.h: Include <stdbool.h>. | |
31 | (struct bitset_vtable): The following members now return bool, not | |
32 | int: toggle, test, empty_p, disjoint_p, equal_p, subset_p, | |
33 | and_cmp, andn_cmp, or_cmp, xor_cmp, and_or_cmp, andn_or_cmp, | |
34 | or_and_cmp). | |
35 | * src/conflicts.c (count_rr_conflicts): Likewise. | |
36 | * lib/bitset_stats.h (bitset_stats_enabled): Now bool, not int. | |
37 | All uses changed. | |
38 | * lib/ebitset.c (ebitset_obstack_init): Likewise. | |
39 | * lib/lbitset.c (lbitset_obstack_init): Likewise. | |
40 | * src/getargs.c (debug_flag, defines_flag, locations_flag, | |
41 | no_lines_flag, no_parser_flag, token_table_flag, yacc_flag, | |
42 | graph_flag): Likewise. | |
43 | * src/getargs.h (debug_flag, defines_flag, locations_flag, | |
44 | no_lines_flag, no_parser_flag, token_table_flag, yacc_flag, | |
45 | graph_flag): Likewise. | |
46 | * src/output.c (error_verbose): Likewise. | |
47 | * src/output.h (error_verbose): Likewise. | |
48 | * src/reader.c (start_flag, typed): Likewise. | |
49 | * src/reader.h (typed): Likewise. | |
50 | * src/getargs.c (LOCATIONS_OPTION): New constant. | |
51 | (long_options, getargs): Use it. | |
52 | * src/lalr.c (build_relations): Use bool, not int. | |
53 | * src/nullable.c (nullable_compute): Likewise. | |
54 | * src/print.c (print_reductions): Likewise. | |
55 | * src/tables.c (action_row, pack_vector): Likewise. | |
56 | * src/muscle_tab.h (MUSCLE_INSERT_BOOL): New macro. | |
57 | * src/output.c (prepare): Use it. | |
58 | * src/output.c (token_definitions_output, | |
59 | symbol_destructors_output, symbol_destructors_output): Use string, | |
60 | not boolean integer, to keep track of whether to output separator. | |
61 | * src/print_graph.c (print_core): Likewise. | |
62 | * src/state.c (state_rule_lookaheads_print): Likewise. | |
63 | ||
64 | * config/install-sh: Sync from automake 1.7.5. | |
65 | ||
6b2584b7 PE |
66 | 2003-05-14 Paul Eggert <eggert@twinsun.com> |
67 | ||
68 | * src/parse-gram.y (rules_or_grammar_declaration): Require a | |
69 | semicolon after a grammar declaration, in the interest of possible | |
70 | future changes to the Bison input language. | |
71 | Do not allow a stray semicolon at the start of the grammar. | |
72 | (rhses.1): Allow one or more semicolons after any rule, including | |
73 | just before "|" as required by POSIX. | |
74 | * tests/input.at (Torturing the Scanner): Add tests for ";|" in a | |
75 | grammar. | |
76 | ||
caf37a36 ADL |
77 | 2003-05-14 Alexandre Duret-Lutz <adl@gnu.org> |
78 | ||
79 | %parse-param support for lalr1.cc. | |
80 | ||
81 | * data/lalr1.cc (b4_parse_param_decl, b4_parse_param_cons, | |
82 | b4_cc_constructor_calls, b4_cc_constructor_call, | |
83 | b4_parse_param_vars, b4_cc_var_decls, b4_cc_var_decl): New m4 | |
84 | definitions. | |
85 | (yy::b4_parser_class_name::b4_parser_class_name): Take extra | |
86 | parse-param arguments. | |
87 | (yy::b4_parser_class_name): Declare instance variables to | |
88 | hold parse-param arguments. | |
89 | * tests/calc.at: s/value/semantic_value/ because value clashes | |
90 | with a member of yy::b4_parser_class_name. Adjust C++ code | |
91 | to handle %parse-param. Enable %parse-param test in C++. | |
92 | ||
3ab37077 PE |
93 | 2003-05-12 Paul Eggert <eggert@twinsun.com> |
94 | ||
95 | * doc/bison.texinfo (How Can I Reset @code{yyparse}): Reword the | |
96 | English a bit. Fix fclose typo. Change "const char" to "char | |
97 | const", and use ANSI C rather than K&R for "main". Suggest | |
98 | YY_FLUSH_BUFFER over yyrestart (as that is what Flex recommends) | |
99 | and suggest yy_switch_to_buffer. | |
100 | ||
101 | 2003-05-05 Paul Eggert <eggert@twinsun.com> | |
163ab321 PE |
102 | |
103 | * lib/bitset.h (__INT_TO_PTR): Define to a value that presumes | |
104 | C89. This avoids a diagnostic on compilers that define __STDC__ | |
105 | to 0, fixing a problem with Tru64 cc reported by Martin Mokrejs in | |
106 | <http://mail.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>. | |
107 | ||
e743727f PE |
108 | 2003-05-03 Paul Eggert <eggert@twinsun.com> |
109 | ||
110 | * lib/bitset.h (BITSET_FOR_EACH, BITSET_FOR_EACH_REVERSE): | |
111 | Do not overrun array bounds. | |
112 | This should fix a bug reported today by Olatunji Oluwabukunmi in | |
113 | <http://mail.gnu.org/archive/html/bug-bison/2003-05/msg00004.html>. | |
114 | ||
916708d5 AD |
115 | 2003-04-29 Akim Demaille <akim@epita.fr> |
116 | ||
117 | * src/gram.h, src/gram.c (pure_parser, glr_parser): Move to... | |
118 | * src/getargs.c, src/getargs.h: here, as bool, not int. | |
119 | (nondeterministic_parser): New. | |
120 | * src/parse-gram.y, src/scan-gram.l: Support | |
121 | %nondeterministic-parser. | |
122 | * src/output.c (prepare): Use nondeterministic_parser instead | |
123 | of glr_parser where appropriate. | |
124 | * src/tables.c (conflict_row, action_row, save_row) | |
125 | (token_actions, token_actions, pack_vector): Ditto. | |
126 | ||
a06ea4aa AD |
127 | 2003-04-29 Akim Demaille <akim@epita.fr> |
128 | ||
129 | * doc/bison.texinfo (C++ Parsers, Implementing Loops): New. | |
130 | ||
211074ca AD |
131 | 2003-04-29 Akim Demaille <akim@epita.fr> |
132 | ||
133 | * tests/calc.at: Also test yacc.c and glr.c (but not lalr1.cc yet) | |
134 | with %pure-parser and %locations to exercise the patch from Yakov | |
135 | Markovitch below. | |
136 | ||
6175ffe3 PE |
137 | 2003-04-28 Tim Van Holder <tim.van.holder@pandora.be> |
138 | ||
139 | * data/yacc.c: (b4_lex_param): Corrected for the case where | |
140 | %lex-param is provided and %pure-parser isn't. | |
141 | ||
b1e95857 PE |
142 | 2003-04-27 Paul Eggert <eggert@twinsun.com> |
143 | ||
144 | Avoid gcc -Wundef warnings reported by Gerald Pfeifer in | |
145 | <http://mail.gnu.org/archive/html/bug-bison/2003-04/msg00044.html>. | |
146 | * data/yacc.c (YYSTACK_ALLOC): Don't evaluate YYSTACK_USE_ALLOCA | |
147 | if it is not defined. | |
148 | (YYMAXDEPTH): Don't evaluate YYMAXDEPTH if it is not defined. | |
149 | ||
acda9df6 PE |
150 | 2003-04-26 Paul Eggert <eggert@twinsun.com> |
151 | ||
3470c57b PE |
152 | * data/lalr1.cc (yy::Parser::pact_ninf_, yy::Parser::table_ninf_): |
153 | Declare to be of type suitable for the ninf value itself, not of | |
154 | type suitable for the corresponding table, since the latter might | |
155 | be unsigned but the ninf value might be negative. This fixes a | |
156 | bug reported by Alexandre Duret-Lutz in | |
157 | <http://mail.gnu.org/archive/html/bug-bison/2003-04/msg00017.html>. | |
158 | ||
acda9df6 PE |
159 | * configure.ac (AC_FUNC_ERROR_AT_LINE): Remove, since gl_ERROR |
160 | invokes it. We shouldn't invoke it twice because it will attempt | |
161 | to put error.o in the archive twice. This fixes a glitch reported | |
162 | by Martin Mokrejs in | |
163 | <http://mail.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>. | |
164 | ||
b5250f26 PE |
165 | 2003-04-21 Paul Eggert <eggert@twinsun.com> |
166 | ||
167 | * m4/error.m4: Update from Bruno Haible's 2003-04-14 patch | |
168 | to gnulib. | |
169 | ||
089ac0f1 PE |
170 | 2003-04-21 Yakov Markovitch <Markovitch@iso.ru> |
171 | ||
172 | * data/glr.c (yyexpandGLRStack) [!YYSTACKEXPANDABLE]: | |
173 | Fix obvious typo that results in uncompilable GLR parsers | |
174 | when both %pure-parser and %locations are used. (trivial change) | |
175 | ||
5ededac6 PE |
176 | 2003-04-17 Paul Eggert <eggert@twinsun.com> |
177 | ||
1b8f2fff PE |
178 | * src/scan-gram.l: Add %option nounput, since we no longer use unput. |
179 | (unexpected_eof): Renamed from unexpected_end_of_file, for brevity. | |
180 | Do not insert the expected token via unput, as this runs afoul | |
181 | of a POSIX-compatibility bug in flex 2.5.31. | |
182 | All uses changed to BEGIN the parent state, | |
183 | since we no longer insert the expected token via unput. | |
184 | * tests/regression.at (Invalid inputs): Remove cascaded diagnostic | |
185 | that is no longer emitted after the above change. | |
186 | ||
5ededac6 PE |
187 | * src/conflicts.c (set_conflicts): Resolve all conflicts, not just |
188 | the first one. This change is from Paul Hilfinger, and it fixes | |
189 | regression reported by Werner Lemberg in | |
190 | <http://mail.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>. | |
191 | ||
192 | (resolve_sr_conflict): Don't invoke state_errs_set | |
193 | unless one or more tokens have been explicitly made errors. | |
194 | Otherwise, the above change causes Bison to abort. | |
195 | ||
196 | * tests/existing.at (GNU pic Grammar): New test case, taken from | |
197 | Lemberg's email. | |
198 | ||
b8be9132 AD |
199 | 2003-03-31 Akim Demaille <akim@epita.fr> |
200 | ||
201 | * doc/Makefile.am (AM_MAKEINFOFLAGS): Don't split the info file. | |
202 | ||
d423d460 AD |
203 | 2003-03-31 Akim Demaille <akim@epita.fr> |
204 | ||
205 | * src/output.c (prepare_symbols): Avoid trailing spaces in the | |
206 | output. | |
207 | ||
c7e441b4 AD |
208 | 2003-03-31 Akim Demaille <akim@epita.fr> |
209 | ||
210 | * doc/bison.texinfo (Strings are Destroyed): s/losses/loses/. | |
211 | From Paul Hilfinger. | |
212 | ||
231897ad AD |
213 | 2003-03-29 Akim Demaille <akim@epita.fr> |
214 | ||
215 | * m4/error.m4: Do not put under dynamic conditions some code which | |
216 | expansion is under static control. | |
217 | ||
5b066063 AD |
218 | 2003-03-29 Akim Demaille <akim@epita.fr> |
219 | ||
220 | * doc/bison.texinfo (How Can I Reset @code{yyparse}): New. | |
221 | ||
22a74fec AD |
222 | 2003-03-29 Akim Demaille <akim@epita.fr> |
223 | ||
224 | * doc/bison.texinfo (Strings are Destroyed): New. | |
225 | ||
0eee27e7 PE |
226 | 2003-03-13 Paul Eggert <eggert@twinsun.com> |
227 | ||
228 | * .cvsignore: Add configure.lineno. | |
229 | * src/.cvsignore: Add yacc. | |
230 | * tests/.cvsignore: Add testsuite.log. | |
231 | * doc/fdl.texi: Sync with latest FSF version. | |
232 | ||
f61aad93 PE |
233 | 2003-03-12 Paul Eggert <eggert@twinsun.com> |
234 | ||
537636c7 PE |
235 | * scan-gram.l (YY_USER_INIT): Initialize code_start, too. |
236 | (<INITIAL><<EOF>>, <SC_PRE_CODE><<EOF>>): Set *loc to the scanner | |
237 | cursor, instead of leaving it undefined. This fixes a bug | |
238 | reported by Tim Van Holder in | |
239 | <http://mail.gnu.org/archive/html/bug-bison/2003-03/msg00023.html>. | |
240 | * tests/input.at (Torturing the Scanner): Test the scanner on | |
241 | an empty input file, which was Tim Van Holder's test case. | |
242 | ||
243 | * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): When checking whether | |
244 | <sys/resource.h> can be included, include sys/time.h and | |
245 | sys/times.h first, if available. This works around the SunOS | |
246 | 4.1.4 porting bug reported by Bruce Becker in | |
247 | <http://mail.gnu.org/archive/html/bug-bison/2003-03/msg00018.html>. | |
248 | ||
249 | * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't | |
250 | AC_CHECK_HEADERS([sys/wait.h]), as this interferes with | |
251 | AC_HEADER_SYS_WAIT. | |
252 | ||
f61aad93 PE |
253 | Merge changes from gnulib. This was prompted because the CVS |
254 | snapshot didn't build on Solaris 7 due to strnlen problems. | |
255 | ||
256 | These changes need to be merged back into gnulib: | |
257 | * lib/hash.c: Include <stdbool.h> unconditionally. | |
258 | * m4/onceonly.m4 (m4_quote): New macro. | |
259 | (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE): | |
260 | Quote AC_FOREACH variable-expansions properly. | |
261 | The 2003-01-03 obstack.h change also needs merging. | |
262 | {end of changes requiring merging} | |
5b066063 | 263 | |
f61aad93 PE |
264 | * lib/stdbool.h.in, m4/alloca.m4, m4/dirname.m4, m4/dos.m4, |
265 | m4/getopt.m4, m4/hash.m4, m4/malloc.m4, m4/memchr.m4, | |
266 | m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/quote.m4, | |
267 | m4/quotearg.m4, m4/realloc.m4, m4/stpcpy.m4, m4/strnlen.m4, | |
268 | m4/strtol.m4, m4/strtoul.m4, m4/unlocked-io.m4, m4/xalloc.m4: | |
269 | New files, imported from gnulib. | |
270 | * m4/Makefile.am (EXTRA_DIST): Add the new m4/*.m4 files mentioned | |
271 | above. | |
272 | ||
273 | * lib/mbswidth.c, m4/error.m4, m4/mbrtowc.m4, m4/mbswidth.m4, | |
274 | m4/memcmp.m4, m4/prereq.m4, m4/stdbool.m4: Update to current | |
275 | gnulib sources. | |
276 | ||
277 | * configure.ac (gl_DIRNAME, gl_GETOPT, gl_HASH, gl_QUOTE, gl_XALLOC): | |
278 | Add. | |
279 | (gl_ERROR): New, replacing jm_PREREQ_ERROR. | |
280 | (gl_FUNC_ALLOCA): New, replacing AC_FUNC_ALLOCA. | |
281 | (gl_FUNC_STPCPY): New, replacing AC_REPLACE_FUNCS(stpcpy). | |
282 | (gl_FUNC_STRNLEN): New, replacing AC_FUNC_STRNLEN. | |
283 | (gl_MBSWIDTH): New, replacing jm_PREREQ_MBSWIDTH. | |
284 | (gl_OBSTACK): New, replacing AC_FUNC_OBSTACK. | |
285 | (gl_QUOTEARG): New, replacing jm_PREREQ_QUOTEARG. | |
286 | (jm_FUNC_GLIBC_UNLOCKED_IO, gl_FUNC_STPCPY, gl_FUNC_STRTOL): New. | |
287 | (jm_FUNC_MALLOC): New, replacing AC_FUNC_MALLOC. | |
288 | (jm_FUNC_REALLOC): New, replacing AC_FUNC_REALLOC. | |
289 | (jm_PREREQ_ARGMATCH): Remove. | |
290 | (AC_REPLACE_FUNCS): Remove memchr, memrchr, stpcpy, strtol, strtoul. | |
291 | * lib/Makefile.am (libbison_a_SOURCES): Add argmatch.c, argmatch.h. | |
292 | ||
293 | * src/system.h: Include <stdbool.h> unconditionally. | |
294 | ||
295 | * lib/bbitset.h: Include <limits.h> unconditionally. We have been | |
296 | assuming at least C89 in the bitset code for some time now. | |
297 | ||
d2ffe116 AD |
298 | 2003-03-03 Akim Demaille <akim@epita.fr> |
299 | ||
300 | * ro.po: New. | |
301 | ||
052826fd AD |
302 | 2003-03-02 Akim Demaille <akim@epita.fr> |
303 | ||
304 | * doc/bison.texinfo (Table of Symbols): Reactivate the | |
305 | documentation for %lex-param, and %parse-param. | |
306 | ||
c4749565 AD |
307 | 2003-03-02 Akim Demaille <akim@epita.fr> |
308 | ||
309 | * data/yacc.c, data/glr.c, data/lal1.cc: Use similar code to | |
310 | generate verbose error messages. | |
311 | Use the number of tokens as an upper bound in yytname, as it | |
312 | cannot be a non terminal. | |
313 | ||
d5286af1 AD |
314 | 2003-03-02 Akim Demaille <akim@epita.fr> |
315 | ||
316 | * tests/regression.at (_AT_DATA_DANCER_Y): Fix the expected error | |
317 | message. | |
318 | ||
22e304a6 AD |
319 | 2003-03-02 Akim Demaille <akim@epita.fr> |
320 | ||
22e304a6 AD |
321 | * tests/regression.at (_AT_DATA_DANCER_Y, AT_CHECK_DANCER): New. |
322 | Use them to exercise yycheck overrun. | |
323 | Based on Andrew Suffield's grammar. | |
324 | ||
67a25fed AD |
325 | 2003-03-02 Akim Demaille <akim@epita.fr> |
326 | ||
327 | Create tests/local.at for Bison generic testing macros. | |
328 | ||
329 | * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Move to... | |
330 | * tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS): | |
331 | This new file. | |
332 | * tests/calc.at (AT_CHECK_CALC): Adjust. | |
333 | * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR) | |
334 | (AT_COMPILE, AT_COMPILE_CXX, AT_PARSER_CHECK): Move to... | |
335 | * tests/local.at: here. | |
336 | (AT_COMPILE_CXX): Tags the tests using it as c++. | |
337 | Ignore the test if CXX is not functional. | |
338 | ||
9c2b381f PE |
339 | 2003-03-01 Paul Eggert <eggert@twinsun.com> |
340 | ||
341 | * src/scan-gram.l (code_start): Initialize it to scanner_cursor, | |
342 | not loc->end, since loc->end might contain garbage and this leads | |
343 | to undefined behavior on some platforms. | |
344 | (id_loc, token_start): Use (IF_LINTed) initial values that do not | |
345 | depend on *loc, so that the reader doesn't give the the false | |
346 | impression that *loc is initialized. | |
347 | (<INITIAL>"%%"): Do not bother setting code_start, since its value | |
348 | does not survive the return. | |
349 | ||
0433ba88 AD |
350 | 2003-03-01 Akim Demaille <akim@epita.fr> |
351 | ||
352 | * src/scan-gram.l (code_start): Always initialize it when entering | |
353 | into yylex, as SC_EPILOGUE is activated *before* the corresponding | |
354 | yylex invocation. An alternative would be making it static, but | |
355 | then it starts with the second %%'s beginning, instead of its end. | |
356 | ||
b305ea69 PE |
357 | 2003-02-28 Paul Eggert <eggert@twinsun.com> |
358 | ||
359 | * lib/mbswidth.c: Include <wchar.h> before "mbswidth.h", to work | |
360 | around a UnixWare 7.1.1 porting bug reported by John Hughes in | |
361 | <http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00030.html>. | |
362 | ||
c3d25e01 PE |
363 | 2003-02-26 Paul Eggert <eggert@twinsun.com> |
364 | ||
365 | * README: Mention compiler bug in Sun Forte Developer 6 update 2. | |
366 | Remove Sequent/Pyramid discussion (nobody uses them any more). | |
367 | Merge VMS and MS-DOS discussion; these ports may well be dead | |
368 | but let's keep mentioning them for now. Put <> around email | |
369 | addresses. Add copyright notice. | |
370 | ||
c267ffbc PE |
371 | 2003-02-24 Paul Eggert <eggert@twinsun.com> |
372 | ||
373 | * data/glr.c (yy_reduce_print): yylineno -> yylno, | |
374 | to avoid collision with flex use of yylineno. | |
375 | Problem reported by Bruce Lilly in | |
376 | <http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00016.html>. | |
377 | * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise. | |
378 | * data/yacc.c (yy_reduce_print): Likewise. | |
379 | ||
380 | * config/depcomp: Sync with Automake 1.7.3. | |
381 | ||
f939fc12 AD |
382 | 2003-02-21 Akim Demaille <akim@epita.fr> |
383 | ||
384 | * data/lalr1.cc: Use temporary variables instead of casts to | |
385 | change integer types. | |
386 | Suggested by Paul Eggert. | |
387 | ||
95923bd6 AD |
388 | 2003-02-21 Akim Demaille <akim@epita.fr> |
389 | ||
390 | * doc/bison.texinfo: Use "location" consistently to refer to @n, | |
391 | to avoid confusions with lalr1.cc's notion of Position. | |
392 | Suggested by Paul Eggert. | |
393 | ||
2cdc240e AD |
394 | 2003-02-20 Akim Demaille <akim@epita.fr> |
395 | ||
396 | * data/lalr1.cc (position.hh): Make sure "columns" never pushes | |
397 | before initial_columns. | |
398 | (location.hh): Use consistent variable names when defining the | |
399 | operator<<. | |
400 | Use "last" so that we subtract from Positions, not from unsigned. | |
401 | ||
5d003116 AD |
402 | 2003-02-20 Akim Demaille <akim@epita.fr> |
403 | ||
404 | * data/lalr1.cc (position.hh): New subfile, including the extended | |
405 | and Doxygen'ed documentation of class Position. | |
406 | (location.hh): Use it. | |
407 | Document a` la Doxygen. | |
ba1ecc07 | 408 | With the help of Benoit Perrot. |
5d003116 | 409 | |
d02b25f9 AD |
410 | 2003-02-20 Akim Demaille <akim@epita.fr> |
411 | ||
412 | * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Define | |
413 | AT_YACC_IF. | |
414 | Redefine AT_YYERROR_SEES_LOC_IF using it. | |
415 | (_AT_DATA_CALC_Y): Don't declare yyerror when lalr1.cc, as it is | |
416 | not defined. | |
417 | Don't use the location in yy::Parser::error_ and | |
418 | yy::Parser::print_ when not %locations. | |
419 | Activate more lalr1.cc tests. | |
420 | ||
0d1c3a04 AD |
421 | 2003-02-19 Akim Demaille <akim@epita.fr> |
422 | ||
423 | * data/lalr1.cc: When displaying a line number, be sure to make it | |
424 | an int. | |
425 | ||
60a777aa AD |
426 | 2003-02-19 Akim Demaille <akim@epita.fr> |
427 | ||
428 | * data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_): | |
429 | Remove, useless. | |
430 | (YYABORT, YYACCEPT, YYERROR): New. | |
431 | * tests/calc.at: Renable the lalr1.cc test. | |
432 | ||
0b86fc41 AD |
433 | 2003-02-19 Akim Demaille <akim@epita.fr> |
434 | ||
435 | * tests/calc.at (AT_CHECK_CALC): Check different scenarios of | |
436 | error recovery, mixing with/without pops and discarding of the | |
437 | lookahead. | |
438 | Exercise YYERROR. | |
439 | Disable the lalr1.cc tests as currently it doesn't support YYERROR. | |
440 | ||
da99a5dc PE |
441 | 2003-02-17 Paul Eggert <eggert@twinsun.com> |
442 | ||
443 | * tests/atlocal.in (LDFLAGS, LIBS): New vars. | |
444 | * tests/testsuite.at (AT_COMPILE): Use them. | |
445 | This fixes the testsuite problem reported by Robert Lentz in | |
446 | <http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00011.html>. | |
447 | ||
93b8c255 PE |
448 | 2003-02-12 Paul Eggert <eggert@twinsun.com> |
449 | ||
450 | * data/yacc.c (yyerrlab) [YYERROR_VERBOSE]: | |
451 | Avoid subscript error in yycheck. Bug reported by Andrew Suffield in | |
452 | <http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00003.html>. | |
453 | * data/glr.c (yyreportSyntaxError) [YYERROR_VERBOSE]: Likewise. | |
454 | Check for malloc failure, for consistency with yacc.c. | |
455 | (yytname_size): Remove, for consistency with yacc.c. | |
456 | ||
457 | The bug still remains in data/lalr1.cc, as I didn't have time | |
458 | to fix it there. | |
459 | ||
7548fed2 AD |
460 | 2003-02-06 Akim Demaille <akim@epita.fr> |
461 | ||
462 | * configure.ac (GXX): Rename as... | |
463 | (CXX): this, to keep the original Autoconf semantics. | |
464 | Require 2.57. | |
465 | * data/lalr1.cc: Fix b4_copyright invocations. | |
466 | If YYDEBUG is not defined, don't depend upon name_ being defined. | |
467 | (location.hh): Include string and iostream. | |
468 | (Position::filename): New member. | |
469 | (Position::Position ()): New. | |
470 | (operator<< (Position)): New. | |
471 | (operator- (Position, int)): New. | |
472 | (Location::first, Location::last): Rename as... | |
473 | (Location::begin, Location::end): these, to mock the conventional | |
474 | iterator names. | |
475 | (operator<< (Location)): New. | |
476 | * tests/atlocal.in (CXX): New. | |
477 | * tests/testsuite.at (AT_COMPILE_CXX): New. | |
478 | * tests/calc.at (_AT_DATA_CALC_Y): Adjust yyerror to report the | |
479 | locations in a more synthetic way. | |
480 | (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF is positive if | |
481 | lalr1.cc is used. | |
482 | Adjust the C locations to match those from Emacs: first column is | |
483 | column 0. | |
484 | Change all the expected results. | |
485 | Conform to the GCS: simplify the locations when applicable. | |
486 | (LOC, VAL, YYLLOC_FORMAL, YYLLOC_ARG, USE_YYLLOC, LEX_FORMALS) | |
487 | (LEX_ARGS, USE_LEX_ARGS, LEX_PRE_FORMALS, LEX_PRE_ARGS): Replace | |
488 | these CPP macros with the m4 macros new defined by... | |
489 | (AT_CHECK_PUSHDEFS): this, i.e.: | |
490 | (AT_LALR1_CC_IF, AT_PURE_LEX_IF, AT_LOC, AT_VAL, AT_LEX_FORMALS) | |
d02b25f9 | 491 | (AT_LEX_ARGS, AT_USE_LEX_ARGS, AT_LEX_PRE_FORMALS, AT_LEX_PRE_ARGS) |
7548fed2 AD |
492 | New macros. |
493 | (AT_CHECK_POPDEFS): Undefine them. | |
494 | (AT_CHECK_CALC_LALR1_CC): New. | |
495 | Use it for the first lalr1.cc test. | |
496 | ||
43a176ef AD |
497 | 2003-02-04 Akim Demaille <akim@epita.fr> |
498 | ||
499 | * data/lalr1.cc (YYLLOC_DEFAULT): Fix its definition: be based on | |
500 | Location as is defined. | |
501 | ||
fc049e9c AD |
502 | 2003-02-04 Akim Demaille <akim@epita.fr> |
503 | ||
504 | * data/lalr1.cc: If YYDEBUG is not defined, don't depend upon | |
505 | name_ being defined. | |
506 | ||
a737b216 PE |
507 | 2003-02-03 Paul Eggert <eggert@twinsun.com> |
508 | ||
509 | * src/gram.h (start_symbol): Remove unused decl. | |
510 | ||
511 | Use more-consistent naming conventions for local vars. | |
512 | ||
513 | * src/derives.c (derives_compute): Change type of local var from | |
514 | int to rule_number. | |
515 | * src/gram.c (grammar_rules_partial_print): Likewise. | |
516 | * src/print.c (print_core): Likewise. | |
517 | * src/reduce.c (reduce_grammar_tables): Likewise. | |
518 | ||
519 | * src/gram.c (grammar_dump): Change name of item_number * | |
520 | local var from r to rp. | |
521 | * src/nullable.c (nullable_compute): Likewise. | |
522 | ||
523 | * src/gram.h (ISTOKEN, ISVAR): Use i, not s, for int var. | |
524 | ||
525 | * src/gram.h (symbol_number_as_item_number): Use sym, not s, | |
526 | for symbol or symbol_number var. | |
527 | * src/reader.c (grammar_start_symbol_set): Likewise. | |
528 | * src/reader.h (grammar_start_symbol_set, grammar_symbol_append): | |
529 | Likewise. | |
530 | * src/state.c (transitions_to): Likewise. | |
531 | * src/state.h: Likewise. | |
532 | * src/tables.c (symbol_number_to_vector_number): Likewise. | |
533 | ||
534 | * src/muscle_tab.h (MUSCLE_OBSTACK_SGROW): Use p, not s, for | |
535 | char * var. | |
536 | ||
537 | * src/parse-gram.y (lloc_default): Use loc, not r, for YYLTYPE | |
538 | var. | |
539 | ||
540 | * src/scan-gram.l (no_cr_read): Use bytes_read, not s, for size | |
541 | var. | |
542 | ||
543 | * src/system.h (xstrndup, strchr, strspn, strnlen, memchr, memrchr): | |
544 | Use str, not s, for char * var. Use ch, not c, for character var. | |
545 | Use size for size var. | |
546 | ||
547 | * src/uniqstr.c (uniqstr_new, uniqstr_assert): Use str, not s, for | |
548 | char * var. | |
549 | (uniqstr_print, uniqst_print_processor): Use ustr, not s, for | |
550 | uniqstr var. | |
551 | * src/uniqstr.h: Likewise. | |
552 | ||
553 | * src/vcg.c (get_color_str, get_textmode_str, get_shape_str, | |
554 | get_layoutalgorithm_str, get_decision_str, get_orientation_str, | |
555 | get_node_alignment_str, get_arrow_mode_str, get_crossing_type_str, | |
556 | get_view_str, get_linestyle_str, get_arrowstyle_str): Rename | |
557 | param to have same name as that of enum, so that we don't use | |
558 | "s" to stand for a non-state. | |
559 | ||
68e93ad5 AD |
560 | 2003-02-02 Akim Demaille <akim@epita.fr> |
561 | ||
562 | * src/scan-skel.l: Scan more than one inert character per yylex | |
563 | invocation. | |
564 | ||
92898986 PE |
565 | 2003-02-01 Paul Eggert <eggert@twinsun.com> |
566 | ||
567 | Version 1.875a. | |
568 | ||
1d9d5d71 PE |
569 | * po/LINGUAS: Add ms. |
570 | ||
0435d061 AD |
571 | 2003-01-30 Akim Demaille <akim@epita.fr> |
572 | ||
573 | * doc/Makefile.am (CLEANFILES): Add bison.fns for distcheck. | |
574 | ||
6029a57f PH |
575 | 2003-01-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU> |
576 | ||
577 | * tests/cxx-type.at: Correct apparent typo in Bison input: $$ instead | |
578 | of $1. | |
0435d061 AD |
579 | |
580 | Changes in response to error report by S. Eken: GLR mode does not | |
6029a57f PH |
581 | handle negative $ indices or $ indices in embedded rules correctly. |
582 | See <http://mail.gnu.org/archive/html/bug-bison/2003-01/msg00076.html>. | |
0435d061 | 583 | |
6029a57f PH |
584 | * data/glr.c (b4_rhs_value): Change to use YYFILL macro. |
585 | (b4_rhs_location): Ditto. | |
0435d061 | 586 | (yyfill): New function to copy from stack tree into array |
6029a57f | 587 | incrementally. |
0435d061 AD |
588 | (yyuserAction): Modify to allow incremental move of semantic values |
589 | to rhs array when in GLR mode. | |
590 | Define YYFILL to use in user-defined actions to fill semantic array | |
6029a57f PH |
591 | as needed. |
592 | Remove dummy use of yystack, as there is now a guaranteed use. | |
593 | (yydoAction): Modify to allow incremental move of semantic values | |
594 | to rhs array when in GLR mode. | |
595 | (yyresolveAction): Ditto. | |
596 | (yyglrShiftDefer): Update comment. | |
0435d061 | 597 | (yyresolveStates): Use X == NULL for pointers, not !X. |
6029a57f PH |
598 | (yyglrReduce): Ditto. |
599 | (yydoAction): Ditto | |
0435d061 | 600 | |
6029a57f PH |
601 | * tests/glr-regr1.at: Rename to ... |
602 | * tests/glr-regression.at: Add new regression test for the problems | |
603 | described above (adapted from S. Eken). | |
604 | Update copyright notice. | |
605 | * tests/testsuite.at: Rename glr-regr1.at to glr-regression.at. | |
606 | * tests/Makefile.am: Ditto. | |
607 | ||
6cee6297 PE |
608 | 2003-01-28 Paul Eggert <eggert@twinsun.com> |
609 | ||
610 | * data/lalr1.cc: Do not use @output_header_name@ unless | |
611 | b4_defines_flag is set. This fixes two bugs reported by | |
612 | Tim Van Holder in | |
613 | <http://mail.gnu.org/archive/html/bug-bison/2003-01/msg00071.html> | |
614 | and <http://mail.gnu.org/archive/html/bug-bison/2003-01/msg00073.html>. | |
615 | ||
b2a836b5 PE |
616 | 2003-01-21 Paul Eggert <eggert@twinsun.com> |
617 | ||
618 | * data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that | |
619 | we don't need to worry about yyerrlab1 being reported as an | |
620 | "unused label" by non-GCC C compilers. The downside is that if | |
621 | locations are used then a couple of statements are duplicated each | |
622 | time YYERROR is invoked, but the upside is that the warnings | |
623 | should vanish. | |
624 | (yyerrlab1): Move code to YERROR. | |
625 | (yyerrlab2): Remove. Change uses back to yyerrlab1. | |
626 | This reverts some of the 2002-12-27 change. | |
627 | ||
4196b931 PE |
628 | 2003-01-17 Paul Eggert <eggert@twinsun.com> |
629 | ||
630 | * src/output.c (symbol_printers_output): Fix typo that led | |
631 | to core dump. Problem reported by Antonio Rus in | |
632 | <http://mail.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>. | |
633 | ||
3ae831b4 AD |
634 | 2003-01-13 Akim Demaille <akim@epita.fr>, |
635 | Quoc Peyrot <chojin@lrde.epita.fr>, | |
636 | Robert Anisko <anisko_r@lrde.epita.fr> | |
637 | ||
638 | * data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop | |
639 | when the stacks contain one element, as the loop would otherwise | |
640 | free the last state, and then use the top state (the one we just | |
641 | popped). This means that the initial elements will not be freed | |
642 | explicitly, as is the case in yacc.c; it is not a problem, as | |
643 | these elements have fake values. | |
644 | ||
e3aa65c5 PE |
645 | 2003-01-11 Paul Eggert <eggert@twinsun.com> |
646 | ||
647 | * NEWS: %expect-violations are now just warnings, reverting | |
648 | to Bison 1.30 and 1.75 behavior. This fixes the GCC 3.2 | |
649 | bootstrapping problem reported by Matthias Klose; see | |
650 | <http://mail.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>. | |
651 | * src/conflicts.c (conflicts_print): Likewise. | |
652 | * tests/conflicts.at (%expect not enough, %expect too much, | |
653 | %expect with reduce conflicts): Likewise. | |
654 | * doc/bison.texinfo (Expect Decl): Document this. Also mention | |
655 | that the warning is enabled if the number of conflicts changes | |
656 | (not necessarily increases). | |
657 | ||
658 | * src/getargs.c (version): Update copyright year. | |
659 | ||
f0057011 AD |
660 | 2003-01-09 Akim Demaille <akim@epita.fr> |
661 | ||
662 | * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@. | |
663 | ||
1ee6d2a0 PE |
664 | 2003-01-08 Paul Eggert <eggert@twinsun.com> |
665 | ||
666 | * Makefile.maint (WGETFLAGS): | |
667 | New macro, containing "-C off" to disable proxy caches. | |
668 | All uses of $(WGET) changed to $(WGET) $(WGETFLAGS). | |
669 | (rel-check): Use $(WGET) instead of wget. | |
670 | ||
d4fd77c4 PE |
671 | 2003-01-06 Paul Eggert <eggert@twinsun.com> |
672 | ||
673 | * doc/bison.texinfo (Generalized LR Parsing): Add a reference to | |
674 | the GLR paper of Scott, Johnstone and Hussain. | |
675 | ||
464c6927 PE |
676 | 2003-01-04 Paul Eggert <eggert@twinsun.com> |
677 | ||
d600ee67 PE |
678 | * configure.ac (AC_ARG_ENABLE): Add --disable-yacc. |
679 | (YACC_SCRIPT, YACC_LIBRARY): New vars to AC_SUBST. | |
680 | * lib/Makefile.am (lib_LIBRARIES): liby.a -> @YACC_LIBRARY@. | |
681 | (EXTRA_LIBRARIES): New var, for liby.a. | |
682 | * src/Makefile.am (bin_SCRIPTS): yacc -> @YACC_SCRIPT@. | |
683 | (EXTRA_SCRIPTS): New var, for yacc. | |
684 | ||
464c6927 PE |
685 | * data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined, |
686 | since GNU C++ (as of 3.2.1) does not allow attributes on labels. | |
687 | Problem reported by Nelson H. F. Beebe. | |
688 | ||
689 | 2003-01-03 Paul Eggert <eggert@twinsun.com> | |
690 | ||
691 | * lib/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to | |
692 | (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5 | |
693 | when compiling Bison 1.875's `bitset bset = obstack_alloc | |
694 | (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe. | |
695 | ||
696 | * src/scan-skel.l (QPUTS): Omit redundant `;' from macro definition. | |
697 | ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not | |
698 | grow to a huge size with typical invocation. | |
d600ee67 | 699 | |
464c6927 PE |
700 | * lib/hash.c (_Bool, bool, false, true, __bool_true_false_are_defined): |
701 | Use the pattern recommended by Autoconf 2.57, except also protect | |
702 | against double-definition. | |
703 | * src/system.h: Likewise. | |
704 | Portability issues reported by Nelson H. F. Beebe. | |
d600ee67 | 705 | |
464c6927 PE |
706 | * data/glr.c (yybool): Renamed from bool, to avoid collisions in C. |
707 | All uses changed. Provide a definition in both C and C++. | |
708 | (yytrue, yyfalse): Define even if defined (__cplusplus). | |
709 | ||
710 | * lib/bitset_stats.c (bitset_stats_list): Remove unused var. | |
711 | Reported by Nelson H. F. Beebe. | |
d600ee67 | 712 | |
464c6927 PE |
713 | * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno. |
714 | ||
0f42c7d5 PE |
715 | 2003-01-02 Paul Eggert <eggert@twinsun.com> |
716 | ||
717 | * data/yacc.c (yyerrlab1): Append `;' after attribute, to | |
718 | pacify the buggy "smart preprocessor" in MacOS 10.2.3. | |
719 | Bug reported by Nelson H. F. Beebe. | |
720 | ||
dc546b0f PE |
721 | 2003-01-01 Paul Eggert <eggert@twinsun.com> |
722 | ||
723 | * Version 1.875. | |
724 | ||
2c09b6a7 PE |
725 | 2002-12-30 Paul Eggert <eggert@twinsun.com> |
726 | ||
727 | * src/scan-gram.l (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","): | |
728 | Moved here from... | |
729 | (<INITIAL>","): Here. This causes stray "," to be treated | |
730 | more uniformly. | |
731 | ||
dc546b0f | 732 | * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the |
2c09b6a7 PE |
733 | last brace in braced code when not in Yacc mode, for compatibility |
734 | with Bison 1.35. This resurrects the 2001-12-15 patch to | |
735 | src/reader.c. | |
736 | ||
737 | * src/reader.h (YYDECL): Use YYSTYPE, not its deprecated alias | |
738 | yystype. This follows up the 2002-12-24 YYSTYPE bug fix. | |
739 | ||
535c0f63 PE |
740 | 2002-12-28 Paul Eggert <eggert@twinsun.com> |
741 | ||
742 | * src/symtab.c (symbol_make_alias): Set type of SYMVAL to be | |
743 | that of SYM's type. This fixes Debian bug 168069, reported by | |
744 | Thomas Olsson. | |
d600ee67 | 745 | |
963fcc17 PE |
746 | 2002-12-28 Paul Eggert <eggert@twinsun.com> |
747 | ||
748 | Version 1.75f. | |
749 | ||
750 | Switch back to the Yacc style of conflict reports, undoing some | |
751 | of the 2002-07-30 change. | |
752 | * doc/bison.texinfo (Understanding): Use Yacc style for | |
753 | conflict reports. Also, use new way of locating rules. | |
754 | * src/conflicts.c (conflict_report): | |
755 | Renamed from conflict_report_yacc, removing the old | |
756 | 'conflict_report'. Translate the entire conflict report at once, | |
757 | so that we don't assume that "," has the same interpretation in | |
758 | all languages. | |
759 | (conflicts_output): Use Yacc-style conflict report for each state, | |
760 | instead of our more-complicated style. | |
761 | (conflicts_print): Use Yacc-style conflict report, except print | |
762 | the input file name when not emulating Yacc. | |
763 | * tests/conflicts.at (Unresolved SR Conflicts, Defaulted | |
764 | Conflicted Reduction, %expect not enough, %expect too much, | |
765 | %expect with reduce conflicts): Switch to Yacc-style conflict reports. | |
766 | * tests/existing.at (GNU Cim Grammar): Likewise. | |
767 | * tests/glr-regr1.at (Badly Collapsed GLR States): Likewise. | |
768 | ||
769 | * src/complain.c (warn_at, warn, complain_at, complain, fatal_at, | |
770 | fatal): Don't invoke fflush; it's not needed and it might even be | |
771 | harmful for stdout, as stdout might not be open. | |
772 | * src/reduce.c (reduce_print): Likewise. | |
773 | ||
b1efe548 PE |
774 | 2002-12-27 Paul Eggert <eggert@twinsun.com> |
775 | ||
776 | Fix a bug where error locations were not being recorded correctly. | |
777 | This problem was originally reported by Paul Hilfinger in | |
e3aa65c5 | 778 | <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>. |
b1efe548 PE |
779 | |
780 | * data/yacc.c (yyparse): New local var yylerrsp, to record the | |
781 | top of the location stack's error locations. | |
782 | (yyerrlab): Set it. When discarding a token, push its location | |
783 | onto yylerrsp so that we don't lose track of the error's end. | |
784 | (yyerrlab1): Now is only the target of YYERROR, so that we can | |
785 | properly record the location of the action that failed. For GCC | |
786 | 2.93 and later, insert an __attribute__ ((__unused__)) to avoid | |
787 | GCC warning about yyerrlab1 being unused if YYERROR is unused. | |
788 | (yyerrlab2): New label, which yyerrlab now falls through to. | |
789 | Compute the error's location by applying YYLLOC_DEFAULT to | |
790 | the locations of all the symbols that went into the error. | |
791 | * doc/bison.texinfo (Location Default Action): Mention that | |
792 | YYLLOC_DEFAULT is also invoked for syntax errors. | |
793 | * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): | |
794 | Error locations include the locations of all the tokens that were | |
795 | discarded, not just the last token. | |
d600ee67 | 796 | |
983c5c2c PE |
797 | 2002-12-26 Paul Eggert <eggert@twinsun.com> |
798 | ||
b1efe548 PE |
799 | * src/files.c: Include quote.h. |
800 | (compute_output_file_names): Warn if we detect conflicting | |
801 | outputs to the same file. This should catch the misunderstanding | |
802 | exemplified by Debian Bug 165349, reported by Bruce Stephens.. | |
803 | ||
804 | * src/conflicts.c (conflicts_print): If the user specifies | |
805 | "%expect N", report an error if there are any reduce/reduce | |
806 | conflicts. This is what the manual says should happen. | |
807 | This fixes Debian bug 130890, reported by Anthony DeRobertis. | |
808 | * tests/conflicts.at (%expect with reduce conflicts): New test. | |
809 | ||
983c5c2c PE |
810 | Don't use m4_include on relative file names, as it doesn't work as |
811 | desired if there happens to be a file with that name under ".". | |
d600ee67 | 812 | |
983c5c2c PE |
813 | * m4sugar/version.m4: Remove; it was included but it wasn't used. |
814 | * data/Makefile.am (dist_m4sugar_DATA): Remove m4sugar/version.m4. | |
815 | * data/m4sugar/m4sugar.m4: Don't include m4sugar/version.m4. | |
816 | * data/glr.c, data/lalr1.cc, data/yacc.c: Don't include c.m4. | |
817 | * src/output.c (output_skeleton): Use full path names when | |
818 | specifying a file to include; don't rely on include path, as | |
819 | it's unreliable when the working file contains a file with | |
820 | that name. | |
d600ee67 | 821 | |
983c5c2c PE |
822 | 2002-12-25 Paul Eggert <eggert@twinsun.com> |
823 | ||
824 | Remove obsolete references to bison.simple and bison.hairy. | |
825 | Problem mentioned by Aubin Mahe in | |
e3aa65c5 | 826 | <http://mail.gnu.org/archive/html/help-bison/2002-12/msg00010.html>. |
983c5c2c PE |
827 | * data/glr.c: Comment fix. |
828 | * doc/bison.1: Remove references. Also, mention "yacc". | |
829 | ||
830 | * src/getargs.c (getargs) [MSDOS]: Don't assume optarg != NULL | |
831 | with -g option. | |
832 | ||
833 | * src/parse-gram.y (declaration): Use enum "report_states" rather | |
834 | than its numeric value 1. | |
835 | ||
836 | * src/scan-skel.l ("@output ".*\n): Close any old yyout before | |
837 | opening a new one. This fixes Debian bug 165349, reported by | |
838 | Bruce Stephens. | |
839 | ||
23f2d9dc PE |
840 | 2002-12-24 Paul Eggert <eggert@twinsun.com> |
841 | ||
842 | Version 1.75e. | |
843 | ||
844 | * Makefile.maint (cvs-update): Don't assume that the shell | |
845 | supports $(...), as Solaris sh doesn't. | |
846 | ||
847 | * src/parse-gram.y (lloc_default): Remove test for empty | |
848 | nonterminals at the end, since it didn't change the result. | |
849 | ||
850 | 2002-12-24 Paul Eggert <eggert@twinsun.com> | |
33167b8b PE |
851 | |
852 | If the user does not define YYSTYPE as a macro, Bison now declares it | |
853 | using typedef instead of defining it as a macro. POSIX requires this. | |
854 | For consistency, YYLTYPE is also declared instead of defined. | |
855 | ||
856 | %union directives can now have a tag before the `{', e.g., the | |
857 | directive `%union foo {...}' now generates the C code | |
858 | `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility. | |
859 | The default union tag is `YYSTYPE', for compatibility with Solaris 9 | |
860 | Yacc. For consistency, YYLTYPE's struct tag is now `YYLTYPE' | |
861 | instead of `yyltype'. | |
862 | ||
863 | `yystype' and `yyltype' are now obsolescent macros instead of being | |
864 | typedefs or tags; they are no longer documented and will be | |
865 | withdrawn in a future release. | |
866 | ||
867 | * data/glr.c (b4_location_type): Remove. | |
868 | (YYSTYPE): Renamed from yystype. | |
869 | (YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef. | |
870 | (struct YYLTYPE): Renamed from struct yyltype. | |
871 | (YYLTYPE): Renamed from yyltype. | |
872 | (yyltype, yystype): New (and obsolescent) macros, | |
873 | for backward compatibility. | |
874 | * data/yacc.c: Likewise. | |
875 | ||
876 | * data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user | |
877 | does not specify a union tag. This is for compatibility with | |
878 | Solaris 9 yacc. | |
879 | ||
880 | * src/parse-gram.y (add_param): 2nd arg is now char * not char | |
881 | const *, since it is now modified by stripping surrounding { }. | |
882 | (current_braced_code): Remove. | |
883 | (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION, | |
884 | PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include | |
885 | trailing " {...}". Now of type <chars>. | |
886 | (grammar_declaration): Adjust to bundled tokens. | |
887 | (code_content): Remove; stripping is now done by add_param. | |
888 | (print_token_value): Print contents of bundled tokens. | |
889 | (token_name): New function. | |
890 | ||
891 | * src/reader.h (braced_code, current_braced_code): Remove. | |
892 | (token_name): New decl. | |
893 | ||
894 | * src/scan-gram.l (handle_dollar, handle_at): Now takes int | |
895 | token_type, not braced_code code_kind. All uses changed. | |
896 | (SC_PRE_CODE): New state, for scanning after a keyword that | |
897 | has (or usually has) an immediately-following braced code. | |
898 | (token_type): New local var, to keep track of which token type | |
899 | to return when scanning braced code. | |
900 | (<INITIAL>"%destructor", <INITIAL>"%lex-param", | |
dc546b0f | 901 | <INITIAL>"%parse-param", <INITIAL>"%printer", |
33167b8b PE |
902 | <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE |
903 | instead of returning a token type immediately. | |
904 | (<INITIAL>"{"): Set token type. | |
905 | (<SC_BRACED_CODE>"}"): Use it. | |
906 | (handle_action_dollar, handle_action_at): Now returns bool | |
907 | indicating success. Fail if ! current_rule; this prevents a core dump. | |
908 | (handle_symbol_code_dollar, handle_symbol_code_at): | |
909 | Remove; merge body into caller. | |
910 | (handle_dollar, handle_at): Complain in invalid contexts. | |
911 | ||
912 | * NEWS, doc/bison.texinfo: Document the above. | |
913 | * NEWS: Fix years and program names in copyright notice. | |
914 | ||
879ca4f8 PE |
915 | 2002-12-17 Paul Eggert <eggert@twinsun.com> |
916 | ||
917 | * NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error | |
918 | Reporting, Table of Symbols): Omit mentions of %lex-param and | |
919 | %parse-param from the documentation for now. | |
920 | ||
1c5fe69d PE |
921 | 2002-12-15 Paul Eggert <eggert@twinsun.com> |
922 | ||
923 | Undo most of the 2002-11-12 yychar -> yytoken patch, as it broke | |
924 | GCC 3.2.1 (which depends on yychar == YYEMPTY when there is no | |
925 | lookahead symbol, and which sets yychar in parser actions) and it | |
7ea9026a PE |
926 | disagreed with the Bison documentation. Bug |
927 | reported by Andrew Walrond. | |
d600ee67 | 928 | |
1c5fe69d PE |
929 | * data/yacc.c (YYTRANSLATE): Don't check for negative argument, |
930 | as the caller now does that. | |
931 | (yyclearin, YYBACKUP, yyparse): Use yychar, not yytoken. | |
932 | (YYEMPTY): Parenthesize right hand side, since others use it. | |
933 | (yyparse): Don't assume that our generated code is the only code | |
934 | that sets yychar. | |
935 | ||
d1de5372 PE |
936 | 2002-12-13 Paul Eggert <eggert@twinsun.com> |
937 | ||
938 | Version 1.75d. | |
939 | ||
940 | POSIX requires a "yacc" command. | |
941 | * src/Makefile.am (bin_SCRIPTS): New macro, for yacc. | |
942 | (MOSTLYCLEANFILES): Add yacc. | |
943 | (yacc): New rule. | |
1c5fe69d | 944 | * doc/bison.texinfo (Invocation, Bison Options): Mention yacc |
d1de5372 PE |
945 | as an alias for bison y. |
946 | ||
947 | * po/LINGUAS: Add da. | |
d600ee67 | 948 | |
d1de5372 PE |
949 | * src/getargs.c (__GNU_LIBRARY__) [lint]: Define to work around |
950 | problem with latest <getopt.h>. | |
951 | (HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro. | |
952 | ||
953 | * doc/fdl.texi: Upgrade to 1.2. | |
954 | * lib/alloca.c, lib/error.c, lib/getopt.c, lib/getopt.h | |
955 | lib/getopt1.c, lib/gettext.h, lib/memrchr.c, lib/obstack.c, | |
956 | lib/obstack.h, lib/strnlen.c, lib/unlocked-io.h: Sync with | |
957 | gnulib. | |
958 | * config/install-sh: Sync with autotools. | |
959 | ||
960 | Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in | |
e3aa65c5 | 961 | <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>. |
d1de5372 PE |
962 | * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless |
963 | locations are requested. | |
964 | (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless | |
965 | locations are requested. | |
966 | ||
d0f3fe23 PE |
967 | 2002-12-12 Paul Eggert <eggert@twinsun.com> |
968 | ||
969 | Remove unportable casts and storage allocation tricks. | |
970 | While we're at it, remove almost all casts, since they | |
971 | usually aren't needed and are a sign of trouble. | |
972 | ||
973 | * configure.ac (AC_CHECK_TYPES): Check for uintptr_t. | |
974 | ||
975 | * src/derives.c (derives_compute): Do not subtract NTOKENS from | |
976 | the pointer DSET returned by malloc; this isn't portable. | |
977 | Instead, always use DSET[i - NTOKENS] rather than DSET[i]. | |
978 | Similarly for DERIVES. | |
979 | * src/lalr.c (set_goto_map): Likewise, for GOTO_MAP and TEMP_MAP. | |
980 | * src/nullable.c (nullable_compute): Likewise, for RSETS and NULLABLE. | |
981 | * src/reduce.c (reduce_grammar_tables): Likewise, for nontermmap | |
982 | ||
983 | * src/derives.c (derives_compute): Do not bother invoking | |
984 | int_of_rule_number, since rule numbers are integers. | |
985 | ||
986 | * src/files.c (concat2, tr, compute_base_name): Use xmalloc (N) | |
987 | rather than XMALLOC (char, N). | |
988 | ||
989 | * src/files.c (filename_split): Rewrite to avoid cast. | |
990 | ||
991 | * src/gram.h (symbol_number_as_item_number, | |
992 | item_number_as_symbol_number, rule_number_as_item_number, | |
993 | item_number_as_rule_number): | |
994 | Now inline functions rather than macros, to avoid casts. | |
995 | * src/state.h (state_number_as_int): Likewise. | |
996 | * src/tables.c (state_number_to_vector_number, | |
997 | symbol_number_to_vector_number): Likewise. | |
998 | ||
999 | * src/gram.h (int_of_rule_number): Remove; no longer used. | |
1000 | ||
1001 | * src/lalr.c (add_lookback_edge): Use malloc rather than calloc, | |
1002 | since the resulting storage is always stored into. | |
1003 | ||
1004 | * src/main.c (alloca) [C_ALLOCA]: Add decl here, the only place | |
1005 | where it's needed. | |
1006 | ||
1007 | * src/muscle_tab.c (muscle_m4_output): | |
1008 | Now inline. Return bool, not int. | |
1009 | * src/state.c (state_compare): Likewise. | |
1010 | * src/symtab.c (symbol_check_defined, | |
1011 | symbol_check_alias_consistency, symbol_pack, symbol_translation, | |
1012 | hash_compare_symbol, hash_symbol): | |
1013 | Likewise. | |
1014 | * src/uniqstr.c (uniqstr_print): Likewise. | |
1015 | * src/muscle_tab.c (muscle_m4_output_processor): | |
1016 | New function, to avoid casts. | |
1017 | * src/state.c (state_comparator, stage_hasher): Likewise. | |
1018 | * src/symtab.c (symbol_check_defined_processor, | |
1019 | symbol_check_alias_consistency_processor, symbol_pack_processor, | |
1020 | symbol_translation_processor, hash_symbol_comparator, | |
1021 | hash_symbol_hasher): Likewise. | |
1022 | * src/uniqstr.c (uniqstr_print_processor): Likewise. | |
1023 | * src/muscle_tab.c (muscles_m4_output): | |
1024 | Use new functions instead of casting old functions unportably. | |
1025 | * src/state.c (state_hash_new): Likewise. | |
1026 | * src/symtab.c (symbols_new, symbols_do, symbols_check_defined, | |
1027 | symbols_token_translations_init): | |
1028 | Likewise. | |
1029 | * src/uniqstr.c (uniqstrs_new, hash_initialize, uniqstrs_do): Likewise. | |
1030 | ||
1031 | * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): Use long local | |
1032 | var instead of casting to long, to avoid casts. | |
1033 | (prepare_states): Use MALLOC rather than alloca, so that we don't | |
1034 | have to worry about alloca. | |
1035 | * src/state.c (state_hash_lookup): Likewise. | |
1036 | ||
1037 | * src/scan-gram.l (<SC_ESCAPED_CHARACTER>"'"): Use unsigned char | |
1038 | local var instead of casting to unsigned char, to avoid casts. | |
1039 | ||
1040 | * src/state.c (TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC, | |
1041 | STATE_ALLOC): Remove. | |
1042 | (transitions_new, errs_new, reductions_new, state_new): Use malloc | |
1043 | rather than calloc, and use offsetof to avoid allocating slightly | |
1044 | too much storage. | |
1045 | (state_new): Initialize all members. | |
1046 | ||
1047 | * src/state.c (state_hash): Use unsigned accumulator, not signed. | |
1048 | ||
1049 | * src/symtab.c (symbol_free): Remove; unused. | |
1050 | (symbol_get): Remove cast in lhs of assignment. | |
1051 | (symbols_do): Now static. Accept generic arguments, not | |
1052 | hashing-related ones. | |
1053 | ||
1054 | * src/symtab.h: (NUMBER_UNDEFINED): Remove unnecessary cast. | |
1055 | (symbol_processor): Remove. | |
1056 | (symbols_do): Remove decl; now static. | |
1057 | ||
1058 | * src/system.h (alloca): Remove; decl no longer needed. | |
1059 | (<stddef.h>): Include, for offsetof. | |
1060 | (<inttypes.>, <stdint.h>): Include if available. | |
1061 | (uintptr_t): New type, if system lacks it. | |
1062 | (CALLOC, MALLOC, REALLOC): New macros. | |
1063 | All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these | |
1064 | new macros. | |
1065 | ||
1066 | * src/tables.c (table_size): Now int, to pacify GCC. | |
1067 | (table_grow, table_ninf_remap): Use signed table size. | |
1068 | (save_row): Don't bother initializing locals when not needed. | |
1069 | (default_goto, goto_actions, pack_vector): Remove unnecessary casts. | |
1070 | * src/uniqstr.c (hash_compare_uniqstr): Likewise. | |
1071 | ||
1072 | * src/vcg.h: Correct misspellings. | |
1073 | ||
1074 | * src/vcg_defaults.h (G_CMAX): Now INT_MAX. | |
1075 | ||
1076 | ||
1077 | * src/getargs.c (getargs): Don't assume EOF == -1. | |
1078 | ||
26b4a969 PE |
1079 | 2002-12-09 Paul Eggert <eggert@twinsun.com> |
1080 | ||
1081 | Change identifier spellings to avoid collisions with names | |
1082 | that are reserved by POSIX. | |
1083 | ||
1084 | Don't use names ending in _t, since POSIX reserves them. | |
1085 | For consistency, remove _e and _s endings -- they're weren't | |
1086 | needed to remove ambiguity. All uses changed. | |
1087 | * src/uniqstr.h (uniqstr): Renamed from uniqstr_t, which in | |
1088 | turn was just renamed from struniq_t. | |
1089 | * src/uniqstr.c (uniqstr_processor): Renamed from struniq_processor, | |
1090 | which in turn was just renamed from struniq_processor_t. | |
1091 | (hash_compare_uniqstr): Renamed from hash_compare_struniq, which | |
1092 | in turn was renamed from hash_compare_struniq_t. | |
1093 | * src/LR0.c (struct state_list): Renamed from struct state_list_s. | |
1094 | (state_list): Renamed from state_list_t. | |
1095 | * src/assoc.h (assoc): Renamed from assoc_t. | |
1096 | * src/conflicts.c (enum conflict_resolution): Renamed from | |
1097 | enum conflict_resolution_e. | |
1098 | * src/derives.c (struct rule_list): Renamed from struct rule_list_s. | |
1099 | (rule_list): Renamed from rule_list_t. | |
1100 | * src/getargs.h (enum trace): Renamed from enum trace_e. | |
1101 | (enum report): Renamed from enum report_e. | |
1102 | * src/gram.h (item_number): Renamed from item_number_t. | |
1103 | (rule_number): Renamed from rule_number_t. | |
1104 | (struct rule_s): Remove the "rule_s" part; not used. | |
1105 | (rule): Renamed from rule_t. | |
1106 | (rule_filter): Renamed from rule_filter_t. | |
1107 | * src/lalr.c (struct goto_list): Renamed from struct goto_list_s. | |
1108 | (goto_list): Renamed from goto_list_t. | |
1109 | * src/lalr.h (goto_number): Renamed from goto_number_t. | |
1110 | * src/location.h (location): Renamed from location_t. | |
1111 | * src/muscle_tab.c (muscle_entry): Renamed from muscle_entry_t, | |
1112 | and moved here from: | |
1113 | * src/muscle_tab.h (muscle_entry_t): here. | |
1114 | * src/nullable.c (struct rule_list): Renamed from struct rule_list_s. | |
1115 | (rule_list): Renamed from rule_list_t. | |
1116 | * src/print_graph.c (static_graph): Renamed from graph. | |
1117 | * src/reader.h (braced_code): Renamed from braced_code_t. | |
1118 | Remove brace_code_e tag. | |
1119 | * src/relation.h (relation_node): Renamed from relation_node_t. | |
1120 | (relation_nodes): Renamed from relation_nodes_t. | |
1121 | (relation): Renamed from relation_t. | |
1122 | * src/state.h (state_number): Renamed from state_number_t. | |
1123 | (struct state): Renamed from struct state_s. | |
1124 | (state): Renamed from state_t. | |
1125 | (transitions): Renamed from transitions_t. Unused (and | |
1126 | misspelled) transtion_s tag removed. | |
1127 | (errs): Renamed from errs_t. Unused errs_s tag removed. | |
1128 | (reductions): Renamed from reductions_t. Unused tag | |
1129 | reductions_s removed. | |
1130 | * src/symlist.h (symbol_list): Renamed from symbol_list_t. | |
1131 | (struct symbol_list): Renamed from struct symbol_list_s. | |
1132 | * src/symtab.h (symbol_number): Renamed from symbol_number_t. | |
1133 | (struct symbol): Renamed from struct symbol_s. | |
1134 | (symbol): Renamed from symbol_t. | |
1135 | * src/tables.c (vector_number): Renamed from vector_number_t. | |
1136 | (action_number): Renamed from action_t. | |
1137 | * src/tables.h (base_number): Renamed from base_t. | |
1138 | * src/vcg.h (enum color): Renamed from enum color_e. | |
1139 | (enum textmode): Renamed from enum textmode_e. | |
1140 | (enum shape): Renamed from enum shape_e. | |
1141 | (struct colorentry): Renamed from struct colorentry_s. | |
1142 | (struct classname): Renamed from struct classname_s. | |
1143 | (struct infoname): Renamed from struct infoname_s. | |
1144 | (enum layoutalgorithm): Renamed from enum layoutalgorithm_e. | |
1145 | (enum decision): Renamed from enum decision_e. | |
1146 | (enum orientation): Renamed from enum orientation_e. | |
1147 | (enum alignment): Renamed from enum alignment_e. | |
1148 | (enum arrow_mode): Renamed from enum arrow_mode_e. | |
1149 | (enum crossing_type): Renamed from enum crossing_type_e. | |
1150 | (enum view): Renamed from enum view_e. | |
1151 | (struct node): Renamed from struct node_s. | |
1152 | (node): Renamed from node_t. | |
1153 | (enum linestyle): Renamed from enum linestyle_e. | |
1154 | (enum arrowstyle): Renamed from enum arrowstyle_e. | |
1155 | (struct edge): Renamed from struct edge. | |
1156 | (edge): Renamed from edge_t. | |
1157 | (struct graph): Renamed from struct graph_s. | |
1158 | (graph): Renamed from graph_t. | |
1159 | * tests/calc.at (_AT_DATA_CALC_Y, Simple LALR Calculator): | |
1160 | Rename value_t -> value. | |
1161 | * tests/input.at (Torturing the Scanner): Rename value_t -> value, | |
1162 | value_t_as_yystype -> value_as_yystype. | |
1163 | ||
1164 | Don't include <errno.h> in the mainstream code, since it | |
1165 | reserves E[A-Z0-9]* and we want to use symbols like 'EQUALS'. | |
1166 | * lib/get-errno.c, lib/get-errno.h: New files. | |
1167 | * lib/Makefile.am (libbison_a_SOURCES): Add get-errno.h, | |
1168 | get-errno.c. | |
1169 | * src/files.c (xfopen, xfclose): Use get_errno instead of errno. | |
1170 | * src/output.c (output_skeleton): Likewise. | |
1171 | * src/scan-gram.l (<INITIAL>{int}): Use set_errno and get_errno | |
1172 | instead of errno. | |
1173 | (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+): | |
1174 | Likewise. | |
1175 | (handle_action_dollar, handle_action_at): Likewise. | |
1176 | * src/system.h: Do not include <errno.h>. | |
1177 | (TAB_EXT): Renamed from EXT_TAB. | |
1178 | (OUTPUT_EXT): Renamed from EXT_OUTPUT. | |
1179 | ||
1180 | Avoid str[a-z]*, since <string.h> reserves that name space. | |
1181 | Change all instances of "struniq" in names to "uniqstr", and | |
1182 | likewise for "STRUNIQ" and "UNIQSTR". | |
1183 | * src/uniqstr.c: Renamed from src/struniq.c. | |
1184 | * src/uniqstr.h: Renamed from src/struniq.h. | |
1185 | * src/Makefile.am (bison_SOURCES): Adjust to these renamings. | |
1186 | * src/files.c (strsuffix): Remove; unused. | |
1187 | (concat2): Renamed from stringappend. Now static. | |
1188 | * src/files.h (strsuffix, stringappend): Remove; unused. | |
1189 | * src/parse-gram.y (<chars>): Renamed from <string>. | |
1190 | (<uniqstr>): Renamed from <struniq>. | |
1191 | * src/scan-gram.l (obstack_for_string): Renamed from string_obstack. | |
1192 | * src/vcg.h (struct node_s.expand): Renamed from struct node_s.stretch. | |
1193 | (struct graph_s.expand): Renamed from struct graph_s.stretch. | |
1194 | * src/vcg_defaults.h (G_EXPAND): Renamed from G_STRETCH. | |
1195 | (G_LONG_STRAIGHT_PHASE): Renamed from G_STRAIGHT_PHASE. | |
1196 | (N_EXPAND): Renamed from N_STRETCH. | |
1197 | ||
1198 | Avoid *_MAX and *_MIN, since <limits.h> reserves that name space. | |
1199 | * data/yacc.c (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX. | |
1200 | * src/gram.h (ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX): | |
1201 | Remove; unused. | |
1202 | * src/lalr.h (GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX. | |
1203 | * src/state.h (STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX. | |
1204 | * src/symtab.h (SYMBOL_NUMBER_MAXIMUM): Renamed from SYMBOL_NUMBER_MAX. | |
1205 | * src/tables.c (VECTOR_NUMBER_MAX, VECTOR_NUMBER_MIN): Remove; unused. | |
1206 | (BASE_MAXIMUM): Renamed from BASE_MAX. | |
1207 | (BASE_MINIMUM): Renamed from BASE_MIN. | |
1208 | (ACTION_MAX): Remove; unused. | |
1209 | (ACTION_NUMBER_MINIMUM): Renamed from ACTION_MIN. | |
1210 | Unnecessary casts removed from above defines. | |
1211 | ||
1212 | ||
1213 | Fix misspelling in names. | |
1214 | * src/vcg.h (enum_alignment_e): Renamed from enum_alignement_e. | |
1215 | * src/vcg_defaults.h (G_NODE_ALIGNMENT): Renamed from | |
1216 | G_NODE_ALIGNEMENT. | |
1217 | ||
1218 | ||
1219 | * lib/timevar.c (timevar_report): Renamed from time_report, | |
1220 | for consistency with other names. | |
1221 | * lib/timevar.h (timevar_report): New decl. | |
1222 | * src/system.h (time_report): Remove; decl is now in lib/timevar.h. | |
1223 | ||
1224 | ||
1225 | Sort include-file uses. | |
1226 | ||
1227 | Reorder all include files under src to be in the order "system.h". | |
1228 | then the ../lib include files in angle brackets (alphabetized), | |
1229 | then the . include files in double-quotes (alphabetized). Fix | |
1230 | dependency breakages encountered in this process, as follows: | |
1231 | * src/closure.h, src/derives.h, src/state.h: Include "gram.h". | |
1232 | * src/complain.c: Don't include stdlib.h, string.h _LIBC stuff. | |
1233 | * src/state.h: Include "symtab.h". | |
1234 | ||
996b1c7e PE |
1235 | 2002-12-08 Paul Eggert <eggert@twinsun.com> |
1236 | ||
1237 | * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__, | |
1238 | since this causes problems when __file__ contains character | |
1239 | sequences like "@" that are treated specially by src/scan-skel.l. | |
1240 | Instead, just use the file's basename. This fixes the bug | |
1241 | reported by Martin Mokrejs in | |
e3aa65c5 | 1242 | <http://mail.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>. |
996b1c7e | 1243 | |
e19c4e5d PE |
1244 | 2002-12-06 Paul Eggert <eggert@twinsun.com> |
1245 | ||
1246 | Add support for rules that do not have trailing semicolons, as | |
1247 | POSIX requires. Improve the quality of locations in Bison | |
1248 | diagnostics. | |
26b4a969 | 1249 | |
e19c4e5d PE |
1250 | * src/location.c: Include <quotearg.h>. |
1251 | (empty_location): Now const. | |
1252 | (location_print): New function. Follow the recommendation of the | |
1253 | GNU Coding Standards for locations that span file boundaries. | |
1254 | * src/location.h: Do not include <quotearg.h>; no longer needed. | |
1255 | (boundary): New type. | |
1256 | (location_t): Use it. This allows locations to span file boundaries. | |
1257 | All member uses changed: file -> start.file or end.file (as needed), | |
1258 | first_line -> start.line, first_column -> start.column, | |
1259 | last_line -> end.line, last_column -> end.column. | |
1260 | (equal_boundaries): New function. | |
1261 | (LOCATION_RESET, LOCATION_STEP): Remove. | |
1262 | (LOCATION_PRINT): Remove. All callers changed to use location_print. | |
1263 | (empty_location): Now const. | |
1264 | (location_print): New decl. | |
1265 | * src/parse-gram.y (lloc_default): New function, which handles | |
1266 | empty locations more accurately. | |
1267 | (YYLLOC_DEFAULT): Use it. | |
1268 | (%token COLON): Remove. | |
1269 | (%token ID_COLON): New token. | |
26b4a969 | 1270 | (rules): Use it. |
e19c4e5d PE |
1271 | (declarations, rules): Remove trailing semicolon. |
1272 | (declaration, rules_or_grammar_declaration): | |
1273 | Allow empty (";") declaration. | |
1274 | (symbol_def): Remove empty actions; no longer needed. | |
1275 | (rules_or_grammar_declaration): Remove trailing semicolon. | |
1276 | (semi_colon.opt): Remove. | |
1277 | * src/reader.h: Include location.h. | |
1278 | (scanner_cursor): New decl. | |
1279 | * src/reduce.c (nonterminals_reduce): Use warn_at rather than | |
1280 | rolling our own. | |
1281 | * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead | |
1282 | of *loc. | |
1283 | (STEP): Remove. No longer needed, now that adjust_location does | |
1284 | the work. All uses removed. | |
1285 | (scanner_cursor): New var. | |
1286 | (adjust_location): Renamed from extend_location. It now sets | |
1287 | *loc and adjusts the scanner cursor. All uses changed. | |
1288 | Don't bother testing for CR. | |
1289 | (handle_syncline): Remove location arg; now updates scanner cursor. | |
1290 | All callers changed. | |
1291 | (unexpected_end_of_file): Now accepts start boundary of token or | |
1292 | comment, not location. All callers changed. Update scanner cursor, | |
1293 | not the location. | |
1294 | (SC_AFTER_IDENTIFIER): New state. | |
1295 | (context_state): Renamed from c_context. All uses changed. | |
1296 | (id_loc, code_start, token_start): New local vars. | |
1297 | (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all | |
1298 | processing of Yacc white space and equivalents here. | |
1299 | (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER | |
1300 | instead of returning ID immediately, since we need to search for | |
1301 | a subsequent colon. | |
1302 | (<INITIAL>"'", "\""): Save token_start. | |
1303 | (<INITIAL>"%{", "{", "%%"): Save code_start. | |
1304 | (<SC_AFTER_IDENTIFIER>): New state, looking for a colon. | |
1305 | (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>): | |
1306 | BEGIN context_state at end, not INITIAL. | |
1307 | (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'", | |
1308 | <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>): | |
1309 | Return correct token start. | |
1310 | (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when | |
1311 | the start of a character, string or multiline comment is found. | |
1312 | * tests/conflicts.at (S/R in initial, Defaulted Conflicted | |
1313 | Reduction): Adjust reported locations to match the more-precise | |
1314 | results now expected. | |
1315 | * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise. | |
1316 | * tests/reduce.at (Useless Rules, Reduced Automaton, | |
1317 | Underivable Rules): Likewise. | |
1318 | * tests/regression.at (Invalid inputs): No longer `expecting ";" | |
1319 | or "|"' now that so many other tokens are allowed by the new grammar. | |
1320 | ||
1321 | * src/complain.h (current_file): Remove duplicate decl; | |
1322 | current_file is now owned by files.h. | |
1323 | * src/complain.c, src/scan-gram.l: Include files.h. | |
1324 | ||
1325 | 2002-12-06 Paul Eggert <eggert@twinsun.com> | |
26b4a969 | 1326 | |
e19c4e5d PE |
1327 | * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule] |
1328 | promotes to int; it might be unsigned int. | |
1329 | * data/yacc.c (yy_reduce_print): Likewise. | |
1330 | ||
1331 | * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should | |
1332 | be #defined in the prologue, not in the Bison declarations. | |
1333 | This fixes Debian Bug 102878, reported by Shaul Karl. | |
26b4a969 | 1334 | |
b64755e3 PE |
1335 | 2002-12-02 Paul Eggert <eggert@twinsun.com> |
1336 | ||
1337 | * configure.ac (AC_REPLACE_FUNCS): Add strtoul. | |
1338 | * lib/strtoul.c: New file, from gnulib. | |
1339 | This fixes a porting bug reported by Peter Klein in | |
e3aa65c5 | 1340 | <http://mail.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>. |
b64755e3 | 1341 | |
6e746484 PE |
1342 | 2002-11-30 Paul Eggert <eggert@twinsun.com> |
1343 | ||
b64755e3 PE |
1344 | * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue, |
1345 | and put only a forward declaration in the prologue. This is for | |
1346 | consistency with the other scanner helper functions. | |
1347 | ||
6ba55592 PE |
1348 | Type clashes now generate warnings, not errors, since it |
1349 | appears that POSIX may allow some grammars with type clashes. | |
1350 | * src/reader.c (grammar_current_rule_check): Warn about | |
1351 | type clashes instead of complaining. | |
1352 | * tests/input.at (Type Clashes): Expect warnings, not complaints. | |
1353 | ||
6e746484 PE |
1354 | Add Yacc library, since POSIX requires it. |
1355 | * doc/bison.texinfo (Yacc Library): New node. Regenerate top menu. | |
1356 | * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros. | |
1357 | * lib/main.c, lib/yyerror.c: New files. | |
1358 | ||
1359 | gram_error can be static; it need not be extern. | |
1360 | * src/reader.h (gram_error): Remove decl. | |
1361 | * src/parse-gram.y (gram_error): Now static. Add static decl. | |
1362 | (print_token_value): Omit parameter names from forward decl, | |
1363 | for consistency. | |
1364 | ||
88510f9c PE |
1365 | 2002-11-29 Paul Eggert <eggert@twinsun.com> |
1366 | ||
6e746484 PE |
1367 | * doc/bison.texinfo: Emphasize that yylex and yyerror must |
1368 | be declared before being used. E.g., one should typically | |
1369 | declare them in the prologue. Use GNU coding style in examples. | |
1370 | Put "const" consistently after the type it modifies. Mention | |
1371 | that C99 supports "inline". Mention that yyerror traditionally | |
1372 | returns "int". | |
1373 | ||
88510f9c PE |
1374 | %parse-param and %lex-param now take just one argument, the |
1375 | declaration; the argument name is deduced from the declaration. | |
1376 | ||
1377 | * doc/bison.texinfo (Parser Function, Pure Calling, Error | |
1378 | Reporting, Table of Symbols): Document this. | |
1379 | * src/parse-gram.y (add_param): New function. | |
1380 | (COMMA): Remove. | |
1381 | (declaration): Implement new rule for %parse-param and %lex-param. | |
1382 | * src/scan-gram.l: "," now elicits a warning, rather than being | |
1383 | a token; this is more compatible with byacc. | |
1384 | * tests/calc.at (Simple LALR Calculator): Adopt new convention. | |
1385 | ||
bb92250c PE |
1386 | 2002-11-27 Paul Eggert <eggert@twinsun.com> |
1387 | ||
1388 | Rename identifiers to avoid real and potential collisions. | |
1389 | ||
1390 | * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput, | |
1391 | to avoid collision with lex macro described by Bruce Lilly in | |
e3aa65c5 | 1392 | <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>. |
bb92250c PE |
1393 | * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise. |
1394 | * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value. | |
1395 | * src/parse-gram.y (print_token_value): Renamed from yyprint. | |
1396 | All uses changed. | |
1397 | (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed. | |
1398 | The name "yycontrol" violates the name space rules, and this stuff | |
1399 | wasn't being used anyway. | |
1400 | (input): Remove action; this stuff wasn't being used. | |
1401 | (gram_error): Rename local variable yylloc -> loc. | |
1402 | * src/reader.h (struct gram_control_s, gram_control_t): Remove. | |
1403 | (YY_DECL): Don't use "yy" at start of local variables. | |
1404 | All uses changed, e.g., yylloc -> loc. | |
1405 | * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed. | |
1406 | (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed. | |
1407 | (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed. | |
1408 | (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed. | |
1409 | ||
1410 | * src/parse-gram.y (gram_error): loc is now const *. | |
1411 | * src/reader.h (gram_error): Likewise. | |
1412 | ||
3af4feb2 PE |
1413 | 2002-11-24 Paul Eggert <eggert@twinsun.com> |
1414 | ||
1415 | Version 1.75c. | |
1416 | ||
1417 | * tests/actions.at (Actions after errors): Use an output format | |
1418 | more similar to that of the Printers and Destructors test. | |
1419 | Test the position of the ';' token too. | |
1420 | (Printers and Destructors): Likewise. | |
1421 | (Printers and Destructors: %glr-parser): Remove for now, to avoid | |
1422 | unnecessarily alarming people when the test fails. | |
1423 | ||
1424 | * data/yacc.c (yyerrlab1): Move this label down, so that the | |
1425 | parser does not discard the lookahead token if the user code | |
1426 | invokes YYERROR. This change is required for POSIX conformance. | |
1427 | ||
1428 | * lib/error.c: Sync with gnulib. | |
1429 | ||
1430 | 2002-11-22 Paul Eggert <eggert@twinsun.com> | |
1431 | ||
1432 | * lib/quotearg.c, lib/quotearg.h: Sync with gnulib. | |
1433 | * lib/mbswidth.c, lib/mbswidth.h: Likewise. | |
1434 | * lib/xmalloc.c: Likewise. | |
26b4a969 | 1435 | |
58004308 PE |
1436 | 2002-11-20 Paul Eggert <eggert@twinsun.com> |
1437 | ||
1438 | * lib/argmatch.c, lib/argmatch.h: Sync with gnulib. | |
1439 | ||
1440 | 2002-11-20 Paul Eggert <eggert@twinsun.com> | |
26b4a969 | 1441 | |
58004308 PE |
1442 | Avoid use of <assert.h>, as the GNU Coding Standards hint that one |
1443 | should use `if (! x) abort ();' rather than `assert (x);', and | |
1444 | anyway it's one less thing to worry about configuring. | |
1445 | ||
1446 | * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>. | |
1447 | * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise, | |
1448 | and replace all instances of assert with abort. | |
1449 | * tests/calc.at (_AT_DATA_CALC_Y): Likewise. | |
1450 | * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise. | |
1451 | ||
1452 | * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates, | |
1453 | yyresolveAction, yyprocessOneStack): Use abort rather than assert. | |
1454 | * lib/hash.c (hash_lookup, hash_get_first, hash_get_next, | |
1455 | hash_find_entry, hash_rehash, hash_insert): Likewise. | |
1456 | * src/conflicts.c (resolve_sr_conflict): Likewise. | |
1457 | * src/lalr.c (set_goto_map, map_goto): Likewise. | |
1458 | * src/nullable.c (nullable_compute): Likewise. | |
1459 | * src/output.c (prepare_rules, token_definitions_output): Likewise. | |
1460 | * src/reader.c (packgram, reader): Likewise. | |
1461 | * src/state.c (state_new, state_free, state_transitions_set, | |
1462 | state_reduction_find): Likewise. | |
1463 | * src/symtab.c (symbol_user_token_number_set, symbol_make_alias, | |
1464 | symbol_pack): Likewise. | |
1465 | * src/tables.c (conflict_row, pack_vector): Likewise. | |
1466 | * src/vcg.c (get_color_str, get_textmode_str, get_shape_str, | |
1467 | get_layoutalgorithm_str, get_decision_str, get_orientation_str, | |
1468 | get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str, | |
1469 | get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise. | |
1470 | ||
1471 | * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef. | |
1472 | (ARGMATCH_CONSTRAINT): New macro. | |
1473 | (ARGMATCH_ASSERT): Use it. | |
1474 | ||
1475 | * src/system.h (verify): New macro. | |
1476 | * src/getargs.c (trace_argmatch, report_argmatch): Use verify | |
1477 | rather than assert. | |
1478 | * src/tables.c (tables_generate): Likewise. | |
1479 | ||
1480 | * src/struniq.c (struniq_assert): Now returns void, and aborts | |
1481 | if the assertion is false. | |
1482 | (struniq_assert_p): Remove. | |
1483 | * src/struniq.h: Likewise. | |
1484 | ||
76ae8198 PE |
1485 | 2002-11-18 Paul Eggert <eggert@twinsun.com> |
1486 | ||
1487 | * data/glr.c (yygetLRActions): Replace `yyindex' with | |
1488 | `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch. | |
1489 | This fixes the regression with Sun ONE Studio 7 cc that I reported in | |
e3aa65c5 | 1490 | <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>. |
76ae8198 | 1491 | |
d3c4e709 AD |
1492 | 2002-11-18 Akim Demaille <akim@epita.fr> |
1493 | ||
1494 | * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a | |
1495 | space. | |
1496 | From Tim Van Holder. | |
1497 | ||
8d8a7238 PE |
1498 | 2002-11-17 Paul Eggert <eggert@twinsun.com> |
1499 | ||
1500 | Pacify Sun ONE Studio 7 lint. Also, rename "ParseError" | |
1501 | to "SyntaxError" for consistency with my 2002-11-15 change. | |
1502 | ||
1503 | * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do | |
1504 | not define to {}, since this breaks the common use of `YYDPRINTF | |
1505 | ((...));' if a single statement is desired (e.g. before `else'). | |
1506 | Work around GCC warnings by surrounding corresponding calls with | |
1507 | {} if needed. | |
1508 | (yyhasResolvedValue): Remove unused function. | |
1509 | (yymergeOptionSets, yyresolvStack): Use `continue;' for empty | |
1510 | loop body. | |
1511 | (yyreportSyntaxError): Renamed from yyreportParseError. | |
1512 | (yyrecoverSyntaxError): Renamed from yyrecoverParseError. | |
1513 | All uses changed. | |
1514 | * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of | |
1515 | extern when possible. Remove unused initializations. | |
1516 | ||
b0937b22 AD |
1517 | 2002-11-16 Akim Demaille <akim@epita.fr> |
1518 | ||
1519 | Augment the similarity between GLR and LALR traces. | |
1520 | ||
1521 | * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print) | |
1522 | (YY_REDUCE_PRINT): New. | |
1523 | (yyparse): Use them. | |
1524 | * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for | |
1525 | YYDPRINT here. | |
1526 | (yyglrReduce, yyrecoverParseError, yyparse): Don't report the | |
1527 | state reached after the reduction/recovery, since... | |
1528 | (yyparse, yyprocessOneStack): Report the state we are entering in. | |
1529 | ||
c5e3e510 AD |
1530 | 2002-11-16 Akim Demaille <akim@epita.fr> |
1531 | ||
1532 | * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types): | |
1533 | Add support for --trace=skeleton. | |
1534 | * src/scan-skel.l: %option debug. | |
1535 | Scan strings of non-@ or \n instead of character by character. | |
1536 | (scan_skel): Handle trace_skeleton. | |
1537 | (QPUTS): New. | |
1538 | (@output_parser_name@, @output_header_name@): ``Restore'' their | |
1539 | support (used to be M4 macros). | |
1540 | * data/yacc.c: Quote larger chunks, a la glr.c. | |
1541 | * data/lalr1.cc: Likewise. | |
1542 | The header guards are no longer available, so use some other | |
1543 | string than `YYLSP_NEEDED'. | |
1544 | ||
4c6cc1db AD |
1545 | 2002-11-16 Akim Demaille <akim@epita.fr> |
1546 | ||
1547 | Make the ``Printers and Destructors'' test more verbose, taking | |
1548 | `yacc.c''s behavior as (possibly wrong) reference. | |
1549 | ||
1550 | * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf | |
1551 | instead of fprint on stdout. | |
1552 | Set and report the last_line of the symbols. | |
1553 | Consistently display values and locations. | |
1554 | ||
6d9e8019 PE |
1555 | 2002-11-16 Paul Eggert <eggert@twinsun.com> |
1556 | ||
1557 | * data/yacc.c: Avoid over-quoting of __line__ and __file__. | |
1558 | ||
6e649e65 PE |
1559 | 2002-11-15 Paul Eggert <eggert@twinsun.com> |
1560 | ||
b25d88f6 PE |
1561 | * tests/actions.at (Actions after errors): New test case. |
1562 | ||
6e649e65 PE |
1563 | * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo, |
1564 | src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h, | |
1565 | tests/action.at, tests/calc.at, tests/conflicts.at, | |
1566 | tests/cxx-type.at, tests/regression.at: | |
1567 | "parse error" -> "syntax error" for POSIX compatibility. | |
1568 | "parsing stack overflow..." -> "parser stack overflow" so | |
1569 | that code matches Bison documentation. | |
1570 | ||
0f39aab9 AD |
1571 | 2002-11-15 Akim Demaille <akim@epita.fr> |
1572 | ||
1573 | * src/parse-gram.y (declaration): Have %parse-param and %lex-param | |
1574 | take two BRACED_CODE, not two string_content. | |
1575 | Free the scanner's obstack when we are done. | |
1576 | (code_content): New. | |
1577 | * tests/calc.at: Adjust. | |
1578 | * doc/bison.texinfo: Adjust. | |
1579 | Also, make sure to include the `,' for these declarations. | |
1580 | ||
761c1926 AD |
1581 | 2002-11-15 Tim Van Holder <tim.van.holder@pandora.be> |
1582 | ||
1583 | * m4/prereq.m4: Removed the commented jm_PREREQ_HASH | |
1584 | definition; avoids potential autoreconf problems. | |
1585 | ||
b0f98b10 AD |
1586 | 2002-11-15 Akim Demaille <akim@epita.fr> |
1587 | ||
1588 | Always check the value returned by yyparse. | |
1589 | ||
1590 | * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value | |
1591 | returned by yyparse. | |
1592 | (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument. | |
1593 | Adjust calls. | |
1594 | * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value | |
1595 | returned by yyparse. | |
1596 | ||
970785f1 PH |
1597 | 2002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU> |
1598 | ||
1599 | * data/glr.c (yyFail): Always set yyerrflag. Corrects regression | |
1600 | on input.at test. | |
1601 | ||
8fcc7db1 PE |
1602 | 2002-11-14 Paul Eggert <eggert@twinsun.com> |
1603 | ||
7ec1b48e PE |
1604 | * src/output.c (output_skeleton): Call xfopen instead of |
1605 | duplicating xfopen's body. | |
1606 | ||
cfff7583 | 1607 | Fix bugs reported by Nelson H. F. Beebe in |
e3aa65c5 | 1608 | <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>. |
cfff7583 | 1609 | |
8fcc7db1 PE |
1610 | * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that |
1611 | "$CC -E foo.h" is allowed, as this doesn't work with the Portland | |
1612 | Group compiler. Instead, use "$CC -E bar.c". Include the .h | |
1613 | file twice in the grammar, as an extra check. | |
1614 | ||
1615 | * tests/input.at (Torturing the Scanner): Surround the | |
1616 | backslash-newline tests with "#if 0", to make it less likely that | |
1617 | we'll run into compiler bugs. Bring back solitary \ inside | |
1618 | comment, but add a closing comment to work around HP C bug. Don't | |
e3aa65c5 | 1619 | test backslash-newline in C character constant. |
8fcc7db1 | 1620 | |
4e8d992c AD |
1621 | 2002-11-14 Akim Demaille <akim@epita.fr> |
1622 | ||
1623 | * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit | |
1624 | status of the compiler. | |
f32b346d | 1625 | Calling `exit 1' is no longer needed. |
4e8d992c AD |
1626 | Reported by Nelson H. F. Beebe. |
1627 | ||
9501dc6e AD |
1628 | 2002-11-14 Akim Demaille <akim@epita.fr> |
1629 | ||
1630 | * tests/atlocal.in (CPPFLAGS): We have config.h. | |
1631 | * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR): | |
1632 | New. | |
1633 | * tests/actions.at, tests/calc.at, tests/conflicts.at, | |
1634 | * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at, | |
1635 | * tests/regression.at, tests/torture.at: Use them for all the | |
1636 | grammars that are to be compiled. | |
1637 | * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as... | |
1638 | * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this. | |
1639 | * doc/bison.texinfo (GLR Parsers): Document `inline'. | |
1640 | ||
18b519c0 AD |
1641 | 2002-11-14 Akim Demaille <akim@epita.fr> |
1642 | ||
1643 | * doc/bison.texinfo: Various formatting changes (alignments in | |
1644 | samples, additional @group/@end group, GCS in samples. | |
1645 | Use @deffn instead of simple @table to define the directives, | |
1646 | macros, variables etc. | |
1647 | ||
9a86cdb9 PE |
1648 | 2002-11-13 Paul Eggert <eggert@twinsun.com> |
1649 | ||
daa33def | 1650 | Fix some bugs reported by Albert Chin-A-Young in |
e3aa65c5 | 1651 | <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>. |
18b519c0 | 1652 | |
daa33def | 1653 | * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c |
8fcc7db1 | 1654 | -o c"; the HP C compiler chatters during compilation. |
daa33def PE |
1655 | Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c". |
1656 | * tests/headers.at (export YYLTYPE): Likewise. | |
1657 | ||
1658 | * tests/input.at (Torturing the Scanner): Remove lines containing | |
8fcc7db1 | 1659 | solitary backslashes, as they tickle a bug in the HP C compiler. |
daa33def | 1660 | |
9a86cdb9 PE |
1661 | * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid // |
1662 | comments, since they're not portable. Use GNU coding style. | |
1663 | ||
9c1e26bd AD |
1664 | 2002-11-13 Akim Demaille <akim@epita.fr> |
1665 | ||
1666 | * data/yacc.c: Leave bigger chunks of quoted text. | |
1667 | (YYDSYMPRINTF): New. | |
1668 | Use it to report symbol activities. | |
1669 | * data/glr.c (YYDSYMPRINTF): New. | |
1670 | Use it. | |
1671 | ||
87f721cc PE |
1672 | 2002-11-12 Paul Eggert <eggert@twinsun.com> |
1673 | ||
1674 | Version 1.75b. | |
1675 | ||
1676 | * data/glr.c (yydoAction): Return YYRESULTTAG, not int. | |
1677 | (yyglrReduce): Return yyok, not 0. | |
1678 | This should avoid the enumerated-type warnings reported | |
464c6927 | 1679 | by Nelson H. F. Beebe in |
e3aa65c5 | 1680 | <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>. |
87f721cc PE |
1681 | |
1682 | * lib/bbitset.h (BITSET_INLINE): Remove. | |
1683 | * lib/bitset.h [! BITSET_INLINE]: Remove. | |
1684 | (bitset_set, bitset_reset, bitset_test): Rename local vars | |
1685 | to avoid shadowing warnings by GCC. | |
1686 | ||
1687 | * data/glr.c (inline): Remove #define. It's the user's | |
1688 | responsibility to #define it away, just like 'const'. | |
464c6927 | 1689 | This fixes one of the bugs reported by Nelson H. F. Beebe in |
e3aa65c5 | 1690 | <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>. |
18b519c0 | 1691 | |
87f721cc PE |
1692 | * Makefile.maint (po-check): Scan .l and .y files instead of the |
1693 | .c and the .h files that they generate. This fixes the bug | |
1694 | reported by Tim Van Holder in: | |
e3aa65c5 | 1695 | <http://mail.gnu.org/archive/html/bison-patches/2002-11/msg00062.html> |
87f721cc PE |
1696 | Look for N_ as well as for _. Try to avoid matching #define for |
1697 | N_ and _. | |
1698 | * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c, | |
1699 | src/system.h. Add src/parse-gram.y, src/scan-gram.l. | |
1700 | * src/scan-gram.l: Revamp regular expressions so that " and ' | |
1701 | do not confuse xgettext. | |
1702 | ||
1703 | * src/struniq.h (struniq_new): Do not declare the return type | |
1704 | to be 'const'; this violates the C standard. | |
1705 | * src/struniq.c (struniq_new): Likewise. | |
1706 | ||
be14ade5 AD |
1707 | 2002-11-12 Albert Chin-A-Young <china@thewrittenword.com> |
1708 | ||
1709 | * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the | |
1710 | duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq | |
1711 | linker. | |
1712 | ||
05291fbc AD |
1713 | 2002-11-12 Akim Demaille <akim@epita.fr> |
1714 | ||
1715 | * Makefile.maint: Sync with Autoconf: | |
1716 | (local_updates): New. | |
1717 | ||
1f5fd52e AD |
1718 | 2002-11-12 Akim Demaille <akim@epita.fr> |
1719 | ||
1720 | * po/POTFILES.in (src/lalr.c, src/state.c): Remove | |
1721 | ||
283f1e64 AD |
1722 | 2002-11-12 Akim Demaille <akim@epita.fr> |
1723 | ||
1724 | * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the | |
1725 | locations. | |
1726 | ||
886b69d1 AD |
1727 | 2002-11-12 Akim Demaille <akim@epita.fr> |
1728 | ||
1729 | * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT, | |
1730 | not yyvalue. | |
1731 | ||
3df37415 AD |
1732 | 2002-11-12 Akim Demaille <akim@epita.fr> |
1733 | ||
1734 | * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New. | |
1735 | Use it to test the GLR parser. | |
1736 | ||
7bd6c77e AD |
1737 | 2002-11-12 Akim Demaille <akim@epita.fr> |
1738 | ||
1739 | * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton | |
1740 | defines it. | |
1741 | * data/glr.c (yystos): New. | |
1742 | (b4_yysymprint_generate, b4_yydestruct_generate): Invoke. | |
1743 | (YYDSYMPRINT): New. | |
1744 | (yyval): Don't define it, it is handled via M4. | |
1745 | (yyrecoverParseError): Free verbosely the discarded symbols. | |
1746 | * data/yacc.c (yysymprint): Remove, rather... | |
1747 | (b4_yysymprint_generate): invoke. | |
1748 | * data/c.m4 (b4_yysymprint_generate): New. | |
1749 | Accept pointers as arguments, as opposed to the version from | |
1750 | yacc.c. | |
1751 | (b4_yydestruct_generate): Likewise. | |
1752 | * tests/cations.at (Printers and Destructors): Use Bison directives | |
1753 | instead of CPP macros. | |
1754 | Don't rely on internal details. | |
1755 | ||
b0400cc6 AD |
1756 | 2002-11-12 Akim Demaille <akim@epita.fr> |
1757 | ||
1758 | * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New. | |
1759 | * data/yacc.c: Rename yychar1 as yytoken, as in glr.c. | |
1760 | Don't work on yychar (i.e., do set it to YYEMPTY, don't match | |
1761 | it against YYEMPTY and so forth), work on yytoken (i.e., set | |
1762 | it to YYEMPTY etc.). | |
1763 | (yydestruct): Replace with a b4_yydestruct_generate invocation. | |
1764 | (b4_symbol_actions): Remove. | |
1765 | * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands | |
1766 | for 0, end-of-input. | |
1767 | ||
72f889cc AD |
1768 | 2002-11-12 Akim Demaille <akim@epita.fr> |
1769 | ||
1770 | * doc/bison.texinfo (Destructor Decl): New. | |
1771 | ||
b1ae9233 AD |
1772 | 2002-11-12 Akim Demaille <akim@epita.fr> |
1773 | ||
1774 | * src/tables.c (tables_generate): Use free for pointers that | |
1775 | cannot be NULL, not XFREE. | |
1776 | (pack_vector): Use assert, not fatal, for bound violations. | |
1777 | * src/state.c (state_new): Likewise. | |
1778 | * src/reader.c (reader): Likewise. | |
1779 | * src/lalr.c (set_goto_map): Likewise. | |
72f889cc | 1780 | * src/location.h (LOCATION_PRINT): If first_line is 0, just issue |
b1ae9233 AD |
1781 | the file name. |
1782 | ||
7ec2d4cd AD |
1783 | 2002-11-12 Akim Demaille <akim@epita.fr> |
1784 | ||
1785 | * src/scan-gram.l, src/reader.h (scanner_last_string_free): | |
1786 | Restore. | |
1787 | * src/scan-gram.l (last_string): Is global to the file, not to | |
1788 | yylex. | |
1789 | * src/parse-gram.y (input): Don't append the epilogue here, | |
1790 | (epilogue.opt): do it here, and free the scanner's obstack. | |
1791 | * src/reader.c (epilogue_set): Rename as... | |
1792 | (epilogue_augment): this. | |
1793 | * data/c.m4 (b4_epilogue): Defaults to empty. | |
1794 | ||
573a6cd3 AD |
1795 | 2002-11-12 Akim Demaille <akim@epita.fr> |
1796 | ||
1797 | * src/getargs.c (long_options): Remove duplicates. | |
1798 | * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar: | |
1799 | Remove. | |
1800 | * doc/bison.rnh: Remove. | |
1801 | * doc/bison.texinfo (VMS Invocation): Remove. | |
1802 | ||
95612cfa AD |
1803 | 2002-11-12 Akim Demaille <akim@epita.fr> |
1804 | ||
1805 | * src/struniq.h, src/struniq.c (struniq_t): Is const. | |
1806 | (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New. | |
1807 | ||
1808 | Use struniq for symbols. | |
1809 | ||
1810 | * src/symtab.h (symbol_t): The tag member is a struniq. | |
1811 | (symbol_type_set): Adjust. | |
1812 | * src/symtab.c (symbol_new): Takes a struniq. | |
1813 | (symbol_free): Don't free the tag member. | |
1814 | (hash_compare_symbol_t, hash_symbol_t): Rename as... | |
1815 | (hash_compare_symbol, hash_symbol): these. | |
1816 | Use the fact that tags as struniqs. | |
1817 | (symbol_get): Use struniq_new. | |
1818 | * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get): | |
1819 | Returns a strniq. | |
1820 | * src/reader.h (merger_list, grammar_currentmerge_set): The name | |
1821 | and type members are struniqs. | |
1822 | * src/reader.c (get_merge_function) | |
1823 | (grammar_current_rule_merge_set): Adjust. | |
1824 | (TYPE, current_type): Are struniq. | |
1825 | ||
1826 | Use struniq for file names. | |
1827 | ||
1828 | * src/files.h, src/files.c (infile): Split into... | |
1829 | (grammar_file, current_file): these. | |
1830 | * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust. | |
1831 | * src/reduce.c (reduce_print): Likewise. | |
1832 | * src/getargs.c (getargs): Likewise. | |
1833 | * src/complain.h, src/complain.c: Likewise. | |
1834 | * src/main.c (main): Call struniqs_new early enough to use it for | |
1835 | file names. | |
1836 | Don't free the input file name. | |
1837 | ||
3e6656f9 AD |
1838 | 2002-11-12 Akim Demaille <akim@epita.fr> |
1839 | ||
1840 | * src/symtab.c (symbol_free): Remove dead deactivated code: | |
1841 | type_name are properly removed. | |
1842 | Don't use XFREE to free items that cannot be NULL. | |
1843 | * src/struniq.h, src/struniq.c: New. | |
1844 | * src/main.c (main): Initialize/free struniqs. | |
1845 | * src/parse-gram.y (%union): Add astruniq member. | |
1846 | (yyprint): Adjust. | |
1847 | * src/scan-gram.l (<{tag}>): Return a struniq. | |
1848 | Free the obstack bit that used to store it. | |
1849 | * src/symtab.h (symbol_t): The 'type_name' member is a struniq. | |
1850 | ||
7672019c PE |
1851 | 2002-11-11 Paul Eggert <eggert@twinsun.com> |
1852 | ||
1853 | Revamp to fix many (but not all) of the C- and M4-related quoting | |
1854 | problems. Among other things, this fixes the Bison bug reported | |
1855 | by Jan Hubicka when processing the Bash grammar; see: | |
e3aa65c5 | 1856 | <http://mail.gnu.org/archive/html/bison-patches/2002-11/msg00039.html> |
7672019c PE |
1857 | |
1858 | Use new @ escapes consistently. Represent brackets with @{ and @} | |
1859 | rather than @<:@ and @:>@, since this works a bit better with dumb | |
1860 | editors like vi. Represent @ with @@, since @ is now consistently | |
1861 | an escape. Use @oline@ and @ofile@ rather than __oline__ and | |
1862 | __ofile__, to avoid unexpected expansions. Similarly, use @output | |
1863 | rather than #output. | |
1864 | ||
1865 | * data/c.m4 (b4_copyright): Omit file name from comment, since | |
1866 | the file name could contain "*/". | |
1867 | (b4_synclines_flag): Don't quote the 2nd argument; it should already | |
1868 | be quoted. All uses changed. | |
1869 | ||
1870 | * data/glr.c: Use new @ escapes consistently. | |
1871 | (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name, | |
1872 | b4_output_header_suffix, b4_output_header_name, b4_header_guard): | |
1873 | Remove, since they couldn't handle arbitrary characters in file | |
1874 | names. | |
1875 | * data/lalr1.cc: Likewise. | |
1876 | * data/yacc.c: Likewise. | |
1877 | ||
1878 | * src/files.c (output_infix): Remove; all uses removed. | |
1879 | * src/files.h: Likewise. | |
1880 | ||
1881 | * data/glr.c: Remove use of "#ifdef b4_header_guard", since it | |
1882 | mishandled funny characters in file names, and anyway it isn't | |
1883 | needed any more. | |
1884 | * data/yacc.c: Likewise. | |
1885 | * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard. | |
1886 | ||
1887 | * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would. | |
1888 | * data/yacc.c: Likewise. | |
1889 | ||
1890 | * src/muscle_tab.c: Include quotearg.h, since we need to quote C | |
1891 | strings now. | |
1892 | (muscle_init): Quote filename as a C string. | |
1893 | * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused. | |
1894 | (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros. | |
1895 | * src/output.c (escaped_file_name_output): New function. | |
1896 | (prepare_symbols): Quote tokens for M4. | |
1897 | (prepare): Don't insert output_infix, output_prefix, | |
1898 | output_parser_name, output_header_name; this is now down by scan-skel. | |
1899 | Insert skeleton as a C string. | |
1900 | ||
1901 | * src/output.c (user_actions_output, symbol_destructors_output, | |
1902 | symbol_printers_output): Quote filenames for C and M4. | |
1903 | * src/reader.c (prologue_augment, epilogue_set): Likewise. | |
1904 | ||
1905 | * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash | |
1906 | escapes other than \\ and \'; this simplifies the code. | |
1907 | (<SC_STRING>): Likewise, for \\ and \". | |
1908 | (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE, | |
1909 | SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too. | |
1910 | Use new escapes @{ and @} for [ and ]. | |
1911 | ||
1912 | * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing | |
1913 | them with auto vars. | |
1914 | Switch to new escape scheme, where @ is the escape character uniformly. | |
1915 | Abort if a stray escape character is found. Avoid unbounded input | |
1916 | buffer when parsing non-escaped text. | |
1917 | ||
1918 | * tests/input.at (Torturing the Scanner): Add tests that @oline@, | |
1919 | __oline__, #output, $@, and @{ do not have unintended meanings. | |
1920 | ||
acea4f3b PE |
1921 | 2002-11-09 Paul Eggert <eggert@twinsun.com> |
1922 | ||
1923 | Fix the test failure due to GCC warnings described in | |
e3aa65c5 | 1924 | <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>. |
acea4f3b PE |
1925 | * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which |
1926 | evaluate to 0 if it's impossible for NINF to be in the respective | |
1927 | table. | |
1928 | (yygetLRActions, yyrecoverParseError): Use them. | |
1929 | ||
1930 | * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were | |
1931 | counted in the token inserted at end of file. Now takes | |
1932 | location_t *, not location_t, so that the location can be | |
1933 | adjusted. All uses changed. | |
1934 | ||
1935 | * tests/regression.at (Invalid inputs): Adjust wording in | |
1936 | diagnostic to match the new behavior. | |
1937 | ||
1938 | * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR, | |
1939 | AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR, | |
1940 | AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x)) | |
1941 | abort ();'. This reduces the runtime of the "Many lookaheads" | |
1942 | test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running | |
1943 | GCC 3.2. | |
1944 | ||
20ef1ad5 PE |
1945 | 2002-11-07 Paul Eggert <eggert@twinsun.com> |
1946 | ||
1947 | * src/parse-gram.y (CHARACTER): Remove unused token. | |
1948 | All uses removed. | |
1949 | ||
1950 | * src/scan-gram.l: Remove stack option. We no longer use the | |
1951 | stack, since the stack was never deeper than 1; instead, use the | |
1952 | new auto var c_context to record the stacked value. | |
1953 | ||
1954 | Remove nounput option. At an unexpected end of file, we now unput | |
1955 | the minimal input necessary to end cleanly; this simplifies the | |
1956 | code. | |
1957 | ||
1958 | Avoid unbounded token sizes where this is easy. | |
1959 | ||
1960 | (unexpected_end_of_file): New function. | |
1961 | Use it to systematize the error message on unexpected EOF. | |
1962 | (last-string): Now auto, not static. | |
1963 | (YY_OBS_FREE): Remove unnecessary do while (0) wrapper. | |
1964 | (scanner_last_string_free): Remove; not used. | |
1965 | (percent_percent_count): Move decl to just before use. | |
1966 | (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file, | |
1967 | not the (never otherwised-used) CHARACTER. | |
1968 | ||
93724f13 AD |
1969 | 2002-11-07 Akim Demaille <akim@epita.fr> |
1970 | ||
1971 | Let yyerror always receive the msg as last argument, so that | |
1972 | yyerror can be variadic. | |
1973 | ||
1974 | * data/yacc.c (b4_yyerror_args): New. | |
1975 | Use it when calling yyerror. | |
1976 | * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New. | |
1977 | Use it when calling yyerror. | |
1978 | * doc/bison.texinfo (Error Reporting): Adjust. | |
1979 | * tests/calc.at (_AT_DATA_CALC_Y): Adjust. | |
1980 | * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust. | |
1981 | ||
6e40b4eb AD |
1982 | 2002-11-06 Akim Demaille <akim@epita.fr> |
1983 | ||
1984 | #line should have quoted strings. | |
1985 | Ideally, this should be done by m4_quotearg. | |
1986 | ||
1987 | * src/scan-skel.l: Include quotearg.h. | |
1988 | Quote __ofile__. | |
1989 | * src/output.c (symbol_printers_output) | |
1990 | (symbol_destructors_output): Quote the file name. | |
1991 | ||
2dfbfc12 AD |
1992 | 2002-11-06 Akim Demaille <akim@epita.fr> |
1993 | ||
1994 | * tests/regression.at (Invalid inputs): Adjust to the recent | |
1995 | messages. | |
1996 | ||
437c2d80 AD |
1997 | 2002-11-06 Akim Demaille <akim@epita.fr> |
1998 | ||
1999 | Restore --no-lines. | |
2000 | Reported by Jim Kent. | |
2001 | ||
2002 | * data/c.m4 (b4_syncline): New. | |
2003 | * data/glr.c, data/yacc.c, data/lalr1.cc: Use it. | |
2004 | * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline. | |
2005 | * src/output.c (user_actions_output): Likewise. | |
2006 | (prepare): Define 'b4_synclines_flag'. | |
2dfbfc12 | 2007 | * src/muscle_tab.c (muscle_init): Don't define b4_linef. |
437c2d80 | 2008 | |
900c5db5 AD |
2009 | 2002-11-06 Akim Demaille <akim@epita.fr> |
2010 | ||
2011 | * src/main.c (main): Free `infile'. | |
2012 | * src/scan-gram.l (handle_syncline): New. | |
2013 | Recognize `#line'. | |
2014 | * src/output.c (user_actions_output, symbol_destructors_output) | |
2015 | (symbol_printers_output): Use the location's file name, not | |
2016 | infile. | |
2017 | * src/reader.c (prologue_augment, epilogue_set): Likewise. | |
2018 | ||
e183b123 | 2019 | 2002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU> |
51b4a04c | 2020 | |
e183b123 | 2021 | * src/tables.c (matching_state): Don't allow states to match if |
51b4a04c | 2022 | either has GLR conflict entries. |
e183b123 | 2023 | |
193eb6b7 PE |
2024 | 2002-11-05 Paul Eggert <eggert@twinsun.com> |
2025 | ||
e183b123 PE |
2026 | * src/scan-gram.l: Use more accurate diagnostics, e.g. |
2027 | "integer out of range" rather than "invalid value". | |
2028 | * tests/input.at (Invalid $n, Invalid @n): Change expected wording | |
2029 | accordingly. | |
2030 | ||
193eb6b7 PE |
2031 | Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires. |
2032 | Also, remove one static variable in the scanner. | |
2033 | ||
2034 | * src/scan-gram.l (braces_level): Now auto, not static. | |
2035 | Initialize to zero if the compiler is being picky. | |
2036 | (INITIAL): Clear braces_level instead of incrementing it. | |
2037 | (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code, | |
2038 | as POSIX 1003.1-2001 requires. | |
2039 | * src/system.h (IF_LINT): New macro, taken from coreutils. | |
2040 | * configure.ac: Define "lint" if --enable-gcc-warnings. | |
2041 | ||
29c01725 AD |
2042 | 2002-11-05 Akim Demaille <akim@epita.fr> |
2043 | ||
2044 | * src/scan-gram.l: When it starts with `%', complain about the | |
2045 | whole directive, not just that `invalid character: %'. | |
2046 | ||
8aeac3ca AD |
2047 | 2002-11-04 Akim Demaille <akim@epita.fr> |
2048 | ||
2049 | * Makefile.maint: Update from Autoconf. | |
2050 | (update, cvs-update, po-update, do-po-update): New. | |
2051 | ||
793a58bb AD |
2052 | 2002-11-04 Akim Demaille <akim@epita.fr> |
2053 | ||
2054 | * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex | |
2055 | and yyerror. | |
2056 | Have yyerror `use' its arguments. | |
2057 | * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF | |
2058 | returns true when location & yacc & pure & parse-param. | |
2059 | (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments. | |
2060 | ||
c4d720cd AD |
2061 | 2002-11-04 Akim Demaille <akim@epita.fr> |
2062 | ||
2063 | * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid | |
2064 | clashes. | |
2065 | * src/scan-gram.l: Use [\'] instead of ['] to pacify | |
2066 | font-lock-mode. | |
2067 | Use complain_at. | |
2068 | Use quote, not quote_n since LOCATION_PRINT no longer uses the | |
2069 | slot 0. | |
2070 | ||
613a0dc5 PE |
2071 | 2002-11-03 Paul Eggert <eggert@twinsun.com> |
2072 | ||
2073 | * src/reader.c (get_merge_function, grammar_current_rule_check): | |
2074 | Use consistent diagnostics for reporting type name clashes. | |
2075 | Quote the types with <>, for consistency with Yacc. | |
2076 | * tests/input.at (Type Clashes): Adjust to diagnostic changes. | |
2077 | ||
2a8d363a AD |
2078 | 2002-11-03 Akim Demaille <akim@epita.fr> |
2079 | ||
2080 | * data/c.m4 (b4_identification, b4_user_args, b4_parse_param): | |
2081 | New. | |
2082 | * data/yacc.m4 (b4_pure_args, b4_Pure_args): New. | |
2083 | (b4_parse_param): Remove. | |
2084 | Use b4_identification. | |
2085 | Propagate b4_pure_args where needed to pass them to yyerror. | |
2086 | * data/glr.m4 (b4_parse_param): Remove. | |
2087 | (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args) | |
2088 | (b4_lpure_formals): New. | |
2089 | Use b4_identification. | |
2090 | (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by | |
2091 | b4_user_formals and b4_user_args. | |
2092 | (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer) | |
2093 | (yyreportAmbiguity): When using a pure parser, also need | |
2094 | the location, and the parse-params. | |
2095 | Adjust callers. | |
2096 | (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError): | |
2097 | When using a pure parser, also need the parse-params. | |
2098 | Adjust callers. | |
2099 | * tests/calc.at: Test pure (%pure-parser) and absolutely pure | |
2100 | (%pure-parser + %parse-param) LALR and GLR parsers. | |
2101 | (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF, | |
2102 | AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF, | |
2103 | AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF. | |
2104 | (_AT_DATA_CALC_Y): Equip for purity of yyerror. | |
2105 | (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF. | |
2106 | * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity. | |
2107 | * doc/bison.texinfo: Untabify the whole file. | |
2108 | (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM. | |
2109 | (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM. | |
2110 | (Error Reporting): Adjust to these new directives. | |
2111 | Document %error-verbose, deprecate YYERROR_VERBOSE. | |
2112 | ||
9e32add8 AD |
2113 | 2002-11-03 Akim Demaille <akim@epita.fr> |
2114 | ||
2115 | * tests/calc.at: Change all the AT_CHECK_CALC_LALR and | |
2116 | AT_CHECK_CALC_GLR invocations to use % directives, instead of | |
2117 | command line options. | |
2118 | * tests/cxx-type.at: Formatting changes. | |
2119 | ||
b02d90a5 PE |
2120 | 2002-11-03 Paul Eggert <eggert@twinsun.com> |
2121 | ||
2122 | * src/scan-gram.l: Revamp to fix POSIX incompatibilities, | |
2123 | to count columns correctly, and to check for invalid inputs. | |
9e32add8 | 2124 | |
b02d90a5 PE |
2125 | Use mbsnwidth to count columns correctly. Account for tabs, too. |
2126 | Include mbswidth.h. | |
2127 | (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS. | |
2128 | (extend_location): New function. | |
2129 | (YY_LINES): Remove. | |
2130 | ||
2131 | Handle CRLF in C code rather than in Lex code. | |
2132 | (YY_INPUT): New macro. | |
2133 | (no_cr_read): New function. | |
2134 | ||
2135 | Scan UCNs, even though we don't fully handle them yet. | |
2136 | (convert_ucn_to_byte): New function. | |
2137 | ||
2138 | Handle backslash-newline correctly in C code. | |
2139 | (SC_LINE_COMMENT, SC_YACC_COMMENT): New states. | |
2140 | (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.; | |
2141 | all uses changed. | |
2142 | (tag, splice): New EREs. Do not allow NUL or newline in tags. | |
2143 | Use {splice} wherever C allows backslash-newline. | |
2144 | YY_STEP after space, newline, vertical-tab. | |
2145 | ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT). | |
9e32add8 | 2146 | |
b02d90a5 PE |
2147 | (letter, id): Don't assume ASCII; e.g., spell out a-z. |
2148 | ||
2149 | ({int}, handle_action_dollar, handle_action_at): Check for integer | |
2150 | overflow. | |
9e32add8 | 2151 | |
b02d90a5 PE |
2152 | (YY_STEP): Omit trailing semicolon, so that it's more like C. |
2153 | ||
2154 | (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00 | |
2155 | as well as \000. Check for UCHAR_MAX, not 255. | |
2156 | Allow \x with an arbitrary positive number of digits, as in C. | |
2157 | Check for overflow here. | |
2158 | Allow \? and UCNs, for compatibility with C. | |
2159 | ||
2160 | (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision | |
2161 | with quote slot used by complain_at. | |
2162 | ||
2163 | * tests/input.at: Add tests for backslash-newline, m4 quotes | |
2164 | in symbols, long literals, and funny escapes in strings. | |
2165 | ||
2166 | * configure.ac (jm_PREREQ_MBSWIDTH): Add. | |
2167 | * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c. | |
2168 | * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext. | |
2169 | * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4. | |
2170 | * m4/mbswidth.m4: New file, from GNU coreutils. | |
2171 | ||
2172 | * doc/bison.texinfo (Grammar Outline): Document // comments. | |
2173 | (Symbols): Document that trigraphs have no special meaning in Bison, | |
2174 | nor is backslash-newline allowed. | |
2175 | (Actions): Document that trigraphs have no special meaning. | |
2176 | ||
2177 | * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove; | |
2178 | no longer used. | |
2179 | ||
2180 | 2002-11-02 Paul Eggert <eggert@twinsun.com> | |
2181 | ||
2182 | * src/reader.c: Don't include quote.h; not needed. | |
2183 | (get_merge_function): Reword warning to be consistent with | |
2184 | type clash diagnostic in grammar_current_rule_check. | |
2185 | ||
2186 | * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two | |
2187 | bug in trigraph handling. | |
2188 | ||
2189 | * src/output.c (prepare_symbols): When printing token names, | |
2190 | escape "[" as "@<:@" and likewise for "]". | |
2191 | ||
2192 | * src/system.h (errno): Remove declaration, as we are now | |
2193 | assuming C89 or better, and C89 guarantees errno. | |
2194 | ||
762b212b PE |
2195 | 2002-10-30 Paul Eggert <eggert@twinsun.com> |
2196 | ||
2197 | * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write): | |
2198 | Check for close failures. | |
2199 | * src/files.h (xfclose): Return void, not int, since it always | |
2200 | returned zero. | |
2201 | * src/files.c (xfclose): Likewise. Report I/O error if ferror | |
2202 | indicates one. | |
2203 | * src/output.c (output_skeleton): Use xfclose rather than fclose | |
2204 | and ferror. xfclose now checks ferror. | |
2205 | ||
2206 | * data/glr.c (YYLEFTMOST_STATE): Remove. | |
2207 | (yyreportTree): Use a stack-based leftmost state. This avoids | |
2208 | our continuing battles with bogus warnings about initializers. | |
2209 | ||
56100c60 AD |
2210 | 2002-10-30 Akim Demaille <akim@epita.fr> |
2211 | ||
2212 | * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only | |
2213 | #if. | |
2214 | ||
51b4a04c PH |
2215 | 2002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU> |
2216 | ||
2217 | * tests/glr-regr1.at: New test for reported regressions. | |
2218 | * tests/testsuite.at: Add glr-regr1.at test. | |
2219 | * tests/Makefile.am: Add glr-regr1.at test. | |
e183b123 | 2220 | |
bf1ebda2 PE |
2221 | 2002-10-24 Paul Eggert <eggert@twinsun.com> |
2222 | ||
5c16c6b1 PE |
2223 | Version 1.75a. |
2224 | ||
bf1ebda2 PE |
2225 | * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration. |
2226 | * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since | |
2227 | we use malloc. Don't assume 'A' through 'Z' are contiguous. | |
2228 | Don't assume strdup exists; POSIX says its an XSI extension. | |
2229 | Check for buffer overflow on input. | |
2230 | ||
b526ee61 AD |
2231 | 2002-10-24 Akim Demaille <akim@epita.fr> |
2232 | ||
2233 | * src/output.c (output_skeleton): Don't disable M4sugar comments | |
2234 | too soon: it results in comments being expanded. | |
2235 | * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the | |
2236 | first output. | |
2237 | ||
f1886bb2 AD |
2238 | 2002-10-24 Akim Demaille <akim@epita.fr> |
2239 | ||
2240 | * data/yacc.c (m4_int_type): New. | |
2241 | * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed | |
2242 | char' as only yacc.c wants K&R portability. | |
2243 | * data/glr.c (yysigned_char): Remove. | |
2244 | * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name. | |
2245 | Reported by Quoc Peyrot. | |
2246 | ||
c5576256 PE |
2247 | 2002-10-23 Paul Eggert <eggert@twinsun.com> |
2248 | ||
2249 | * src/main.c (main): With --trace=time, report times even if a | |
2250 | non-fatal error occurs. Formerly, the times were reported in some | |
2251 | such cases but not in others. | |
2252 | * src/reader.c (reader): Just return if a complaint has been issued, | |
2253 | instead of exiting, so that 'main' can report times. | |
2254 | ||
27b0ffea AD |
2255 | 2002-10-22 Akim Demaille <akim@epita.fr> |
2256 | ||
2257 | * src/system.h: Include sys/types. | |
2258 | Reported by Bert Deknuydt. | |
2259 | ||
223a7883 PE |
2260 | 2002-10-23 Paul Eggert <eggert@twinsun.com> |
2261 | ||
2262 | * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX. | |
2263 | Suggested by Art Haas. | |
2264 | ||
2265 | 2002-10-22 Paul Eggert <eggert@twinsun.com> | |
2266 | ||
2267 | * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit | |
2268 | decl; not needed any more. | |
2269 | * src/main.c (main): Use return to exit, undoing yesterday's change. | |
2270 | The last OS that we could find where this wouldn't work is | |
2271 | SunOS 3.5, and that's too old to worry about now. | |
2272 | ||
2273 | * data/glr.c (struct yyltype): Define members even when not | |
2274 | doing locations. This is more consistent with yacc.c, and it | |
2275 | works around the following bug reports: | |
e3aa65c5 PE |
2276 | http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00106.html |
2277 | http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00111.html | |
27b0ffea | 2278 | |
223a7883 PE |
2279 | * doc/bison.texinfo: Minor spelling and typographical fixes. Use |
2280 | @acronym consistently. Standardize on "Yacc" instead of "YACC", | |
2281 | "Algol" instead of "ALGOL". Give a bit more history about BNF. | |
2282 | ||
8b76775a AD |
2283 | 2002-10-22 Akim Demaille <akim@epita.fr> |
2284 | ||
2285 | * data/README: New. | |
2286 | ||
6db10d14 PE |
2287 | 2002-10-21 Paul Eggert <eggert@twinsun.com> |
2288 | ||
2289 | Be consistent about 'bool'; the old code used an enum in one | |
2290 | module and an int in another, and this violates the C standard. | |
2291 | * m4/stdbool.m4: New file, from coreutils 4.5.3. | |
2292 | * configure.ac (AC_HEADER_STDBOOL): Add. | |
2293 | * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4. | |
2294 | * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a) | |
2295 | * src/symtab.c (hash_compare_symbol_t): Likewise. | |
2296 | * src/system.h (bool, false, true): Use a definition consistent | |
2297 | with ../lib/hash.c. All uses changed. | |
2298 | ||
2299 | * src/complain.c (warning_issued): Renamed from warn_message_count, | |
2300 | so that we needn't worry about integer overflow (!). | |
2301 | Now of type bool. All uses changed. | |
2302 | (complaint_issued): Renamed from complain_message_count; likewise. | |
2303 | ||
2304 | * src/main.c (main): Use exit to exit with failure. | |
27b0ffea | 2305 | |
6db10d14 PE |
2306 | * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS |
2307 | rather than 1 and 0. | |
2308 | * src/main.c (main): Likewise. | |
2309 | * src/getargs.c (getargs): Likewise. | |
2310 | * src/reader.c (reader): Likewise. | |
2311 | ||
2312 | * src/getarg.c (getargs): Remove duplicate code for | |
2313 | "Try `bison --help'". | |
2314 | ||
2315 | * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2. | |
2316 | What was that "2" for? | |
2317 | ||
2318 | * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)). | |
2319 | * src/getargs.c (usage): Likewise. | |
2320 | ||
2321 | * src/getargs.c (getargs): When there are too few operands, report | |
2322 | the last one. When there are too many, report the first extra | |
2323 | one. This is how diffutils does it. | |
2324 | ||
92a060fd PE |
2325 | 2002-10-20 Paul Eggert <eggert@twinsun.com> |
2326 | ||
2327 | Remove K&R vestiges. | |
2328 | * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove. | |
2329 | * src/complain.c (VA_START): Remove. Assume prototypes. | |
2330 | (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro. | |
2331 | (private_strerror, warn_at, warn, complain_at, complain, fatal_at, | |
2332 | fatal): Assume prototypes. | |
2333 | * src/complain.h: Assume prototypes. | |
2334 | * src/system.h (PARAMS): Remove. | |
2335 | Include <limits.h> unconditionally, since it's guaranteeed even | |
2336 | for a freestanding C89 compiler. | |
2337 | (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them. | |
2338 | * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype. | |
8b76775a | 2339 | |
e7cb57c0 AD |
2340 | 2002-10-20 Akim Demaille <akim@epita.fr> |
2341 | ||
2342 | * src/muscle_tab.c (muscle_grow): Remove trailing debugging code. | |
2343 | * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New. | |
2344 | (yyuserAction, yydoAction, yyglrReduce, yyresolveValue) | |
2345 | (yyresolveStates, yyresolveAction, yyresolveStack) | |
2346 | (yyprocessOneStack): Use them. | |
2347 | (yy_reduce_print): New. | |
2348 | * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param. | |
2349 | ||
0245f82d AD |
2350 | 2002-10-20 Akim Demaille <akim@epita.fr> |
2351 | ||
2352 | * data/c.m4 (b4_c_ansi_args): Recognize functions with no | |
2353 | arguments and output `void'. | |
2354 | (b4_c_function): Rename as... | |
2355 | (b4_c_function_def): this. | |
2356 | (b4_c_function_decl, b4_c_ansi_function_def) | |
2357 | (b4_c_ansi_function_decl): New. | |
2358 | Change the interpretation of the arguments: before `int, foo', now | |
2359 | `int foo, foo'. | |
2360 | * data/yacc.c (yyparse): Prototype and define thanks to these. | |
2361 | Adjust b4_c_function_def uses. | |
2362 | * data/glr.c (yyparse): Likewise, but ANSI only. | |
2363 | ||
39912f52 AD |
2364 | 2002-10-20 Akim Demaille <akim@epita.fr> |
2365 | ||
2366 | * src/output.c (prepare): Move the definition of `tokens_number', | |
2367 | `nterms_number', `undef_token_number', `user_token_number_max' | |
2368 | to... | |
2369 | (prepare_tokens): Here. | |
2370 | (prepare_tokens): Rename as... | |
2371 | (prepare_symbols): this. | |
2372 | (prepare): Move the definition of `rules_number' to... | |
2373 | (prepare_rules): here. | |
2374 | (prepare): Move the definition of `last', `final_state_number', | |
2375 | `states_number' to... | |
2376 | (prepare_states): here. | |
2377 | * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'. | |
2378 | ||
20c1e2ad AD |
2379 | 2002-10-20 Akim Demaille <akim@epita.fr> |
2380 | ||
2381 | * src/tables.h, src/tables.c, src/output.c: Comment changes. | |
2382 | ||
21964f43 AD |
2383 | 2002-10-20 Akim Demaille <akim@epita.fr> |
2384 | ||
2385 | * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to... | |
2386 | * data/c.m4: here. | |
2387 | ||
66d30cd4 AD |
2388 | 2002-10-20 Akim Demaille <akim@epita.fr> |
2389 | ||
2390 | * src/output.c (prepare): Use MUSCLE_INSERT_STRING. | |
2391 | * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as | |
2392 | `pair'. | |
2393 | (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth', | |
2394 | `name' to... | |
2395 | * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type) | |
2396 | (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name): | |
2397 | These. | |
2398 | ||
95f2c9fe PE |
2399 | 2002-10-19 Paul Eggert <eggert@twinsun.com> |
2400 | ||
2401 | Do not create a temporary file, as that involves security and | |
2402 | cleanup headaches. Instead, use a pair of pipes. | |
2403 | Derived from a suggestion by Florian Krohm. | |
2404 | * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files. | |
2405 | * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove. | |
2406 | * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove. | |
2407 | (BISON_PREREQ_SUBPIPE): Add. | |
2408 | * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c. | |
2409 | Add subpipe.h, subpipe.c. | |
2410 | * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4. | |
2411 | * po/POTFILES.in: Add lib/subpipe.c. | |
2412 | * src/output.c: Include "subpipe.h". | |
2413 | (m4_invoke): Remove decl. | |
2414 | (scan_skel): New decl. | |
2415 | (output_skeleton): Use pipe rather than temporary file for m4 input. | |
2416 | Check that m4sugar.m4 is readable, to avoid deadlock. | |
2417 | Check for pipe I/O error. | |
2418 | * src/scan-skel.l (readpipe): Remove decl. | |
2419 | (scan_skel): New function, to be used in place of m4_invoke. | |
2420 | Read from stream rather than file. | |
66d30cd4 | 2421 | |
95f2c9fe PE |
2422 | * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to |
2423 | float, as this generates a warning on Solaris 8 + GCC 3.2 with | |
2424 | --enable-gcc-warnings. Instead, divide into 1.0 rather than 1; | |
2425 | this generates a more-accurate value anyway. | |
2426 | ||
2427 | * lib/timevar.c (timervar_accumulate): Rename locals to | |
2428 | avoid confusion with similarly-named more-global. | |
2429 | * src/muscle_tab.c (muscle_pair_list_grow): Likewise. | |
2430 | ||
2431 | * src/output.c (prepare): Use xstrdup to convert char const * | |
2432 | to char *, to avoid GCC warning. | |
2433 | ||
c19988b7 AD |
2434 | 2002-10-19 Akim Demaille <akim@epita.fr> |
2435 | ||
2436 | * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS, | |
2437 | LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS. | |
2438 | Use them to have `calc.y' ready for %pure-parser. | |
2439 | * data/yacc.c (YYLEX): Pass a yylex return type to | |
2440 | b4_c_function_call. | |
2441 | ||
ae7453f2 AD |
2442 | 2002-10-19 Akim Demaille <akim@epita.fr> |
2443 | ||
2444 | Prototype support of %lex-param and %parse-param. | |
2445 | ||
2446 | * src/parse-gram.y: Add the definition of the %lex-param and | |
2447 | %parse-param tokens, plus their rules. | |
2448 | Drop the `_' version of %glr-parser. | |
2449 | Add the "," token. | |
2450 | * src/scan-gram.l (INITIAL): Scan them. | |
2451 | * src/muscle_tab.c: Comment changes. | |
2452 | (muscle_insert, muscle_find): Rename `pair' as `probe'. | |
2453 | * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused. | |
2454 | (muscle_entry_s): The `value' member is no longer const. | |
2455 | Adjust all dependencies. | |
2456 | * src/muscle_tab.c (muscle_init): Adjust: use | |
2457 | MUSCLE_INSERT_STRING. | |
2458 | Initialize the obstack earlier. | |
2459 | * src/muscle_tab.h, src/muscle_tab.c (muscle_grow) | |
2460 | (muscle_pair_list_grow): New. | |
2461 | * data/c.m4 (b4_c_function_call, b4_c_args): New. | |
2462 | * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param. | |
2463 | * tests/calc.at: Use %locations, not --locations. | |
2464 | (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser. | |
2465 | ||
0e575721 AD |
2466 | 2002-10-19 Akim Demaille <akim@epita.fr> |
2467 | ||
2468 | * src/getargs.c (usage): Take status as argument and exit | |
2469 | accordingly. | |
2470 | Report the traditional `Try ... --help' message when status != 0. | |
2471 | (usage, version): Don't take a FILE * as arg, it is pointless. | |
2472 | (getargs): When there is an incorrect number of arguments, make it | |
2473 | an error, and report it GNUlically thanks to `usage ()'. | |
2474 | ||
724ce7f5 PE |
2475 | 2002-10-18 Paul Eggert <eggert@twinsun.com> |
2476 | ||
3a781eb2 PE |
2477 | * data/glr.c (yyreportParseError): Don't assume that sprintf |
2478 | yields the length of the printed string, as this is not true | |
2479 | on SunOS 4.1.4. Reported by Peter Klein. | |
2480 | ||
724ce7f5 PE |
2481 | * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc. |
2482 | * tests/conflicts.at (%nonassoc and eof): Likewise. | |
2483 | Fixes SunOS 4.1.4 test failure reported by Peter Klein. | |
2484 | ||
473d0a75 AD |
2485 | 2002-10-17 Akim Demaille <akim@epita.fr> |
2486 | ||
2487 | * src/getargs.h (trace_e): Add trace_scan, and trace_parse. | |
2488 | * src/getargs.c (trace_types, trace_args): Adjust. | |
2489 | * src/reader.c (grammar_current_rule_prec_set) | |
2490 | (grammar_current_rule_dprec_set, grammar_current_rule_merge_set): | |
2491 | Standardize error messages. | |
2492 | And s/@prec/%prec/! | |
2493 | (reader): Use trace_flag to enable scanner/parser debugging, | |
2494 | instead of an adhoc scheme. | |
2495 | * src/scan-gram.l: Remove trailing debugging code. | |
2496 | ||
e76d2469 PE |
2497 | 2002-10-16 Paul Eggert <eggert@twinsun.com> |
2498 | ||
93e2236a PE |
2499 | * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as |
2500 | MUSCLE_TAB_H. | |
2501 | ||
e76d2469 PE |
2502 | * NEWS: Officially drop support for building Bison with K&R C, |
2503 | since it didn't work anyway and it's not worth worrying about. | |
2504 | * Makefile.maint (wget_files): Remove ansi2knr.c. | |
2505 | (ansi2knr.c-url_prefix): Remove. | |
2506 | * lib/.cvsignore: Remove ansi2knr, ansi2knr.*. | |
2507 | * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove. | |
2508 | * src/Makefile.am (AUTOMAKE_OPTIONS): Remove. | |
2509 | ||
5bd1c419 PE |
2510 | 2002-10-15 Paul Eggert <eggert@twinsun.com> |
2511 | ||
2512 | Stop using the "enum_" trick for K&R-style function definitions; | |
2513 | it confused me, and I was the author! Instead, assume that people | |
2514 | who want to use K&R C compilers (when using these modules in GCC, | |
2515 | perhaps?) will run ansi2knr. | |
2516 | ||
2517 | * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove. | |
2518 | All uses of "enum_" changed to "enum ". | |
2519 | * lib/ebitset.c (enum_ebitset_find_mode): Likewise. | |
2520 | * lib/lbitset.c (enum_lbitset_find_mode): Likewise. | |
e76d2469 | 2521 | |
5bd1c419 PE |
2522 | * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or, |
2523 | abitset_and_or_cmp, abitset_andn, abitset_andn_cmp, | |
2524 | abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy, | |
2525 | abitset_copy1, abitset_disjoint_p, abitset_empty_p, | |
2526 | abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse, | |
2527 | abitset_not, abitset_ones, abitset_or, abitset_or_and, | |
2528 | abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set, | |
2529 | abitset_size, abitset_small_list, abitset_subset_p, abitset_test, | |
2530 | abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero): | |
2531 | Use function prototypes; this removes the need for declaring | |
2532 | static functions simply to provide their prototypes. | |
2533 | * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_, | |
2534 | bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_, | |
2535 | bitset_count_, bitset_create, bitset_dump, bitset_first, | |
2536 | bitset_free, bitset_init, bitset_last, bitset_next, | |
2537 | bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p, | |
2538 | bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev, | |
2539 | bitset_print, bitset_release_memory, bitset_toggle_, | |
2540 | bitset_type_choose, bitset_type_get, bitset_type_name_get, | |
2541 | debug_bitset): Likewise. | |
2542 | * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise. | |
2543 | * lib/bitset_stats.c (bitset_log_histogram_print, | |
2544 | bitset_percent_histogram_print, bitset_stats_and, | |
2545 | bitset_stats_and_cmp, bitset_stats_and_or, | |
2546 | bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp, | |
2547 | bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy, | |
2548 | bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p, | |
2549 | bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable, | |
2550 | bitset_stats_equal_p, bitset_stats_free, bitset_stats_init, | |
2551 | bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not, | |
2552 | bitset_stats_ones, bitset_stats_or, bitset_stats_or_and, | |
2553 | bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print, | |
2554 | bitset_stats_print_1, bitset_stats_read, bitset_stats_reset, | |
2555 | bitset_stats_set, bitset_stats_size, bitset_stats_subset_p, | |
2556 | bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get, | |
2557 | bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp, | |
2558 | bitset_stats_zero): Likewise. | |
2559 | * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free, | |
2560 | bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure, | |
2561 | bitsetv_dump, debug_bitsetv): Likewise. | |
2562 | * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn, | |
2563 | ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_, | |
2564 | ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add, | |
2565 | ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find, | |
2566 | ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove, | |
2567 | ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p, | |
2568 | ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list, | |
2569 | ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp, | |
2570 | ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset, | |
2571 | ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test, | |
2572 | ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero): | |
2573 | Likewise. | |
2574 | * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp, | |
2575 | lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy, | |
2576 | lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc, | |
2577 | lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free, | |
2578 | lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p, | |
2579 | lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init, | |
2580 | lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones, | |
2581 | lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune, | |
2582 | lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size, | |
2583 | lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor, | |
2584 | lbitset_xor_cmp, lbitset_zero): Likewise. | |
e76d2469 | 2585 | |
ae26e1f0 AD |
2586 | 2002-10-14 Akim Demaille <akim@epita.fr> |
2587 | ||
2588 | Version 1.75. | |
2589 | ||
d43baf71 AD |
2590 | 2002-10-14 Akim Demaille <akim@epita.fr> |
2591 | ||
2592 | * tests/Makefile.am (maintainer-check-posix): New. | |
2593 | ||
7ebc83e3 AD |
2594 | 2002-10-14 Akim Demaille <akim@epita.fr> |
2595 | ||
2596 | * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc | |
2597 | member. | |
2598 | ||
05846dae AD |
2599 | 2002-10-14 Akim Demaille <akim@epita.fr> |
2600 | ||
2601 | * src/tables.c (table_ninf_remap): base -> tab. | |
2602 | Reported by Matt Rosing. | |
2603 | ||
1318e37d PE |
2604 | 2002-10-14 Paul Eggert <eggert@twinsun.com> |
2605 | ||
447fbb17 PE |
2606 | * tests/action.at, tests/calc.at, tests/conflicts.at, |
2607 | tests/cxx-type.at, tests/headers.at, tests/input.at, | |
2608 | tests/regression.at, tests/synclines.at, tests/torture.at: | |
2609 | Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c", | |
2610 | so that the tests still work even if POSIXLY_CORRECT is set. | |
2611 | * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise. | |
05846dae | 2612 | |
1318e37d PE |
2613 | * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char, |
2614 | for portability to K&R hosts. Fix typo: signed char is guaranteed | |
2615 | only to 127, not to 128. | |
2616 | * data/glr.c (yysigned_char): New type. | |
2617 | * data/yacc.c (yysigned_char): Likewise. | |
2618 | * tests/regression.at (Web2c Actions): signed char -> yysigned_char. | |
2619 | ||
cc0f0794 PE |
2620 | 2002-10-13 Paul Eggert <eggert@twinsun.com> |
2621 | ||
5038f418 PE |
2622 | * data/yacc.c (yyparse): Rewrite to avoid "comparison is always |
2623 | true due to limited range of data type" warning from GCC. | |
2624 | ||
cc0f0794 PE |
2625 | * data/c.m4 (b4_token_defines): Protect against double-inclusion |
2626 | by wrapping enum yytokentype's definition inside #ifndef | |
2627 | YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12. | |
2628 | ||
6fed0802 AD |
2629 | 2002-10-13 Akim Demaille <akim@epita.fr> |
2630 | ||
2631 | * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction): | |
2632 | Un yy- yyrhs to avoid the name clash with the global YYRHS. | |
2633 | ||
32f0598d AD |
2634 | 2002-10-13 Akim Demaille <akim@epita.fr> |
2635 | ||
2636 | * Makefile.maint: Update from Autoconf 2.54. | |
2637 | * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54. | |
2638 | ||
7ea9a33f AD |
2639 | 2002-10-13 Akim Demaille <akim@epita.fr> |
2640 | ||
2641 | * src/print.c (print_state): Separate the list of solved conflicts | |
2642 | from the other items. | |
2643 | * tests/conflicts.at (Resolved SR Conflicts): Adjust. | |
2644 | ||
ea99527d AD |
2645 | 2002-10-13 Akim Demaille <akim@epita.fr> |
2646 | ||
2647 | Let nondeterministic skeletons be usable with deterministic | |
2648 | tables. | |
2649 | ||
2650 | With the patch, GAWK compiled by GCC without -O2 passes its test | |
2651 | suite using a GLR parser driven by LALR tables. It fails with -O2 | |
2652 | because `struct stat' gives two different answers on my machine: | |
2653 | 88 (definition of an auto var) and later 96 (memset on this var). | |
2654 | Hence the stack is badly corrumpted. The headers inclusion is to | |
2655 | blame: if I move the awk.h inclusion before GLR's system header | |
2656 | inclusion, the two struct stat have the same size. | |
2657 | ||
2658 | * src/tables.c (pack_table): Always create conflict_table. | |
2659 | (token_actions): Always create conflict_list. | |
2660 | * data/glr.c (YYFLAG): Remove, unused. | |
2661 | ||
f377f69f AD |
2662 | 2002-10-13 Akim Demaille <akim@epita.fr> |
2663 | ||
2664 | * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code. | |
2665 | (O0FLAGS): New. | |
2666 | (VALGRIND, GXX): New. | |
2667 | * tests/atlocal.in (CFLAGS): Use O0FLAGS. | |
2668 | * tests/bison.in: Run $PREBISON a pre-command. | |
2669 | * tests/Makefile.am (maintainer-check, maintainer-check-valgrind) | |
2670 | (maintainer-check-g++): New. | |
2671 | * Makefile.am (maintainer-check): New. | |
2672 | ||
2a1fe6ed AD |
2673 | 2002-10-13 Akim Demaille <akim@epita.fr> |
2674 | ||
2675 | * data/glr.c: Formatting changes. | |
2676 | Tweak some trace messages to match yacc.c's. | |
2677 | ||
f50adbbd AD |
2678 | 2002-10-13 Akim Demaille <akim@epita.fr> |
2679 | ||
2680 | GLR parsers sometimes raise parse errors instead of performing the | |
2681 | default reduction. | |
2682 | Reported by Charles-Henry de Boysson. | |
2683 | ||
2684 | * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't | |
2685 | check the length of the traces when %glr. | |
2686 | (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from | |
2687 | GLR's traces. | |
2688 | (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New. | |
2689 | Test GLR parsers. | |
2690 | * data/glr.c (YYLEFTMOST_STATE): Fix its value. | |
2691 | (yyltype): Remove the yy prefix from the member names. | |
2692 | (yytable): Complete its comment. | |
2693 | (yygetLRActions): Map error action number from YYTABLE from | |
2694 | YYTABLE_NINF to 0. | |
2695 | (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF | |
2696 | (which was a bug: it should have been YYTABEL_NINF, and yet it was | |
2697 | not satisfying as we could compare an YYACTION computed from | |
2698 | YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the | |
2699 | only value for error actions. | |
2700 | (yyreportParseError): In verbose parse error messages, don't issue | |
2701 | `error' in the list of expected tokens. | |
2702 | * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the | |
2703 | next action to perform to match glr.c's decoding. | |
2704 | (yytable): Complete its comment. | |
2705 | ||
bcbad5b9 PE |
2706 | 2002-10-13 Paul Eggert <eggert@twinsun.com> |
2707 | ||
2708 | Fix problem reported by Henrik Grubbstroem in | |
e3aa65c5 | 2709 | <http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>: |
bcbad5b9 PE |
2710 | "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected, |
2711 | because the Bison parser reads the second action before reducing | |
2712 | the first one. | |
2713 | * src/scan-gram.l (rule_length): New static var. | |
2714 | Use it to keep track of the rule length in the scanner, since | |
2715 | we can't expect the parser to be in lock-step sync with the scanner. | |
2716 | (handle_action_dollar, handle_action_at): Use this var. | |
2717 | * tests/actions.at (Exotic Dollars): Test for the problem. | |
05846dae | 2718 | |
14904b89 PE |
2719 | 2002-10-12 Paul Eggert <eggert@twinsun.com> |
2720 | ||
1fe611e5 PE |
2721 | * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>. |
2722 | * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>. | |
2723 | Include <sys/time.h> when checking for clock_t and struct tms. | |
2724 | Use same include order as source. | |
2725 | This is for the SunOS 4.1.4 porting bug reported by Peter Klein in | |
e3aa65c5 | 2726 | <http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>. |
05846dae | 2727 | |
1fe611e5 PE |
2728 | * lib/timevar.c: Update copyright date and clarify comments. |
2729 | (get_time) [IN_GCC]: Keep the GCC version for reference. | |
05846dae | 2730 | |
1fe611e5 PE |
2731 | * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import |
2732 | GCC version as of today, then merge Bison's changes. | |
2733 | Change "GCC" to "Bison" in copyright notice. timevar.def's | |
2734 | author is Akim, so change that too. | |
2735 | ||
98194095 PE |
2736 | * src/reader.c (grammar_current_rule_check): |
2737 | Don't worry about the default action if $$ is untyped. | |
2738 | Prevents bogus warnings reported by Jim Gifford in | |
e3aa65c5 | 2739 | <http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>. |
98194095 | 2740 | |
14904b89 PE |
2741 | * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE. |
2742 | * data/glr.c, data/lalr1.cc, data/yacc.c: | |
2743 | Output token definitions before the first part of user declarations. | |
2744 | Fixes compatibility problem reported by Jim Gifford for kbd in | |
e3aa65c5 | 2745 | <http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>. |
14904b89 | 2746 | |
ff6dca18 PE |
2747 | 2002-10-11 Paul Eggert <eggert@twinsun.com> |
2748 | ||
2749 | * data/yacc.c (yyreport_parse_error): Remove, putting its body into... | |
2750 | (yyparse): here. This undoes some of the 2002-07-25 change. | |
2751 | Compatibility problem reported by Ralf S. Engelschall with | |
2752 | OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>. | |
2753 | ||
eb714592 AD |
2754 | 2002-10-11 Akim Demaille <akim@epita.fr> |
2755 | ||
2756 | * tests/regression.at Characters Escapes): New. | |
2757 | * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and | |
2758 | characters. | |
2759 | Reported by Jan Nieuwenhuizen. | |
2760 | ||
b7195100 AD |
2761 | 2002-10-11 Akim Demaille <akim@epita.fr> |
2762 | ||
2763 | * po/id.po: New. | |
2764 | ||
f28a0f2d PE |
2765 | 2002-10-10 Paul Eggert <eggert@twinsun.com> |
2766 | ||
2767 | Portability fixes for bitsets; this also avoids several GCC | |
2768 | warnings. | |
2769 | ||
2770 | * lib/abitset.c: Include <stddef.h>, for offsetof. | |
2771 | * lib/lbitset.c: Likewise. | |
2772 | ||
2773 | * lib/abitset.c (abitset_bytes): Return a size that is aligned | |
2774 | properly for vectors of objects. Do not assume that adding a | |
2775 | header size to a multiple of a word size yields a value that is | |
2776 | properly aligned for the whole union. | |
2777 | * lib/bitsetv.c (bitsetv_alloc): Likewise. | |
2778 | ||
2779 | * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new, | |
2780 | unique names for structures. | |
2781 | * lib/ebitset.c (ebitset_bytes): Likewise. | |
2782 | * lib/lbitset.c (lbitset_bytes): Likewise. | |
2783 | ||
2784 | * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p, | |
2785 | abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p, | |
2786 | abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn, | |
2787 | abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor, | |
2788 | abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp, | |
2789 | abitset_andn_or, abitset_andn_or_cmp, abitset_or_and, | |
2790 | abitset_or_and_cmp, abitset_copy): Supply prototype decls, | |
2791 | to improve the type-checking that GCC can do. | |
2792 | * lib/bitset.c (bitset_op4_cmp): Likewise. | |
2793 | * lib/bitset_stats.c (bitset_stats_count, | |
2794 | bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero, | |
2795 | bitset_stats_copy, bitset_stats_disjoint_p, | |
2796 | bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p, | |
2797 | bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn, | |
2798 | bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp, | |
2799 | bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or, | |
2800 | bitset_stats_and_or_cmp, bitset_stats_andn_or, | |
2801 | bitset_stats_andn_or_cmp, bitset_stats_or_and, | |
2802 | bitset_stats_or_and_cmp): Likewise. | |
2803 | * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn, | |
2804 | lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor, | |
2805 | lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not, | |
2806 | lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise. | |
2807 | ||
2808 | * lib/abitset.h: Include bitset.h, not bbitset.h. | |
2809 | * lib/ebitset.h: Likewise. | |
2810 | * lib/lbitset.h: Likewise. | |
2811 | ||
2812 | * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types. | |
2813 | All instances of parameters of type enum bitset_opts are now of | |
2814 | type enum_bitset_opts, to conform to the C Standard, and similarly | |
2815 | for enum_bitset_type. | |
2816 | * lib/ebitset.c (enum_ebitset_find_mode): Likewise. | |
2817 | * lib/lbitset.c (enum_lbitset_find_mode): Likewise. | |
2818 | ||
2819 | Do not use "struct bitset_struct" to mean different things in | |
2820 | different modules. Not only is this confusing, it violates | |
2821 | the C Standard, which requires that structure types in different | |
2822 | modules must be compatible if one is to be passed to the other. | |
2823 | * lib/bbitset.h (bitset): Now points to a union, not to a struct. | |
2824 | All instances of "struct bitset_struct *" replaced with "bitset". | |
2825 | * lib/bitset.h (struct bitset_struct): Remove, replacing with.... | |
2826 | (union bitset_union, struct abitset_struct, struct ebitset_struct, | |
2827 | struct lbitset_struct, struct bitset_stats_struct): New types. | |
2828 | All uses of struct bitset_struct changed to union bitset_union, | |
2829 | etc. | |
2830 | * lib/abitset.c (struct abitset_struct, abitset, | |
2831 | struct bitset_struct): Remove. | |
2832 | * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats, | |
2833 | struct bitset_struct): Remove. | |
2834 | * lib/ebitset.c (struct ebitset_struct, ebitset, struct | |
2835 | bitset_struct): Remove. | |
2836 | * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct): | |
2837 | Likewise. | |
2838 | ||
2839 | Do not call a function of type T using a call that assumes the | |
2840 | function is of a different type U. Standard C requires that a | |
2841 | function must be called with a type that is compatible with its | |
2842 | definition. | |
2843 | * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_): | |
2844 | New decls. | |
2845 | * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_): | |
2846 | New functions. | |
2847 | * lib/ebitset.c (PFV): Remove. | |
2848 | * lib/lbitset.c (PFV): Likewise. | |
2849 | * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or, | |
2850 | ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New | |
2851 | decls. | |
2852 | (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions. | |
2853 | (ebitset_vtable): Use them. | |
2854 | * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or, | |
2855 | lbitset_xor): New functions. | |
2856 | (lbitset_vtable): Use them. | |
2857 | ||
2858 | * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p): | |
2859 | Declare. | |
2860 | ||
2861 | * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a | |
2862 | GCC warning. | |
2863 | * lib/lbitset.c (LBITSET_CURRENT1): Likewise. | |
2864 | Use offsetof, for simplicity. | |
2865 | ||
6fbe4984 PE |
2866 | 2002-10-06 Paul Eggert <eggert@twinsun.com> |
2867 | ||
2868 | * lib/bitset.h (bitset_reset): Do not assume that bitset_word is | |
2869 | the same width as int. This reapplies a hunk of the 2002-08-12 patch | |
e3aa65c5 | 2870 | <http://mail.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>, |
6fbe4984 PE |
2871 | which was inadvertently undone by the 2002-09-30 patch. |
2872 | * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is | |
2873 | the same width as int. | |
2874 | ||
420f93c8 PE |
2875 | 2002-10-04 Paul Eggert <eggert@twinsun.com> |
2876 | ||
2877 | Version 1.50. | |
2878 | ||
2879 | * configure.ac (AC_INIT), NEWS: Increment version number. | |
2880 | ||
2881 | * doc/bison.texinfo: Minor spelling, grammar, and white space | |
2882 | fixes. | |
2883 | (Symbols): Mention that any negative value returned from yylex | |
2884 | signifies end-of-input. Warn about negative chars. Mention | |
2885 | the portable Standard C character set. | |
2886 | ||
2887 | The GNU coding standard says CFLAGS and YFLAGS are reserved | |
2888 | for the installer to set. | |
2889 | * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS. | |
2890 | * src/Makefile.am (AM_CFLAGS): Likewise. | |
2891 | (AM_YFLAGS): Renamed from YFLAGS. | |
2892 | ||
2893 | Fix some MAX and MIN problems. | |
2894 | * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN. | |
2895 | * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX. | |
2896 | * src/symtab.h (SYMBOL_NUMBER_MAX): New macro. | |
2897 | * src/reader.c (reader): Use it. | |
2898 | ||
2899 | * tests/regression.at (Braces parsing): Use grep, not fgrep, as | |
2900 | POSIX 1003.1-2001 has removed fgrep. | |
2901 | ||
2902 | 2002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz> | |
2903 | ||
2904 | * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be | |
2905 | interpreted as signed. | |
2906 | * lib/ebitset.c (ebitset_list): Fix bug. | |
2907 | ||
ff68026d PE |
2908 | 2002-10-01 Paul Eggert <eggert@twinsun.com> |
2909 | ||
2910 | More fixes for 64-bit hosts and large bitsets. | |
2911 | ||
2912 | * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list, | |
2913 | abitset_size, abitset_list, abitset_list_reverse, abitset_list): | |
2914 | Use bitset_bindex, not int or unsigned int or size_t, to count bits. | |
2915 | * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count, | |
2916 | struct bitset_vtable.list, struct bitset_vtable.list_reverse, | |
2917 | bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last, | |
2918 | bitset_count_): Likewise. | |
2919 | * lib/bitset.h (bitset_iterator.num, bitset_iterator.i, | |
2920 | bitset_first, bitset_last): Likewise. | |
2921 | * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list, | |
2922 | bitset_stats_list_reverse, bitset_stats_size, | |
2923 | bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse): | |
2924 | Likewise. | |
2925 | * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise. | |
2926 | * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free, | |
2927 | bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure, | |
2928 | bitsetv_reflexive_transitive_closure): Likewise. | |
2929 | * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise. | |
2930 | * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse): | |
2931 | Likewise. | |
2932 | * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge): | |
2933 | Likewise. | |
420f93c8 | 2934 | |
ff68026d PE |
2935 | * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes): |
2936 | Use size_t, not unsigned int, to count bytes. | |
2937 | * lib/abitset.h (abitset_bytes): Likewise. | |
2938 | * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc): | |
2939 | Likewise. | |
2940 | * lib/bitset.h (bitset_bytes): Likewise. | |
2941 | * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise. | |
2942 | * lib/bitset_stats.h (bitset_stats_bytes): Likewise. | |
2943 | * lib/bitsetv.c (bitsetv_alloc): Likewise. | |
2944 | * lib/ebitset.c (ebitset_bytes): Likewise. | |
2945 | * lib/ebitset.h (ebitset_bytes): Likewise. | |
2946 | * lib/lbitset.c (lbitset_bytes): Likewise. | |
2947 | * lib/lbitset.h (lbitset_bytes): Likewise. | |
420f93c8 | 2948 | |
ff68026d PE |
2949 | * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p, |
2950 | abitset_subset_p, abitset_disjoint_p, abitset_and, | |
2951 | abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or, | |
2952 | abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or, | |
2953 | abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp, | |
2954 | abitset_or_and, abitset_or_and_cmp): | |
2955 | Use bitset_windex instead of unsigned int. | |
2956 | * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise. | |
2957 | * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow, | |
2958 | ebitset_elt_add, ebitset_elt_remove, ebitset_weed, | |
2959 | ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init): | |
2960 | Likewise. | |
2961 | * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise. | |
420f93c8 | 2962 | |
ff68026d PE |
2963 | * lib/bitset.c (bitset_print): |
2964 | Use proper printf formats for widths of integer types. | |
2965 | * lib/bitset_stats.c (bitset_percent_histogram_print, | |
2966 | bitset_log_histogram_print, bitset_stats_print_1): Likewise. | |
2967 | * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise. | |
2968 | * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise. | |
2969 | * lib/lbitset.c (lbitset_bytes): Likewise. | |
420f93c8 | 2970 | |
ff68026d PE |
2971 | * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX, |
2972 | BITSET_SIZE_MAX): New macros. | |
2973 | (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that | |
2974 | sizeof (bitset_word) == sizeof (bitset_windex). All uses changed | |
2975 | to BITSET_WINDEX_MAX. | |
2976 | ||
2977 | * lib/bitset.c (bitset_next, bitset_prev, bitset_first, | |
2978 | bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value, | |
2979 | since we now return the bitset_bindex type (not int). | |
2980 | ||
2981 | * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow | |
2982 | when computing sizes. | |
2983 | * lib/ebitset.c (ebitset_elts_grow): Likewise. | |
2984 | ||
2985 | * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation | |
2986 | and avoid cast to unsigned. | |
2987 | ||
6aa452a6 AD |
2988 | 2002-09-30 Akim Demaille <akim@epita.fr> |
2989 | ||
2990 | * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h, | |
2991 | * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c: | |
2992 | Updates from Michael Hayes. | |
2993 | ||
927f7817 AD |
2994 | 2002-09-30 Art Haas <ahaas@neosoft.com> |
2995 | ||
2996 | * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER | |
2997 | invocations. | |
2998 | * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not | |
2999 | defined. | |
3000 | ||
9738f41e AD |
3001 | 2002-09-27 Akim Demaille <akim@epita.fr> |
3002 | ||
3003 | Version 1.49c. | |
3004 | ||
a5c75d7f AD |
3005 | 2002-09-27 Akim Demaille <akim@epita.fr> |
3006 | ||
3007 | * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7. | |
3008 | (Because of AC_LIBSOURCE). | |
3009 | ||
8280e179 AD |
3010 | 2002-09-27 Akim Demaille <akim@epita.fr> |
3011 | ||
3012 | Playing with Autoscan. | |
3013 | ||
3014 | * configure.ac: Remove the old LIBOBJ tweaks. | |
3015 | (AC_REPLACE_FUNCS): Add strrchr and strtol. | |
3016 | * lib/strrchr.c: New. | |
3017 | * lib/strtol.c: New, from the Coreutils 4.5.1. | |
3018 | ||
ae64af35 AD |
3019 | 2002-09-27 Akim Demaille <akim@epita.fr> |
3020 | ||
3021 | Playing with Autoscan. | |
3022 | ||
3023 | * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New. | |
3024 | * lib/Makefile.am (libbison_a_SOURCES): No longer include | |
3025 | argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd. | |
3026 | * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the | |
3027 | Coreutils 4.5.1. | |
3028 | ||
d1a1114f AD |
3029 | 2002-09-24 Akim Demaille <akim@epita.fr> |
3030 | ||
3031 | * doc/bison.texinfo (Stack Overflow): xref to Recursion. | |
3032 | (Frequently Asked Questions, Parser Stack Overflow): New. | |
3033 | ||
b906441c AD |
3034 | 2002-09-13 Akim Demaille <akim@epita.fr> |
3035 | ||
3036 | Playing with autoscan. | |
3037 | ||
3038 | * src/reader.c (get_merge_function): Use xstrdup, not strdup. | |
3039 | * src/files.c (skeleton_find): Remove, unused. | |
3040 | * m4/memcmp.m4: New, from the Coreutils 4.5.1. | |
3041 | * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP. | |
3042 | ||
bd701811 AD |
3043 | 2002-09-13 Akim Demaille <akim@epita.fr> |
3044 | ||
3045 | * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3. | |
3046 | * Makefile.am (AUTOMAKE_OPTIONS): Don't. | |
3047 | ||
e0a13e7b AD |
3048 | 2002-09-13 Akim Demaille <akim@epita.fr> |
3049 | ||
3050 | * configure.ac: Require 2.54. | |
3051 | s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/. | |
3052 | s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/. | |
3053 | * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4: | |
3054 | Remove, provided by Autoconf macros. | |
3055 | ||
c97011bf AD |
3056 | 2002-09-12 Akim Demaille <akim@epita.fr> |
3057 | ||
3058 | * m4/prereq.m4: Update, from Coreutils 4.5.1. | |
3059 | ||
d862b1be AD |
3060 | 2002-09-12 Akim Demaille <akim@epita.fr> |
3061 | ||
3062 | * m4/prereq.m4: Update, from Fileutils 4.1.5. | |
3063 | * configure.ac (jm_PREREQ_TEMPNAME): Invoke it. | |
3064 | Reported by Martin Mokrejs. | |
3065 | ||
3d38c03a AD |
3066 | 2002-09-10 Akim Demaille <akim@epita.fr> |
3067 | ||
3068 | * src/parse-gram.y: Associate a human readable string to each | |
3069 | token type. | |
3070 | * tests/regression.at (Invalid inputs): Adjust. | |
3071 | ||
b6347355 AD |
3072 | 2002-09-10 Gary V. Vaughan <gary@gnu.org> |
3073 | ||
3074 | * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships | |
3075 | with an Autoconf-2.5x style configure.ac. | |
3076 | ||
09ba4ab2 PE |
3077 | 2002-09-06 Paul Eggert <eggert@twinsun.com> |
3078 | ||
3079 | * doc/bison.texinfo (Conditions): Make explicit that the GPL | |
3080 | exception applies only to yacc.c. This is a modification of a | |
3081 | patch originally suggested by Akim Demaille. | |
3082 | ||
21846f69 AD |
3083 | 2002-09-06 Akim Demaille <akim@epita.fr> |
3084 | ||
09ba4ab2 PE |
3085 | * data/c.m4 (b4_copyright): Move the GPL exception comment from |
3086 | here to... | |
3087 | * data/yacc.c: here. | |
3088 | ||
21846f69 AD |
3089 | * data/lalr1.cc (struct yyltype): Don't define it, since we use |
3090 | LocationType. | |
3091 | (b4_ltype): Default to yy::Location from location.hh. | |
3092 | ||
c0ad8bf3 AD |
3093 | 2002-09-04 Jim Meyering <jim@meyering.net> |
3094 | ||
3095 | * data/yacc.c: Guard the declaration of yytoknum also with | |
3096 | `#ifdef YYPRINT', so it is declared only when used. | |
3097 | ||
3a93251e AD |
3098 | 2002-09-04 Akim Demaille <akim@epita.fr> |
3099 | ||
3100 | * configure.in: Rename as... | |
3101 | * configure.ac: this. | |
3102 | Bump to 1.49c. | |
3103 | ||
427c0dda AD |
3104 | 2002-09-04 Akim Demaille <akim@epita.fr> |
3105 | ||
3106 | * src/assoc.c, src/closure.c, src/gram.c, src/injections.c, | |
3107 | * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't | |
3108 | translate maintainer only messages. | |
3109 | ||
6a254321 PE |
3110 | 2002-08-12 Paul Eggert <eggert@twinsun.com> |
3111 | ||
645e30d1 PE |
3112 | Version 1.49b. |
3113 | ||
6a254321 PE |
3114 | * Makefile.am (SUBDIRS): Remove intl. |
3115 | (DISTCLEANFILES): Remove. | |
3116 | * NEWS: Mention that GNU M4 is now required. Clarify what is | |
3117 | meant by "larger grammars". Mention the pt_BR translation. | |
3118 | * configure.in (AC_CHECK_DECLS): Add getenv, getopt. | |
3119 | (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var. | |
3120 | Bump version from 0.11.2 to 0.11.5. | |
3121 | (BISON_PREREQ_STAGE): Remove. | |
3122 | (AM_GNU_GETTEXT): Use external gettext. | |
3123 | (AC_OUTPUT): Remove intl/Makefile. | |
3124 | ||
3125 | * config/depcomp, config/install-sh: Sync with Automake 1.6.3. | |
3126 | ||
3127 | * data/glr.c: Include string.h, for strlen. | |
3128 | (yyreportParseError): Use size_t for yysize. | |
3129 | (yy_yypstack): No longer nested inside yypstates, as nested | |
3130 | functions are not portable. Do not assume size_t is the | |
3131 | same width as int. | |
3132 | (yypstates): Do not assume that ptrdiff_t is the same width | |
3133 | as int, and similarly for yyposn and YYINDEX. | |
3134 | ||
3135 | * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage. | |
3136 | ||
3137 | * lib/Makefile.am (INCLUDES): Do not include from the intl | |
3138 | directory, which has been removed. | |
3139 | * src/Makefile.am (INCLUDES): Likewise. | |
3140 | ||
3141 | * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h. | |
3142 | (bitsets_sources, additional_bitsets_sources, timevars_sources): | |
3143 | New vars. | |
3144 | ||
3145 | * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension. | |
3146 | * tests/Makefile.am (EXTRA_DIST): Likewise. | |
3147 | ||
3148 | * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list): | |
3149 | Do not assume that bitset_windex is the same width as unsigned. | |
3150 | ||
3151 | * lib/abitset.c (abitset_unused_clear): Do not assume that | |
3152 | bitset_word is the same width as int. | |
3153 | * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise. | |
3154 | * lib/bitset.h (bitset_set, bitset_reset): Likewise. | |
3155 | * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise. | |
3156 | * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise. | |
3157 | * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise. | |
3158 | ||
3159 | * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for | |
3160 | portability to one's complement hosts!). | |
3161 | * lib/ebitset.c (ebitset_op1): Likewise. | |
3162 | * lib/lbitset.c (lbitset_op1): Likewise. | |
3163 | ||
3164 | * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar. | |
3165 | * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h, | |
3166 | lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c: | |
3167 | Sync with fileutils. | |
3168 | * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c, | |
3169 | lib/gettext.h: Sync with diffutils. | |
3170 | ||
3171 | * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c, | |
3172 | lib/strspn.c, lib/tempname.c: Use GPL, not LGPL. | |
3173 | ||
3174 | * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use | |
3175 | PROTOTYPES to check for prototypes, and "defined __STDC__" to | |
3176 | check for void *. | |
3177 | ||
3178 | * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not | |
3179 | size_t; the old version tried to do this but casted improperly. | |
3180 | (bitset_bindex, bitset_windex): Now size_t, not unsigned long. | |
3181 | (bitset_test): Now returns int, not unsigned long. | |
3182 | ||
3183 | * lib/bitset_stats.c: Include "gettext.h". | |
3184 | (_): New macro. | |
3185 | (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't | |
3186 | name locals "index", as it generates unnecessary warnings on some | |
3187 | hosts that have an "index" function. | |
3188 | ||
3189 | * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print, | |
3190 | bitset_stats_read, bitset_stats_write): Wrap strings in _() if | |
3191 | they need translation. | |
3192 | * src/LR0.c (state_list_append, new_itemsets, get_state, | |
3193 | append_states, generate_states): Likewise. | |
3194 | * src/assoc.c (assoc_to_string): Likewise. | |
3195 | * src/closure.c (print_closure, set_firsts, closure): Likewise. | |
3196 | * src/gram.c (grammar_dump): Likewise. | |
3197 | * src/injections.c (injections_compute): Likewise. | |
3198 | * src/lalr.c (lookaheads_print): Likewise. | |
3199 | * src/relation.c (relation_transpose): Likewise. | |
3200 | * src/scan-gram.l: Likewise. | |
3201 | * src/tables.c (table_grow, pack_vector): Likewise. | |
3202 | ||
3203 | * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4, | |
3204 | glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4. | |
3205 | * m4/malloc.m4, m4/realloc.m4: Sync with diffutils. | |
3206 | * m4/mbstate_t.m4: Sync with fileutils. | |
3207 | * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T. | |
3208 | ||
3209 | * po/LINGUAS: Add pt_BR. | |
3210 | * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c, | |
3211 | src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c, | |
3212 | lib/timevar.c. | |
3213 | Use src/parse-gram.y instead of src/parse-gram.c, as the gettext | |
3214 | manual recommends. | |
3215 | Similarly, use src/scan-gram.l instead of src/scan-gram.c. | |
3216 | ||
3217 | * src/complain.c (strerror_r): Remove decl; not needed. | |
3218 | (strerror): Use same pattern as ../lib/error.c. | |
3219 | ||
3220 | * src/files.c, src/files.h (compute_header_macro): Remove; unused. | |
3221 | ||
3222 | * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int. | |
3223 | ||
3224 | * src/main.c (main): Cast result of bindtextdomain and textdomain | |
3225 | to void, to avoid a GCC warning when --disable-nls is in effect. | |
3226 | ||
3227 | * src/scan-gram.l: Use strings rather than escapes when possible, | |
3228 | to minimize the number of warnings from xgettext. | |
3229 | (handle_action_dollar, handle_action_at): Don't use isdigit, | |
3230 | as it mishandles negative chars and it may not work as expected | |
3231 | outside the C locale. | |
3232 | ||
3233 | * src/symtab.c (symbol_get): Don't cast LHS of an assignment; | |
3234 | this is a GCC extension and is not portable to other compilers. | |
3235 | ||
3236 | * src/system.h (alloca): Use same pattern as ../lib/error.c. | |
3237 | Do not include <ctype.h>; no longer needed. | |
3238 | Do not include <malloc.h>; no longer needed (and generates | |
3239 | warnings on OpenBSD 3.0). | |
3240 | ||
3241 | * tests/cxx-type.at (yylex): Do not pass signed char to isupper; | |
3242 | it's not portable. | |
3243 | ||
3244 | * tests/regression.at: Do not use 'cc -c input.c -o input'; | |
3245 | Sun C rejects this. Instead, use 'cc -c input.c -o input.o'. | |
3246 | ||
3247 | * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero | |
3248 | exit status as failure, not just exit status 1. Sun C exits | |
3249 | with status 2 sometimes. | |
3250 | ||
3251 | * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro. | |
3252 | Use it for the two large tests. | |
3253 | ||
c8f002c7 AD |
3254 | 2002-08-02 Akim Demaille <akim@epita.fr> |
3255 | ||
3256 | * src/conflicts.c (conflicts_output): Don't output rules never | |
3257 | reduced here, since anyway that computation doesn't work. | |
3258 | * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p) | |
3259 | (rule_useless_p, rule_never_reduced_p): New. | |
3260 | (grammar_rules_partial_print): Use a filter instead of a range. | |
3261 | Display the title only if needed. | |
3262 | (grammar_rules_print): Adjust. | |
3263 | (grammar_rules_never_reduced_report): New. | |
3264 | * src/tables.c (action_row): Move the computation of rules never | |
3265 | reduced to... | |
3266 | (token_actions): here. | |
3267 | * src/main.c (main): Make the parser before making the report, so | |
3268 | that rules never reduced are computed. | |
3269 | Call grammar_rules_never_reduced_report. | |
3270 | * src/print.c (print_results): Report rules never reduced. | |
3271 | * tests/conflicts.at, tests/reduce.at: Adjust. | |
3272 | ||
cd08e51e AD |
3273 | 2002-08-01 Akim Demaille <akim@epita.fr> |
3274 | ||
3275 | Instead of attaching lookaheads and duplicating the rules being | |
3276 | reduced by a state, attach the lookaheads to the reductions. | |
3277 | ||
3278 | * src/state.h (state_t): Remove the `lookaheads', | |
3279 | `lookaheads_rule' member. | |
3280 | (reductions_t): Add a `lookaheads' member. | |
3281 | Use a regular array for the `rules'. | |
3282 | * src/state.c (reductions_new): Initialize the lookaheads member | |
3283 | to 0. | |
3284 | (state_rule_lookaheads_print): Adjust. | |
3285 | * src/state.h, src/state.c (state_reductions_find): New. | |
3286 | * src/conflicts.c (resolve_sr_conflict, set_conflicts) | |
3287 | (count_rr_conflicts): Adjust. | |
3288 | * src/lalr.c (LArule): Remove. | |
3289 | (add_lookback_edge): Adjust. | |
3290 | (state_lookaheads_count): New. | |
3291 | (states_lookaheads_initialize): Merge into... | |
3292 | (initialize_LA): this. | |
3293 | (lalr_free): Adjust. | |
3294 | * src/main.c (main): Don't free nullable and derives too early: it | |
3295 | is used by --verbose. | |
3296 | * src/print.c, src/print_graph.c, src/tables.c: Adjust. | |
3297 | ||
bb0027a9 AD |
3298 | 2002-08-01 Akim Demaille <akim@epita.fr> |
3299 | ||
3300 | * src/derives.h, src/derives.c (derives): A `rule_t***' instead of | |
3301 | `rule_number_t**'. | |
3302 | (set_derives, free_derives): Rename as... | |
3303 | (derives_compute, derives_free): this. | |
3304 | Adjust all dependencies. | |
3305 | * src/nullable.c (set_nullable, free_nullable): Rename as... | |
3306 | (nullable_compute, nullable_free): these. | |
3307 | (rule_list_t): Store rule_t *, not rule_number_t. | |
3308 | * src/state.c (state_rule_lookaheads_print): Directly compare rule | |
3309 | pointers, instead of their numbers. | |
3310 | * src/main.c (main): Call nullable_free, and derives_free earlier, | |
3311 | as they were lo longer used. | |
3312 | ||
3325ddc4 AD |
3313 | 2002-08-01 Akim Demaille <akim@epita.fr> |
3314 | ||
3315 | * lib/timevar.c (get_time): Include children time. | |
3316 | * src/lalr.h (LA, LArule): Don't export them: used with the | |
3317 | state_t. | |
3318 | * src/lalr.c (LA, LArule): Static. | |
3319 | * src/lalr.h, src/lalr.c (lalr_free): New. | |
3320 | * src/main.c (main): Call it. | |
3321 | * src/tables.c (pack_vector): Check whether loc is >= to the | |
3322 | table_size, not >. | |
3323 | (pack_tables): Don't free froms, tos, conflict_tos, and pos... | |
3324 | (tables_generate): do it, since that's also it which allocates | |
3325 | them. | |
3326 | Don't free LA and LArule, main does. | |
3327 | ||
c6f1a33c AD |
3328 | 2002-07-31 Akim Demaille <akim@epita.fr> |
3329 | ||
3330 | Separate parser tables computation and output. | |
3331 | ||
3332 | * src/output.c (nvectors, base_t, base, base_ninf, conflict_table) | |
3333 | (conflict_list, conflict_list_cnt, table, check, table_ninf) | |
3334 | (yydefgoto, yydefact, high): Move to... | |
3335 | * src/tables.h, src/tables.c: here. | |
3336 | * src/output.c (vector_number_t, VECTOR_NUMBER_MAX) | |
3337 | (VECTOR_NUMBER_MIN, state_number_to_vector_number) | |
3338 | (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN) | |
3339 | (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX) | |
3340 | (ACTION_MIN, actrow, order, nentries, pos, conflrow) | |
3341 | (conflict_list_free, table_size, lowzero, table_grow, conflict_row) | |
3342 | (action_row, save_row, token_actions, save_column, default_goto) | |
3343 | (goto_actions, sort_actions, matching_state, pack_vector) | |
3344 | (table_ninf_remap, pack_table, prepare_actions): Move to... | |
3345 | * src/tables.c: here. | |
3346 | * src/tables.h, src/tables.c(tables_generate, tables_free): New. | |
3347 | * src/output.c (token_actions, output_base, output_conflicts) | |
3348 | (output_check): Merge into... | |
3349 | (prepare_actions): this. | |
3350 | (actions_output): Rename as... | |
3351 | (user_actions_output): this. | |
3352 | * src/main.c (main): Call tables_generate and tables_free. | |
3353 | ||
1509d42f AD |
3354 | 2002-07-31 Akim Demaille <akim@epita.fr> |
3355 | ||
3356 | Steal GCC's --time-report support. | |
3357 | ||
3358 | * lib/timevar.c, lib/timevar.h, lib/timevar.def: New, | |
3359 | stolen/adjusted from GCC. | |
3360 | * m4/stage.m4: Remove time related checks. | |
3361 | * m4/timevar.m4: New. | |
3362 | * configure.in: Adjust. | |
3363 | * src/system.h: Adjust to using timevar.h. | |
3364 | * src/getargs.h, src/getargs.c: Support trace_time for | |
3365 | --trace=time. | |
3366 | * src/main.c (stage): Remove. | |
3367 | (main): Replace `stage' invocations with timevar calls. | |
3368 | * src/output.c: Insert pertinent timevar calls. | |
3369 | ||
273a74fa AD |
3370 | 2002-07-31 Akim Demaille <akim@epita.fr> |
3371 | ||
3372 | Let --trace have arguments. | |
3373 | ||
3374 | * src/getargs.h (enum trace_e): New. | |
3375 | * src/getargs.c (trace_args, trace_types, trace_argmatch): New. | |
3376 | (long_options, short_options): --trace/-T takes an optional | |
3377 | argument. | |
3378 | Change all the uses of trace_flag to reflect the new flags. | |
3379 | * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets. | |
3380 | ||
3381 | Strengthen `stage' portability. | |
3382 | ||
3383 | * m4/stage.m4 (BISON_PREREQ_STAGE): New. | |
3384 | * configure.in: Use it. | |
3385 | Don't check for malloc.h and sys/times.h. | |
3386 | * src/system.h: Include them when appropriate. | |
3387 | * src/main.c (stage): Compile only when mallinfo, struct mallinfo, | |
3388 | times and struct tms are available. | |
3389 | ||
217598da AD |
3390 | 2002-07-30 Akim Demaille <akim@epita.fr> |
3391 | ||
3392 | In verbose parse error message, don't report `error' as an | |
3393 | expected token. | |
3394 | * tests/actions.at (Printers and Destructors): Adjust. | |
3395 | * tests/calc.at (Calculator $1): Adjust. | |
3396 | * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose | |
3397 | error message, do not report the parser accepts the error token in | |
3398 | that state. | |
3399 | ||
52489d44 AD |
3400 | 2002-07-30 Akim Demaille <akim@epita.fr> |
3401 | ||
3402 | Normalize conflict related messages. | |
3403 | ||
3404 | * src/complain.h, src/complain.c (warn, complain): New. | |
3405 | * src/conflicts.c (conflicts_print): Use them. | |
3406 | (conflict_report_yacc): New, extracted from... | |
3407 | (conflicts_print): here. | |
3408 | * tests/conflicts.at, tests/existing.at: Adjust. | |
3409 | ||
e8832397 AD |
3410 | 2002-07-30 Akim Demaille <akim@epita.fr> |
3411 | ||
3412 | Report rules which are never reduced by the parser: those hidden | |
3413 | by conflicts. | |
3414 | ||
3415 | * src/LR0.c (save_reductions): Don't make the final state too | |
3416 | different: save its reduction (accept) instead of having a state | |
3417 | without any action (no shift or goto, no reduce). | |
3418 | Note: the final state is now a ``regular'' state, i.e., the | |
3419 | parsers now contain `reduce 0' as default reduction. | |
3420 | Nevertheless, since they decide to `accept' when yystate = | |
3421 | final_state, they still will not reduce rule 0. | |
3422 | * src/print.c (print_actions, print_reduction): Adjust. | |
3423 | * src/output.c (action_row): Track reduced rules. | |
3424 | (token_actions): Report rules never reduced. | |
3425 | * tests/conflicts.at, tests/regression.at: Adjust. | |
3426 | ||
caf23d24 AD |
3427 | 2002-07-30 Akim Demaille <akim@epita.fr> |
3428 | ||
3429 | `stage' was accidently included in a previous patch. | |
3430 | Initiate its autoconfiscation. | |
3431 | ||
3432 | * configure.in: Look for malloc.h and sys/times.h. | |
3433 | * src/main.c (stage): Adjust. | |
3434 | Report only when trace_flag. | |
3435 | ||
640748ee AD |
3436 | 2002-07-29 Akim Demaille <akim@epita.fr> |
3437 | ||
3438 | * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not | |
3439 | state_number_t. | |
3440 | (errs_t): symbol_t*, not symbol_number_t. | |
3441 | (reductions_t): rule_t*, not rule_number_t. | |
3442 | (FOR_EACH_SHIFT): New. | |
3443 | * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c | |
3444 | * src/print.c, src/print_graph.c: Adjust. | |
3445 | ||
88bce5a2 AD |
3446 | 2002-07-29 Akim Demaille <akim@epita.fr> |
3447 | ||
3448 | Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $. | |
3449 | ||
3450 | * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as... | |
3451 | (endtoken, accept): these. | |
3452 | * src/reader.c (reader): Set endtoken's default tag to "$end". | |
3453 | Set undeftoken's tag to "$undefined" instead of "$undefined.". | |
3454 | * doc/bison.texinfo (Table of Symbols): Mention $accept and $end. | |
3455 | Adjust. | |
3456 | ||
1bfb97db AD |
3457 | 2002-07-29 Akim Demaille <akim@epita.fr> |
3458 | ||
3459 | * src/reduce.c (reduce_grammar): When the language is empty, | |
3460 | complain about the start symbol, not the axiom. | |
3461 | Use its location. | |
3462 | * tests/reduce.at (Empty Language): New. | |
3463 | ||
fc5734fe AD |
3464 | 2002-07-26 Akim Demaille <akim@epita.fr> |
3465 | ||
3466 | * src/reader.h, src/reader.c (gram_error): ... can't get | |
3467 | yycontrol without making too strong assumptions on the parser | |
3468 | itself. | |
3469 | * src/output.c (prepare_tokens): Use the real 0th value of | |
3470 | token_translations instead of `0'. | |
3471 | * src/parse-gram.y (yyerror): Don't rely on yycontrol being | |
3472 | visible here. | |
3473 | * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc | |
3474 | for the time being: %locations ought to provide it to yyerror. | |
3475 | ||
3650b4b8 AD |
3476 | 2002-07-25 Akim Demaille <akim@epita.fr> |
3477 | ||
3478 | * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1. | |
3479 | * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./. | |
3480 | * tests/regression.at (Web2c Actions): Adjust. | |
3481 | ||
4b3d3a8e AD |
3482 | 2002-07-25 Akim Demaille <akim@epita.fr> |
3483 | ||
3484 | Stop storing rules from 1 to nrules + 1. | |
3485 | ||
3486 | * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c | |
3487 | * src/nullable.c, src/output.c, src/print.c, src/reader.c | |
3488 | * src/reduce.c: Allocate and free from &rules[0], not &rules[1]. | |
3489 | Iterate from 0 to nrules. | |
3490 | Use rule_number_as_item_number and item_number_as_rule_number. | |
3491 | Adjust to `derive' now containing possibly 0. | |
3492 | * src/gram.h (rule_number_as_item_number, item_number_as_rule_number): | |
3493 | Handle the `- 1' part in rule numbers from/to item numbers. | |
3494 | * src/conflicts.c (log_resolution): Fix the message which reversed | |
3495 | shift and reduce. | |
3496 | * src/output.c (action_row): Initialize default_rule to -1. | |
3497 | (token_actions): Adjust. | |
3498 | * tests/sets.at (Nullable, Firsts): Fix the previously bogus | |
3499 | expected output. | |
3500 | * tests/conflicts.at (Resolved SR Conflicts): Likewise. | |
3501 | ||
4a2a22f4 AD |
3502 | 2002-07-25 Akim Demaille <akim@epita.fr> |
3503 | ||
3504 | * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg) | |
3505 | (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls) | |
3506 | (b4_c_knr_arg_decl): New. | |
3507 | * data/yacc.c: Use it to define yysymprint, yydestruct, and | |
3508 | yyreport_parse_error. | |
3509 | ||
b8df3223 AD |
3510 | 2002-07-25 Akim Demaille <akim@epita.fr> |
3511 | ||
3512 | * data/yacc.c (yyreport_parse_error): New, extracted from... | |
3513 | (yyparse): here. | |
3514 | (yydestruct, yysymprint): Move above yyparse. | |
3515 | Be K&R compliant. | |
3516 | ||
a762e609 AD |
3517 | 2002-07-25 Akim Demaille <akim@epita.fr> |
3518 | ||
3519 | * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New, | |
3520 | replace... | |
3521 | (b4_sint_type, b4_uint_type): these. | |
3522 | * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for. | |
3523 | * tests/regression.at (Web2c Actions): Adjust. | |
3524 | ||
12b0043a AD |
3525 | 2002-07-25 Akim Demaille <akim@epita.fr> |
3526 | ||
3527 | * src/gram.h (TIEM_NUMBER_MAX): New. | |
3528 | (item_number_of_rule_number, rule_number_of_item_number): Rename | |
3529 | as... | |
3530 | (rule_number_as_item_number, item_number_as_rule_number): these. | |
3531 | Adjust dependencies. | |
3532 | * src/output.c (vector_number_t, VECTOR_NUMBER_MAX) | |
3533 | (VECTOR_NUMBER_MIN, state_number_to_vector_number) | |
3534 | (symbol_number_to_vector_number): New. | |
3535 | (order): Of vector_number_t* type. | |
3536 | (base_t, BASE_MAX, BASE_MIN): New. | |
3537 | (froms, tos, width, pos, check): Of base_t type. | |
3538 | (action_number_t, ACTION_MIN, ACTION_MAX): New. | |
3539 | (actrow): Of action_number_t type. | |
3540 | (conflrow): Of unsigned int type. | |
3541 | (table_ninf, base_ninf): New. | |
3542 | (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value. | |
3543 | (muscle_insert_int_table, muscle_insert_base_table) | |
3544 | (muscle_insert_rule_number_table): New. | |
3545 | (prepare_tokens): Output `toknum' as int_table. | |
3546 | (action_row): Returns a rule_number_t. | |
3547 | Use ACTION_MIN, not SHRT_MIN. | |
3548 | (token_actions): yydefact is rule_number_t*. | |
3549 | (table_ninf_remap): New. | |
3550 | (pack_table): Use it for `base' and `table'. | |
3551 | * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove, | |
3552 | replaced with... | |
3553 | (YYPACT_NINF, YYTABLE_NINF): these. | |
3554 | (yypact, yytable): Compute their types instead of hard-coded | |
3555 | `short'. | |
3556 | * tests/regression.at (Web2c Actions): Adjust. | |
3557 | ||
5dde258a AD |
3558 | 2002-07-19 Akim Demaille <akim@epita.fr> |
3559 | ||
3560 | * src/scan-gram.l (id): Can start with an underscore. | |
3561 | ||
a945ec39 AD |
3562 | 2002-07-16 Akim Demaille <akim@epita.fr> |
3563 | ||
3564 | * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New. | |
3565 | Adjust all former `associativity' dependencies. | |
3566 | * src/symtab.c (symbol_new): Default associativity is `undef', not | |
3567 | `right'. | |
3568 | (symbol_check_alias_consistence): Adjust. | |
3569 | ||
fae437e8 AD |
3570 | 2002-07-09 Akim Demaille <akim@epita.fr> |
3571 | ||
3572 | * doc/bison.texinfo: Properly set the ``header'' part. | |
3573 | Use @dircategory ``GNU programming tools'' as per Texinfo's | |
3574 | documentation. | |
3575 | Use @copying. | |
3576 | ||
1a715ef2 AD |
3577 | 2002-07-09 Akim Demaille <akim@epita.fr> |
3578 | ||
3579 | * lib/quotearg.h: Protect against multiple inclusions. | |
3580 | * src/location.h (location_t): Add a `file' member. | |
3581 | (LOCATION_RESET, LOCATION_PRINT): Adjust. | |
3582 | * src/complain.c (warn_at, complain_at, fatal_at): Drop | |
3583 | `error_one_per_line' support. | |
3584 | ||
a5d50994 AD |
3585 | 2002-07-09 Akim Demaille <akim@epita.fr> |
3586 | ||
3587 | * src/complain.h, src/complain.c (warn, complain): Remove, unused. | |
3588 | * src/reader.c (lineno): Remove. | |
3589 | Adjust all dependencies. | |
3590 | (get_merge_function): Take a location and use complain_at. | |
3591 | * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise. | |
3592 | * tests/regression.at (Invalid inputs, Mixing %token styles): | |
3593 | Adjust. | |
3594 | ||
b275314e AD |
3595 | 2002-07-09 Akim Demaille <akim@epita.fr> |
3596 | ||
3597 | * src/parse-gram.y (rules_or_grammar_declaration): Add an error | |
3598 | recovery rule, and forbid extensions when --yacc. | |
3599 | (gram_error): Use complain_at. | |
3600 | * src/reader.c (reader): Exit if there were parse errors. | |
3601 | ||
865b9df1 AD |
3602 | 2002-07-09 Akim Demaille <akim@epita.fr> |
3603 | ||
3604 | * tests/synclines.at (AT_SYNCLINES_COMPILE): New. | |
3605 | (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs. | |
3606 | Reported by R Blake <blakers@mac.com>. | |
3607 | ||
c76e14da AD |
3608 | 2002-07-09 Akim Demaille <akim@epita.fr> |
3609 | ||
3610 | * data/yacc.c: Output the copyright notive in the header. | |
3611 | ||
7db2ed2d AD |
3612 | 2002-07-03 Akim Demaille <akim@epita.fr> |
3613 | ||
3614 | * src/output.c (froms, tos): Are state_number_t. | |
3615 | (save_column): sp, sp1, and sp2 are state_number_t. | |
3616 | (prepare): Rename `final' as `final_state_number', `nnts' as | |
3617 | `nterms_number', `nrules' as `rules_number', `nstates' as | |
3618 | `states_number', and `ntokens' as `tokens_number'. Remove `nsym', | |
3619 | unused. | |
3620 | * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust. | |
3621 | * data/lalr1.cc (nsym_): Remove, unused. | |
3622 | ||
e68e0410 AD |
3623 | 2002-07-03 Akim Demaille <akim@epita.fr> |
3624 | ||
3625 | * src/lalr.h, src/lalr.c (goto_number_t): New. | |
3626 | * src/lalr.c (goto_list_t): New. | |
3627 | Propagate them. | |
3628 | * src/nullable.c (rule_list_t): New. | |
3629 | Propagate. | |
3630 | * src/types.h: Remove. | |
3631 | ||
e1a4f3a4 AD |
3632 | 2002-07-03 Akim Demaille <akim@epita.fr> |
3633 | ||
3634 | * src/closure.c (print_fderives): Use rule_rhs_print. | |
3635 | * src/derives.c (print_derives): Use rule_rhs_print. | |
3636 | (rule_list_t): New, replaces `shorts'. | |
3637 | (set_derives): Add comments. | |
3638 | * tests/sets.at (Nullable, Firsts): Adjust. | |
3639 | ||
536545f3 AD |
3640 | 2002-07-03 Akim Demaille <akim@epita.fr> |
3641 | ||
3642 | * src/output.c (prepare_actions): Free `tally' and `width'. | |
3643 | (prepare_actions): Allocate and free `order'. | |
3644 | * src/symtab.c (symbols_free): Free `symbols'. | |
3645 | * src/scan-gram.l (scanner_free): Clear Flex's scanners memory. | |
3646 | * src/output.c (m4_invoke): Move to... | |
3647 | * src/scan-skel.l: here. | |
3648 | (<<EOF>>): Close yyout, and free its name. | |
3649 | ||
8b752b00 AD |
3650 | 2002-07-03 Akim Demaille <akim@epita.fr> |
3651 | ||
3652 | Fix some memory leaks, and fix a bug: state 0 was examined twice. | |
3653 | ||
3654 | * src/LR0.c (new_state): Merge into... | |
3655 | (state_list_append): this. | |
3656 | (new_states): Merge into... | |
3657 | (generate_states): here. | |
3658 | (set_states): Don't ensure a proper `errs' state member here, do it... | |
3659 | * src/conflicts.c (conflicts_solve): here. | |
3660 | * src/state.h, src/state.c: Comment changes. | |
3661 | (state_t): Rename member `shifts' as `transitions'. | |
3662 | Adjust all dependencies. | |
3663 | (errs_new): For consistency, also take the values as argument. | |
3664 | (errs_dup): Remove. | |
3665 | (state_errs_set): New. | |
3666 | (state_reductions_set, state_transitions_set): Assert that no | |
3667 | previous value was assigned. | |
3668 | (state_free): New. | |
3669 | (states_free): Use it. | |
3670 | * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as | |
3671 | temporary storage: use `errs' and `nerrs' as elsewhere. | |
3672 | (set_conflicts): Allocate and free this `errs'. | |
3673 | ||
613f5e1a AD |
3674 | 2002-07-02 Akim Demaille <akim@epita.fr> |
3675 | ||
3676 | * lib/libiberty.h: New. | |
3677 | * lib: Update the bitset implementation from upstream. | |
3678 | * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c, | |
3679 | * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE. | |
3680 | * src/main.c: Adjust bitset stats calls. | |
3681 | ||
26e0cadc PE |
3682 | 2002-07-01 Paul Eggert <eggert@twinsun.com> |
3683 | ||
3684 | * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned | |
3685 | char, so that negative chars don't collide with $. | |
3686 | ||
1154cced AD |
3687 | 2002-06-30 Akim Demaille <akim@epita.fr> |
3688 | ||
3689 | Have the GLR tests be `warning' checked, and fix the warnings. | |
3690 | ||
3691 | * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG | |
3692 | (yyuserAction, yyreportAmbiguity): `Use' all the arguments. | |
3693 | (yyremoveDeletes): `yyi' and `yyj' are size_t. | |
3694 | Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies. | |
3695 | (yyaddDeferredAction): static. | |
3696 | (yyglrReduce): yyi, yyk, amd yyposn are size_t. | |
3697 | (yyreportParseError): yyprefix is const. | |
3698 | yytokenp is used only when verbose. | |
3699 | (yy__GNUC__): Replace with __GNUC__. | |
3700 | (yypdumpstack): yyi is size_t. | |
3701 | (yypreference): Un-yy local variables and arguments, to avoid | |
3702 | clashes with `yyr1'. Anyway, we are not in the user name space. | |
3703 | (yytname_size): be an int, as is compared with ints. | |
3704 | * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New. | |
3705 | Use them. | |
3706 | * tests/cxx-gram.at: Use quotation to protect $1. | |
3707 | Use AT_COMPILE to enable warnings hunts. | |
3708 | Prototype yylex and yyerror. | |
3709 | `Use' argc. | |
3710 | Include `string.h', not `strings.h'. | |
3711 | Produce and prototype stmtMerge only when used. | |
3712 | yylex takes a location. | |
3713 | ||
97650f4e AD |
3714 | 2002-06-30 Akim Demaille <akim@epita.fr> |
3715 | ||
3716 | We spend a lot of time in quotearg, in particular when --verbose. | |
3717 | ||
3718 | * src/symtab.c (symbol_get): Store a quoted version of the key. | |
3719 | (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove. | |
3720 | Adjust all callers. | |
3721 | ||
d2576365 AD |
3722 | 2002-06-30 Akim Demaille <akim@epita.fr> |
3723 | ||
3724 | * src/state.h (reductions_t): Rename member `nreds' as num. | |
3725 | (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'. | |
3726 | * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types. | |
3727 | ||
ccaf65bc AD |
3728 | 2002-06-30 Akim Demaille <akim@epita.fr> |
3729 | ||
3730 | * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT) | |
3731 | (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED) | |
3732 | (shifts_to): Rename as... | |
3733 | (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION) | |
3734 | (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE) | |
3735 | (TRANSITION_IS_DISABLED, transitions_to): these. | |
3736 | ||
87675353 AD |
3737 | 2002-06-30 Akim Demaille <akim@epita.fr> |
3738 | ||
3739 | * src/print.c (print_shifts, print_gotos): Merge into... | |
3740 | (print_transitions): this. | |
3741 | (print_transitions, print_errs, print_reductions): Align the | |
3742 | lookaheads columns. | |
3743 | (print_core, print_transitions, print_errs, print_state, | |
3744 | print_grammar): Output empty lines separator before, not after. | |
3745 | (state_default_rule_compute): Rename as... | |
3746 | (state_default_rule): this. | |
3747 | * tests/conflicts.at (Defaulted Conflicted Reduction), | |
3748 | (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust. | |
3749 | * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust. | |
3750 | ||
ce4ccb4b AD |
3751 | 2002-06-30 Akim Demaille <akim@epita.fr> |
3752 | ||
3753 | Display items as we display rules. | |
3754 | ||
3755 | * src/gram.h, src/gram.c (rule_lhs_print): New. | |
3756 | * src/gram.c (grammar_rules_partial_print): Use it. | |
3757 | * src/print.c (print_core): Likewise. | |
3758 | * tests/conflicts.at (Defaulted Conflicted Reduction), | |
3759 | (Unresolved SR Conflicts): Adjust. | |
3760 | (Unresolved SR Conflicts): Adjust and rename as... | |
3761 | (Resolved SR Conflicts): this, as was meant. | |
3762 | * tests/regression.at (Web2c Report): Adjust. | |
3763 | ||
bc933ef1 AD |
3764 | 2002-06-30 Akim Demaille <akim@epita.fr> |
3765 | ||
3766 | * src/print.c (state_default_rule_compute): New, extracted from... | |
3767 | (print_reductions): here. | |
3768 | Pessimize, but clarify the code. | |
3769 | * tests/conflicts.at (Defaulted Conflicted Reduction): New. | |
3770 | ||
53d4308d AD |
3771 | 2002-06-30 Akim Demaille <akim@epita.fr> |
3772 | ||
3773 | * src/output.c (action_row): Let default_rule be always a rule | |
3774 | number. | |
3775 | ||
574fb2d5 AD |
3776 | 2002-06-30 Akim Demaille <akim@epita.fr> |
3777 | ||
3778 | * src/closure.c (print_firsts, print_fderives, closure): | |
3779 | Use BITSET_EXECUTE. | |
3780 | * src/lalr.c (lookaheads_print): Likewise. | |
3781 | * src/state.c (state_rule_lookaheads_print): Likewise. | |
3782 | * src/print_graph.c (print_core): Likewise. | |
3783 | * src/print.c (print_reductions): Likewise. | |
3784 | * src/output.c (action_row): Likewise. | |
3785 | Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL. | |
3786 | ||
05811fd7 AD |
3787 | 2002-06-30 Akim Demaille <akim@epita.fr> |
3788 | ||
3789 | * src/print_graph.c: Use report_flag. | |
3790 | ||
0e4d5753 AD |
3791 | 2002-06-30 Akim Demaille <akim@epita.fr> |
3792 | ||
3793 | * src/lalr.c (traverse, digraph, matrix_print, transpose): Move | |
3794 | to... | |
3795 | * src/relation.h, src/relation.c (traverse, relation_digraph) | |
3796 | (relation_print, relation_transpose): New. | |
3797 | ||
24c7d800 AD |
3798 | 2002-06-30 Akim Demaille <akim@epita.fr> |
3799 | ||
3800 | * src/state.h, src/state.c (shifts_to): New. | |
3801 | * src/lalr.c (build_relations): Use it. | |
3802 | ||
9222837b AD |
3803 | 2002-06-30 Akim Demaille <akim@epita.fr> |
3804 | ||
3805 | * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number) | |
3806 | (item_number_of_rule_number, rule_number_of_item_number): New. | |
3807 | * src/LR0.c, src/closure.c, src/derives.c, src/derives.h, | |
3808 | * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c, | |
3809 | * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h: | |
3810 | Propagate their use. | |
3811 | Much remains to be done, in particular wrt `shorts' from types.h. | |
3812 | ||
260008e5 AD |
3813 | 2002-06-30 Akim Demaille <akim@epita.fr> |
3814 | ||
3815 | * src/symtab.c (symbol_new): Initialize the `printer' member. | |
3816 | ||
8a731ca8 AD |
3817 | 2002-06-30 Akim Demaille <akim@epita.fr> |
3818 | ||
3819 | * src/LR0.c (save_reductions): Remove, replaced by... | |
3820 | * src/state.h, src/state.c (state_reductions_set): New. | |
3821 | (reductions, errs): Rename as... | |
3822 | (reductions_t, errs_t): these. | |
3823 | Adjust all dependencies. | |
3824 | ||
32e1e0a4 AD |
3825 | 2002-06-30 Akim Demaille <akim@epita.fr> |
3826 | ||
3827 | * src/LR0.c (state_list_t, state_list_append): New. | |
3828 | (first_state, last_state): Now symbol_list_t. | |
3829 | (this_state): Remove. | |
3830 | (new_itemsets, append_states, save_reductions): Take a state_t as | |
3831 | argument. | |
3832 | (set_states, generate_states): Adjust. | |
3833 | (save_shifts): Remove, replaced by... | |
3834 | * src/state.h, src/state.c (state_shifts_set): New. | |
3835 | (shifts): Rename as... | |
3836 | (shifts_t): this. | |
3837 | Adjust all dependencies. | |
3838 | * src/state.h (state_t): Remove the `next' member. | |
3839 | ||
e5fb6710 AD |
3840 | 2002-06-30 Akim Demaille <akim@epita.fr> |
3841 | ||
3842 | * src/vcg.c (quote): Use slot 2, since we often pass symbol tag | |
3843 | escaped in slot 0. | |
3844 | ||
c7ca99d4 AD |
3845 | 2002-06-30 Akim Demaille <akim@epita.fr> |
3846 | ||
3847 | Use hash.h for the state hash table. | |
3848 | ||
3849 | * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove. | |
3850 | (allocate_storage): Use state_hash_new. | |
3851 | (free_storage): Use state_hash_free. | |
3852 | (new_state, get_state): Adjust. | |
3853 | * src/lalr.h, src/lalr.c (states): Move to... | |
3854 | * src/states.h (state_t): Remove the `link' member, no longer | |
3855 | used. | |
3856 | * src/states.h, src/states.c: here. | |
3857 | (state_hash_new, state_hash_free, state_hash_lookup) | |
3858 | (state_hash_insert, states_free): New. | |
3859 | * src/states.c (state_table, state_compare, state_hash): New. | |
3860 | * src/output.c (output_actions): Do not free states now, since we | |
3861 | still need to know the final_state number in `prepare', called | |
3862 | afterwards. Do it... | |
3863 | * src/main.c (main): here: call states_free after `output'. | |
3864 | ||
df0e7316 AD |
3865 | 2002-06-30 Akim Demaille <akim@epita.fr> |
3866 | ||
3867 | * src/state.h, src/state.c (state_new): New, extracted from... | |
3868 | * src/LR0.c (new_state): here. | |
3869 | * src/state.h (STATE_ALLOC): Move to... | |
3870 | * src/state.c: here. | |
3871 | * src/LR0.h, src/LR0.c (nstates, final_state): Move to... | |
3872 | * src/state.h, src/state.c: here. | |
3873 | ||
39f41916 AD |
3874 | 2002-06-30 Akim Demaille <akim@epita.fr> |
3875 | ||
3876 | * src/reader.c (gensym): Rename as... | |
3877 | * src/symtab.h, src/symtab.c (dummy_symbol_get): this. | |
3878 | (getsym): Rename as... | |
3879 | (symbol_get): this. | |
3880 | ||
d57650a5 AD |
3881 | 2002-06-30 Akim Demaille <akim@epita.fr> |
3882 | ||
3883 | * src/state.h (state_number_t, STATE_NUMBER_MAX): New. | |
3884 | * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h, | |
3885 | * src/output.c, src/print.c, src/print_graph.c: Propagate. | |
3886 | * src/LR0.h, src/LR0.h (final_state): Is a state_t*. | |
3887 | ||
5a08f1ce AD |
3888 | 2002-06-30 Akim Demaille <akim@epita.fr> |
3889 | ||
3890 | Make the test suite pass with warnings checked. | |
3891 | ||
3892 | * tests/actions.at (Printers and Destructors): Improve. | |
3893 | Avoid unsigned vs. signed issues. | |
3894 | * tests/calc.at: Don't exercise the scanner here, do it... | |
3895 | * tests/input.at (Torturing the Scanner): here. | |
3896 | ||
720623af PH |
3897 | 2002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU> |
3898 | ||
88e7e941 | 3899 | * data/glr.c: Correct typo in Emacs-mode directive. Slightly |
720623af PH |
3900 | reorganize first lines parallel to yacc.c. |
3901 | ||
fb8135fa AD |
3902 | 2002-06-28 Akim Demaille <akim@epita.fr> |
3903 | ||
3904 | * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define) | |
3905 | (b4_token_enum, b4_token_defines): New, factored from... | |
3906 | * data/lalr1.cc, data/yacc.c, glr.c: here. | |
3907 | ||
41442480 AD |
3908 | 2002-06-28 Akim Demaille <akim@epita.fr> |
3909 | ||
3910 | * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for | |
3911 | unused variables. | |
3912 | * src/output.c (merger_output): static. | |
3913 | ||
e0e5bf84 AD |
3914 | 2002-06-28 Akim Demaille <akim@epita.fr> |
3915 | ||
3916 | * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../. | |
3917 | * src/conflicts.c (conflicts_total_count): `i' is unsigned, to | |
3918 | pacify GCC. | |
3919 | * src/output.c (save_row): Initialize all the variables to pacify GCC. | |
e0e5bf84 | 3920 | |
676385e2 PH |
3921 | 2002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU> |
3922 | ||
3923 | Accumulated changelog for new GLR parsing features. | |
3924 | ||
6a254321 | 3925 | * src/conflicts.c (count_total_conflicts): Change name to |
676385e2 PH |
3926 | conflicts_total_count. |
3927 | * src/conflicts.h: Ditto. | |
3928 | * src/output.c (token_actions): Use the new name. | |
3929 | (output_conflicts): Change conflp => conflict_list_heads, and | |
3930 | confl => conflict_list for better readability. | |
3931 | * data/glr.c: Use the new names. | |
3932 | * NEWS: Add self to GLR announcement. | |
e0e5bf84 | 3933 | |
676385e2 PH |
3934 | * src/reader.c (free_merger_functions): Cleanup: XFREE->free. |
3935 | ||
3936 | * doc/bison.texinfo (GLR Parsers): Make corrections suggested by | |
3937 | Akim Demaille. | |
3938 | ||
3939 | * data/bison.glr: Change name to glr.c | |
3940 | * data/glr.c: Renamed from bison.glr. | |
3941 | * data/Makefile.am: Add glr.c | |
e0e5bf84 AD |
3942 | |
3943 | * src/getargs.c: | |
3944 | ||
676385e2 PH |
3945 | * src/symlist.h: Add dprec and merger fields to symbol_list_s. |
3946 | * src/symlist.c (symbol_list_new): Initialize dprec and merger fields. | |
e0e5bf84 | 3947 | |
676385e2 PH |
3948 | Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU> |
3949 | ||
3950 | * data/bison.glr: Be sure to restore the | |
3951 | current #line when returning to the skeleton contents after having | |
3952 | exposed the input file's #line. | |
3953 | ||
3954 | Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU> | |
3955 | ||
3956 | * data/bison.glr: Bring up to date with changes to bison.simple. | |
3957 | ||
3958 | Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU> | |
3959 | ||
3960 | * data/bison.glr: Correct definitions that use b4_prefix. | |
3961 | Various reformatting. | |
3962 | (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack. | |
3963 | (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove | |
3964 | yytokenp argument; now part of stack. | |
3965 | (yychar): Define to behave as documented. | |
3966 | (yyclearin): Ditto. | |
e0e5bf84 | 3967 | |
676385e2 PH |
3968 | Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU> |
3969 | ||
3970 | * src/reader.h: Add declaration for free_merger_functions. | |
3971 | ||
3972 | * src/reader.c (merge_functions): New variable. | |
3973 | (get_merge_function): New function. | |
3974 | (free_merger_functions): New function. | |
3975 | (readgram): Check for %prec that is not followed by a symbol. | |
3976 | Handle %dprec and %merge declarations. | |
3977 | (packgram): Initialize dprec and merger fields in rules array. | |
3978 | ||
3979 | * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list, | |
3980 | conflict_list_cnt, conflict_list_free): New variables. | |
3981 | (table_grow): Also grow conflict_table. | |
e0e5bf84 | 3982 | (prepare_rules): Output dprec and merger tables. |
676385e2 | 3983 | (conflict_row): New function. |
e0e5bf84 | 3984 | (action_row): Output conflict lists for GLR parser. Don't use |
676385e2 PH |
3985 | default reduction in conflicted states for GLR parser so that there |
3986 | are spaces for the conflict lists. | |
3987 | (save_row): Also save conflict information. | |
3988 | (token_actions): Allocate conflict list. | |
3989 | (merger_output): New function. | |
3990 | (pack_vector): Pack conflict table, too. | |
3991 | (output_conflicts): New function to output yyconflp and yyconfl. | |
3992 | (output_check): Allocate conflict_tos. | |
3993 | (output_actions): Output conflict tables, also. | |
3994 | (output_skeleton): Output b4_mergers definition. | |
3995 | (prepare): Output b4_max_rhs_length definition. | |
3996 | Use 'bison.glr' as default skeleton for GLR parsers. | |
3997 | ||
3998 | * src/gram.c (glr_parser): New flag. | |
3999 | (grammar_free): Call free_merger_functions. | |
4000 | ||
4001 | * src/conflicts.c (count_rr_conflicts): Augment to optionally count | |
4002 | all pairs of conflicting reductions, rather than just all tokens | |
4003 | causing conflicts. Needed to size conflict tables. | |
e0e5bf84 | 4004 | (conflicts_output): Modify call to count_rr_conflicts for new |
676385e2 PH |
4005 | interface. |
4006 | (conflicts_print): Ditto. | |
4007 | (count_total_conflicts): New function. | |
4008 | ||
4009 | * src/reader.h (merger_list): New type. | |
4010 | (merge_functions): New variable. | |
4011 | ||
4012 | * src/lex.h (tok_dprec, tok_merge): New token types. | |
4013 | ||
4014 | * src/gram.h (rule_s): Add dprec and merger fields. | |
4015 | (glr_parser): New flag. | |
4016 | ||
4017 | * src/conflicts.h (count_total_conflicts): New function. | |
4018 | ||
4019 | * src/options.c (option_table): Add %dprec, %merge, and %glr-parser. | |
4020 | ||
4021 | * doc/bison.texinfo (Generalized LR Parsing): New section. | |
4022 | (GLR Parsers): New section. | |
4023 | (Language and Grammar): Mention GLR parsing. | |
4024 | (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR | |
4025 | Correct typo ("tge" -> "the"). | |
4026 | ||
4027 | * data/bison.glr: New skeleton for GLR parsing. | |
4028 | ||
4029 | * tests/cxx-gram.at: New tests for GLR parsing. | |
4030 | ||
4031 | * tests/testsuite.at: Include cxx-gram.at. | |
4032 | ||
4033 | * tests/Makefile.am: Add cxx-gram.at. | |
e0e5bf84 | 4034 | |
676385e2 PH |
4035 | * src/parse-gram.y: |
4036 | ||
4037 | * src/scan-gram.l: Add %dprec, %glr-parser, %merge. | |
4038 | ||
4039 | * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser. | |
e0e5bf84 | 4040 | |
b5480d74 | 4041 | 2002-06-27 Akim Demaille <akim@epita.fr> |
e2aaf4c4 AD |
4042 | |
4043 | * src/options.h, src/options.c: Remove. | |
4044 | * src/getargs.c (short_options, long_options): New. | |
4045 | ||
60491a94 AD |
4046 | 2002-06-27 Akim Demaille <akim@epita.fr> |
4047 | ||
4048 | * data/bison.simple, data/bison.c++: Rename as... | |
4049 | * data/yacc.c, data/lalr1.cc: these. | |
4050 | * doc/bison.texinfo (Environment Variables): Remove. | |
4051 | ||
9be0c25b AD |
4052 | 2002-06-25 Raja R Harinath <harinath@cs.umn.edu> |
4053 | ||
4054 | * src/getargs.c (report_argmatch): Initialize strtok(). | |
4055 | ||
1ae72863 AD |
4056 | 2002-06-20 Akim Demaille <akim@epita.fr> |
4057 | ||
4058 | * data/bison.simple (b4_symbol_actions): New, replaces... | |
4059 | (b4_symbol_destructor, b4_symbol_printer): these. | |
4060 | (yysymprint): Be sure to call YYPRINT only for tokens, and using | |
4061 | user token numbers. | |
4062 | ||
87542d29 AD |
4063 | 2002-06-20 Akim Demaille <akim@epita.fr> |
4064 | ||
4065 | * data/bison.simple (yydestructor): Rename as... | |
4066 | (yydestruct): this. | |
4067 | ||
1a31ed21 AD |
4068 | 2002-06-20 Akim Demaille <akim@epita.fr> |
4069 | ||
4070 | * src/symtab.h, src/symtab.c (symbol_type_set) | |
4071 | (symbol_destructor_set, symbol_precedence_set): The location is | |
4072 | the last argument. | |
4073 | Adjust all callers. | |
4074 | ||
e776192e AD |
4075 | 2002-06-20 Akim Demaille <akim@epita.fr> |
4076 | ||
4077 | * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser | |
4078 | internals. | |
4079 | * src/reader.h, src/reader.c (grammar_current_rule_prec_set): | |
4080 | Takes a location. | |
4081 | * src/symtab.h, src/symtab.c (symbol_class_set) | |
4082 | (symbol_user_token_number_set): Likewise. | |
4083 | Adjust all callers. | |
4084 | Promote complain_at. | |
4085 | * tests/input.at (Type Clashes): Adjust. | |
4086 | ||
5c1180b3 AD |
4087 | 2002-06-20 Akim Demaille <akim@epita.fr> |
4088 | ||
4089 | * data/bison.simple (YYLEX): Fix the declaration when | |
4090 | %pure-parser. | |
4091 | ||
e3170060 AD |
4092 | 2002-06-20 Akim Demaille <akim@epita.fr> |
4093 | ||
4094 | * data/bison.simple (yysymprint): Don't print the token number, | |
4095 | just its name. | |
4096 | * tests/actions.at (Destructors): Rename as... | |
4097 | (Printers and Destructors): this. | |
4098 | Also exercise %printer. | |
4099 | ||
253862fd AD |
4100 | 2002-06-20 Akim Demaille <akim@epita.fr> |
4101 | ||
4102 | * data/bison.simple (YYDSYMPRINT): New. | |
4103 | Use it to remove many of the #if YYDEBUG/if (yydebug). | |
4104 | ||
366eea36 AD |
4105 | 2002-06-20 Akim Demaille <akim@epita.fr> |
4106 | ||
4107 | * src/symtab.h, src/symtab.c (symbol_t): printer and | |
4108 | printer_location are new members. | |
4109 | (symbol_printer_set): New. | |
4110 | * src/parse-gram.y (PERCENT_PRINTER): New token. | |
4111 | Handle its associated rule. | |
4112 | * src/scan-gram.l: Adjust. | |
4113 | (handle_destructor_at, handle_destructor_dollar): Rename as... | |
4114 | (handle_symbol_code_at, handle_symbol_code_dollar): these. | |
4115 | * src/output.c (symbol_printers_output): New. | |
4116 | (output_skeleton): Call it. | |
4117 | * data/bison.simple (yysymprint): New. Cannot be named yyprint | |
4118 | since there are already many grammar files with a user `yyprint'. | |
4119 | Replace the calls to YYPRINT to calls to yysymprint. | |
4120 | * tests/calc.at: Adjust. | |
4121 | * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was | |
4122 | taking advantage of parser very internal details (stack size!). | |
4123 | ||
4f25ebb0 AD |
4124 | 2002-06-20 Akim Demaille <akim@epita.fr> |
4125 | ||
4126 | * src/scan-gram.l: Complete the scanner with the missing patterns | |
4127 | to pacify Flex. | |
4128 | Use `quote' and `symbol_tag_get' where appropriate. | |
4129 | ||
93b68a0e AD |
4130 | 2002-06-19 Akim Demaille <akim@epita.fr> |
4131 | ||
4132 | * tests/actions.at (Destructors): Augment to test locations. | |
4133 | * data/bison.simple (yydestructor): Pass it the current location | |
4134 | if locations are enabled. | |
4135 | Prototype only when __STDC__ or C++. | |
4136 | Change the argument names to move into the yy name space: there is | |
4137 | user code here. | |
4138 | ||
58612f1d AD |
4139 | 2002-06-19 Akim Demaille <akim@epita.fr> |
4140 | ||
74310291 AD |
4141 | * data/bison.simple (b4_pure_if): New. |
4142 | Use it instead of #ifdef YYPURE. | |
4143 | ||
4144 | 2002-06-19 Akim Demaille <akim@epita.fr> | |
4145 | ||
4146 | * data/bison.simple (b4_location_if): New. | |
58612f1d AD |
4147 | Use it instead of #ifdef YYLSP_NEEDED. |
4148 | ||
f25bfb75 AD |
4149 | 2002-06-19 Akim Demaille <akim@epita.fr> |
4150 | ||
4151 | Prepare @$ in %destructor, but currently don't bind it in the | |
4152 | skeleton, as %location use is not cleaned up yet. | |
4153 | ||
4154 | * src/scan-gram.l (handle_dollar, handle_destructor_at) | |
4155 | (handle_action_at): New. | |
4156 | (handle_at, handle_action_dollar, handle_destructor_dollar): Take | |
4157 | a braced_code_t and a location as additional arguments. | |
4158 | (handle_destructor_dollar): Instead of requiring `b4_eval', just | |
4159 | unquote one when outputting `b4_dollar_dollar'. | |
4160 | Adjust callers. | |
4161 | * data/bison.simple (b4_eval): Remove. | |
4162 | (b4_symbol_destructor): Adjust. | |
4163 | * tests/input.at (Invalid @n): Adjust. | |
4164 | ||
c732d2c6 AD |
4165 | 2002-06-19 Zack Weinberg <zack@codesourcery.com> |
4166 | ||
4167 | * doc/bison.texinfo: Document ability to have multiple | |
4168 | prologue sections. | |
4169 | ||
8c165d89 AD |
4170 | 2002-06-18 Akim Demaille <akim@epita.fr> |
4171 | ||
4172 | * src/files.c (compute_base_names): When computing the output file | |
4173 | names from the input file name, strip the directory part. | |
4174 | ||
ca98bf57 AD |
4175 | 2002-06-18 Akim Demaille <akim@epita.fr> |
4176 | ||
4177 | * data/bison.simple.new: Comment changes. | |
4178 | Reported by Andreas Schwab. | |
4179 | ||
0bfb02ff AD |
4180 | 2002-06-18 Matt Kraai <kraai@alumni.cmu.edu> |
4181 | ||
4182 | * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that | |
4183 | there are no `label `yyoverflowlab' defined but not used' warnings | |
4184 | when yyoverflow is defined. | |
4185 | ||
24c0aad7 AD |
4186 | 2002-06-18 Akim Demaille <akim@epita.fr> |
4187 | ||
4188 | * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a | |
4189 | new member. | |
4190 | (symbol_destructor_set): Adjust. | |
4191 | * src/output.c (symbol_destructors_output): Output the destructor | |
4192 | locations. | |
4193 | Output the symbol name. | |
4194 | * data/bison.simple (b4_symbol_destructor): Adjust. | |
4195 | ||
5719c109 AD |
4196 | 2002-06-18 Cris Bailiff <c.bailiff@awayweb.com> |
4197 | and Akim Demaille <akim@epita.fr> | |
4198 | ||
4199 | * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy | |
4200 | what's left on the stack when the error recovery hits EOF. | |
4201 | * tests/actions.at (Destructors): Complete to exercise this case. | |
4202 | ||
9280d3ef AD |
4203 | 2002-06-17 Akim Demaille <akim@epita.fr> |
4204 | ||
4205 | * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of | |
4206 | arguments is really empty, not only equal to `[]'. | |
4207 | * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new | |
4208 | member. | |
4209 | (symbol_destructor_set): New. | |
4210 | * src/output.c (symbol_destructors_output): New. | |
4211 | * src/reader.h (brace_code_t, current_braced_code): New. | |
4212 | * src/scan-gram.l (BRACED_CODE): Use it to branch on... | |
4213 | (handle_dollar): Rename as... | |
4214 | (handle_action_dollar): this. | |
4215 | (handle_destructor_dollar): New. | |
4216 | * src/parse-gram.y (PERCENT_DESTRUCTOR): New. | |
4217 | (grammar_declaration): Use it. | |
4218 | * data/bison.simple (yystos): Is always defined. | |
4219 | (yydestructor): New. | |
4220 | * tests/actions.at (Destructors): New. | |
4221 | * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep. | |
4222 | ||
dafdc66f AD |
4223 | 2002-06-17 Akim Demaille <akim@epita.fr> |
4224 | ||
4225 | * src/symlist.h, src/symlist.c (symbol_list_length): New. | |
4226 | * src/scan-gram.l (handle_dollar, handle_at): Compute the | |
4227 | rule_length only when needed. | |
4228 | * src/output.c (actions_output, token_definitions_output): Output | |
4229 | the full M4 block. | |
4230 | * src/symtab.c: Don't access directly to the symbol tag, use | |
4231 | symbol_tag_get. | |
4232 | * src/parse-gram.y: Use symbol_list_free. | |
4233 | ||
56c47203 AD |
4234 | 2002-06-17 Akim Demaille <akim@epita.fr> |
4235 | ||
4236 | * src/reader.h, src/reader.c (symbol_list, symbol_list_new) | |
4237 | (symbol_list_prepend, get_type_name): Move to... | |
4238 | * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new) | |
4239 | (symbol_list_prepend, symbol_list_n_type_name_get): here. | |
4240 | Adjust all callers. | |
4241 | (symbol_list_free): New. | |
4242 | * src/scan-gram.l (handle_dollar): Takes a location. | |
4243 | * tests/input.at (Invalid $n): Adjust. | |
4244 | ||
1e0bab92 AD |
4245 | 2002-06-17 Akim Demaille <akim@epita.fr> |
4246 | ||
4247 | * src/reader.h, src/reader.c (symbol_list_new): Export it. | |
4248 | (symbol_list_prepend): New. | |
4249 | * src/parse-gram.y (%union): `list' is a new member. | |
4250 | (symbols.1): New, replaces... | |
4251 | (terms_to_prec.1, nterms_to_type.1): these. | |
4252 | * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set) | |
4253 | Take a location as additional argument. | |
4254 | Adjust all callers. | |
4255 | ||
04e60654 AD |
4256 | 2002-06-15 Akim Demaille <akim@epita.fr> |
4257 | ||
4258 | * src/parse-gram.y: Move %token in the declaration section so that | |
4259 | we don't depend upon CVS Bison. | |
4260 | ||
10e5b8bd AD |
4261 | 2002-06-15 Akim Demaille <akim@epita.fr> |
4262 | ||
4263 | * src/state.h, src/state.c (state_rule_lookaheads_print): New. | |
4264 | * src/print.c (print_core): Use it. | |
4265 | ||
9801d40c AD |
4266 | 2002-06-15 Akim Demaille <akim@epita.fr> |
4267 | ||
4268 | * src/conflicts.c (log_resolution): Accept the rule involved in | |
4269 | the sr conflicts instead of the lookahead number that points to | |
4270 | that rule. | |
4271 | (flush_reduce): Accept the current lookahead vector as argument, | |
4272 | instead of the index in LA. | |
4273 | (resolve_sr_conflict): Accept the current number of lookahead | |
4274 | bitset to consider for the STATE, instead of the index in LA. | |
4275 | (set_conflicts): Adjust. | |
4276 | * src/lalr.c, src/lalr.h, src/state.h: Comment changes. | |
4277 | ||
c0263492 AD |
4278 | 2002-06-15 Akim Demaille <akim@epita.fr> |
4279 | ||
4280 | * src/state.h (state_t): Replace the `lookaheadsp' member, a | |
4281 | short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**). | |
4282 | Adjust all dependencies. | |
4283 | * src/lalr.c (initialize_lookaheads): Split into... | |
4284 | (states_lookaheads_count, states_lookaheads_initialize): these. | |
4285 | (lalr): Adjust. | |
4286 | ||
9757c359 AD |
4287 | 2002-06-15 Akim Demaille <akim@epita.fr> |
4288 | ||
4289 | * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved | |
4290 | out of... | |
4291 | (grammar_rules_print): here. | |
4292 | * src/reduce.c (reduce_output): Use it. | |
4293 | * tests/reduce.at (Useless Rules, Reduced Automaton) | |
4294 | (Underivable Rules): Adjust. | |
4295 | ||
6b98e4b5 AD |
4296 | 2002-06-15 Akim Demaille <akim@epita.fr> |
4297 | ||
4298 | Copy BYacc's nice way to report the grammar. | |
4299 | ||
4300 | * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print): | |
4301 | New. | |
4302 | Don't print the rules' location, it is confusing and useless. | |
4303 | (rule_print): Use grammar_rhs_print. | |
4304 | * src/print.c (print_grammar): Use grammar_rules_print. | |
4305 | ||
6b98e4b5 AD |
4306 | 2002-06-15 Akim Demaille <akim@epita.fr> |
4307 | ||
4308 | Complete and rationalize `useless thing' warnings. | |
4309 | ||
4310 | * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n) | |
4311 | (symbol_tag_print): New. | |
4312 | Use them everywhere in place of accessing directly the tag member. | |
4313 | * src/gram.h, src/gram.c (rule_print): New. | |
4314 | Use it where a rule used to be printed `by hand'. | |
4315 | * src/reduce.c (nonterminals_reduce): Report the use nonterminals. | |
4316 | (reduce_grammar_tables): Report the useless rules. | |
4317 | (reduce_print): Useless things are a warning, not an error. | |
4318 | Report it as such. | |
4319 | * tests/reduce.at (Useless Nonterminals, Useless Rules): | |
4320 | (Reduced Automaton, Underivable Rules): Adjust. | |
4321 | * tests/regression.at (Web2c Report, Web2c Report): Adjust. | |
4322 | * tests/conflicts.at (Unresolved SR Conflicts) | |
4323 | (Solved SR Conflicts): Adjust. | |
4324 | ||
ee000ba4 AD |
4325 | 2002-06-15 Akim Demaille <akim@epita.fr> |
4326 | ||
4327 | Let symbols have a location. | |
4328 | ||
4329 | * src/symtab.h, src/symtab.c (symbol_t): Location is a new member. | |
4330 | (getsym): Adjust. | |
4331 | Adjust all callers. | |
4332 | * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at): | |
4333 | Use location_t, not int. | |
4334 | * src/symtab.c (symbol_check_defined): Take advantage of the | |
4335 | location. | |
4336 | * tests/regression.at (Invalid inputs): Adjust. | |
4337 | ||
8efe435c AD |
4338 | 2002-06-15 Akim Demaille <akim@epita.fr> |
4339 | ||
4340 | * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New. | |
4341 | (input): Don't try to initialize yylloc here, do it in the | |
4342 | scanner. | |
4343 | * src/scan-gram.l (YY_USER_INIT): Initialize yylloc. | |
4344 | * src/gram.h (rule_t): Change line and action_line into location | |
4345 | and action_location, of location_t type. | |
4346 | Adjust all dependencies. | |
4347 | * src/location.h, src/location.c (empty_location): New. | |
4348 | * src/reader.h, src/reader.c (grammar_start_symbol_set) | |
4349 | (grammar_symbol_append, grammar_rule_begin, grammar_rule_end) | |
4350 | (grammar_current_rule_symbol_append) | |
4351 | (grammar_current_rule_action_append): Expect a location as argument. | |
4352 | * src/reader.c (grammar_midrule_action): Adjust to attach an | |
4353 | action's location as dummy symbol location. | |
4354 | * src/symtab.h, src/symtab.c (startsymbol_location): New. | |
4355 | * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust | |
4356 | the line numbers. | |
4357 | ||
1921f1d7 AD |
4358 | 2002-06-14 Akim Demaille <akim@epita.fr> |
4359 | ||
4360 | Grammar declarations may be found in the grammar section. | |
4361 | ||
4362 | * src/parse-gram.y (rules_or_grammar_declaration): New. | |
4363 | (declarations): Each declaration may end with a semicolon, not | |
4364 | just... | |
4365 | (grammar_declaration): `"%union"'. | |
4366 | (grammar): Branch to rules_or_grammar_declaration. | |
4367 | ||
4515534c AD |
4368 | 2002-06-14 Akim Demaille <akim@epita.fr> |
4369 | ||
4370 | * src/main.c (main): Invoke scanner_free. | |
4371 | ||
f958596b AD |
4372 | 2002-06-14 Akim Demaille <akim@epita.fr> |
4373 | ||
4374 | * src/output.c (m4_invoke): Extracted from... | |
4375 | (output_skeleton): here. | |
4376 | Free tempfile. | |
4377 | ||
2c569025 AD |
4378 | 2002-06-14 Akim Demaille <akim@epita.fr> |
4379 | ||
4380 | * src/parse-gram.y (directives, directive, gram) | |
4381 | (grammar_directives, precedence_directives, precedence_directive): | |
4382 | Rename as... | |
4383 | (declarations, declaration, grammar, grammar_declaration) | |
4384 | (precedence_declaration, precedence_declarator): these. | |
4385 | (symbol_declaration): New. | |
4386 | ||
592e8d4d AD |
4387 | 2002-06-14 Akim Demaille <akim@epita.fr> |
4388 | ||
4389 | * src/files.c (action_obstack): Remove, unused. | |
4390 | (output_obstack): Remove it, and all its dependencies, as it is no | |
4391 | longer needed. | |
4392 | * src/reader.c (epilogue_set): Build the epilogue in the | |
4393 | muscle_obstack. | |
4394 | * src/output.h, src/output.c (muscle_obstack): Move to... | |
4395 | * src/muscle_tab.h, src/muscle_tab.h: here. | |
4396 | (muscle_init): Initialize muscle_obstack. | |
4397 | (muscle_free): New. | |
4398 | * src/main.c (main): Call it. | |
4399 | ||
0c15323d AD |
4400 | 2002-06-14 Akim Demaille <akim@epita.fr> |
4401 | ||
4402 | * src/location.h: New, extracted from... | |
4403 | * src/reader.h: here. | |
4404 | * src/Makefile.am (noinst_HEADERS): Merge into | |
4405 | (bison_SOURCES): this. | |
4406 | Add location.h. | |
4407 | * src/parse-gram.y: Use location_t instead of Bison's. | |
4408 | * src/reader.h, src/reader.c (prologue_augment, epilogue_set): | |
4409 | Use location_t instead of ints. | |
4410 | ||
e96c9728 AD |
4411 | 2002-06-14 Akim Demaille <akim@epita.fr> |
4412 | ||
4413 | * data/bison.simple, data/bison.c++: Be sure to restore the | |
4414 | current #line when returning to the skeleton contents after having | |
4415 | exposed the input file's #line. | |
4416 | ||
75d1fe16 AD |
4417 | 2002-06-12 Akim Demaille <akim@epita.fr> |
4418 | ||
4419 | * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too | |
4420 | eager. | |
4421 | * tests/actions.at (Exotic Dollars): New. | |
4422 | ||
6c35d22c AD |
4423 | 2002-06-12 Akim Demaille <akim@epita.fr> |
4424 | ||
4425 | * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst | |
4426 | ['"/] too eagerly. | |
4427 | * tests/input.at (Torturing the Scanner): New. | |
4428 | ||
1d6412ad AD |
4429 | 2002-06-11 Akim Demaille <akim@epita.fr> |
4430 | ||
4431 | * src/scan-gram.l (YY_OBS_INIT): Remove, replace with... | |
4432 | [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE] | |
4433 | [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment. | |
4434 | * src/reader.h, src/scan-gram.l (scanner_initialize): this. | |
4435 | * src/reader.c (reader): Use it. | |
4436 | ||
4cdb01db AD |
4437 | 2002-06-11 Akim Demaille <akim@epita.fr> |
4438 | ||
4439 | * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval. | |
4440 | Adjust all callers. | |
4441 | (scanner_last_string_free): New. | |
4442 | ||
44995b2e AD |
4443 | 2002-06-11 Akim Demaille <akim@epita.fr> |
4444 | ||
4445 | * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as... | |
4446 | (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these. | |
4447 | (last_string, YY_OBS_FREE): New. | |
4448 | Use them when returning an ID. | |
4449 | ||
e9955c83 AD |
4450 | 2002-06-11 Akim Demaille <akim@epita.fr> |
4451 | ||
4452 | Have Bison grammars parsed by a Bison grammar. | |
4453 | ||
4454 | * src/reader.c, src/reader.h (prologue_augment): New. | |
4455 | * src/reader.c (copy_definition): Remove. | |
4456 | ||
4457 | * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment) | |
4458 | (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action) | |
4459 | (grammar_current_rule_prec_set, grammar_current_rule_check) | |
4460 | (grammar_current_rule_symbol_append) | |
4461 | (grammar_current_rule_action_append): Export. | |
4462 | * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_ | |
4463 | (symbol_list_action_append): Remove. | |
4464 | Hook the routines from reader. | |
4465 | * src/scan-gram.l: In INITIAL, characters and strings are tokens. | |
4466 | * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now. | |
4467 | ||
4468 | * src/reader.c (read_declarations): Remove, unused. | |
4469 | ||
4470 | * src/parse-gram.y: Handle the epilogue. | |
4471 | * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as... | |
4472 | (grammar_start_symbol_set): this. | |
4473 | * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet. | |
4474 | * src/reader.c (readgram): Remove, unused. | |
4475 | (reader): Adjust to insert eoftoken and axiom where appropriate. | |
4476 | ||
4477 | * src/reader.c (copy_dollar): Replace with... | |
4478 | * src/scan-gram.h (handle_dollar): this. | |
4479 | * src/parse-gram.y: Remove `%thong'. | |
4480 | ||
4481 | * src/reader.c (copy_at): Replace with... | |
4482 | * src/scan-gram.h (handle_at): this. | |
4483 | ||
4484 | * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at): | |
4485 | New. | |
4486 | ||
4487 | * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the | |
4488 | time being. | |
4489 | ||
4490 | * src/reader.h, src/reader.c (grammar_rule_end): New. | |
4491 | ||
4492 | * src/parse.y (current_type, current_class): New. | |
4493 | Implement `%nterm', `%token' support. | |
4494 | Merge `%term' into `%token'. | |
4495 | (string_as_id): New. | |
4496 | * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the | |
4497 | type name. | |
4498 | ||
4499 | * src/parse-gram.y: Be sure to handle properly the beginning of | |
4500 | rules. | |
4501 | ||
4502 | * src/parse-gram.y: Handle %type. | |
4503 | * src/reader.c (grammar_rule_end): Call grammar_current_rule_check. | |
4504 | ||
4505 | * src/parse-gram.y: More directives support. | |
4506 | * src/options.c: No longer handle source directives. | |
4507 | ||
4508 | * src/parse-gram.y: Fix %output. | |
4509 | ||
4510 | * src/parse-gram.y: Handle %union. | |
4511 | Use the prologue locations. | |
4512 | * src/reader.c (parse_union_decl): Remove. | |
4513 | ||
4514 | * src/reader.h, src/reader.c (epilogue_set): New. | |
4515 | * src/parse-gram.y: Use it. | |
4516 | ||
4517 | * data/bison.simple, data/bison.c++: b4_stype is now either not | |
4518 | defined, then default to int, or to the contents of %union, | |
4519 | without `union' itself. | |
4520 | Adjust. | |
4521 | * src/muscle_tab.c (muscle_init): Don't predefine `stype'. | |
4522 | ||
4523 | * src/output.c (actions_output): Don't output braces, as they are | |
4524 | already handled by the scanner. | |
4525 | ||
4526 | * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of | |
4527 | characters to themselves. | |
4528 | ||
4529 | * tests/reduce.at (Reduced Automaton): End the grammars with %% so | |
4530 | that the epilogue has a proper #line. | |
4531 | ||
4532 | * src/parse-gram.y: Handle precedence/associativity. | |
4533 | ||
4534 | * src/symtab.c (symbol_precedence_set): Requires the symbol to be | |
4535 | a terminal. | |
4536 | * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters. | |
4537 | * tests/calc.at: Do not use `%token "foo"' as it makes not sense | |
4538 | at all to define terminals that cannot be emitted. | |
4539 | ||
4540 | * src/scan-gram.l: Escape M4 characters. | |
4541 | ||
4542 | * src/scan-gram.l: Working properly with escapes in user | |
4543 | strings/characters. | |
4544 | ||
4545 | * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR) | |
4546 | (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING' | |
4547 | grammar. | |
4548 | Use more modest sizes, as for the time being the parser does not | |
4549 | release memory, and therefore the process swallows a huge amount | |
4550 | of memory. | |
4551 | ||
4552 | * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the | |
4553 | stricter %token grammar. | |
4554 | ||
4555 | * src/symtab.h (associativity): Add `undef_assoc'. | |
4556 | (symbol_precedence_set): Do nothing when passed an undef_assoc. | |
4557 | * src/symtab.c (symbol_check_alias_consistence): Adjust. | |
4558 | ||
4559 | * tests/regression.at (Invalid %directive): Remove, as it is now | |
4560 | meaningless. | |
4561 | (Invalid inputs): Adjust to the new error messages. | |
4562 | (Token definitions): The new grammar doesn't allow too many | |
4563 | eccentricities. | |
4564 | ||
4565 | * src/lex.h, src/lex.c: Remove. | |
4566 | * src/reader.c (lastprec, skip_to_char, read_signed_integer) | |
4567 | (copy_character, copy_string2, copy_string, copy_identifier) | |
4568 | (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl) | |
4569 | (parse_muscle_decl, parse_dquoted_param, parse_skel_decl) | |
4570 | (parse_action): Remove. | |
4571 | * po/POTFILES.in: Adjust. | |
4572 | ||
2e047461 AD |
4573 | 2002-06-11 Akim Demaille <akim@epita.fr> |
4574 | ||
4575 | * src/reader.c (parse_action): Don't store directly into the | |
4576 | rule's action member: return the action as a string. | |
4577 | Don't require `rule_length' as an argument: compute it. | |
4578 | (grammar_current_rule_symbol_append) | |
4579 | (grammar_current_rule_action_append): New, eved out from | |
4580 | (readgram): here. | |
4581 | Remove `action_flag', `rulelength', unused now. | |
4582 | ||
9af3fbce AD |
4583 | 2002-06-11 Akim Demaille <akim@epita.fr> |
4584 | ||
4585 | * src/reader.c (grammar_current_rule_prec_set). | |
4586 | (grammar_current_rule_check): New, eved out from... | |
4587 | (readgram): here. | |
4588 | Remove `xaction', `first_rhs': useless. | |
4589 | * tests/input.at (Type clashes): New. | |
4590 | * tests/existing.at (GNU Cim Grammar): Adjust. | |
4591 | ||
1485e106 AD |
4592 | 2002-06-11 Akim Demaille <akim@epita.fr> |
4593 | ||
4594 | * src/reader.c (grammar_midrule_action): New, Eved out from | |
4595 | (readgram): here. | |
4596 | ||
da4160c3 AD |
4597 | 2002-06-11 Akim Demaille <akim@epita.fr> |
4598 | ||
4599 | * src/reader.c (grammar_rule_begin, previous_rule, current_rule): | |
4600 | New. | |
4601 | (readgram): Use them as replacement of inlined code, crule and | |
4602 | crule1. | |
4603 | ||
f6d0f937 AD |
4604 | 2002-06-11 Akim Demaille <akim@epita.fr> |
4605 | ||
4606 | * src/reader.c (grammar_end, grammar_symbol_append): New. | |
4607 | (readgram): Use them. | |
4608 | Make the use of `p' as local as possible. | |
4609 | ||
69078d4b AD |
4610 | 2002-06-10 Akim Demaille <akim@epita.fr> |
4611 | ||
4612 | GCJ's parser requires the tokens to be defined before the prologue. | |
4613 | ||
4614 | * data/bison.simple: Output the token definition before the user's | |
4615 | prologue. | |
4616 | * tests/regression.at (Braces parsing, Duplicate string) | |
4617 | (Mixing %token styles): Check the output from bison. | |
4618 | (Early token definitions): New. | |
4619 | ||
5e424082 AD |
4620 | 2002-06-10 Akim Demaille <akim@epita.fr> |
4621 | ||
4622 | * src/symtab.c (symbol_user_token_number_set): Don't complain when | |
4623 | assigning twice the same user number to a token, so that we can | |
4624 | use it in... | |
4625 | * src/lex.c (lex): here. | |
4626 | Also use `symbol_class_set' instead of hand written code. | |
4627 | * src/reader.c (parse_assoc_decl): Likewise. | |
4628 | ||
44536b35 AD |
4629 | 2002-06-10 Akim Demaille <akim@epita.fr> |
4630 | ||
4631 | * src/symtab.c, src/symtab.c (symbol_class_set) | |
4632 | (symbol_user_token_number_set): New. | |
4633 | * src/reader.c (parse_token_decl): Use them. | |
4634 | Use a switch instead of ifs. | |
4635 | Use a single argument. | |
4636 | ||
8b9f2372 AD |
4637 | 2002-06-10 Akim Demaille <akim@epita.fr> |
4638 | ||
4639 | Remove `%thong' support as it is undocumented, unused, duplicates | |
4640 | `%token's job, and creates useless e-mail traffic with people who | |
4641 | want to know what it is, why it is undocumented, unused, and | |
4642 | duplicates `%token's job. | |
4643 | ||
4644 | * src/reader.c (parse_thong_decl): Remove. | |
4645 | * src/options.c (option_table): Remove "thong". | |
4646 | * src/lex.h (tok_thong): Remove. | |
4647 | ||
3ae2b51f AD |
4648 | 2002-06-10 Akim Demaille <akim@epita.fr> |
4649 | ||
4650 | * src/symtab.c, src/symtab.c (symbol_type_set) | |
4651 | (symbol_precedence_set): New. | |
4652 | * src/reader.c (parse_type_decl, parse_assoc_decl): Use them. | |
4653 | (value_components_used): Remove, unused. | |
4654 | ||
2f1afb73 AD |
4655 | 2002-06-09 Akim Demaille <akim@epita.fr> |
4656 | ||
4657 | Move symbols handling code out of the reader. | |
4658 | ||
4659 | * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken) | |
4660 | (axiom): Move to... | |
4661 | * src/symtab.h, src/symtab.c: here. | |
4662 | ||
4663 | * src/gram.c (start_symbol): Remove: use startsymbol->number. | |
4664 | * src/reader.c (startval): Rename as... | |
4665 | * src/symtab.h, src/symtab.c (startsymbol): this. | |
4666 | * src/reader.c: Adjust. | |
4667 | ||
4668 | * src/reader.c (symbol_check_defined, symbol_make_alias) | |
4669 | (symbol_check_alias_consistence, symbol_pack, symbol_translation) | |
4670 | (token_translations_init) | |
4671 | Move to... | |
4672 | * src/symtab.c: here. | |
4673 | * src/reader.c (packsymbols): Move to... | |
4674 | * src/symtab.h, src/symtab.c (symbols_pack): here. | |
4675 | * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as | |
4676 | argument. | |
4677 | ||
e9bca3ad AD |
4678 | 2002-06-03 Akim Demaille <akim@epita.fr> |
4679 | ||
4680 | * src/muscle_tab.c (muscle_insert, muscle_find): Declarations, | |
4681 | then statements. | |
4682 | ||
86eff183 AD |
4683 | 2002-06-03 Akim Demaille <akim@epita.fr> |
4684 | ||
4685 | * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize | |
4686 | structs with non literals. | |
4687 | * src/scan-skel.l: never-interactive. | |
4688 | * src/conflicts.c (enum conflict_resolution_e): No trailing | |
4689 | comma. | |
4690 | * src/getargs.c (usage): Split long literal strings. | |
4691 | Reported by Hans Aberg. | |
4692 | ||
717be197 AD |
4693 | 2002-05-28 Akim Demaille <akim@epita.fr> |
4694 | ||
4695 | * data/bison.c++: Use C++ ostreams. | |
4696 | (cdebug_): New member. | |
4697 | ||
670ddffd AD |
4698 | 2002-05-28 Akim Demaille <akim@epita.fr> |
4699 | ||
4700 | * src/output.c (output_skeleton): Be sure to allocate enough room | |
4701 | for `/' _and_ for `\0' in full_skeleton. | |
4702 | ||
769b430f AD |
4703 | 2002-05-28 Akim Demaille <akim@epita.fr> |
4704 | ||
4705 | * data/bison.c++: Catch up with bison.simple: | |
4706 | 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU> | |
4707 | and Paul Eggert <eggert@twinsun.com>: `error' handing. | |
4708 | 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_, | |
4709 | and popping traces. | |
4710 | ||
7067cb36 PH |
4711 | 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU> |
4712 | ||
4713 | * src/output.c (output_skeleton): Put an explicit path in front of | |
4714 | the skeleton file name, rather than relying on the -I directory, | |
4715 | to partially alleviate effects of having a skeleton file lying around | |
4716 | in the current directory. | |
769b430f | 4717 | |
4a713ec2 PH |
4718 | 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU> |
4719 | ||
769b430f | 4720 | * src/conflicts.c (log_resolution): Correct typo: |
4a713ec2 PH |
4721 | obstack_printf should be obstack_fgrow1. |
4722 | ||
b408954b AD |
4723 | 2002-05-26 Akim Demaille <akim@epita.fr> |
4724 | ||
4725 | * src/state.h (state_t): `solved_conflicts' is a new member. | |
4726 | * src/LR0.c (new_state): Set it to 0. | |
4727 | * src/conflicts.h, src/conflicts.c (print_conflicts) | |
4728 | (free_conflicts, solve_conflicts): Rename as... | |
4729 | (conflicts_print, conflicts_free, conflicts_solve): these. | |
4730 | Adjust callers. | |
4731 | * src/conflicts.c (enum conflict_resolution_e) | |
4732 | (solved_conflicts_obstack): New, used by... | |
4733 | (log_resolution): this. | |
4734 | Adjust to attach the conflict resolution to each state. | |
4735 | Complete the description with the precedence/associativity | |
4736 | information. | |
4737 | (resolve_sr_conflict): Adjust. | |
4738 | * src/print.c (print_state): Output its solved_conflicts. | |
4739 | * tests/conflicts.at (Unresolved SR Conflicts) | |
4740 | (Solved SR Conflicts): Exercise --report=all. | |
4741 | ||
a49aecd5 AD |
4742 | 2002-05-26 Akim Demaille <akim@epita.fr> |
4743 | ||
4744 | * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c, | |
4745 | * src/nullable.c, src/output.c, src/print.c, src/print_graph.c, | |
4746 | * src/reader.c, src/reduce.c, src/state.h, src/symtab.h | |
4747 | (token_number_t, item_number_as_token_number) | |
4748 | (token_number_as_item_number, muscle_insert_token_number_table): | |
4749 | Rename as... | |
4750 | (symbol_number_t, item_number_as_symbol_number) | |
4751 | (symbol_number_as_item_number, muscle_insert_symbol_number_table): | |
4752 | these, since it is more appropriate. | |
4753 | ||
5504898e AD |
4754 | 2002-05-26 Akim Demaille <akim@epita.fr> |
4755 | ||
4756 | * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional | |
4757 | `Error:' lines. | |
4758 | * data/bison.simple (yystos) [YYDEBUG]: New. | |
4759 | (yyparse) [YYDEBUG]: Display the symbols which are popped during | |
4760 | error recovery. | |
4761 | * tests/regression.at (Web2c Actions): Adjust: yystos is output now. | |
4762 | ||
ec3bc396 AD |
4763 | 2002-05-25 Akim Demaille <akim@epita.fr> |
4764 | ||
4765 | * doc/bison.texinfo (Debugging): Split into... | |
4766 | (Tracing): this new section, its former contents, and... | |
4767 | (Understanding): this new section. | |
4768 | * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced | |
4769 | by... | |
4770 | (report_flag): this. | |
4771 | Adjust all dependencies. | |
4772 | (report_args, report_types, report_argmatch): New. | |
4773 | (usage, getargs): Report/support -r, --report. | |
4774 | * src/options.h | |
4775 | (struct option_table_struct): Rename as.., | |
4776 | (struct option_table_s): this. | |
4777 | Rename the `set_flag' member to `flag' to match with getopt_long's | |
4778 | struct. | |
4779 | * src/options.c (option_table): Split verbose into an entry for | |
4780 | %verbose, and another for --verbose. | |
4781 | Support --report/-r, so remove -r from the obsolete --raw. | |
4782 | * src/print.c: Attach full item sets and lookaheads reports to | |
4783 | report_flag instead of trace_flag. | |
4784 | * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1. | |
4785 | ||
78df8250 PE |
4786 | 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU> |
4787 | and Paul Eggert <eggert@twinsun.com> | |
769b430f | 4788 | |
78df8250 PE |
4789 | * data/bison.simple (yyparse): Correct error handling to conform to |
4790 | POSIX and yacc. Specifically, after syntax error is discovered, | |
4791 | do not reduce further before shifting the error token. | |
4792 | Clean up the code a bit by removing the labels yyerrdefault, | |
4793 | yyerrhandle, yyerrpop. | |
4794 | * NEWS: Document the above. | |
4795 | ||
c0c9ea05 PH |
4796 | 2002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU> |
4797 | ||
4798 | * data/bison.simple (yyr1): Don't use yy_token_number_type as element | |
4799 | type; it isn't always big enough, since it doesn't necessarily | |
4800 | include non-terminals. | |
769b430f | 4801 | (yytranslate): Expand definition of yy_token_number_type, so that |
c0c9ea05 PH |
4802 | the latter can be removed. |
4803 | (yy_token_number_type): Remove, only one use. | |
4804 | * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple--- | |
4805 | don't use TokenNumberType as element type. | |
769b430f | 4806 | |
c0c9ea05 PH |
4807 | * tests/regression.at: Modify expected output to agree with change |
4808 | to yyr1 and yytranslate. | |
769b430f | 4809 | |
6390a83f FK |
4810 | 2002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com> |
4811 | ||
4812 | * src/reader.c (parse_action): Use copy_character instead of | |
4813 | obstack_1grow. | |
4814 | ||
db7c8e9a AD |
4815 | 2002-05-13 Akim Demaille <akim@epita.fr> |
4816 | ||
4817 | * tests/regression.at (Token definitions): Prototype yylex and | |
4818 | yyerror. | |
4819 | ||
fcc61800 PH |
4820 | 2002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU> |
4821 | ||
158c687b | 4822 | * src/scan-skel.l: Correct off-by-one error in handling of __oline__. |
fcc61800 PH |
4823 | * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect |
4824 | 32-bit arithmetic. | |
4825 | * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto. | |
4826 | ||
5683e9b2 AD |
4827 | 2002-05-07 Akim Demaille <akim@epita.fr> |
4828 | ||
4829 | * tests/synclines.at: Be sure to prototype yylex and yyerror to | |
4830 | avoid GCC warnings. | |
4831 | ||
0c2d3f4c AD |
4832 | 2002-05-07 Akim Demaille <akim@epita.fr> |
4833 | ||
4834 | Kill GCC warnings. | |
4835 | ||
4836 | * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop | |
4837 | over the RHS of each rule. | |
4838 | * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int. | |
4839 | * src/state.h (state_t): Member `nitems' is unsigned short. | |
4840 | * src/LR0.c (get_state): Adjust. | |
4841 | * src/reader.c (packgram): Likewise. | |
4842 | * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type | |
4843 | `Type'. | |
4844 | (muscle_insert_int_table): Remove, unused. | |
4845 | (prepare_rules): Remove `max'. | |
4846 | ||
1565b720 AD |
4847 | 2002-05-06 Akim Demaille <akim@epita.fr> |
4848 | ||
4849 | * src/closure.c (print_firsts): Display of the symbol tags. | |
4850 | (bitmatrix_print): Move to... | |
4851 | * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump): | |
4852 | here. | |
4853 | * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust. | |
4854 | ||
cfaee611 AD |
4855 | 2002-05-06 Akim Demaille <akim@epita.fr> |
4856 | ||
4857 | * src/muscle_tab.c (muscle_m4_output): Must return TRUE for | |
4858 | hash_do_for_each. | |
4859 | ||
458be8e0 AD |
4860 | 2002-05-06 Akim Demaille <akim@epita.fr> |
4861 | ||
4862 | * src/LR0.c (new_state, get_state): Instead of using the global | |
4863 | `kernel_size' and `kernel_base', have two new arguments: | |
4864 | `core_size' and `core'. | |
4865 | Adjust callers. | |
4866 | ||
a900a624 AD |
4867 | 2002-05-06 Akim Demaille <akim@epita.fr> |
4868 | ||
4869 | * src/reader.c (packgram): No longer end `ritem' with a 0 | |
4870 | sentinel: it is not used. | |
4871 | ||
d4e7d3a1 AD |
4872 | 2002-05-05 Akim Demaille <akim@epita.fr> |
4873 | ||
4874 | New experimental feature: display the lookaheads in the report and | |
4875 | graph. | |
4876 | ||
4877 | * src/print (print_core): When --trace-flag, display the rules | |
4878 | lookaheads. | |
4879 | * src/print_graph.c (print_core): Likewise. | |
4880 | Swap the arguments. | |
4881 | Adjust caller. | |
4882 | ||
39ceb25b AD |
4883 | 2002-05-05 Akim Demaille <akim@epita.fr> |
4884 | ||
4885 | * tests/torture.at (Many lookaheads): New test. | |
4886 | ||
5372019f AD |
4887 | 2002-05-05 Akim Demaille <akim@epita.fr> |
4888 | ||
4889 | * src/output.c (GENERATE_OUTPUT_TABLE): Replace with... | |
4890 | (GENERATE_MUSCLE_INSERT_TABLE): this. | |
4891 | (output_int_table, output_unsigned_int_table, output_short_table) | |
4892 | (output_token_number_table, output_item_number_table): Replace with... | |
4893 | (muscle_insert_int_table, muscle_insert_unsigned_int_table) | |
4894 | (muscle_insert_short_table, muscle_insert_token_number_table) | |
4895 | (muscle_insert_item_number_table): these. | |
4896 | Adjust all callers. | |
4897 | (prepare_tokens): Don't free `translations', since... | |
4898 | * src/reader.h, src/reader.c (grammar_free): do it. | |
4899 | Move to... | |
4900 | * src/gram.h, src/gram.c (grammar_free): here. | |
4901 | * data/bison.simple, data/bison.c++: b4_token_number_max is now | |
4902 | b4_translate_max. | |
4903 | ||
5df5f6d5 AD |
4904 | 2002-05-05 Akim Demaille <akim@epita.fr> |
4905 | ||
4906 | * src/output.c (output_unsigned_int_table): New. | |
4907 | (prepare_rules): `i' is unsigned. | |
4908 | `prhs', `rline', `r2' are unsigned int. | |
4909 | Rename muscle `rhs_number_max' as `rhs_max'. | |
4910 | Output muscles `prhs_max', `rline_max', and `r2_max'. | |
4911 | Free rline and r1. | |
4912 | * data/bison.simple, data/bison.c++: Adjust to use these muscles | |
4913 | to compute types instead of constant types. | |
4914 | * tests/regression.at (Web2c Actions): Adjust. | |
4915 | ||
b87f8b21 AD |
4916 | 2002-05-04 Akim Demaille <akim@epita.fr> |
4917 | ||
4918 | * src/symtab.h (SALIAS, SUNDEF): Rename as... | |
4919 | (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these. | |
4920 | Adjust dependencies. | |
4921 | * src/output.c (token_definitions_output): Be sure not to output a | |
4922 | `#define 'a'' when fed with `%token 'a' "a"'. | |
4923 | * tests/regression.at (Token definitions): New. | |
4924 | ||
8bb936e4 PE |
4925 | 2002-05-03 Paul Eggert <eggert@twinsun.com> |
4926 | ||
4927 | * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE | |
4928 | for K&R C. | |
4929 | ||
4930 | 2002-05-03 gettextize <bug-gnu-gettext@gnu.org> | |
4931 | ||
4932 | * Makefile.am (SUBDIRS): Remove intl. | |
4933 | (EXTRA_DIST): Add config/config.rpath. | |
4934 | ||
53c71a12 AD |
4935 | 2002-05-03 Akim Demaille <akim@epita.fr> |
4936 | ||
4937 | * data/bison.simple (m4_if): Don't output empty enums. | |
4938 | And actually, output valid enum definitions :(. | |
4939 | ||
289dd0cf AD |
4940 | 2002-05-03 Akim Demaille <akim@epita.fr> |
4941 | ||
4942 | * configure.bat: Remove, completely obsolete. | |
4943 | * Makefile.am (EXTRA_DIST): Adjust. | |
4944 | Don't distribute config.rpath... | |
4945 | * config/Makefile.am (EXTRA_DIST): Do it. | |
4946 | ||
db85e524 AD |
4947 | 2002-05-03 Akim Demaille <akim@epita.fr> |
4948 | ||
4949 | * configure.in (GETTEXT_VERSION): New. | |
4950 | Suggested by Bruno Haible for the forthcoming Gettext 0.10.3. | |
4951 | ||
83ccf991 AD |
4952 | 2002-05-03 Akim Demaille <akim@epita.fr> |
4953 | ||
4954 | * data/bison.simple (b4_token_enum): New. | |
4955 | (b4_token_defines): Use it to output tokens both as #define and | |
4956 | enums. | |
4957 | Suggested by Paul Eggert. | |
4958 | * src/output.c (token_definitions_output): Don't output spurious | |
4959 | white spaces. | |
4960 | ||
1f418995 AD |
4961 | 2002-05-03 Akim Demaille <akim@epita.fr> |
4962 | ||
4963 | * data/m4sugar/m4sugar.m4: Update from CVS Autoconf. | |
4964 | ||
45119f04 RA |
4965 | 2002-05-02 Robert Anisko <robert@lrde.epita.fr> |
4966 | ||
4967 | * data/bison.c++: Adapt expansion of $s and @s to the C++ parser. | |
4968 | Update the stack class, give a try to deque as the default container. | |
4969 | ||
b2d52318 AD |
4970 | 2002-05-02 Akim Demaille <akim@epita.fr> |
4971 | ||
4972 | * data/bison.simple (yyparse): Do not implement @$ = @1. | |
4973 | (YYLLOC_DEFAULT): Adjust to do it. | |
4974 | * doc/bison.texinfo (Location Default Action): Fix. | |
4975 | ||
3a8b4109 AD |
4976 | 2002-05-02 Akim Demaille <akim@epita.fr> |
4977 | ||
4978 | * src/reader.c (parse_braces): Merge into... | |
4979 | (parse_action): this. | |
4980 | ||
84614e13 AD |
4981 | 2002-05-02 Akim Demaille <akim@epita.fr> |
4982 | ||
4983 | * configure.in (ALL_LINGUAS): Remove. | |
4984 | * po/LINGUAS, hr.po: New. | |
4985 | ||
fdbcd8e2 AD |
4986 | 2002-05-02 Akim Demaille <akim@epita.fr> |
4987 | ||
4988 | Remove the so called hairy (semantic) parsers. | |
4989 | ||
4990 | * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove. | |
4991 | * src/gram.h, src/gram.c (semantic_parser): Remove. | |
4992 | (rule_t): Remove the guard and guard_line members. | |
4993 | * src/lex.h (token_t): remove tok_guard. | |
4994 | * src/options.c (option_table): Remove %guard and %semantic_parser | |
4995 | support. | |
4996 | * src/output.c, src/output.h (guards_output): Remove. | |
4997 | (prepare): Adjust. | |
4998 | (token_definitions_output): Don't output the `T' | |
4999 | tokens (???). | |
5000 | (output_skeleton): Don't output the guards. | |
5001 | * src/files.c, src/files.c (attrsfile): Remove. | |
5002 | * src/reader.c (symbol_list): Remove the guard and guard_line | |
5003 | members. | |
5004 | Adjust dependencies. | |
5005 | (parse_guard): Remove. | |
5006 | * data/bison.hairy: Remove. | |
5007 | * doc/bison.texinfo (Environment Variables): Remove occurrences of | |
5008 | BISON_HAIRY. | |
5009 | ||
82b6cb3f AD |
5010 | 2002-05-02 Akim Demaille <akim@epita.fr> |
5011 | ||
5012 | * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action) | |
5013 | (parse_guard): Rename the formal argument `stack_offset' as | |
5014 | `rule_length', which is more readable. | |
5015 | Adjust callers. | |
5016 | (copy_at, copy_dollar): Instead of outputting the hard coded | |
5017 | values of $$, $n and so forth, output invocation to b4_lhs_value, | |
5018 | b4_lhs_location, b4_rhs_value, and b4_rhs_location. | |
900c877b AD |
5019 | Note: this patch partially drops `semantic-parser' support: it |
5020 | always does `rule_length - n', where semantic parsers ought to | |
5021 | always use `-n'. | |
82b6cb3f AD |
5022 | * data/bison.simple, data/bison.c++ (b4_lhs_value) |
5023 | (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New. | |
5024 | ||
6cbfbcc5 AD |
5025 | 2002-05-02 Akim Demaille <akim@epita.fr> |
5026 | ||
5027 | * configure.in (AC_INIT): Bump to 1.49b. | |
5028 | (AM_INIT_AUTOMAKE): Short invocation. | |
5029 | ||
b8548114 AD |
5030 | 2002-05-02 Akim Demaille <akim@epita.fr> |
5031 | ||
5032 | Version 1.49a. | |
5033 | ||
c20cd1fa AD |
5034 | 2002-05-01 Akim Demaille <akim@epita.fr> |
5035 | ||
5036 | * src/skeleton.h: Remove. | |
5037 | ||
8a9566d4 AD |
5038 | 2002-05-01 Akim Demaille <akim@epita.fr> |
5039 | ||
5040 | * src/skeleton.h: Fix the #endif. | |
5041 | Reported by Magnus Fromreide. | |
5042 | ||
8c6d399a PE |
5043 | 2002-04-26 Paul Eggert <eggert@twinsun.com> |
5044 | ||
5045 | * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL): | |
5046 | Define if we define YYSTYPE and YYLTYPE, respectively. | |
b756bb75 | 5047 | (YYCOPY): Fix [] quoting problem in the non-GCC case. |
8a9566d4 | 5048 | |
2b7ed18a RA |
5049 | 2002-04-25 Robert Anisko <robert@lrde.epita.fr> |
5050 | ||
5051 | * src/scan-skel.l: Postprocess quadrigraphs. | |
5052 | ||
5053 | * src/reader.c (copy_character): New function, used to output | |
5054 | single characters while replacing `[' and `]' with quadrigraphs, to | |
5055 | avoid troubles with M4 quotes. | |
5056 | (copy_comment): Output characters with copy_character. | |
5057 | (read_additionnal_code): Likewise. | |
5058 | (copy_string2): Likewise. | |
5059 | (copy_definition): Likewise. | |
5060 | ||
5061 | * tests/calc.at: Exercise M4 quoting. | |
5062 | ||
34a89c50 AD |
5063 | 2002-04-25 Akim Demaille <akim@epita.fr> |
5064 | ||
5065 | * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space | |
5066 | between `!' and the command. | |
5067 | Reported by Paul Eggert. | |
5068 | ||
0dd1580a RA |
5069 | 2002-04-24 Robert Anisko <robert@lrde.epita.fr> |
5070 | ||
5071 | * tests/calc.at: Exercise prologue splitting. | |
5072 | ||
5073 | * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and | |
5074 | `b4_post_prologue' instead of `b4_prologue'. | |
5075 | ||
5076 | * src/output.c (prepare): Add the `pre_prologue' and `post_prologue' | |
5077 | muscles. | |
5078 | (output): Free pre_prologue_obstack and post_prologue_obstack. | |
5079 | * src/files.h, src/files.c (attrs_obstack): Remove. | |
5080 | (pre_prologue_obstack, post_prologue_obstack): New. | |
5081 | * src/reader.c (copy_definition): Add a parameter to specify the | |
5082 | obstack to fill, instead of using attrs_obstack unconditionally. | |
5083 | (read_declarations): Pass pre_prologue_obstack to copy_definition if | |
5084 | `%union' has not yet been seen, pass post_prologue_obstack otherwise. | |
5085 | ||
83c1796f PE |
5086 | 2002-04-23 Paul Eggert <eggert@twinsun.com> |
5087 | ||
5088 | * data/bison.simple: Remove unnecessary commentary and white | |
5089 | space differences from 1_29-branch. | |
5090 | Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE). | |
5091 | ||
5092 | (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY, | |
5093 | YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or | |
5094 | if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial | |
5095 | constructors or destructors. | |
5096 | ||
5097 | (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack. | |
5098 | ||
1207eeac AD |
5099 | 2002-04-23 Akim Demaille <akim@epita.fr> |
5100 | ||
5101 | * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels. | |
5102 | * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's | |
5103 | location with columns. | |
5104 | * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'. | |
5105 | All reported by Paul Eggert. | |
5106 | ||
78ab8f67 AD |
5107 | 2002-04-22 Akim Demaille <akim@epita.fr> |
5108 | ||
5109 | * src/reduce.c (dump_grammar): Move to... | |
5110 | * src/gram.h, src/gram.c (grammar_dump): here. | |
5111 | Be sure to separate long item numbers. | |
5112 | Don't read the members of a rule's prec if its nil. | |
5113 | ||
133c20e2 AD |
5114 | 2002-04-22 Akim Demaille <akim@epita.fr> |
5115 | ||
5116 | * src/output.c (table_size, table_grow): New. | |
5117 | (MAXTABLE): Remove, replace uses with table_size. | |
5118 | (pack_vector): Instead of dying when the table is too big, grow it. | |
5119 | ||
9515e8a7 AD |
5120 | 2002-04-22 Akim Demaille <akim@epita.fr> |
5121 | ||
5122 | * data/bison.simple (yyr1): Its type is that of a token number. | |
5123 | * data/bison.c++ (r1_): Likewise. | |
5124 | * tests/regression.at (Web2c Actions): Adjust. | |
5125 | ||
23c5a174 AD |
5126 | 2002-04-22 Akim Demaille <akim@epita.fr> |
5127 | ||
5128 | * src/reader.c (token_translations_init): 256 is now the default | |
5129 | value for the error token, i.e., it will be assigned another | |
5130 | number if the user assigned 256 to one of her tokens. | |
5131 | (reader): Don't force 256 to error. | |
5132 | * doc/bison.texinfo (Symbols): Adjust. | |
5133 | * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR) | |
5134 | (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3 | |
5135 | etc. instead of 10, 20, 30 (which was used to `jump' over error | |
5136 | (256) and undefined (2)). | |
5137 | ||
5fbb0954 AD |
5138 | 2002-04-22 Akim Demaille <akim@epita.fr> |
5139 | ||
5140 | Propagate more token_number_t. | |
5141 | ||
5142 | * src/gram.h (token_number_as_item_number) | |
5143 | (item_number_as_token_number): New. | |
5144 | * src/output.c (GENERATE_OUTPUT_TABLE): New. | |
5145 | Use it to create output_item_number_table and | |
5146 | output_token_number_table. | |
5147 | * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c, | |
5148 | * src/lex.c, src/nullable.c, src/output.c, src/print.c, | |
5149 | * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h, | |
5150 | * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts. | |
5151 | ||
4f940944 AD |
5152 | 2002-04-22 Akim Demaille <akim@epita.fr> |
5153 | ||
5154 | * src/output.h, src/output.c (get_lines_number): Remove. | |
5155 | ||
3ded9a63 AD |
5156 | 2002-04-19 Akim Demaille <akim@epita.fr> |
5157 | ||
5158 | * doc/bison.texinfo (Actions): Make clear that `|' is not the same | |
5159 | as Lex/Flex'. | |
5160 | (Debugging): More details about enabling the debugging features. | |
5161 | (Table of Symbols): Describe $$, $n, @$, and @n. | |
5162 | Suggested by Tim Josling. | |
5163 | ||
e0c471a9 AD |
5164 | 2002-04-19 Akim Demaille <akim@epita.fr> |
5165 | ||
5166 | * doc/bison.texinfo: Remove the uses of the obsolete @refill. | |
5167 | ||
fecc10cd AD |
5168 | 2002-04-10 Akim Demaille <akim@epita.fr> |
5169 | ||
5170 | * src/system.h: Rely on HAVE_LIMITS_H. | |
5171 | Suggested by Paul Eggert. | |
5172 | ||
51dec47b AD |
5173 | 2002-04-09 Akim Demaille <akim@epita.fr> |
5174 | ||
5175 | * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the | |
5176 | full stderr, and strip it according to the bison options, instead | |
5177 | of composing the error message from different bits. | |
5178 | This makes it easier to check for several error messages. | |
5179 | Adjust all the invocations. | |
5180 | Add an invocation exercising the error token. | |
5181 | Add an invocation demonstrating a stupid error message. | |
5182 | (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0. | |
5183 | Adjust the tests. | |
5184 | Error message are for stderr, not stdout. | |
5185 | ||
007a50a4 AD |
5186 | 2002-04-09 Akim Demaille <akim@epita.fr> |
5187 | ||
5188 | * src/gram.h, src/gram.c (error_token_number): Remove, use | |
5189 | errtoken->number. | |
5190 | * src/reader.c (reader): Don't specify the user token number (2) | |
5191 | for $undefined, as it uselessly prevents using it. | |
5192 | * src/gram.h (token_number_t): Move to... | |
5193 | * src/symtab.h: here. | |
5194 | (state_t.number): Is a token_number_t. | |
5195 | * src/print.c, src/reader.c: Use undeftoken->number instead of | |
5196 | hard coded 2. | |
5197 | (Even though this 2 is not the same as above: the number of the | |
5198 | undeftoken remains being 2, it is its user token number which | |
5199 | might not be 2). | |
5200 | * src/output.c (prepare_tokens): Rename the `maxtok' muscle with | |
5201 | `user_token_number_max'. | |
5202 | Output `undef_token_number'. | |
5203 | * data/bison.simple, data/bison.c++: Use them. | |
5204 | Be sure to map invalid yylex return values to | |
5205 | `undef_token_number'. This saves us from gratuitous SEGV. | |
5206 | ||
5207 | * tests/conflicts.at (Solved SR Conflicts) | |
5208 | (Unresolved SR Conflicts): Adjust. | |
5209 | * tests/regression.at (Web2c Actions): Adjust. | |
5210 | ||
06446ccf AD |
5211 | 2002-04-08 Akim Demaille <akim@epita.fr> |
5212 | ||
5213 | * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/. | |
5214 | Adding #line. | |
5215 | Remove the duplicate `typedefs'. | |
5216 | (RhsNumberType): Fix the declaration and various other typos. | |
5217 | Use __ofile__. | |
5218 | * data/bison.simple: Use __ofile__. | |
5219 | * src/scan-skel.l: Handle __ofile__. | |
5220 | ||
62a3e4f0 AD |
5221 | 2002-04-08 Akim Demaille <akim@epita.fr> |
5222 | ||
5223 | * src/gram.h (item_number_t): New, the type of item numbers in | |
5224 | RITEM. Note that it must be able to code symbol numbers as | |
5225 | positive number, and the negation of rule numbers as negative | |
5226 | numbers. | |
5227 | Adjust all dependencies (pretty many). | |
5228 | * src/reduce.c (rule): Remove this `short *' pointer: use | |
5229 | item_number_t. | |
5230 | * src/system.h (MINSHORT, MAXSHORT): Remove. | |
5231 | Include `limits.h'. | |
5232 | Adjust dependencies to using SHRT_MAX and SHRT_MIN. | |
5233 | (shortcpy): Remove. | |
5234 | (MAXTABLE): Move to... | |
5235 | * src/output.c (MAXTABLE): here. | |
5236 | (prepare_rules): Use output_int_table to output rhs. | |
5237 | * data/bison.simple, data/bison.c++: Adjust. | |
5238 | * tests/torture.at (Big triangle): Move the limit from 254 to | |
5239 | 500. | |
5240 | * tests/regression.at (Web2c Actions): Ajust. | |
5241 | ||
5242 | Trying with bigger grammars shows various phenomena: at 3000 (28Mb | |
5243 | of grammar file) bison is killed by my system, at 2000 (12Mb) bison | |
5244 | passes, but produces negative #line number, once fixed, GCC is | |
5245 | killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of | |
5246 | C), it passes. | |
5247 | * src/state.h (state_h): Code input lines on ints, not shorts. | |
5248 | ||
bb88b0fc AD |
5249 | 2002-04-08 Akim Demaille <akim@epita.fr> |
5250 | ||
5251 | * src/reduce.c (reduce_grammar): First reduce the nonterminals, | |
5252 | and then the grammar. | |
5253 | ||
9a636f47 AD |
5254 | 2002-04-08 Akim Demaille <akim@epita.fr> |
5255 | ||
5256 | * src/system.h: No longer using strndup. | |
5257 | ||
680e8701 AD |
5258 | 2002-04-07 Akim Demaille <akim@epita.fr> |
5259 | ||
5260 | * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New. | |
5261 | * src/output.c (output_table_data): Return the longest number. | |
5262 | (prepare_tokens): Output `token_number_max'). | |
5263 | * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type): | |
5264 | New. | |
5265 | Use them to define yy_token_number_type/TokenNumberType. | |
5266 | Use this type for yytranslate. | |
5267 | * tests/torture.at (Big triangle): Push the limit from 124 to | |
5268 | 253. | |
5269 | * tests/regression.at (Web2c Actions): Adjust. | |
5270 | ||
817e9f41 AD |
5271 | 2002-04-07 Akim Demaille <akim@epita.fr> |
5272 | ||
5273 | * tests/torture.at (Big triangle): New. | |
5274 | (GNU AWK Grammar, GNU Cim Grammar): Move to... | |
5275 | * tests/existing.at: here. | |
5276 | ||
5123689b AD |
5277 | 2002-04-07 Akim Demaille <akim@epita.fr> |
5278 | ||
5279 | * src/gram.h, src/gram.c (nitems): Remove, it is an alias of | |
5280 | nritems. | |
5281 | Adjust dependencies. | |
5282 | ||
f3849179 AD |
5283 | 2002-04-07 Akim Demaille <akim@epita.fr> |
5284 | ||
5285 | * src/reader.c: Normalize increments to prefix form. | |
5286 | ||
bd02036a AD |
5287 | 2002-04-07 Akim Demaille <akim@epita.fr> |
5288 | ||
5289 | * src/reader.c, symtab.c: Remove debugging code. | |
5290 | ||
db8837cb AD |
5291 | 2002-04-07 Akim Demaille <akim@epita.fr> |
5292 | ||
5293 | Rename all the `bucket's as `symbol_t'. | |
5294 | ||
5295 | * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c, | |
5296 | * src/reader.c, src/reader.h, src/reduce.c, src/state.h, | |
5297 | * src/symtab.c, src/symtab.h (bucket): Rename as... | |
5298 | (symbol_t): this. | |
5299 | (symbol_list_new, bucket_check_defined, bucket_make_alias) | |
5300 | (bucket_check_alias_consistence, bucket_pack, bucket_translation) | |
5301 | (bucket_new, bucket_free, hash_compare_bucket, hash_bucket) | |
5302 | (buckets_new, buckets_free, buckets_do): Rename as... | |
5303 | (symbol_list_new, symbol_check_defined, symbol_make_alias) | |
5304 | (symbol_check_alias_consistence, symbol_pack, symbol_translation) | |
5305 | (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t) | |
5306 | (symbols_new, symbols_free, symbols_do): these. | |
5307 | ||
72a23c97 AD |
5308 | 2002-04-07 Akim Demaille <akim@epita.fr> |
5309 | ||
5310 | Use lib/hash for the symbol table. | |
5311 | ||
5312 | * src/gram.c (ntokens): Initialize to 1, to reserve a slot for | |
5313 | EOF. | |
5314 | * src/lex.c (lex): Set the `number' member of new terminals. | |
5315 | * src/reader.c (bucket_check_defined, bucket_make_alias) | |
5316 | (bucket_check_alias_consistence, bucket_translation): New. | |
5317 | (reader, grammar_free, readgram, token_translations_init) | |
5318 | (packsymbols): Adjust. | |
5319 | (reader): Number the predefined tokens. | |
5320 | * src/reduce.c (inaccessable_symbols): Just use hard coded numbers | |
5321 | for predefined tokens. | |
5322 | * src/symtab.h (bucket): Remove all the hash table related | |
5323 | members. | |
5324 | * src/symtab.c (symtab): Replace by... | |
5325 | (bucket_table): this. | |
5326 | (bucket_new, bucket_free, hash_compare_bucket, hash_bucket) | |
5327 | (buckets_new, buckets_do): New. | |
5328 | ||
280a38c3 AD |
5329 | 2002-04-07 Akim Demaille <akim@epita.fr> |
5330 | ||
5331 | * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems) | |
5332 | (start_symbol, max_user_token_number, semantic_parser) | |
5333 | (error_token_number): Initialize. | |
5334 | * src/reader.c (grammar, start_flag, startval, typed, lastprec): | |
5335 | Initialize. | |
5336 | (reader): Don't. | |
5337 | (errtoken, eoftoken, undeftoken, axiom): Extern. | |
5338 | ||
03b31c0c AD |
5339 | 2002-04-07 Akim Demaille <akim@epita.fr> |
5340 | ||
5341 | * src/gram.h (rule_s): prec and precsym are now pointers | |
5342 | to the bucket giving the priority/associativity. | |
5343 | Member `associativity' removed: useless. | |
5344 | * src/reduce.c, src/conflicts.c: Adjust. | |
5345 | ||
8b3df748 AD |
5346 | 2002-04-07 Akim Demaille <akim@epita.fr> |
5347 | ||
5348 | * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c: | |
5349 | Properly escape the symbols' TAG when outputting them. | |
5350 | ||
e601aa1d AD |
5351 | 2002-04-07 Akim Demaille <akim@epita.fr> |
5352 | ||
5353 | * src/lalr.h (LA): Is a bitsetv, not bitset*. | |
5354 | ||
b0299a2e AD |
5355 | 2002-04-07 Akim Demaille <akim@epita.fr> |
5356 | ||
5357 | * src/lalr.h, src/lalr.c (LAruleno): Replace with... | |
5358 | (LArule): this, which is an array to rule_t*. | |
5359 | * src/print.c, src/conflicts.c: Adjust. | |
5360 | ||
d7e1f00c AD |
5361 | 2002-04-07 Akim Demaille <akim@epita.fr> |
5362 | ||
5363 | * src/gram.h (rule_t): Rename `number' as `user_number'. | |
5364 | `number' is a new member. | |
5365 | Adjust dependencies. | |
5366 | * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number. | |
5367 | ||
cc9305dd AD |
5368 | 2002-04-07 Akim Demaille <akim@epita.fr> |
5369 | ||
5370 | As a result of the previous patch, it is no longer needed | |
5371 | to reorder ritem itself. | |
5372 | ||
5373 | * src/reduce.c (reduce_grammar_tables): Don't sort RITEM. | |
5374 | ||
b0940840 AD |
5375 | 2002-04-07 Akim Demaille <akim@epita.fr> |
5376 | ||
5377 | Be sure never to walk through RITEMS, but use only data related to | |
5378 | the rules themselves. RITEMS should be banished. | |
5379 | ||
5380 | * src/output.c (output_token_translations): Rename as... | |
5381 | (prepare_tokens): this. | |
5382 | In addition to `translate', prepare the muscles `tname' and | |
5383 | `toknum', which were handled by... | |
5384 | (output_rule_data): this. | |
5385 | Remove, and move the remainder of its outputs into... | |
5386 | (prepare_rules): this new routines, which also merges content from | |
5387 | (output_gram): this. | |
5388 | (prepare_rules): Be sure never to walk through RITEMS. | |
5389 | (output_stos): Rename as... | |
5390 | (prepare_stos): this. | |
5391 | (output): Always invoke prepare_states, after all, just don't use it | |
5392 | in the output if you don't need it. | |
5393 | ||
643a5994 AD |
5394 | 2002-04-07 Akim Demaille <akim@epita.fr> |
5395 | ||
5396 | * src/LR0.c (new_state): Display `nstates' as the name of the | |
5397 | newly created state. | |
5398 | Adjust to initialize first_state and last_state if needed. | |
5399 | Be sure to distinguish the initial from the final state. | |
5400 | (new_states): Create the itemset of the initial state, and use | |
5401 | new_state. | |
5402 | * src/closure.c (closure): Now that the initial state has its | |
5403 | items properly set, there is no need for a special case when | |
5404 | creating `ruleset'. | |
5405 | ||
5406 | As a result, now the rule 0, reducing to $axiom, is visible in the | |
5407 | outputs. Adjust the test suite. | |
5408 | ||
5409 | * tests/conflicts.at (Solved SR Conflicts) | |
5410 | (Unresolved SR Conflicts): Adjust. | |
5411 | * tests/regression.at (Web2c Report, Rule Line Numbers): Idem. | |
5412 | * tests/conflicts.at (S/R in initial): New. | |
5413 | ||
b4c4ccc2 AD |
5414 | 2002-04-07 Akim Demaille <akim@epita.fr> |
5415 | ||
5416 | * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over | |
5417 | the RHS of the rules. | |
5418 | * src/output.c (output_gram): Likewise. | |
5419 | ||
bba97eb2 AD |
5420 | 2002-04-07 Akim Demaille <akim@epita.fr> |
5421 | ||
5422 | * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's | |
5423 | bucket. | |
5424 | Adjust all dependencies. | |
5425 | * src/reduce.c (nonterminals_reduce): Don't forget to renumber the | |
5426 | `number' of the buckets too. | |
5427 | * src/gram.h: Include `symtab.h'. | |
5428 | (associativity): Move to... | |
5429 | * src/symtab.h: here. | |
5430 | No longer include `gram.h'. | |
5431 | ||
c3b407f4 AD |
5432 | 2002-04-07 Akim Demaille <akim@epita.fr> |
5433 | ||
5434 | * src/gram.h, src/gram.c (rules_rhs_length): New. | |
5435 | (ritem_longest_rhs): Use it. | |
5436 | * src/gram.h (rule_t): `number' is a new member. | |
5437 | * src/reader.c (packgram): Set it. | |
5438 | * src/reduce.c (reduce_grammar_tables): Move the useless rules at | |
5439 | the end of `rules', and count them out of `nrules'. | |
5440 | (reduce_output, dump_grammar): Adjust. | |
5441 | * src/print.c (print_grammar): It is no longer needed to check for | |
5442 | the usefulness of a rule, as useless rules are beyond `nrules + 1'. | |
5443 | * tests/reduce.at (Reduced Automaton): New test. | |
5444 | ||
11652ab3 AD |
5445 | 2002-04-07 Akim Demaille <akim@epita.fr> |
5446 | ||
5447 | * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a | |
5448 | lacking `+ 1' to nrules, Bison reported as useless a token if it | |
5449 | was used solely to set the precedence of the last rule... | |
5450 | ||
26b23c1a AD |
5451 | 2002-04-07 Akim Demaille <akim@epita.fr> |
5452 | ||
5453 | * data/bison.c++, data/bison.simple: Don't output the current file | |
5454 | name in #line, to avoid useless diffs between two identical | |
5455 | outputs under different names. | |
5456 | ||
18bcecb0 AD |
5457 | 2002-04-07 Akim Demaille <akim@epita.fr> |
5458 | ||
5459 | * src/closure.c, src/print.c, src/reader.c, src/reduce.c: | |
5460 | Normalize loops to using `< nrules + 1', not `<= nrules'. | |
5461 | ||
fa770c86 AD |
5462 | 2002-04-07 Akim Demaille <akim@epita.fr> |
5463 | ||
5464 | * TODO: Update. | |
5465 | ||
d9b739c3 AD |
5466 | 2002-04-07 Akim Demaille <akim@epita.fr> |
5467 | ||
5468 | * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename | |
5469 | bucket.value as bucket.number. | |
5470 | ||
99013900 AD |
5471 | 2002-04-07 Akim Demaille <akim@epita.fr> |
5472 | ||
5473 | * src/closure.c, src/derives.c, src/gram.h, src/lalr.c, | |
5474 | * src/nullable.c, src/output.c, src/print.c, src/print_graph.c, | |
5475 | * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the | |
5476 | RHS, instead of being an index in RITEMS. | |
5477 | ||
e966383b PE |
5478 | 2002-04-04 Paul Eggert <eggert@twinsun.com> |
5479 | ||
5480 | * doc/bison.texinfo: Update copyright date. | |
5481 | (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII. | |
5482 | (Symbols): Warn about running Bison in one character set, | |
5483 | but compiling and/or running in an incompatible one. | |
5484 | Warn about character code 256, too. | |
5485 | ||
5486 | 2002-04-03 Paul Eggert <eggert@twinsun.com> | |
5487 | ||
5488 | * src/bison.data (YYSTACK_ALLOC): Depend on whether | |
5489 | YYERROR_VERBOSE is nonzero, not whether it is defined. | |
5490 | ||
5491 | Merge changes from bison-1_29-branch. | |
c307773e | 5492 | |
8d6c48b9 PE |
5493 | 2002-03-20 Paul Eggert <eggert@twinsun.com> |
5494 | ||
5495 | Merge fixes from Debian bison_1.34-1.diff. | |
5496 | ||
5497 | * configure.in (AC_PREREQ): 2.53. | |
5498 | ||
e53c6322 AD |
5499 | 2002-03-20 Akim Demaille <akim@epita.fr> |
5500 | ||
5501 | * src/conflicts.c (log_resolution): Argument `resolution' is const. | |
5502 | ||
9ffbeca7 PE |
5503 | 2002-03-19 Paul Eggert <eggert@twinsun.com> |
5504 | ||
21db0b2a PE |
5505 | * src/bison.simple (YYCOPY): New macro. |
5506 | (YYSTACK_RELOCATE): Use it. | |
5507 | Remove Type arg; no longer needed. All callers changed. | |
5508 | (yymemcpy): Remove; no longer needed. | |
5509 | ||
9ffbeca7 PE |
5510 | * Makefile.am (AUTOMAKE_OPTIONS): 1.6. |
5511 | * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove. | |
5512 | ||
642cb8f8 AD |
5513 | 2002-03-19 Akim Demaille <akim@epita.fr> |
5514 | ||
5515 | Test and fix the #line outputs. | |
5516 | ||
5517 | * tests/atlocal.at (GCC): New. | |
5518 | * tests/synclines.at (AT_TEST_SYNCLINE): New macro. | |
5519 | (Prologue synch line, ,%union synch line, Postprologue synch line) | |
5520 | (Action synch line, Epilogue synch line): New tests. | |
5521 | * src/reader.c (parse_union_decl): Define the muscle stype_line. | |
5522 | * data/bison.simple, data/bison.c++: Use it. | |
5523 | ||
3c31a486 AD |
5524 | 2002-03-19 Akim Demaille <akim@epita.fr> |
5525 | ||
5526 | * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts) | |
5527 | (Solved SR Conflicts, %expect not enough, %expect right) | |
5528 | (%expect too much): Move to... | |
5529 | * tests/conflicts.at: this new file. | |
5530 | ||
0d8bed56 AD |
5531 | 2002-03-19 Akim Demaille <akim@epita.fr> |
5532 | ||
5533 | * data/m4sugar/m4sugar.m4: Update from CVS Autoconf. | |
5534 | * data/bison.simple, data/bison.c++: Handle the `#define' part, so | |
5535 | that we can move to enums for instance. | |
5536 | * src/output.c (token_definitions_output): Output a list of | |
5537 | `token-name, token-number' instead of the #define. | |
5538 | (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'. | |
5539 | ||
9208d17f AD |
5540 | 2002-03-14 Akim Demaille <akim@epita.fr> |
5541 | ||
5542 | Use Gettext 0.11.1. | |
5543 | ||
af27eacb RA |
5544 | 2002-03-09 Robert Anisko <robert@lrde.epita.fr> |
5545 | ||
5546 | * data/bison.c++: Make the user able to add members to the generated | |
5547 | parser by subclassing. | |
5548 | ||
9101a310 RA |
5549 | 2002-03-05 Robert Anisko <robert@lrde.epita.fr> |
5550 | ||
5551 | * src/reader.c (read_additionnal_code): `c' should be an integer, not | |
5552 | a character. | |
5553 | Reported by Nicolas Tisserand and Nicolas Burrus. | |
5554 | ||
fff9bf0b RA |
5555 | 2002-03-04 Robert Anisko <robert@lrde.epita.fr> |
5556 | ||
5557 | * src/reader.c: Warn about lacking semi-colons, do not complain. | |
5558 | ||
64dba31e RA |
5559 | 2002-03-04 Robert Anisko <robert@lrde.epita.fr> |
5560 | ||
5561 | * data/bison.c++: Remove a debug line. | |
5562 | ||
374f5a14 RA |
5563 | 2002-03-04 Robert Anisko <robert@lrde.epita.fr> |
5564 | ||
5565 | * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge | |
5566 | location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and | |
5567 | provide a default implementation. | |
5568 | ||
bfcf1f3a AD |
5569 | 2002-03-04 Akim Demaille <akim@epita.fr> |
5570 | ||
5571 | * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'. | |
5572 | * tests/output.at (AT_CHECK_OUTPUT): Likewise. | |
5573 | * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto. | |
5574 | * tests/semantic.at (Parsing Guards): Similarly. | |
5575 | * src/reader.at (readgram): Complain if the last rule is not ended | |
5576 | with a semi-colon. | |
5577 | ||
65ccf9fc AD |
5578 | 2002-03-04 Akim Demaille <akim@epita.fr> |
5579 | ||
5580 | * src/warshall.h, src/warshall.c (bitmatrix_print): Move to... | |
5581 | * src/closure.c: here. | |
5582 | (set_firsts): Use bitsetv_reflexive_transitive_closure instead of | |
5583 | RTC. | |
5584 | * src/warshall.h, src/warshall.c: Remove. | |
5585 | * tests/sets.at (Broken Closure): Adjust. | |
5586 | ||
d0039cbc AD |
5587 | 2002-03-04 Akim Demaille <akim@epita.fr> |
5588 | ||
5589 | * src/output.c (output_skeleton): tempdir is const. | |
5590 | bytes_read is unused. | |
5591 | ||
345cea78 AD |
5592 | 2002-03-04 Akim Demaille <akim@epita.fr> |
5593 | ||
5594 | * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c, | |
5595 | * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c: | |
5596 | Update. | |
5597 | From Michael Hayes. | |
5598 | ||
564801f7 AD |
5599 | 2002-03-04 Akim Demaille <akim@epita.fr> |
5600 | ||
5601 | * src/closure.c (closure): `r' is unused. | |
5602 | ||
e5352bc7 AD |
5603 | 2002-03-04 Akim Demaille <akim@epita.fr> |
5604 | ||
5605 | * tests/sets.at (Broken Closure): Add the ending `;'. | |
5606 | * src/reader.at (readgram): Complain if a rule is not ended with a | |
5607 | semi-colon. | |
5608 | ||
914feea9 AD |
5609 | 2002-03-04 Akim Demaille <akim@epita.fr> |
5610 | ||
5611 | * src/conflicts.c (set_conflicts): Use bitset_disjoint_p. | |
5612 | (count_sr_conflicts): Use bitset_count. | |
5613 | * src/reduce.c (inaccessable_symbols): Ditto. | |
5614 | (bits_size): Remove. | |
5615 | * src/warshall.h, src/warshall.c: Convert to bitsetv. | |
5616 | ||
f0250de6 AD |
5617 | 2002-03-04 Akim Demaille <akim@epita.fr> |
5618 | ||
5619 | * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c, | |
5620 | * src/reduce.c: Remove the `bitset_zero's following the | |
5621 | `bitset_create's, as now it is performed by the latter. | |
5622 | ||
ef017502 AD |
5623 | 2002-03-04 Akim Demaille <akim@epita.fr> |
5624 | ||
5625 | * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h, | |
5626 | * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h, | |
5627 | * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the | |
5628 | latest sources from Michael. | |
5629 | ||
76514394 AD |
5630 | 2002-03-04 Akim Demaille <akim@epita.fr> |
5631 | ||
5632 | * src/output.c (output): Don't free the grammar. | |
5633 | * src/reader.c (grammar_free): New. | |
5634 | * src/main.c (main): Call it and don't free symtab here. | |
5635 | ||
55024580 AD |
5636 | 2002-03-04 Akim Demaille <akim@epita.fr> |
5637 | ||
5638 | * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer | |
5639 | before returning. | |
5640 | Reported by Benoit Perrot. | |
5641 | ||
f9abaa2c AD |
5642 | 2002-03-04 Akim Demaille <akim@epita.fr> |
5643 | ||
5644 | Use bitset operations when possible, not loops over bits. | |
5645 | ||
5646 | * src/conflicts.c (set_conflicts, count_sr_conflicts): Use | |
5647 | bitset_or. | |
5648 | * src/print.c (print_reductions): Use bitset_and, bitset_andn. | |
5649 | * src/reduce.c (useless_nonterminals): Formatting changes. | |
5650 | * src/warshall.c (TC): Use bitset_or. | |
5651 | ||
0e721e75 AD |
5652 | 2002-03-04 Akim Demaille <akim@epita.fr> |
5653 | ||
5654 | * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused. | |
5655 | * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET): | |
5656 | Ditto. | |
5657 | ||
0fb1ffb1 AD |
5658 | 2002-03-04 Akim Demaille <akim@epita.fr> |
5659 | ||
5660 | * src/lalr.c (F): Now a bitset*. | |
5661 | Adjust all dependencies. | |
5662 | ||
b86796bf AD |
5663 | 2002-03-04 Akim Demaille <akim@epita.fr> |
5664 | ||
5665 | * src/conflicts.c (shiftset, lookaheadset): Now bitset. | |
5666 | Adjust all dependencies. | |
5667 | ||
602bbf31 AD |
5668 | 2002-03-04 Akim Demaille <akim@epita.fr> |
5669 | ||
5670 | * src/L0.c, src/LR0.h (nstates): Be size_t. | |
5671 | Adjust comparisons (signed vs unsigned). | |
5672 | * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a | |
5673 | bitset*. | |
5674 | Adjust all dependencies. | |
5675 | ||
d8a0245c AD |
5676 | 2002-03-04 Akim Demaille <akim@epita.fr> |
5677 | ||
5678 | * src/closure.c (firsts): Now, also a bitset. | |
5679 | Adjust all dependencies. | |
5680 | (varsetsize): Remove, now unused. | |
5681 | * src/warshall.h, src/warshall.c: Now work on arrays of bitsets. | |
5682 | ||
34ba9743 AD |
5683 | 2002-03-04 Akim Demaille <akim@epita.fr> |
5684 | ||
5685 | * src/print.c: Convert to use bitset.h, not hand coded iterations | |
5686 | over ints. | |
5687 | ||
ed86e78c AD |
5688 | 2002-03-04 Akim Demaille <akim@epita.fr> |
5689 | ||
5690 | * src/reduce.c: Convert to use bitset.h, not hand coded BSet. | |
5691 | ||
dfdb1797 AD |
5692 | 2002-03-04 Akim Demaille <akim@epita.fr> |
5693 | ||
5694 | * src/closure.c (ruleset): Be a bitset. | |
5695 | (rulesetsize): Remove. | |
5696 | ||
7086e707 AD |
5697 | 2002-03-04 Akim Demaille <akim@epita.fr> |
5698 | ||
5699 | * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c, | |
5700 | * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, | |
5701 | * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New. | |
5702 | * src/closure.c (fderives): Be an array of bitsets. | |
5703 | ||
98254360 RA |
5704 | 2002-02-28 Robert Anisko <robert@lrde.epita.fr> |
5705 | ||
5706 | * data/bison.c++: Merge the two generated headers. Insert a copyright | |
5707 | notice in each output file. | |
5708 | ||
a75c057f AD |
5709 | 2002-02-28 Akim Demaille <akim@epita.fr> |
5710 | ||
5711 | * data/bison.c++: Copy the prologue of bison.simple to fetch | |
5712 | useful M4 definitions, such as b4_header_guard. | |
5713 | ||
06b00abc AD |
5714 | 2002-02-25 Akim Demaille <akim@epita.fr> |
5715 | ||
5716 | * src/getargs.c (version): Give the name of the authors, and use a | |
a75c057f AD |
5717 | translator friendly scheme for the bgr |
5718 | copyright notice. | |
06b00abc | 5719 | |
70e7d534 AD |
5720 | 2002-02-25 Akim Demaille <akim@epita.fr> |
5721 | ||
5722 | * src/output.c (header_output): Remove, now handled completely via | |
5723 | M4. | |
5724 | ||
abe017f6 AD |
5725 | 2002-02-25 Akim Demaille <akim@epita.fr> |
5726 | ||
5727 | * m4/m4.m4: New, from CVS Autoconf. | |
5728 | * configure.in: Invoke it. | |
5729 | * src/output.c (output_skeleton): Use its result instead of the | |
5730 | hard coded name. | |
5731 | ||
381fb12e AD |
5732 | 2002-02-25 Akim Demaille <akim@epita.fr> |
5733 | ||
5734 | * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from | |
5735 | Fileutils 4.1.5. | |
5736 | * configure.in: Invoke UTILS_FUNC_MKSTEMP. | |
5737 | * src/output.c (output_skeleton): Use mkstemp to create a real | |
5738 | temporary file. | |
5739 | Move the filling of `skeleton' and its muscle to... | |
5740 | (prepare): here. | |
5741 | (output): Move the definition of the prologue muscle to... | |
5742 | (prepare): here. | |
5743 | * src/system.h (DEFAULT_TMPDIR): New. | |
5744 | ||
6f38107f PE |
5745 | 2002-02-14 Paul Eggert <eggert@twinsun.com> |
5746 | ||
5747 | Remove the support for C++ namespace cleanliness; it was | |
5748 | causing more problems than it was curing, since it didn't work | |
5749 | properly on some nonstandard C++ compilers. This can wait | |
5750 | for a proper C++ parser. | |
5751 | ||
5752 | * NEWS: Document this. | |
5753 | * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention | |
5754 | of C++, as it's treated like C now. | |
5755 | * src/bison.simple (YYSTD): Remove. | |
5756 | (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL): | |
5757 | Treat C++ just like Standard C instead of trying to support | |
5758 | namespace cleanliness. | |
5759 | ||
80cce3da AD |
5760 | 2002-02-14 Akim Demaille <akim@epita.fr> |
5761 | ||
5762 | * tests/regression.at (else): Adjust to Andreas' change. | |
5763 | ||
842e8679 AD |
5764 | 2002-02-14 Akim Demaille <akim@epita.fr> |
5765 | ||
5766 | * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c. | |
5767 | ||
4bda3f10 AD |
5768 | 2002-02-13 Andreas Schwab <schwab@suse.de> |
5769 | ||
5770 | * src/output.c (output_rule_data): Don't output NULL, it might | |
5771 | not be defined yet. | |
5772 | ||
4162fa07 | 5773 | 2002-02-11 Robert Anisko <robert@lrde.epita.fr> |
b418ecd8 | 5774 | |
4162fa07 RA |
5775 | * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue. |
5776 | (Copyright notice): Update. | |
b418ecd8 | 5777 | |
bd16a5dc AD |
5778 | 2002-02-11 Akim Demaille <akim@epita.fr> |
5779 | ||
5780 | * tests/regression.at (%nonassoc and eof): Don't include | |
5781 | nonportable headers. | |
5782 | ||
8d69a1a3 RA |
5783 | 2002-02-08 Robert Anisko <robert@lrde.epita.fr> |
5784 | ||
5785 | * data/bison.c++: Correct error recovery. Make the user able to | |
5786 | initialize the starting location. | |
5787 | ||
9b2d0677 AD |
5788 | 2002-02-07 Akim Demaille <akim@epita.fr> |
5789 | ||
5790 | * tests/input.at: New. | |
5791 | ||
69e2658b RA |
5792 | 2002-02-07 Robert Anisko <robert@lrde.epita.fr> |
5793 | ||
5794 | * data/bison.c++: Replace some direct m4 expansions by constants. Be | |
9b2d0677 | 5795 | more consistent when naming methods and variables. Put preprocessor |
69e2658b RA |
5796 | directives around tables only needed for debugging. |
5797 | ||
4aacc3a7 RA |
5798 | 2002-02-07 Robert Anisko <robert@lrde.epita.fr> |
5799 | ||
5800 | * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in | |
5801 | C++ parsers. | |
5802 | (yy::b4_name::parse): Use print_. | |
5803 | ||
762a801e RA |
5804 | 2002-02-07 Robert Anisko <robert@lrde.epita.fr> |
5805 | ||
5806 | * data/bison.c++ (yy::b4_name::parse): Error recovery is back. | |
5807 | ||
4bb2bc3f RA |
5808 | 2002-02-07 Robert Anisko <robert@lrde.epita.fr> |
5809 | ||
5810 | * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in | |
5811 | C++ parsers. | |
5812 | (yy::b4_name::parse): Build verbose error messages, and use error_. | |
5813 | ||
6b45a3ca RA |
5814 | 2002-02-06 Robert Anisko <robert@lrde.epita.fr> |
5815 | ||
5816 | * data/bison.c++: Fix m4 quoting in comments. | |
5817 | ||
50997c6e RA |
5818 | 2002-02-06 Robert Anisko <robert@lrde.epita.fr> |
5819 | ||
5820 | * data/bison.c++: Adjust the parser code. Fix some muscles that were | |
5821 | not expanded by m4. | |
5822 | ||
3f3eed27 AD |
5823 | 2002-02-05 Akim Demaille <akim@epita.fr> |
5824 | ||
5825 | * data/bison.c++: Adjust to the M4 back end. | |
5826 | More is certainly needed. | |
5827 | ||
be2a1a68 AD |
5828 | 2002-02-05 Akim Demaille <akim@epita.fr> |
5829 | ||
5830 | Give a try to M4 as a back end. | |
5831 | ||
5832 | * lib/readpipe.c: New, from wdiff. | |
5833 | * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and | |
5834 | BISON_HAIRY. | |
5835 | * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS | |
5836 | specific values. Now it is m4 that performs the lookup. | |
5837 | * src/parse-skel.y: Remove. | |
5838 | * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New. | |
5839 | * src/output.c (actions_output, guards_output) | |
5840 | (token_definitions_output): No longer keeps track of the output | |
5841 | line number, hence remove the second argument. | |
5842 | (guards_output): Check against the guard member of a rule, not the | |
5843 | action member. | |
5844 | Adjust callers. | |
5845 | (output_skeleton): Don't look for the skeleton location, let m4 do | |
5846 | that. | |
5847 | Create `/tmp/muscles.m4'. This is temporary, a proper temporary | |
5848 | file will be used. | |
5849 | Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton. | |
5850 | (prepare): Given that for the time being changesyntax is not | |
5851 | usable in M4, rename the muscles using `-' to `_'. | |
5852 | Define `defines_flag', `output_parser_name' and `output_header_name'. | |
5853 | * src/output.h (actions_output, guards_output) | |
5854 | (token_definitions_output): Adjust prototypes. | |
5855 | * src/scan-skel.l: Instead of scanning the skeletons, it now | |
5856 | processes the output of m4: `__oline__' and `#output'. | |
5857 | * data/bison.simple: Adjust to be used by M4(sugar). | |
5858 | * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up | |
5859 | to date. | |
5860 | * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR' | |
5861 | instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'. | |
5862 | * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New, | |
5863 | shamelessly stolen from CVS Autoconf. | |
5864 | ||
beda758b AD |
5865 | 2002-02-05 Akim Demaille <akim@epita.fr> |
5866 | ||
5867 | * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version. | |
5868 | * configure.in: Check for the declarations of free and malloc. | |
5869 | * src/muscle_tab.c: Adjust. | |
5870 | ||
5ece6d43 AD |
5871 | 2002-02-05 Akim Demaille <akim@epita.fr> |
5872 | ||
5873 | * src/muscle_tab.c (muscle_init): Don't default to NULL muscle | |
5874 | which have no values. | |
5875 | ||
5bb18f9a AD |
5876 | 2002-02-05 Akim Demaille <akim@epita.fr> |
5877 | ||
5878 | * src/bison.simple, src/bison.hairy, src/bison.c++: Move to... | |
5879 | * data/: here. | |
5880 | ||
894dd62e PE |
5881 | 2002-01-29 Paul Eggert <eggert@twinsun.com> |
5882 | ||
5883 | * src/bison.simple (YYSIZE_T): Do not define merely because | |
5884 | YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined. | |
5885 | On some platforms, <alloca.h> does not declare YYSTD (size_t). | |
5886 | ||
82841af7 AD |
5887 | 2002-01-27 Akim Demaille <akim@epita.fr> |
5888 | ||
5889 | Fix `%nonassoc and eof'. | |
5890 | ||
5891 | * src/state.c (errs_dup): Aaaah! The failure was due to bytes | |
5892 | which were not properly copied! Replace | |
5893 | memcpy (res->errs, src->errs, src->nerrs); | |
5894 | with | |
5895 | memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0])); | |
5896 | !!! | |
5897 | * tests/regression.at (%nonassoc and eof): Adjust to newest | |
5898 | Autotest: `.' is not in the PATH. | |
5899 | ||
318b76e9 AD |
5900 | 2002-01-27 Akim Demaille <akim@epita.fr> |
5901 | ||
5902 | * tests/sets.at (AT_EXTRACT_SETS): New. | |
5903 | (Nullable): Use it. | |
5904 | (Firsts): New. | |
5905 | ||
30d2f3d5 AD |
5906 | 2002-01-26 Akim Demaille <akim@epita.fr> |
5907 | ||
5908 | * tests/actions.at, tests/calc.at, tests/headers.at, | |
5909 | * tests/torture.at: Adjust to the newest Autotest which no longer | |
5910 | forces `.' in the PATH. | |
5911 | ||
30f8c395 AD |
5912 | 2002-01-25 Akim Demaille <akim@epita.fr> |
5913 | ||
5914 | * tests/regression.at (%nonassoc and eof): New. | |
5915 | Suggested by Robert Anisko. | |
5916 | ||
29ae55f1 AD |
5917 | 2002-01-24 Akim Demaille <akim@epita.fr> |
5918 | ||
5919 | Bison dumps core when trying to complain about broken input files. | |
5920 | Reported by Cris van Pelt. | |
5921 | ||
5922 | * src/lex.c (parse_percent_token): Be sure to set token_buffer. | |
5923 | * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge | |
5924 | into... | |
5925 | (Invalid inputs): Strengthen: exercise parse_percent_token. | |
5926 | ||
2b548aa6 RA |
5927 | 2002-01-24 Robert Anisko <robert.anisko@epita.fr> |
5928 | ||
5929 | * src/Makefile.am: Add bison.c++. | |
5930 | * src/bison.c++: New skeleton. | |
5931 | ||
bb0146c2 AD |
5932 | 2002-01-21 Paolo Bonzini <bonzini@gnu.org> |
5933 | ||
5934 | * po/it.po: New. | |
5935 | ||
bec30531 AD |
5936 | 2002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net> |
5937 | ||
5938 | * src/files.c (skeleton_find) [MSDOS]: Fix cp definition. | |
5939 | ||
fc6edc45 MA |
5940 | 2002-01-20 Marc Autret <marc@gnu.org> |
5941 | ||
5942 | * src/files.c (compute_output_file_names): Fix | |
5943 | ||
5e5d5415 MA |
5944 | 2002-01-20 Marc Autret <marc@gnu.org> |
5945 | ||
5946 | * tests/output.at: New test. | |
5947 | * src/files.c (compute_base_names): Don't map extensions when | |
5948 | the YACC flag is set, use defaults. | |
5949 | Reported by Evgeny Stambulchik. | |
5950 | ||
44ea3fbd MA |
5951 | 2002-01-20 Marc Autret <marc@gnu.org> |
5952 | ||
bb0146c2 | 5953 | * src/system.h: Need to define __attribute__ away for non-GCC |
44ea3fbd MA |
5954 | compilers as well (i.e. the vendor C compiler). |
5955 | Suggested by Albert Chin-A-Young. | |
5956 | ||
338963d1 TVH |
5957 | 2002-01-11 Tim Van Holder <tim.van.holder@pandora.be> |
5958 | ||
5959 | * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the | |
5960 | canonical definition. | |
5961 | * src/system.h: Use the canonical definition for PARAMS (avoids | |
5962 | a conflict with the macro from lib/hash.h). | |
5963 | ||
c57b2479 AD |
5964 | 2002-01-11 Akim Demaille <akim@epita.fr> |
5965 | ||
5966 | * configure.in: Use AC_FUNC_STRNLEN. | |
d9e9746c | 5967 | Fixes the failures observed on AIX 4.3 by H.Merijn Brand. |
c57b2479 | 5968 | |
b85810ae AD |
5969 | 2002-01-09 Akim Demaille <akim@epita.fr> |
5970 | ||
5971 | * src/files.c, src/files.h (output_infix): New. | |
5972 | (tab_extension): Remove. | |
5973 | (compute_base_names): Compute the former, drop the latter. | |
5974 | * src/output.c (prepare): Insert the muscles `output-infix', and | |
5975 | `output-suffix'. | |
5976 | * src/parse-skel.y (string, string.1): New. | |
5977 | (section.header): Use it. | |
5978 | (section.yacc): Remove. | |
5979 | (prefix): Remove too. | |
5980 | * src/scan-skel.l: Adjust. | |
5981 | * src/bison.simple, src/bison.hairy: Adjust. | |
5982 | ||
cae60122 AD |
5983 | 2002-01-09 Akim Demaille <akim@epita.fr> |
5984 | ||
5985 | * configure.in (WERROR_CFLAGS): Compute it. | |
5986 | * src/Makefile.am (CFLAGS): Pass it. | |
5987 | * tests/atlocal.in (CFLAGS): Idem. | |
5988 | * src/files.c: Fix a few warnings. | |
5989 | (get_extension_index): Remove, unused. | |
5990 | ||
ae404801 AD |
5991 | 2002-01-08 Akim Demaille <akim@epita.fr> |
5992 | ||
5993 | * src/getargs.c (AS_FILE_NAME): New. | |
5994 | (getargs): Use it to convert DOSish file names. | |
5995 | * src/files.c (base_name): Rename as full_base_name to avoid | |
5996 | clashes with `base_name ()'. | |
5997 | (filename_split): New. | |
5998 | (compute_base_names): N-th rewrite, using filename_split. | |
5999 | ||
22312b71 AD |
6000 | 2002-01-08 Akim Demaille <akim@epita.fr> |
6001 | ||
6002 | * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c: | |
6003 | New, stolen from the Fileutils 4.1. | |
6004 | * lib/Makefile.am (libbison_a_SOURCES): Adjust. | |
6005 | * configure.in: Check for the presence of memrchr, and of its | |
6006 | prototype. | |
6007 | ||
a67cef01 TVH |
6008 | 2002-01-07 Tim Van Holder <tim.van.holder@pandora.be> |
6009 | ||
6010 | * lib/hash.h (__P): Added definition for this macro. | |
6011 | * src/Makefile.am: Add parse-skel.c and scan-skel.c to | |
6012 | BUILT_SOURCES, to ensure they are generated first. | |
6013 | * src/parse-skel.y: Use YYERROR_VERBOSE instead of | |
6014 | %error-verbose to allow bootstrapping with bison 1.30x. | |
6015 | ||
2b25d624 AD |
6016 | 2002-01-06 Akim Demaille <akim@epita.fr> |
6017 | ||
6018 | * src/reader.c (parse_braces): Don't fetch the next char, the | |
6019 | convention is to fetch on entry. | |
6020 | * tests/torture.at (GNU Cim Grammar): Reintroduce their weird | |
6021 | 'switch' without a following semicolon. | |
6022 | * tests/regression.at (braces parsing): New. | |
6023 | ||
3460813b AD |
6024 | 2002-01-06 Akim Demaille <akim@epita.fr> |
6025 | ||
6026 | Bison is dead wrong in its RR conflict reports. | |
6027 | ||
6028 | * tests/torture.at (GNU Cim Grammar): New. | |
6029 | * src/conflicts.c (count_rr_conflicts): Fix. | |
6030 | ||
73784c64 AD |
6031 | 2002-01-06 Akim Demaille <akim@epita.fr> |
6032 | ||
6033 | Creating package.m4 from configure.ac causes too many problems. | |
6034 | ||
6035 | * tests/Makefile.am (package.m4): Create it by hand, | |
6036 | AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf. | |
6037 | ||
25d81090 AD |
6038 | 2002-01-06 Akim Demaille <akim@epita.fr> |
6039 | ||
6040 | * src/Makefile.am (bison_SOURCES): Add parse-skel.h and | |
6041 | skeleton.h. | |
6042 | ||
a9b8959e PE |
6043 | 2002-01-04 Paul Eggert <eggert@twinsun.com> |
6044 | ||
6045 | * doc/bison.texinfo (Debugging): | |
6046 | Remove YYSTDERR; it's no longer defined or used. | |
6047 | Also, s/cstdio.h/cstdio/. | |
6048 | ||
25d81090 AD |
6049 | 2002-01-03 Akim Demaille <akim@epita.fr> |
6050 | ||
6051 | * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf. | |
6052 | ||
1109455c AD |
6053 | 2002-01-03 Akim Demaille <akim@epita.fr> |
6054 | ||
6055 | * src/parse-skel.y (process_skeleton): Don't bind the parser's | |
6056 | tracing code to --trace, wait for a better --trace option, with | |
6057 | args. | |
6058 | ||
7ea5e977 AD |
6059 | 2002-01-03 Akim Demaille <akim@epita.fr> |
6060 | ||
6061 | * src/bison.simple (YYSTDERR): Remove, replace `stderr'. | |
6062 | The ISO C++ standard is extremely clear about it: stderr is | |
6063 | considered a macro, not a regular symbol (see table 94 `Header | |
6064 | <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files). | |
6065 | Therefore std:: does not apply to it. It still does with fprintf. | |
6066 | Also, s/cstdio.h/cstdio/. | |
6067 | ||
fab5b110 AD |
6068 | 2002-01-03 Akim Demaille <akim@epita.fr> |
6069 | ||
6070 | * lib/quotearg.c: Use `#include "..."' instead of `#include <...>' | |
6071 | for non system headers. | |
6072 | ||
aed7fd9b AD |
6073 | 2002-01-02 Akim Demaille <akim@epita.fr> |
6074 | ||
6075 | Equip the skeleton chain with location tracking, runtime trace, | |
6076 | pure parser and scanner. | |
6077 | ||
6078 | * src/parse-skel.y: Request a pure parser, locations, and prefix | |
6079 | renaming. | |
6080 | (%union): Having several members with the same type does not help | |
6081 | type mismatches, simplify. | |
6082 | (YYPRINT, yyprint): New. | |
6083 | (yyerror): ``Rename'' (there is a #define yyerror skel_error) as... | |
6084 | (skel_error): this. | |
6085 | Handle locations. | |
6086 | * src/scan-skel.l: Adjust to these changes. | |
6087 | * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP) | |
6088 | (LOCATION_PRINT, skel_control_t): New. | |
6089 | ||
24fad99e AD |
6090 | 2001-12-30 Akim Demaille <akim@epita.fr> |
6091 | ||
6092 | * src/parse-skel.y: Get rid of the shift/reduce conflict: | |
6093 | replace `gb' with BLANKS. | |
6094 | * src/scan-skel.l: Adjust. | |
6095 | ||
a4b36db4 AD |
6096 | 2001-12-30 Akim Demaille <akim@epita.fr> |
6097 | ||
6098 | * src/system.h: We don't need nor want bcopy. | |
6099 | Throw away MS-DOS crap: we don't need getpid. | |
6100 | * configure.in: We don't need strndup. It was even causing | |
6101 | problems: because Flex includes the headers *before* us, | |
6102 | _GNU_SOURCE is not defined by config.h, and therefore strndup was | |
6103 | not visible. | |
6104 | * lib/xstrndup.c: New. | |
6105 | * src/scan-skel.l: Use it. | |
6106 | Be sure to initialize yylval.muscle member when scanning a MUSCLE. | |
6107 | * src/parse-skel.y: Use %directives instead of #defines. | |
6108 | ||
1239777d AD |
6109 | 2001-12-30 Akim Demaille <akim@epita.fr> |
6110 | ||
6111 | * src/skeleton.h: New. | |
6112 | * src/output.c (output_parser, output_master_parser): Remove, dead | |
6113 | code. | |
6114 | * src/output.h (get_lines_number, actions_output, guards_output) | |
6115 | (token_definitions_output): Prototype them. | |
6116 | * src/parse-skel.y: Add the license notice. | |
6117 | Include output.h and skeleton.h. | |
6118 | (process_skeleton): Returns void, and takes a single parameter. | |
6119 | * src/scan-skel.l: Add the license notice. | |
6120 | Include skeleton.h. | |
6121 | Don't use %option yylineno: it seems that then Flex imagines | |
6122 | REJECT has been used, and therefore it won't reallocate its | |
6123 | buffers (which makes no other sense to me than a bug). It results | |
6124 | in warnings for `unused: yy_flex_realloc'. | |
6125 | ||
9b3add5b RA |
6126 | 2001-12-30 Robert Anisko <robert.anisko@epita.fr> |
6127 | ||
6128 | * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING) | |
6129 | (MUSCLE_INSERT_PREFIX): ...to there. | |
6130 | * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING) | |
6131 | (MUSCLE_INSERT_PREFIX): Move from here... | |
6132 | ||
6133 | * src/bison.hairy: Add a section directive. Put braces around muscle | |
6134 | names. This parser skeleton is still broken, but Bison should not | |
6135 | choke on a bad muscle 'syntax'. | |
6136 | * src/bison.simple: Add a section directive. Put braces around muscle | |
6137 | names. | |
6138 | ||
6139 | * src/files.h (strsuffix, stringappend): Add declarations. | |
6140 | (tab_extension): Add declaration. | |
6141 | (short_base_name): Add declaration. | |
6142 | ||
6143 | * src/files.c (strsuffix, stringappend): No longer static. These | |
6144 | functions are used in the skeleton parser. | |
6145 | (tab_extension): New. | |
6146 | (compute_base_names): Use the computations done in this function | |
fab5b110 | 6147 | to guess if the generated parsers should have '.tab' in their |
9b3add5b RA |
6148 | names. |
6149 | (short_base_name): No longer static. | |
6150 | ||
6151 | * src/output.c (output_skeleton): New. | |
6152 | (output): Disable call to output_master_parser, and give a try to | |
6153 | a new skeleton handling system. | |
6154 | (guards_output, actions_output): No longer static. | |
6155 | (token_definitions_output, get_lines_number): No longer static. | |
6156 | ||
6157 | * configure.in: Use AM_PROG_LEX and AC_PROG_YACC. | |
6158 | ||
fab5b110 | 6159 | * src/Makefile.am (bison_SOURCES): Add scan-skel.l and |
9b3add5b RA |
6160 | parse-skel.y. |
6161 | ||
6162 | * src/parse-skel.y: New file. | |
6163 | * src/scan-skel.l: New file. | |
6164 | ||
b5b61c61 AD |
6165 | 2001-12-29 Akim Demaille <akim@epita.fr> |
6166 | ||
6167 | %name-prefix is broken. | |
6168 | ||
6169 | * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy". | |
6170 | Adjust all dependencies. | |
6171 | * tests/headers.at (export YYLTYPE): Strengthen this test: use | |
6172 | %name-prefix. | |
6173 | ||
6174 | Renaming yylval but not yylloc is not consistent. Now we do. | |
6175 | ||
6176 | * src/bison.simple: Prefix yylloc if used. | |
6177 | * doc/bison.texinfo (Decl Summary): Document that. | |
6178 | ||
8c9a50be AD |
6179 | 2001-12-29 Akim Demaille <akim@epita.fr> |
6180 | ||
6181 | * doc/bison.texinfo: Promote `%long-directive' over | |
6182 | `%long_directive'. | |
6183 | Remove all references to fixed-output-files, yacc is enough. | |
6184 | ||
d99361e6 AD |
6185 | 2001-12-29 Akim Demaille <akim@epita.fr> |
6186 | ||
6187 | * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the | |
6188 | user prologue. These are defaults. | |
6189 | * tests/actions.at (Mid-rule actions): Make sure the user can | |
6190 | define YYDEBUG and YYERROR_VERBOSE. | |
6191 | ||
b9cecb91 AD |
6192 | 2001-12-29 Akim Demaille <akim@epita.fr> |
6193 | ||
6194 | * src/output.c (header_output): Don't forget to export YYLTYPE and | |
6195 | yylloc. | |
6196 | * tests/headers.at (export YYLTYPE): New, make sure it does. | |
6197 | * tests/regression.at (%union and --defines, Invalid CPP headers): | |
6198 | Move to... | |
6199 | * tests/headers.at: here. | |
6200 | ||
aea13e97 AD |
6201 | 2001-12-29 Akim Demaille <akim@epita.fr> |
6202 | ||
6203 | * src/gram.h (rule_s): Member `assoc' is of type `associativity'. | |
6204 | ||
931394cb AD |
6205 | 2001-12-29 Akim Demaille <akim@epita.fr> |
6206 | ||
6207 | * tests/actions.at (Mid-rule actions): Output on a single line | |
6208 | instead of several. | |
6209 | ||
704a47c4 AD |
6210 | 2001-12-29 Akim Demaille <akim@epita.fr> |
6211 | ||
6212 | * doc/bison.texinfo: Formatting changes. | |
6213 | ||
091e20bb AD |
6214 | 2001-12-29 Akim Demaille <akim@epita.fr> |
6215 | ||
6216 | Don't store the token defs in a muscle, just be ready to output it | |
6217 | on command. Now possible via `symbols'. Fixes a memory leak. | |
6218 | ||
6219 | * src/output.c (token_definitions_output): New. | |
6220 | (output_parser, header_output): Use it. | |
6221 | * src/reader.c (symbols_save): Remove. | |
6222 | ||
cce71710 AD |
6223 | 2001-12-29 Akim Demaille <akim@epita.fr> |
6224 | ||
6225 | * src/bison.simple: Do not provide a default for YYSTYPE and | |
6226 | YYLTYPE before the user's prologue. Otherwise it's hardly... a | |
6227 | default. | |
6228 | ||
82c035a8 AD |
6229 | 2001-12-29 Akim Demaille <akim@epita.fr> |
6230 | ||
6231 | Mid-rule actions are simply... ignored! | |
6232 | ||
6233 | * src/reader.c (readgram): Be sure to attach mid-rule actions to | |
6234 | the empty-rule associated to the dummy symbol, not to the host | |
6235 | rule. | |
6236 | * tests/actions.at (Mid-rule actions): New. | |
6237 | ||
8419d367 AD |
6238 | 2001-12-29 Akim Demaille <akim@epita.fr> |
6239 | ||
6240 | Memory leak. | |
6241 | ||
6242 | * src/reader.c (reader): Free grammar. | |
6243 | ||
375d5806 AD |
6244 | 2001-12-29 Akim Demaille <akim@epita.fr> |
6245 | ||
6246 | Memory leak. | |
6247 | ||
6248 | * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here, | |
6249 | since it allocates it for each state, although only one is needed. | |
6250 | (allocate_storage): Do it here. | |
6251 | ||
f51cb8ff AD |
6252 | 2001-12-29 Akim Demaille <akim@epita.fr> |
6253 | ||
6254 | * src/options.h, src/options.c (create_long_option_table): Rename | |
6255 | as... | |
6256 | (long_option_table_new): this, with a clearer prototype. | |
6257 | (percent_table): Remove, unused, | |
6258 | * src/getargs.c (getargs): Adjust. | |
6259 | ||
29e88316 AD |
6260 | 2001-12-29 Akim Demaille <akim@epita.fr> |
6261 | ||
6262 | * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c | |
6263 | * src/print.c, src/print_graph.c, src/state.h: Rename state_table | |
6264 | as states. | |
6265 | ||
b9f71f19 AD |
6266 | 2001-12-29 Akim Demaille <akim@epita.fr> |
6267 | ||
6268 | * src/lalr.c (build_relations): Rename `states' as `states1'. | |
6269 | Sorry, I don't understand exactly what it is, no better name... | |
6270 | ||
1a2b5d37 AD |
6271 | 2001-12-29 Akim Demaille <akim@epita.fr> |
6272 | ||
6273 | * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c | |
6274 | * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c | |
6275 | * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table | |
6276 | as rules. | |
6277 | ||
1cca533e AD |
6278 | 2001-12-29 Akim Demaille <akim@epita.fr> |
6279 | ||
6280 | * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long | |
6281 | ago. | |
6282 | ||
c03ae966 AD |
6283 | 2001-12-29 Akim Demaille <akim@epita.fr> |
6284 | ||
6285 | * src/reader.c, src/reader.h (user_toknums): Remove. | |
6286 | Adjust all users to use symbols[i]->user_token_number. | |
6287 | ||
5a670b1e AD |
6288 | 2001-12-29 Akim Demaille <akim@epita.fr> |
6289 | ||
6290 | * src/gram.c, src/gram.h (sprec, sassoc): Remove. | |
6291 | Adjust all users to use symbols[i]->prec or ->assoc. | |
6292 | ||
ad949da9 AD |
6293 | 2001-12-29 Akim Demaille <akim@epita.fr> |
6294 | ||
6295 | * src/reader.c, src/reader.h (tags): Remove. | |
6296 | Adjust all users to use symbols[i]->tag. | |
6297 | ||
0e78e603 AD |
6298 | 2001-12-29 Akim Demaille <akim@epita.fr> |
6299 | ||
6300 | * src/gram.h, src/gram.c (symbols): New, similar to state_table | |
6301 | and rule_table. | |
6302 | * src/reader.c (packsymbols): Fill this table. | |
6303 | Drop sprec. | |
6304 | * src/conflicts.c (resolve_sr_conflict): Adjust. | |
6305 | * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a | |
6306 | single table. | |
6307 | Use symbols[i]->tag instead of tags[i]. | |
6308 | ||
213e640e AD |
6309 | 2001-12-29 Akim Demaille <akim@epita.fr> |
6310 | ||
6311 | * tests/calc.at (_AT_DATA_CALC_Y): Also use %union. | |
6312 | In addition, put a comment in there, to replace... | |
6313 | * tests/regression.at (%union and C comments): Remove. | |
6314 | ||
e7b8bef1 AD |
6315 | 2001-12-29 Akim Demaille <akim@epita.fr> |
6316 | ||
6317 | * tests/regression.at (Web2c Actions): Blindly move the actual | |
6318 | output as expected output. The contents *seem* right to me, but I | |
6319 | can't pretend reading perfectly parser tables... Nonetheless, all | |
6320 | the other tests pass correctly, the table look OK, even though the | |
6321 | presence of `$axiom' is to be noted: AFAICS it is useless (but | |
6322 | harmless). | |
6323 | ||
b68e7744 AD |
6324 | 2001-12-29 Akim Demaille <akim@epita.fr> |
6325 | ||
6326 | * src/reader.c (readgram): Don't add the rule 0 if there were no | |
6327 | rules read. In other words, add it _after_ having performed | |
6328 | grammar sanity checks. | |
6329 | Fixes the `tests/regression.at (Invalid input: 1)' Failure. | |
6330 | ||
78d5bae9 AD |
6331 | 2001-12-29 Akim Demaille <akim@epita.fr> |
6332 | ||
6333 | * tests/regression.at (Web2c Report): Catch up: the rule 0 is now | |
6334 | visible, and some states have now a different number. | |
6335 | ||
ff442794 AD |
6336 | 2001-12-29 Akim Demaille <akim@epita.fr> |
6337 | ||
6338 | * src/reader.c (readgram): Bind the initial rule's lineno to that | |
6339 | of the first rule. | |
6340 | * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts): | |
6341 | (Solved SR Conflicts): Adjust rule 0's line number. | |
6342 | ||
610ab194 AD |
6343 | 2001-12-29 Akim Demaille <akim@epita.fr> |
6344 | ||
6345 | Fix the `GAWK Grammar' failure. | |
6346 | ||
6347 | * src/LR0.c (final_state): Initialize to -1 so that we do compute | |
6348 | the reductions of the first state which was mistakenly confused | |
6349 | with the final state because precisely final_state was initialized | |
6350 | to 0. | |
6351 | * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads, | |
6352 | now noticed by Bison. | |
6353 | * tests/regression.at (Rule Line Numbers): Adjust: state 0 does | |
6354 | have a reduction on $default. | |
6355 | ||
29d29c8f AD |
6356 | 2001-12-29 Akim Demaille <akim@epita.fr> |
6357 | ||
6358 | * src/gram.c (ritem_print): Be sure to subtract 1 when displaying | |
6359 | rule line numbers. | |
6360 | * src/closure.c (print_closure): Likewise. | |
6361 | * src/derives.c (print_derives): Likewise. | |
6362 | * tests/sets.at (Nullable): Adjust: the rule numbers are correct | |
6363 | now. | |
6364 | ||
7c6b64d0 AD |
6365 | 2001-12-29 Akim Demaille <akim@epita.fr> |
6366 | ||
6367 | * src/lalr.c (lookaheads_print): New. | |
6368 | (lalr): Call it when --trace-flag. | |
6369 | * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads | |
6370 | are dumped. | |
6371 | ||
3d4daee3 AD |
6372 | 2001-12-29 Akim Demaille <akim@epita.fr> |
6373 | ||
6374 | * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0', | |
6375 | when walking through ritem, even via rule->rhs. | |
6376 | * src/reduce.c (dump_grammar, useful_production, reduce_output) | |
6377 | (useful_production, useless_nonterminals): Likewise. | |
6378 | (reduce_grammar_tables): Likewise, plus update nritems. | |
6379 | * src/nullable.c (set_nullable): Likewise. | |
6380 | * src/lalr.c (build_relations): Likewise. | |
6381 | * tests/sets.at (Nullable): Adjust. | |
6382 | Fortunately, now, the $axiom is no longer nullable. | |
6383 | ||
9e7f6bbd AD |
6384 | 2001-12-29 Akim Demaille <akim@epita.fr> |
6385 | ||
6386 | * src/LR0.c (generate_states): Use nritems, not nitems, nor using | |
6387 | the 0-sentinel. | |
6388 | * src/gram.c (ritem_longest_rhs): Likewise. | |
6389 | * src/reduce.c (nonterminals_reduce): Likewise. | |
6390 | * src/print_graph.c (print_graph): Likewise. | |
6391 | * src/output.c (output_rule_data): Likewise. | |
6392 | * src/nullable.c (set_nullable): Likewise. | |
6393 | ||
255ef638 AD |
6394 | 2001-12-29 Akim Demaille <akim@epita.fr> |
6395 | ||
6396 | * src/output.c: Comment changes. | |
6397 | ||
0d8a7363 AD |
6398 | 2001-12-27 Paul Eggert <eggert@twinsun.com> |
6399 | ||
6400 | * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special | |
6401 | cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and | |
6402 | Sparc, as they were causing more porting problems than the | |
6403 | (minor) performance improvement was worth. | |
6404 | ||
6405 | Also, catch up with 1.31's YYSTD. | |
6406 | ||
3db472b9 AD |
6407 | 2001-12-27 Akim Demaille <akim@epita.fr> |
6408 | ||
6409 | * src/output.c (output_gram): Rely on nritems, not the | |
6410 | 0-sentinel. See below. | |
6411 | Use -1 as separator, not 0. | |
6412 | * src/bison.simple (yyparse): Subtract 1 to the rule numbers. | |
6413 | Rely on -1 as separator in yyrhs, instead of 0. | |
6414 | * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue | |
6415 | twice `Now at end of input', therefore there are two lines less to | |
6416 | expect. | |
6417 | ||
b365aa05 AD |
6418 | 2001-12-27 Akim Demaille <akim@epita.fr> |
6419 | ||
6420 | * tests/regression.at (Unresolved SR Conflicts): | |
6421 | (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes | |
6422 | below. | |
6423 | ||
30171f79 AD |
6424 | 2001-12-27 Akim Demaille <akim@epita.fr> |
6425 | ||
6426 | * src/LR0.c (new_state): Recognize the final state by the fact it | |
6427 | is reached by eoftoken. | |
6428 | (insert_start_shifting_state, insert_eof_shifting_state) | |
6429 | (insert_accepting_state, augment_automaton): Remove, since now | |
6430 | these states are automatically computed from the initial state. | |
6431 | (generate_states): Adjust. | |
6432 | * src/print.c: When reporting a rule number to the user, substract | |
6433 | 1, so that the axiom rule is rule 0, and the first user rule is 1. | |
6434 | * src/reduce.c: Likewise. | |
6435 | * src/print_graph.c (print_core): For the time being, just as for | |
6436 | the report, depend upon --trace-flags to dump the full set of | |
6437 | items. | |
6438 | * src/reader.c (readgram): Once the grammar read, insert the rule | |
6439 | 0: `$axiom: START-SYMBOL $'. | |
6440 | * tests/set.at: Adjust: rule 0 is now displayed, and since the | |
6441 | number of the states has changed (the final state is no longer | |
6442 | necessarily the last), catch up. | |
6443 | ||
75142d45 AD |
6444 | 2001-12-27 Akim Demaille <akim@epita.fr> |
6445 | ||
6446 | Try to make the use of the eoftoken valid. Given that its value | |
6447 | is 0 which was also used as a sentinel in ritem, (i) make sure >= 0 | |
6448 | is used instead of > 0 where appropriate, (ii), depend upon nritems | |
6449 | instead of the 0-sentinel. | |
6450 | ||
6451 | * src/gram.h, src/gram.c (nritems): New. | |
6452 | Expected to be duplication of nitems, but for the time being... | |
6453 | * src/reader.c (packgram): Assert nritems and nitems are equal. | |
6454 | * src/LR0.c (allocate_itemsets, new_itemsets): Adjust. | |
6455 | * src/closure.c (print_closure, print_fderives): Likewise. | |
6456 | * src/gram.c (ritem_print): Likewise. | |
6457 | * src/print.c (print_core, print_grammar): Likewise. | |
6458 | * src/print_graph.c: Likewise. | |
6459 | ||
b7c49edf AD |
6460 | 2001-12-27 Akim Demaille <akim@epita.fr> |
6461 | ||
6462 | * src/main.c (main): If there are complains after grammar | |
6463 | reductions, then output the report anyway if requested, then die. | |
6464 | * src/symtab.c (bucket_new): Initialize `value' to -1, not 0. | |
6465 | * src/reader.c (eoftoken): New. | |
6466 | (parse_token_decl): If the token being defined has value `0', it | |
6467 | is the eoftoken. | |
6468 | (packsymbols): No longer hack `tags' to insert `$' by hand. | |
6469 | Be sure to preserve the value of the eoftoken. | |
6470 | (reader): Make sure eoftoken is defined. | |
6471 | Initialize nsyms to 0: now eoftoken is created just like the others. | |
6472 | * src/print.c (print_grammar): Don't special case the eof token. | |
6473 | * src/regression.at: Adjust: `$' has value 0, not -1, which was a | |
6474 | lie anyway, albeit pleasant. | |
6475 | * tests/calc.at: Exercise error messages with eoftoken. | |
6476 | Change the grammar so that empty input is invalid. | |
6477 | Adjust expectations. | |
6478 | When yyungeting, be sure to use a valid yylloc: use last_yylloc. | |
6479 | ||
ec2da99f AD |
6480 | 2001-12-27 Akim Demaille <akim@epita.fr> |
6481 | ||
6482 | * configure.in: Check the protos of strchr ans strspn. | |
6483 | Replace strchr if needed. | |
6484 | * src/system.h: Provide the protos of strchr, strspn and memchr if | |
6485 | missing. | |
6486 | * lib/strchr.c: New. | |
6487 | * src/reader.c (symbols_save): Use strchr. | |
6488 | ||
8adfa272 AD |
6489 | 2001-12-27 Akim Demaille <akim@epita.fr> |
6490 | ||
6491 | * src/print.c, src/print_graph.c (escape): New. | |
6492 | Use it to quote the TAGS outputs. | |
6493 | * src/print_graph.c (print_state): Now errors are in red, and | |
6494 | reductions in green. | |
6495 | Prefer high to wide: output the state number on a line of its own. | |
6496 | ||
80dac38c AD |
6497 | 2001-12-27 Akim Demaille <akim@epita.fr> |
6498 | ||
6499 | * src/state.h, src/state.c (reductions_new): New. | |
6500 | * src/LR0.c (set_state_table): Let all the states have a | |
6501 | `reductions', even if reduced to 0. | |
6502 | (save_reductions): Adjust. | |
6503 | * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust. | |
6504 | * src/print.c (print_reductions, print_actions): Adjust. | |
6505 | * src/output.c (action_row): Adjust. | |
6506 | ||
2cec70b9 AD |
6507 | 2001-12-27 Akim Demaille <akim@epita.fr> |
6508 | ||
6509 | * src/state.h, src/state.c (errs_new, errs_dup): New. | |
6510 | * src/LR0.c (set_state_table): Let all the states have an errs, | |
6511 | even if reduced to 0. | |
6512 | * src/print.c (print_errs, print_reductions): Adjust. | |
6513 | * src/output.c (output_actions, action_row): Adjust. | |
6514 | * src/conflicts.c (resolve_sr_conflict): Adjust. | |
6515 | ||
13ca549a AD |
6516 | 2001-12-27 Akim Demaille <akim@epita.fr> |
6517 | ||
6518 | * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL. | |
6519 | ||
5092aba5 AD |
6520 | 2001-12-27 Akim Demaille <akim@epita.fr> |
6521 | ||
6522 | * src/conflicts.c, src/conflicts.h (print_reductions): Move to... | |
6523 | * src/print.c: here. | |
6524 | (lookaheadset, shiftset): New, used as additional storage by | |
6525 | print_reductions. | |
6526 | (print_results): Adjust. | |
6527 | (print_shifts, print_gotos, print_errs): New, extracted from... | |
6528 | (print_actions): here. | |
6529 | * src/print_graph.c (print_actions): Remove dead code. | |
6530 | ||
11e2beca AD |
6531 | 2001-12-27 Akim Demaille <akim@epita.fr> |
6532 | ||
6533 | * src/reader.c (copy_dollar, copy_at): Better checking of `n' in | |
6534 | `$n' and `@n'. | |
6535 | ||
dac3c910 AD |
6536 | 2001-12-27 Akim Demaille <akim@epita.fr> |
6537 | ||
6538 | * src/lalr.c (add_lookback_edge): Use state_t instead of ints. | |
6539 | (build_relations): Adjust. | |
6540 | ||
d0b0fefa AD |
6541 | 2001-12-27 Akim Demaille <akim@epita.fr> |
6542 | ||
6543 | * src/lalr.c (set_goto_map): Remove a wrong but benign loop | |
6544 | duplication. | |
6545 | ||
adc8c848 AD |
6546 | 2001-12-27 Akim Demaille <akim@epita.fr> |
6547 | ||
6548 | * src/reader.c (packgram): Catch nitems overflows. | |
6549 | ||
14d293ac AD |
6550 | 2001-12-27 Akim Demaille <akim@epita.fr> |
6551 | ||
6552 | * src/files.c, src/files.h (guard_obstack): Remove. | |
6553 | * src/output.c (output): Adjust. | |
6554 | * src/reader.c (parse_braces): New, factoring... | |
6555 | (copy_action, copy_guard): these two which are renamed as... | |
6556 | (parse_action, parse_guard): these. | |
6557 | As a voluntary consequence, using braces around guards is now | |
6558 | mandatory. | |
6559 | ||
f499b062 AD |
6560 | 2001-12-27 Akim Demaille <akim@epita.fr> |
6561 | ||
6562 | * src/gram.h (rule_t): `guard' and `guard_line' are new members. | |
6563 | * src/reader.c (symbol_list): `guard' and `guard_line' are new | |
6564 | members. | |
6565 | (symbol_list_new): Adjust. | |
6566 | (copy_action): action_line is the first line, not the last. | |
6567 | (copy_guard): Just as for actions, store the `action' only, not | |
6568 | the switch/case/break flesh. | |
6569 | Don't parse the user action that might follow the guard, let... | |
6570 | (readgram): do it, i.e., now, there can be an action after a | |
6571 | guard. | |
6572 | In other words the guard is just explicitly optional. | |
6573 | (packgram): Adjust. | |
6574 | * src/output.c (guards_output): New. | |
6575 | (output_parser): Call it when needed. | |
6576 | (output): Also free the guard and attrs obstacks. | |
6577 | * src/files.c, src/files.h (obstack_save): Remove. | |
6578 | (output_files): Remove. | |
6579 | As a result, if one needs the former `.act' file, using an | |
6580 | appropriate skeleton which requires actions and guards is now | |
6581 | required. | |
6582 | * src/main.c (main): Adjust. | |
6583 | * tests/semantic.at: New. | |
6584 | * tests/regression.at: Use `input.y' as input file name. | |
6585 | Avoid 8+3 problems by requiring input.c when the test needs the | |
6586 | parser. | |
6587 | ||
d945f5cd AD |
6588 | 2001-12-27 Akim Demaille <akim@epita.fr> |
6589 | ||
6590 | * src/reader.c (symbol_list_new): Be sure to initialize all the | |
6591 | fields. | |
6592 | ||
d200e455 AD |
6593 | 2001-12-27 Akim Demaille <akim@epita.fr> |
6594 | ||
6595 | All the hacks using a final pseudo state are now useless. | |
6596 | ||
6597 | * src/LR0.c (set_state_table): state_table holds exactly nstates. | |
6598 | * src/lalr.c (nLA): New. | |
6599 | (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it | |
6600 | instead of lookaheadsp from the pseudo state (nstate + 1). | |
6601 | ||
f9507c28 AD |
6602 | 2001-12-27 Akim Demaille <akim@epita.fr> |
6603 | ||
6604 | * src/output.c (action_row, token_actions): Use a state_t instead | |
6605 | of a integer, and nlookaheads instead of the following state's | |
6606 | lookaheadsp. | |
6607 | ||
065fbd27 AD |
6608 | 2001-12-27 Akim Demaille <akim@epita.fr> |
6609 | ||
6610 | * src/conflicts.c (log_resolution, flush_shift) | |
6611 | (resolve_sr_conflict, set_conflicts, solve_conflicts) | |
6612 | (count_sr_conflicts, count_rr_conflicts, conflicts_output) | |
6613 | (conflicts_print, print_reductions): Use a state_t instead of an | |
6614 | integer when referring to a state. | |
6615 | As much as possible, depend upon nlookaheads, instead of the | |
6616 | `lookaheadsp' member of the following state (since lookaheads of | |
6617 | successive states are successive, the difference between state n + 1 | |
6618 | and n served as the number of lookaheads for state n). | |
6619 | * src/lalr.c (add_lookback_edge): Likewise. | |
6620 | * src/print.c (print_core, print_actions, print_state) | |
6621 | (print_results): Likewise. | |
6622 | * src/print_graph.c (print_core, print_actions, print_state) | |
6623 | (print_graph): Likewise. | |
6624 | * src/conflicts.h: Adjust. | |
6625 | ||
1b177bd7 AD |
6626 | 2001-12-27 Akim Demaille <akim@epita.fr> |
6627 | ||
6628 | * src/bison.hairy: Formatting/comment changes. | |
6629 | ANSIfy. | |
6630 | Remove `register' indications. | |
6631 | Add plenty of `static'. | |
6632 | ||
7742ddeb AD |
6633 | 2001-12-27 Akim Demaille <akim@epita.fr> |
6634 | ||
6635 | * src/output.c (prepare): Drop the muscle `ntbase' which | |
6636 | duplicates ntokens. | |
6637 | * src/bison.simple: Formatting/comment changes. | |
6638 | Use YYNTOKENS only, which is documented, but not YYNTBASE, which | |
6639 | is an undocumented synonym. | |
6640 | ||
1fa14068 AD |
6641 | 2001-12-22 Akim Demaille <akim@epita.fr> |
6642 | ||
6643 | * src/output.c (output_table_data): Change the prototype to use | |
6644 | `int' for array ranges: some invocations do pass an int, not a | |
6645 | short. | |
6646 | Reported by Wayne Green. | |
6647 | ||
b9752825 AD |
6648 | 2001-12-22 Akim Demaille <akim@epita.fr> |
6649 | ||
6650 | Some actions of web2c.y are improperly triggered. | |
6651 | Reported by Mike Castle. | |
6652 | ||
6653 | * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/. | |
6654 | * tests/regression.at (Web2c): Rename as... | |
6655 | (Web2c Report): this. | |
6656 | (Web2c Actions): New. | |
6657 | ||
776209d6 AD |
6658 | 2001-12-22 Akim Demaille <akim@epita.fr> |
6659 | ||
6660 | Reductions in web2c.y are improperly reported. | |
6661 | Reported by Mike Castle. | |
6662 | ||
6663 | * src/conflicts.c (print_reductions): Fix. | |
6664 | * tests/regression.at (Web2c): New. | |
6665 | ||
275fc3ad AD |
6666 | 2001-12-18 Akim Demaille <akim@epita.fr> |
6667 | ||
6668 | Some host fail on `assert (!"foo")', which expands to | |
6669 | ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__)) | |
6670 | Reported by Nelson Beebee. | |
6671 | ||
6672 | * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with | |
6673 | `#define it_succeeded 0' and `assert (it_succeeded)'. | |
6674 | ||
897668ee MA |
6675 | 2001-12-17 Marc Autret <autret_m@epita.fr> |
6676 | ||
6677 | * src/bison.simple: Don't hard code the skeleton line and filename. | |
6678 | * src/output.c (output_parser): Rename 'line' as 'output_line'. | |
6679 | New line counter 'skeleton_line' (skeleton-line muscle). | |
6680 | ||
ab3399e0 PE |
6681 | 2001-12-17 Paul Eggert <eggert@twinsun.com> |
6682 | ||
6683 | * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that | |
6684 | YYDEBUG must be defined to a nonzero value. | |
6685 | ||
6686 | * src/bison.simple (yytname): Do not assume that the user defines | |
6687 | YYDEBUG to a properly parenthesized expression. | |
6688 | ||
3877f72b AD |
6689 | 2001-12-17 Akim Demaille <akim@epita.fr> |
6690 | ||
6691 | * src/state.h (state_t): Rename lookaheads as lookaheadsp. | |
6692 | nlookaheads is a new member. | |
6693 | Adjust all users. | |
6694 | * src/lalr.h (nlookaheads): Remove this orphan declaration. | |
6695 | * src/lalr.c (initialize_lookaheads): Set nlookaheads for each | |
6696 | state. | |
776209d6 | 6697 | |
331dbc1b AD |
6698 | 2001-12-17 Akim Demaille <akim@epita.fr> |
6699 | ||
6700 | * src/files.h, src/files.c (open_files, close_files): Remove. | |
6701 | * src/main.c (main): Don't open/close files, nor invoke lex_free, | |
6702 | let... | |
6703 | * src/reader.c (reader): Do it. | |
776209d6 | 6704 | |
be750e4c AD |
6705 | 2001-12-17 Akim Demaille <akim@epita.fr> |
6706 | ||
6707 | * src/conflicts.c (print_reductions): Formatting changes. | |
776209d6 | 6708 | |
709ae8c6 AD |
6709 | 2001-12-17 Akim Demaille <akim@epita.fr> |
6710 | ||
6711 | * src/conflicts.c (flush_shift): Also adjust lookaheadset. | |
6712 | (flush_reduce): New. | |
6713 | (resolve_sr_conflict): Adjust. | |
776209d6 | 6714 | |
f87685c3 AD |
6715 | 2001-12-17 Akim Demaille <akim@epita.fr> |
6716 | ||
6717 | * src/output.c (output_obstack): Be static and rename as... | |
6718 | (format_obstack): this, to avoid any confusion with files.c's | |
6719 | output_obstack. | |
6720 | * src/reader.h (muscle_obstack): Move to... | |
6721 | * src/output.h: here, since it's defined in output.c. | |
6722 | ||
837491d8 AD |
6723 | 2001-12-17 Akim Demaille <akim@epita.fr> |
6724 | ||
6725 | * src/output.c (action_row, save_column, default_goto) | |
6726 | (sort_actions, matching_state, pack_vector): Better variable | |
6727 | locality. | |
6728 | ||
796d61fb AD |
6729 | 2001-12-17 Akim Demaille <akim@epita.fr> |
6730 | ||
6731 | * src/output.c: Various formatting changes. | |
776209d6 | 6732 | |
64d15509 AD |
6733 | 2001-12-17 Akim Demaille <akim@epita.fr> |
6734 | ||
6735 | * src/files.c (output_files): Free the output_obstack. | |
6736 | * src/main.c (main): Call print and print_graph conditionally. | |
6737 | * src/print.c (print): Work unconditionally. | |
6738 | * src/print_graph.c (print_graph): Work unconditionally. | |
6739 | * src/conflicts.c (log_resolution): Output only if verbose_flag. | |
6740 | ||
fbc8ecb7 MA |
6741 | 2001-12-16 Marc Autret <autret_m@epita.fr> |
6742 | ||
6743 | * src/output.c (actions_output): Fix. When we use %no-lines, | |
6744 | there is one less line per action. | |
6745 | ||
f0440388 MA |
6746 | 2001-12-16 Marc Autret <autret_m@epita.fr> |
6747 | ||
6748 | * src/bison.simple: Remove a useless #line directive. | |
6749 | s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'. | |
6750 | * src/output.c (get_lines_number): New. | |
776209d6 | 6751 | (output_parser): Adjust, now takes care about the lines of a |
f0440388 MA |
6752 | output muscles. |
6753 | Fix line numbering. | |
6754 | (actions_output): Computes the number of lines taken by actions. | |
6755 | (output_master_parser): Insert new skeleton which is the name of | |
6756 | the output parser file name. | |
6757 | ||
a79986b8 MA |
6758 | 2001-12-15 Marc Autret <autret_m@epita.fr> |
6759 | ||
6760 | * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility. | |
6761 | ||
4ec8e00f MA |
6762 | 2001-12-15 Marc Autret <autret_m@epita.fr> |
6763 | ||
6764 | * src/output.c (output_gram): Keep track of the hairy one. | |
6765 | ||
1a4648ff AD |
6766 | 2001-12-15 Akim Demaille <akim@epita.fr> |
6767 | ||
6768 | Make `make distcheck' work. | |
6769 | ||
6770 | * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses | |
6771 | system.h which uses libgettext.h. | |
6772 | ||
9c2c67e6 AD |
6773 | 2001-12-15 Akim Demaille <akim@epita.fr> |
6774 | ||
6775 | * src/nullable.c (set_nullable): Useless rules must be skipped, | |
6776 | otherwise, since we range over their symbols, we might look at a | |
6777 | nonterminal which no longer ``exists'', i.e., it is not counted in | |
6778 | `nvars', hence we overflow our arrays. | |
6779 | ||
93ede233 AD |
6780 | 2001-12-15 Akim Demaille <akim@epita.fr> |
6781 | ||
6782 | The header can also be produced directly, without any obstack! | |
6783 | Yahoo! | |
6784 | ||
6785 | * src/files.c, src/files.h (defines_obstack): Remove. | |
6786 | (compute_header_macro): Global. | |
6787 | (defines_obstack_save): Remove. | |
6788 | * src/reader.c (parse_union_decl): No longer output to | |
6789 | defines_obstack: its content can be found in the `stype' muscle | |
6790 | anyway. | |
6791 | (output_token_translations): Merge into... | |
6792 | (symbols_output): this. | |
6793 | Rename as... | |
6794 | (symbols_save): this. | |
6795 | (reader): Adjust. | |
6796 | * src/output.c (header_output): New. | |
6797 | (output): Call it. | |
6798 | ||
2666f928 AD |
6799 | 2001-12-15 Akim Demaille <akim@epita.fr> |
6800 | ||
6801 | * src/reader.c (parse_union_decl): Instead of handling two obstack | |
6802 | simultaneously, use one to define the `stype' muscle, and use the | |
6803 | value of the latter to fill defines_obstack. | |
6804 | (copy_comment): Remove. | |
6805 | (copy_comment2): Work for a single obstack. | |
6806 | Rename as... | |
6807 | (copy_comment): this. | |
6808 | ||
428046f8 AD |
6809 | 2001-12-15 Akim Demaille <akim@epita.fr> |
6810 | ||
6811 | * src/lex.c, src/lex.h (xgetc): No longer static. | |
6812 | * src/reader.c (parse_union_decl): Revamp. | |
6813 | ||
ea52d706 AD |
6814 | 2001-12-15 Akim Demaille <akim@epita.fr> |
6815 | ||
6816 | Still making progress in separating Bison into (i) input, (ii) | |
6817 | process, (iii) output: now we can directly output the parser file | |
6818 | without using table_obstack at all. | |
6819 | ||
6820 | * src/files.c, src/files.h (table_obstack): Bye bye. | |
6821 | (parser_file_name): New. | |
6822 | * src/files.c (compute_output_file_names): Compute it. | |
6823 | * src/output.c (actions_output, output_parser) | |
6824 | (output_master_parser): To a file instead of an obstack. | |
6825 | ||
3f96f4dc AD |
6826 | 2001-12-15 Akim Demaille <akim@epita.fr> |
6827 | ||
6828 | Attach actions to rules, instead of pre-outputting them to | |
6829 | actions_obstack. | |
6830 | ||
6831 | * src/gram.h (rule_t): action and action_line are new members. | |
6832 | * src/reader.c (symbol_list): Likewise. | |
6833 | (copy_action): Save the actions within the rule. | |
6834 | (packgram): Save them in rule_table. | |
6835 | * src/output.c (actions_output): New. | |
6836 | (output_parser): Use it on `%%actions'. | |
6837 | (output_rule_data): Don't free rule_table. | |
6838 | (output): Do it. | |
6839 | (prepare): Don't save the `action' muscle. | |
6840 | * src/bison.simple: s/%%action/%%actions/. | |
6841 | ||
51576fb3 AD |
6842 | 2001-12-15 Akim Demaille <akim@epita.fr> |
6843 | ||
6844 | * src/reader.c (copy_action): When --yacc, don't append a `;' | |
6845 | to the user action: let it fail if lacking. | |
dee049eb | 6846 | Suggested by Arnold Robbins and Tom Tromey. |
51576fb3 | 6847 | |
2648a72d AD |
6848 | 2001-12-14 Akim Demaille <akim@epita.fr> |
6849 | ||
6850 | * src/lex.c (literalchar): Simply return the char you decoded, non | |
6851 | longer mess around with obstacks and int pointers. | |
6852 | Adjust all callers. | |
6853 | ||
92790e5b AD |
6854 | 2001-12-14 Akim Demaille <akim@epita.fr> |
6855 | ||
6856 | * src/lex.c (literalchar): Don't escape the special characters, | |
6857 | just decode them, and keep them as char (before, eol was output as | |
6858 | the 2 char string `\n' etc.). | |
6859 | * src/output.c (output_rule_data): Use quotearg to output the | |
6860 | token strings. | |
6861 | ||
927c1557 PE |
6862 | 2001-12-13 Paul Eggert <eggert@twinsun.com> |
6863 | ||
6864 | * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE): | |
6865 | Do not infringe on the global user namespace when using C++. | |
6866 | (YYFPRINTF, YYSTDERR): New macros, needed for the above. | |
6867 | All uses of `fprintf' and `stderr' changed. | |
6868 | ||
6869 | * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR. | |
6870 | ||
ed8e1f68 AD |
6871 | 2001-12-13 Akim Demaille <akim@epita.fr> |
6872 | ||
6873 | The computation of nullable is broken: it doesn't handle empty | |
6874 | RHS's properly. | |
6875 | ||
6876 | * tests/torture.at (GNU AWK Grammar): New. | |
6877 | * tests/sets.at (Nullable): New. | |
6878 | * src/nullable.c (set_nullable): Instead of blindly looping over | |
6879 | `ritems', loop over the rules, and then over their rhs's. | |
6880 | ||
6881 | Work around Autotest bugs. | |
6882 | ||
6883 | * src/warshall.c (bitmatrix_print): Don't use `+--+' as table | |
6884 | frame, because Autotest understand lines starting with a `+' as | |
6885 | traces from the shell. Then, they are not processed properly. | |
6886 | Admittedly an Autotest bug, but we don't have time to wait for | |
6887 | Autotest to catch up. | |
6888 | * tests/regression.at (Broken Closure): Adjust to the new table | |
6889 | frames. | |
6890 | Move to... | |
6891 | * tests/sets.at: here. | |
6892 | ||
cb581495 AD |
6893 | 2001-12-13 Akim Demaille <akim@epita.fr> |
6894 | ||
6895 | * src/closure.c (closure): Use nrules instead of playing tricks | |
6896 | with BITS_PER_WORD. | |
6897 | ||
2e729273 AD |
6898 | 2001-12-13 Akim Demaille <akim@epita.fr> |
6899 | ||
6900 | * src/print.c (print_actions): Output the handling of `$' as the | |
6901 | traces do: shifting the token EOF. Before EOF was treated as a | |
6902 | nonterminal. | |
6903 | * tests/regression.at: Adjust some tests. | |
6904 | * src/print_graph.c (print_core): Complete the set of items via | |
6905 | closure. The next-to-final and final states are still unsatisfying, | |
6906 | but that's to be addressed elsewhere. | |
6907 | No longer output the rule numbers, but do output the state number. | |
6908 | A single loop for the shifts + gotos is enough, but picked a | |
6909 | distinct color for each. | |
6910 | (print_graph): Initialize and finalize closure. | |
6911 | ||
107f7dfb AD |
6912 | 2001-12-13 Akim Demaille <akim@epita.fr> |
6913 | ||
6914 | * src/reader.c (readgram): Remove dead code, an strip useless | |
6915 | braces. | |
6916 | (get_type): Remove, unused. | |
6917 | ||
9b53a24f AD |
6918 | 2001-12-12 Akim Demaille <akim@epita.fr> |
6919 | ||
6920 | * src/complain.h, src/complain.c: Remove error_one_per_line, rely | |
6921 | on that of lib/error.c. | |
6922 | ||
dbfb6dcd AD |
6923 | 2001-12-12 Akim Demaille <akim@epita.fr> |
6924 | ||
6925 | Some hosts don't like `/' in includes. | |
6926 | ||
6927 | * src/system.h: Include libgettext.h without qualifying the path. | |
6928 | * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove | |
6929 | $(top_srcdir). | |
6930 | ||
c25fb648 MA |
6931 | 2001-12-11 Marc Autret <autret_m@epita.fr> |
6932 | ||
6933 | * src/output.c (output_parser): Remove useless muscle. | |
6934 | ||
710ddc4f MA |
6935 | 2001-12-11 Marc Autret <autret_m@epita.fr> |
6936 | ||
6937 | * src/bison.simple: Remove #line just before %%epilogue. It | |
6938 | is now handled in ... | |
6939 | * src/reader.c (read_additionnal_code): Add the output of a | |
6940 | #line for the epilogue. | |
6941 | ||
e83d80b8 MA |
6942 | 2001-12-10 Marc Autret <autret_m@epita.fr> |
6943 | ||
927c1557 | 6944 | * src/reader.c (copy_definition): Re-use CPP-outed code which |
e83d80b8 MA |
6945 | replace precedent remove. |
6946 | * src/bison.simple: Remove #line before %%prologue because | |
6947 | %%input-line is wrong at this time. | |
6948 | ||
971d5158 MA |
6949 | 2001-12-10 Marc Autret <autret_m@epita.fr> |
6950 | ||
6951 | * src/reader.c (symbols_output): Clean up. | |
927c1557 | 6952 | * src/output.c (output_gram, output): Clean up. |
971d5158 | 6953 | |
5edafffd AD |
6954 | 2001-12-10 Akim Demaille <akim@epita.fr> |
6955 | ||
6956 | * src/lalr.c (initialize_lookaheads): New. Extracted from... | |
6957 | * src/LR0.c (set_state_table): here. | |
6958 | * src/lalr.c (lalr): Call it. | |
6959 | ||
0279f8e9 AD |
6960 | 2001-12-10 Akim Demaille <akim@epita.fr> |
6961 | ||
6962 | * src/state.h (shifts): Remove the `number' member: shifts are | |
6963 | attached to state, hence no longer need to be labelled with a | |
6964 | state number. | |
6965 | ||
190c4f5f AD |
6966 | 2001-12-10 Akim Demaille <akim@epita.fr> |
6967 | ||
6968 | Now that states have a complete set of members, the linked list of | |
6969 | shifts is useless: just fill directly the state's shifts member. | |
6970 | ||
6971 | * src/state.h (shifts): Remove the `next' member. | |
6972 | * src/LR0.c (first_state, last_state): Remove. | |
6973 | Adjust the callers. | |
6974 | (augment_automaton): Don't look for the shifts that must be added | |
6975 | a shift on EOF: it is those of the state we looked for! But now, | |
6976 | since shifts are attached, it is no longer needed to looking | |
6977 | merely by its id: its number. | |
6978 | ||
2a73b93d AD |
6979 | 2001-12-10 Akim Demaille <akim@epita.fr> |
6980 | ||
6981 | * src/LR0.c (augment_automaton): Better variable locality. | |
6982 | Remove an impossible branch: if there is a state corresponding to | |
6983 | the start symbol being shifted, then there is shift for the start | |
6984 | symbol from the initial state. | |
6985 | ||
74392f6a AD |
6986 | 2001-12-10 Akim Demaille <akim@epita.fr> |
6987 | ||
6988 | * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state' | |
6989 | only when appropriate: when insert_start_shifting_state' is not | |
6990 | invoked. | |
6991 | * tests/regression.at (Rule Line Numbers): Adjust. | |
6992 | ||
37c82725 AD |
6993 | 2001-12-10 Akim Demaille <akim@epita.fr> |
6994 | ||
6995 | * src/LR0.c (augment_automaton): Now that all states have shifts, | |
6996 | merge the two cases addition shifts to the initial state. | |
6997 | ||
6a164e0c AD |
6998 | 2001-12-10 Akim Demaille <akim@epita.fr> |
6999 | ||
7000 | * src/lalr.c (set_state_table): Move to... | |
7001 | * src/LR0.c: here. | |
7002 | * src/lalr.c (lalr): Don't call it... | |
7003 | * src/LR0.c (generate_states): do it. | |
7004 | * src/LR0.h (first_state): Remove, only the table is used. | |
7005 | ||
7215de24 AD |
7006 | 2001-12-10 Akim Demaille <akim@epita.fr> |
7007 | ||
7008 | * src/LR0.h (first_shift, first_reduction): Remove. | |
7009 | * src/lalr.c: Don't use first_shift: find shifts through the | |
7010 | states. | |
7011 | ||
80e25d4d AD |
7012 | 2001-12-10 Akim Demaille <akim@epita.fr> |
7013 | ||
7014 | * src/LR0.c: Attach shifts to states as soon as they are | |
7015 | computed. | |
7016 | * src/lalr.c (set_state_table): Instead of assigning shifts to | |
7017 | state, just assert that the mapping was properly done. | |
7018 | ||
0ab3728b AD |
7019 | 2001-12-10 Akim Demaille <akim@epita.fr> |
7020 | ||
7021 | * src/LR0.c (insert_start_shift): Rename as... | |
7022 | (insert_start_shifting_state): this. | |
7023 | (insert_eof_shifting_state, insert_accepting_state): New. | |
7024 | (augment_automaton): Adjust. | |
7025 | Better locality of the variables. | |
7026 | When looking if the start_symbol is shifted from the initial | |
7027 | state, using `while (... symbol != start_symbol ...)' sounds | |
7028 | better than `while (... symbol < start_symbol ...)': If fail | |
7029 | to see how the order between symbols could be relevant! | |
7030 | ||
78af9bbc AD |
7031 | 2001-12-10 Akim Demaille <akim@epita.fr> |
7032 | ||
7033 | * src/getargs.h: Don't declare `spec_name_prefix' and | |
7034 | `spec_file_prefix', declared by src/files.h. | |
7035 | * src/files.c, src/files.h: Default for spec_name_prefix is "yy". | |
7036 | * src/muscle_tab.c (muscle_init): Default prefix to NULL. | |
7037 | * src/output.c (prepare): Adjust. | |
7038 | * src/reader.c (symbols_output): Likewise. | |
7039 | * src/vmsgetargs.c: Vaguely adjust, but who cares? | |
7040 | ||
bdef2a41 AD |
7041 | 2001-12-10 Akim Demaille <akim@epita.fr> |
7042 | ||
7043 | * src/muscle_tab.c (muscle_init): NULL is a better default than | |
7044 | `"0"'. | |
7045 | ||
3735969c AD |
7046 | 2001-12-10 Akim Demaille <akim@epita.fr> |
7047 | ||
7048 | * src/reader.c (reader): Calling symbols_output once is enough. | |
7049 | ||
49701457 AD |
7050 | 2001-12-10 Akim Demaille <akim@epita.fr> |
7051 | ||
7052 | Now that states have a complete set of members, the linked list of | |
7053 | reductions is useless: just fill directly the state's reductions | |
7054 | member. | |
7055 | ||
7056 | * src/state.h (struct reductions): Remove member `number' and | |
7057 | `next'. | |
7058 | * src/LR0.c (first_reduction, last_reduction): Remove. | |
7059 | (save_reductions): Don't link the new reductions, store them in | |
7060 | this_state. | |
7061 | * src/lalr.c (set_state_table): No need to attach reductions to | |
7062 | states, it's already done. | |
7063 | * src/output.c (output_actions): No longer free the shifts, then | |
7064 | the reductions, then the states: free all the states and their | |
7065 | members. | |
7066 | ||
0edad749 AD |
7067 | 2001-12-10 Akim Demaille <akim@epita.fr> |
7068 | ||
7069 | * src/options.c (OPTN, DRTV, BOTH): New. | |
7070 | (option_table): Use them. | |
7071 | ||
0edad749 AD |
7072 | * src/muscle_tab.c: Don't include xalloc.h and string.h: that's |
7073 | the job of system.h. | |
7074 | * src/options.c: Don't include stdio.h and xalloc.h for the same | |
7075 | reasons. | |
7076 | ||
5449dd0f AD |
7077 | 2001-12-10 Akim Demaille <akim@epita.fr> |
7078 | ||
7079 | * src/output.c (output, prepare): Make sure the values of the | |
7080 | muscles `action' and `prologue' are 0-terminated. | |
7081 | ||
a870c567 AD |
7082 | 2001-12-10 Akim Demaille <akim@epita.fr> |
7083 | ||
7084 | Clean up GCC warnings. | |
7085 | ||
7086 | * src/reader.c (copy_action): `buf' is not used. | |
7087 | (parse_skel_decl): Be static. | |
7088 | * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'. | |
7089 | * src/options.h (create_long_option_table): Have a real prototype. | |
7090 | * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete) | |
7091 | (hash_delete_at): Return const void *. | |
7092 | Adjust casts to preserve the const. | |
7093 | ||
80df8768 AD |
7094 | 2001-12-10 Akim Demaille <akim@epita.fr> |
7095 | ||
7096 | * configure.in: Require 2.52g. | |
7097 | M4 is not needed, but AUTOM4TE is. | |
7098 | * m4/m4.m4: Remove. | |
7099 | * tests/Makefile.am: Adjust. | |
7100 | ||
f693ad14 AD |
7101 | 2001-12-10 Akim Demaille <akim@epita.fr> |
7102 | ||
7103 | One structure for states is enough, even though theoretically | |
7104 | there are LR(0) states and LALR(1) states. | |
7105 | ||
7106 | * src/lalr.h (state_t): Remove. | |
7107 | (state_table): Be state_t **, not state_t *. | |
7108 | * src/state.h (core, CORE_ALLOC): Rename as... | |
7109 | (state_t, STATE_ALLOC): this. | |
7110 | Add the LALR(1) members: shifts, reductions, errs. | |
7111 | * src/LR0.c (state_table): Rename as... | |
7112 | (state_hash): this, to avoid name clashes with the global | |
7113 | `state_table'. | |
7114 | * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c | |
7115 | * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust. | |
7116 | ||
74ffbcb6 AD |
7117 | 2001-12-10 Akim Demaille <akim@epita.fr> |
7118 | ||
7119 | Bison dumps core on bash.y. | |
7120 | Reported by Pascal Bart. | |
7121 | ||
7122 | * src/warshall.c (bitmatrix_print): New. | |
7123 | (TC): Use it. | |
7124 | When performing a transitive closure R(i, j) && R(j, k) => R(i, k), | |
7125 | j must be the outer loop. | |
7126 | * tests/regression.at (Broken Closure): New. | |
7127 | ||
07708e19 AD |
7128 | 2001-12-05 Akim Demaille <akim@epita.fr> |
7129 | ||
7130 | * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and | |
7131 | its argument. | |
ba1ecc07 | 7132 | Reported by Peter Hamorsky. |
07708e19 | 7133 | |
92b16366 AD |
7134 | 2001-12-05 Akim Demaille <akim@epita.fr> |
7135 | ||
7136 | * src/conflicts.c (err_table): Remove. | |
7137 | (resolve_sr_conflict): Adjust. | |
7138 | * src/lalr.h (state_t.reduction_table, state_t.shift_table): | |
7139 | Rename as... | |
7140 | (state_t.reductions, state_t.shifts): this. | |
7141 | ||
076ab033 AD |
7142 | 2001-12-05 Akim Demaille <akim@epita.fr> |
7143 | ||
7144 | * src/reduce.c (reduce_grammar_tables): No longer disable the | |
7145 | removal of useless rules via CPP but via `if (0)', so that the | |
7146 | compiler still check the code is valid. | |
7147 | For instance, it should have noticed `rline' no longer exists: use | |
7148 | the `line' member of rule_t. | |
7149 | * src/gram.c (dummy, rline): Remove, unused. | |
7150 | ||
3843c413 AD |
7151 | 2001-12-05 Akim Demaille <akim@epita.fr> |
7152 | ||
7153 | * src/output.c (pack_vector): Use assert, not berror. | |
7154 | * src/main.c (berror): Remove, unused. | |
7155 | ||
43168960 AD |
7156 | 2001-12-05 Akim Demaille <akim@epita.fr> |
7157 | ||
7158 | New experimental feature: if --verbose --trace output all the | |
7159 | items of a state, not only its kernel. | |
7160 | ||
7161 | * src/print.c (print_core): If `trace_flag', then invoke closure | |
7162 | before outputting the items of the state (print_core is no longer | |
7163 | a correct name them). | |
7164 | (print_results): Invoke new_closure/free_closure if needed. | |
7165 | ||
b2872512 AD |
7166 | 2001-12-05 Akim Demaille <akim@epita.fr> |
7167 | ||
7168 | * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount. | |
7169 | * src/closure.c, src/closure.h (itemsetsize): Rename as... | |
7170 | (nitemset): for consistency with the rest of the project. | |
7171 | ||
23cbcc6c AD |
7172 | 2001-12-05 Akim Demaille <akim@epita.fr> |
7173 | ||
7174 | * src/closure.c (print_closure): Improve. | |
7175 | (closure): Use it for printing input and output. | |
7176 | ||
03ec521c AD |
7177 | 2001-12-05 Akim Demaille <akim@epita.fr> |
7178 | ||
7179 | * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are | |
7180 | indexed by nonterminals. | |
7181 | ||
3a7456dd AD |
7182 | 2001-12-05 Akim Demaille <akim@epita.fr> |
7183 | ||
7184 | * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of | |
7185 | what it was!). | |
7186 | * src/warshall.h: Remove accidental duplication of the content. | |
7187 | ||
1cbcf2e7 AD |
7188 | 2001-12-05 Akim Demaille <akim@epita.fr> |
7189 | ||
7190 | * src/closure.c (set_fderives): De-obfuscate. | |
7191 | ||
84182270 AD |
7192 | 2001-12-05 Akim Demaille <akim@epita.fr> |
7193 | ||
7194 | * src/closure.c (print_firsts, print_fderives): De-obfuscate. | |
7195 | ||
3f6f053c AD |
7196 | 2001-12-05 Akim Demaille <akim@epita.fr> |
7197 | ||
7198 | * src/closure.c (set_firsts): De-obfuscate. | |
7199 | ||
7a5350ba AD |
7200 | 2001-12-05 Akim Demaille <akim@epita.fr> |
7201 | ||
7202 | * src/output.c (action_row): De-obfuscate | |
7203 | using the good o' techniques: arrays not pointers, variable | |
7204 | locality, BITISSET, RESETBIT etc. | |
7205 | ||
d954473d AD |
7206 | 2001-12-05 Akim Demaille <akim@epita.fr> |
7207 | ||
7208 | Pessimize the code to simplify it: from now on, all the states | |
7209 | have a valid SHIFTS, which NSHIFTS is possibly 0. | |
7210 | ||
7211 | * src/LR0.c (shifts_new): Be global and move to.. | |
7212 | * src/state.c, src/state.h: here. | |
7213 | * src/conflicts, src/lalr.c, src/output.c, src/print.c, | |
7214 | * src/print_graph: Adjust. | |
7215 | ||
9839bbe5 AD |
7216 | 2001-12-05 Akim Demaille <akim@epita.fr> |
7217 | ||
7218 | * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New. | |
7219 | * src/conflicts.c: Use it. | |
7220 | Restore a few missing `if (!SHIFT_IS_DISABLED)' which were | |
7221 | incorrectly ``simplified''. | |
7222 | ||
9f136c07 AD |
7223 | 2001-12-05 Akim Demaille <akim@epita.fr> |
7224 | ||
7225 | * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate | |
7226 | using the good o' techniques: arrays not pointers, variable | |
7227 | locality, BITISSET, RESETBIT etc. | |
7228 | ||
b608206e AD |
7229 | 2001-12-05 Akim Demaille <akim@epita.fr> |
7230 | ||
7231 | * src/state.h (SHIFT_SYMBOL): New. | |
7232 | * src/conflicts.c: Use it to deobfuscate. | |
7233 | ||
52afa962 AD |
7234 | 2001-12-05 Akim Demaille <akim@epita.fr> |
7235 | ||
7236 | * src/conflicts.c (count_sr_conflicts, count_rr_conflicts) | |
7237 | (print_reductions): De-obfuscate using the good o' techniques: | |
7238 | arrays not pointers, variable locality, BITISSET. | |
7239 | ||
e74dc321 AD |
7240 | 2001-12-05 Akim Demaille <akim@epita.fr> |
7241 | ||
7242 | * src/conflicts.c (print_reductions): Arrays, not pointers. | |
7243 | Use BITISSET. | |
7244 | ||
768fca83 AD |
7245 | 2001-12-05 Akim Demaille <akim@epita.fr> |
7246 | ||
7247 | * src/conflicts.c (print_reductions): Pessimize, but clarify. | |
7248 | ||
a17e599f AD |
7249 | 2001-12-05 Akim Demaille <akim@epita.fr> |
7250 | ||
7251 | * src/conflicts.c (print_reductions): Improve variable locality. | |
7252 | ||
a04bc341 AD |
7253 | 2001-12-05 Akim Demaille <akim@epita.fr> |
7254 | ||
7255 | * src/conflicts.c (print_reductions): Pessimize, but clarify. | |
7256 | ||
c8ea038e AD |
7257 | 2001-12-05 Akim Demaille <akim@epita.fr> |
7258 | ||
7259 | * src/conflicts.c (print_reductions): Improve variable locality. | |
7260 | ||
aa2aab3c AD |
7261 | 2001-12-05 Akim Demaille <akim@epita.fr> |
7262 | ||
7263 | * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New. | |
7264 | * src/lalr.c: Use them. | |
7265 | ||
b178c8cc AD |
7266 | 2001-12-05 Akim Demaille <akim@epita.fr> |
7267 | ||
7268 | * src/LR0.c (augment_automaton): Formatting changes. | |
7269 | Better variable locality. | |
7270 | ||
f67d13aa AD |
7271 | 2001-12-05 Akim Demaille <akim@epita.fr> |
7272 | ||
7273 | * src/lalr.c (matrix_print): New. | |
7274 | (transpose): Use it. | |
7275 | Use arrays instead of pointers. | |
7276 | ||
c2713865 AD |
7277 | 2001-12-05 Akim Demaille <akim@epita.fr> |
7278 | ||
7279 | * src/lalr.c (maxrhs): Move to... | |
7280 | * src/gram.c, src/gram.h (ritem_longest_rhs): here. | |
7281 | * src/lalr.c (build_relations): Adjust. | |
7282 | ||
9887c18a AD |
7283 | 2001-12-05 Akim Demaille <akim@epita.fr> |
7284 | ||
7285 | * src/lalr.c (transpose): Free the memory allocated to the | |
7286 | argument, as it is replaced by the results by the unique caller. | |
7287 | (build_relations): Merely invoke transpose: it handles the memory | |
7288 | deallocation. | |
7289 | Improve variable locality. | |
7290 | Avoid variables used as mere abbreviations. | |
7291 | (compute_lookaheads): Use arrays instead of pointers. | |
7292 | ||
4d4f699c AD |
7293 | 2001-12-05 Akim Demaille <akim@epita.fr> |
7294 | ||
7295 | * src/lalr.c (initialize_F): Improve variable locality. | |
7296 | Avoid variables used as mere abbreviations. | |
7297 | ||
80a69750 AD |
7298 | 2001-12-05 Akim Demaille <akim@epita.fr> |
7299 | ||
7300 | * src/derives.c (print_derives): Display the ruleno. | |
7301 | * src/lalr.c (initialize_F, transpose): Better variable locality | |
7302 | to improve readability. | |
7303 | Avoid variables used as mere abbreviations. | |
7304 | ||
fe961097 AD |
7305 | 2001-12-05 Akim Demaille <akim@epita.fr> |
7306 | ||
7307 | * src/lalr.c (traverse): Use arrays instead of pointers. | |
7308 | ||
e3e4e814 AD |
7309 | 2001-12-05 Akim Demaille <akim@epita.fr> |
7310 | ||
7311 | * src/nullable.c (set_nullable): Use a for loop to de-obfuscate | |
7312 | the handling of squeue. | |
7313 | `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'. | |
7314 | ||
630e182b AD |
7315 | 2001-12-05 Akim Demaille <akim@epita.fr> |
7316 | ||
7317 | Because useless nonterminals are now kept alive (instead of being | |
7318 | `destroyed'), we now sometimes examine them, and store information | |
7319 | related to them. Hence we need to know their number, and adjust | |
7320 | memory allocations. | |
7321 | ||
7322 | * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer | |
7323 | static. | |
7324 | * src/LR0.c (allocate_itemsets): The memory allocated to | |
7325 | `symbol_count' was used for two different purpose: once to count | |
7326 | the number of occurrences of each symbol, and later reassigned to | |
7327 | `shift_symbol', containing the symbol that can be shifted from a | |
7328 | given state. | |
7329 | Deobfuscate, i.e., allocate, use and free `symbol_count' here | |
7330 | only, and... | |
7331 | (new_itemsets): Allocate `shift_symbol' here. | |
7332 | (allocate_itemsets): symbol_count includes useless nonterminals. | |
7333 | Make room for them. | |
7334 | (free_storage): Use `free', not `XFREE', for pointers that cannot | |
7335 | be null. | |
7336 | ||
81b51460 AD |
7337 | 2001-12-05 Akim Demaille <akim@epita.fr> |
7338 | ||
7339 | * src/nullable.c (set_nullable): Deobfuscate the handling of | |
7340 | ritem. | |
7341 | `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'. | |
7342 | ||
3067fbef AD |
7343 | 2001-12-05 Akim Demaille <akim@epita.fr> |
7344 | ||
7345 | * src/gram.c, src/gram.h (ritem_print): New. | |
7346 | * src/gram.c (dummy): Remove, now there is actual code in gram.c. | |
7347 | (This useless function was defined only to work around VMS linkers | |
7348 | that can't handle compilation units with variables only). | |
7349 | * src/reduce.c (dump_grammar): Use it to trace the construction of | |
7350 | ritem. | |
7351 | ||
c2bea5f9 PE |
7352 | 2001-12-04 Paul Eggert <eggert@twinsun.com> |
7353 | ||
7d27c823 PE |
7354 | * src/bison.simple (union yyalloc): Change member names |
7355 | to be the same as the stack names. | |
7356 | (yyparse): yyptr is now union yyalloc *, not char *. | |
7357 | (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning, | |
7358 | and may generate better code on some machines. | |
c2bea5f9 PE |
7359 | (yystpcpy): Use prototype if __STDC__ is defined, not just |
7360 | if __cplusplus is defined. | |
35687a9d | 7361 | |
2c8a9dfa AD |
7362 | 2001-11-30 Akim Demaille <akim@epita.fr> |
7363 | ||
7364 | * configure.in (WARNING_CFLAGS): Add -Werror when possible. | |
7365 | (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU | |
7366 | Gettext doesn't compile cleanly, and dies with -Werror. | |
7367 | * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS): | |
7368 | Include WARNING_CFLAGS here. | |
7369 | * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared | |
7370 | before being defined. | |
7371 | ||
f4e421e6 AD |
7372 | 2001-11-27 Paul Eggert <eggert@twinsun.com> |
7373 | ||
7374 | * lib/quotearg.h (quotearg_n, quotearg_n_style): | |
7375 | First arg is int, not unsigned. | |
7376 | * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise. | |
7377 | (SIZE_MAX, UINT_MAX): New macros. | |
7378 | (quotearg_n_options): Abort if N is negative. | |
7379 | Avoid overflow check on hosts where size_t is 64 bits and int | |
7380 | is 32 bits, as overflow is impossible there. | |
7381 | Fix off-by-one typo that caused unnecessary reallocation. | |
7382 | ||
7093d0f5 AD |
7383 | 2001-11-29 Paul Eggert <eggert@twinsun.com> |
7384 | ||
7385 | Name space cleanup in generated parser. | |
7386 | ||
7387 | * doc/bison.texinfo (Bison Parser): Discuss system headers | |
7388 | and their effect on the user name space. | |
7389 | ||
7390 | * src/bison.simple: | |
7391 | (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX, | |
7392 | YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary, | |
7393 | i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE). | |
7394 | ||
7395 | (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing | |
7396 | on user names when possible. | |
7397 | ||
7398 | (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn. | |
7399 | Simplify test for whather <alloca.h> exists. | |
7400 | ||
7401 | (<stdlib.h>): Include if we will use malloc, and if standard C or C++. | |
7402 | ||
7403 | (<stdio.h>): Include if YYDEBUG. | |
7404 | ||
7405 | (yymemcpy): Renamed from __yy_memcpy. Do not define unless | |
7406 | ! defined (yyoverflow) && ! defined (yymemcpy). | |
7407 | ||
7408 | (yymemcpy, yyparse): Rename local variables as needed so that | |
7409 | they all begin with 'yy'. | |
7410 | ||
7411 | (yystrlen, yystpcpy): New functions. | |
7412 | ||
7413 | (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES. | |
7414 | All uses changed. | |
7415 | ||
7416 | (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy | |
7417 | instead of relying on string.h functions. Use YYSTACK_ALLOC | |
7418 | and YYSTACK_FREE instead of malloc and free. | |
7419 | ||
fd51e5ff AD |
7420 | 2001-11-30 Akim Demaille <akim@epita.fr> |
7421 | ||
7422 | * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions | |
7423 | before their first uses. | |
7424 | (YYBISON, YYPURE): Move to the top of the output. | |
7425 | ||
7d13ff5f AD |
7426 | 2001-11-30 Akim Demaille <akim@epita.fr> |
7427 | ||
7428 | * tests/reduce.at (Useless Nonterminals): Fix. | |
7429 | ||
892a3995 AD |
7430 | 2001-11-30 Akim Demaille <akim@epita.fr> |
7431 | ||
7432 | * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty | |
7433 | if body instead of `;' to pacify GCC's warnings. | |
7434 | ||
68f1e3ed AD |
7435 | 2001-11-30 Akim Demaille <akim@epita.fr> |
7436 | ||
7437 | Instead of mapping the LHS of unused rules to -1, keep the LHS | |
7438 | valid, but flag the rules as invalid. | |
7439 | ||
7440 | * src/gram.h (rule_t): `useful' is a new member. | |
7441 | * src/print.c (print_grammar): Adjust. | |
7442 | * src/derives.c (set_derives): Likewise. | |
7443 | * src/reader.c (packgram, reduce_output): Likewise. | |
7444 | * src/reduce.c (reduce_grammar_tables): Likewise. | |
7445 | * tests/reduce.at (Underivable Rules, Useless Rules): New. | |
7446 | ||
d2d1b42b AD |
7447 | 2001-11-30 Akim Demaille <akim@epita.fr> |
7448 | ||
7449 | * src/reduce.c (reduce_output): Formatting changes. | |
7450 | * src/print.c (print_results, print_grammar): Likewise. | |
7451 | * tests/regression.at (Rule Line Numbers) | |
7452 | (Solved SR Conflicts, Unresolved SR Conflicts): Adjust. | |
7453 | ||
760b53a8 AD |
7454 | 2001-11-30 Akim Demaille <akim@epita.fr> |
7455 | ||
7456 | * src/reduce.c (nonterminals_reduce): Instead of throwing away | |
7457 | useless nonterminals, move them at the end of the symbol arrays. | |
7458 | (reduce_output): Adjust. | |
7459 | * tests/reduce.at (Useless Nonterminals): Adjust. | |
7460 | ||
00238958 AD |
7461 | 2001-11-30 Akim Demaille <akim@epita.fr> |
7462 | ||
7463 | * src/reduce.c: Various comment/formatting changes. | |
7464 | (nonterminals_reduce): New, extracted from... | |
7465 | (reduce_grammar_tables): here. | |
7466 | (reduce_grammar): Call nonterminals_reduce. | |
7467 | ||
396452de PE |
7468 | 2001-11-29 Paul Eggert <eggert@twinsun.com> |
7469 | ||
7470 | * src/bison.simple (YYSTACK_REALLOC): Remove. | |
7471 | (YYSTACK_ALLOC): Resurrect this macro, with its old meaning. | |
7472 | (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE): | |
7473 | New macros. | |
7474 | (union yyalloc): New type. | |
7475 | (__yy_memcpy): Last arg is size_t, not unsigned int, to remove | |
7476 | an arbitrary restriction on hosts where size_t is wider than int. | |
7477 | ||
7478 | (yyparse): Don't dump core if alloca or malloc fails; instead, report | |
7479 | a parser stack overflow. Allocate just one block of memory for all | |
7480 | three stacks, instead of allocating three blocks; this typically is | |
7481 | faster and reduces fragmentation. | |
7482 | ||
7483 | Do not limit the number of items in the stack to a value that fits | |
7484 | in 'int', as this is an arbitrary limit on hosts with 64-bit | |
7485 | size_t and 32-bit int. | |
7486 | ||
147e184c MA |
7487 | 2001-11-29 Marc Autret <autret_m@epita.fr> |
7488 | ||
7489 | * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead | |
7490 | of defining YYERROR_VERBOSE. | |
7491 | [AT_DATA]: $4 is now out of C declarations in the prologue. | |
7492 | ||
426cf563 MA |
7493 | 2001-11-28 Marc Autret <autret_m@epita.fr> |
7494 | ||
7495 | * src/reader.c (parse_dquoted_param): New. | |
7496 | (parse_skel_decl): Use it. | |
7497 | * src/lex.h: Add its prototype. | |
7498 | * src/lex.c (literalchar): Become not static. | |
7499 | ||
c7925b99 MA |
7500 | 2001-11-28 Marc Autret <autret_m@epita.fr> |
7501 | ||
7502 | * src/output.h: And put its extern declaration here. | |
7503 | * src/output.c (error_verbose): Define here. | |
7504 | (prepare): Echo name modification. | |
7505 | * src/getargs.h: Clean its extern declaration. | |
7506 | * src/getargs.c (error_verbose_flag): Remove. | |
7507 | (getargs): Remove case 'e'. | |
7508 | * src/options.c (option_table): 'error-verbose' is now seen as simple | |
7509 | percent option. | |
7510 | Include output.h. | |
7511 | ||
7512 | * src/reader.c (read_declarations): Remove case tok_include. | |
7513 | (parse_include_decl): Remove. | |
7514 | * src/lex.h (token_t): Remove tok_include. | |
7515 | * src/options.c (option_table): 'include' is now a simple command line | |
7516 | option. | |
7517 | ||
5b5d1929 MA |
7518 | 2001-11-28 Marc Autret <autret_m@epita.fr> |
7519 | ||
7520 | * src/bison.simple: Adjust muscle names. | |
7521 | * src/muscle_tab.c (muscle_init): Also rename the muscles. | |
7522 | * src/output.c (prepare): s/_/-/ for the muscles names. | |
7523 | (output_parser): When scanning for a muscle, allow '-' instead of '_'. | |
7524 | ||
8850be4b MA |
7525 | 2001-11-28 Marc Autret <autret_m@epita.fr> |
7526 | ||
7527 | * src/bison.simple: Fix debug. | |
7528 | [YYERROR_VERBOSE]: Re-integrate as an internal macro. | |
7529 | ||
4a38e613 AD |
7530 | 2001-11-28 Akim Demaille <akim@epita.fr> |
7531 | ||
7532 | * src/LR0.c (shifts_new): New. | |
7533 | (save_shifts, insert_start_shift, augment_automaton): Use it. | |
7534 | ||
4b35e1c1 AD |
7535 | 2001-11-28 Akim Demaille <akim@epita.fr> |
7536 | ||
7537 | * src/closure.c (closure): `b' and `ruleno' denote the same value: | |
7538 | keep ruleno only. | |
7539 | ||
d2b04478 AD |
7540 | 2001-11-28 Akim Demaille <akim@epita.fr> |
7541 | ||
7542 | * src/closure.c (closure): Instead of looping over word in array | |
7543 | then bits in words, loop over bits in array. | |
7544 | ||
2c4c30aa AD |
7545 | 2001-11-28 Akim Demaille <akim@epita.fr> |
7546 | ||
7547 | * src/closure.c (closure): No longer optimize the special case | |
7548 | where all the bits of `ruleset[r]' are set to 0, to make the code | |
7549 | clearer. | |
7550 | ||
576890b7 AD |
7551 | 2001-11-28 Akim Demaille <akim@epita.fr> |
7552 | ||
7553 | * src/closure.c (closure): `r' and `c' are new variables, used to | |
7554 | de-obfuscate accesses to RULESET and CORE. | |
7555 | ||
cb487d7d AD |
7556 | 2001-11-28 Akim Demaille <akim@epita.fr> |
7557 | ||
7558 | * src/reduce.c (reduce_print): Use ngettext. | |
7559 | (dump_grammar): Improve the trace accuracy. | |
7560 | ||
6013d43f AD |
7561 | 2001-11-28 Akim Demaille <akim@epita.fr> |
7562 | ||
7563 | * src/reduce.c (dump_grammar): Don't translate trace messages. | |
7564 | ||
cb4956ee AD |
7565 | 2001-11-28 Akim Demaille <akim@epita.fr> |
7566 | ||
7567 | * tests/reduce.at (Useless Terminals, Useless Nonterminals): New. | |
7568 | * src/reduce.c (reduce_grammar_tables): Do not free useless tags, | |
7569 | as all tags are free'ed afterwards. | |
7570 | From Enrico Scholz. | |
7571 | ||
648185ab PE |
7572 | 2001-11-27 Paul Eggert <eggert@twinsun.com> |
7573 | ||
7574 | * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to | |
7575 | use alloca when we didn't want to, and vice versa. | |
7576 | ||
68254a03 MA |
7577 | 2001-11-27 Marc Autret <autret_m@epita.fr> |
7578 | ||
9113b58f AD |
7579 | * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle |
7580 | initialization. | |
68254a03 MA |
7581 | * src/output.c (prepare): Remove its update. |
7582 | ||
04d843a2 MA |
7583 | 2001-11-27 Marc Autret <autret_m@epita.fr> |
7584 | ||
7585 | * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition. | |
7586 | Use %error-verbose. | |
7587 | ||
d2079671 | 7588 | 2001-11-27 Marc Autret <autret_m@epita.fr> |
eeeb962b MA |
7589 | |
7590 | * src/bison.simple: Remove YYERROR_VERBOSE using. | |
7591 | Use %%error_verbose. | |
7592 | (yyparse): Likewise. | |
7593 | * src/output.c (prepare): Give its final value. | |
7594 | * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'. | |
7595 | * src/getargs.h: Add its extern declaration. | |
7596 | * src/getargs.c (error_verbose_flag): New int. | |
7597 | (getargs): Update to catch new case. | |
7598 | * src/options.c (option_table): 'error-verbose' is a new option. | |
7599 | (shortopts): Update. | |
7600 | ||
e0327bc8 AD |
7601 | 2001-11-27 Akim Demaille <akim@epita.fr> |
7602 | ||
7603 | * src/system.h: Use intl/libgettext.h. | |
7604 | * src/Makefile.am (INCLUDES): Add -I $(top_srcdir). | |
7605 | ||
000f1a3c AD |
7606 | 2001-11-27 Akim Demaille <akim@epita.fr> |
7607 | ||
7608 | * tests/torture.at (Exploding the Stack Size with Malloc): | |
7609 | s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/. | |
7610 | ||
26cfe0be AD |
7611 | 2001-11-27 Akim Demaille <akim@epita.fr> |
7612 | ||
7613 | * src/files.c: Include error.h. | |
7614 | Reported by Hans Aberg. | |
7615 | ||
f6bd5427 MA |
7616 | 2001-11-26 Marc Autret <autret_m@epita.fr> |
7617 | ||
d2079671 | 7618 | * src/reader.c (parse_include_decl): New, not yet implemented. |
f6bd5427 MA |
7619 | (read_declarations): Add case tok_include. |
7620 | * src/getargs.h (include): Add its extern definition. | |
7621 | * src/getargs.c (include): New const char *. | |
7622 | (getargs): Add case '-I'. | |
7623 | * src/options.c (option_table): Add include as command line and | |
7624 | percent option. | |
7625 | * src/lex.h (token_t): Add tok_include. | |
7626 | ||
2ca209c1 AD |
7627 | 2001-11-26 Akim Demaille <akim@epita.fr> |
7628 | ||
7629 | * src/reader.c (readgram): Make sure rules for mid-rule actions | |
7630 | have a lineno equal to that of their host rule. | |
7631 | Reported by Hans Aberg. | |
7632 | * tests/regression.at (Rule Line Numbers): New. | |
7633 | ||
0e41b407 AD |
7634 | 2001-11-26 Akim Demaille <akim@epita.fr> |
7635 | ||
7636 | * src/LR0.c (allocate_itemsets): kernel_size contains ints, not | |
7637 | size_ts. | |
7638 | ||
7639 | 2001-11-26 Akim Demaille <akim@epita.fr> | |
7640 | ||
7641 | * src/complain.c, src/complain.h (error): Remove, provided by | |
7642 | lib/error.[ch]. | |
7643 | ||
e0c40012 AD |
7644 | 2001-11-26 Akim Demaille <akim@epita.fr> |
7645 | ||
7646 | * src/reader.c (read_declarations): Don't abort on tok_illegal, | |
7647 | issue an error message. | |
7648 | * tests/regression.at (Invalid %directive): New. | |
7649 | Reported by Hans Aberg. | |
7650 | ||
5e147124 AD |
7651 | 2001-11-26 Akim Demaille <akim@epita.fr> |
7652 | ||
7653 | * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE. | |
7654 | * lib/Makefile.am (libbison_a_SOURCES): Adjust. | |
7655 | ||
a034c8b8 AD |
7656 | 2001-11-26 Akim Demaille <akim@epita.fr> |
7657 | ||
7658 | * src/conflicts.c (conflicts_print): Don't complain at all when | |
7659 | there are no reduce/reduce conflicts, and as many shift/reduce | |
7660 | conflicts as expected. | |
7661 | * tests/regression.at (%expect right): Adjust. | |
7662 | ||
c64a20f3 AD |
7663 | 2001-11-23 Akim Demaille <akim@epita.fr> |
7664 | ||
7665 | * lib/alloca.c: Update, from fileutils. | |
7666 | ||
5b0d29bb AD |
7667 | 2001-11-23 Akim Demaille <akim@epita.fr> |
7668 | ||
7669 | * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@. | |
7670 | ||
722c4bfe AD |
7671 | 2001-11-23 Akim Demaille <akim@epita.fr> |
7672 | ||
7673 | * src/system.h: Include alloca.h. | |
7674 | * src/main.c (main) [C_ALLOCA]: Call alloca (0). | |
7675 | ||
6255b435 AD |
7676 | 2001-11-23 Akim Demaille <akim@epita.fr> |
7677 | ||
7678 | * src/print_graph.c (print_actions): Remove `rule', unused. | |
7679 | * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to | |
7680 | pacify GCC's signed < unsigned warnings. | |
7681 | * src/closure.c (itemsetsize): Likewise. | |
7682 | * src/reader.c (symbol_list_new): Static. | |
7683 | ||
b29b2ed5 AD |
7684 | 2001-11-23 Akim Demaille <akim@epita.fr> |
7685 | ||
7686 | Attaching lineno to buckets is stupid, since only one copy of each | |
7687 | symbol is kept, only the line of the first occurrence is kept too. | |
7688 | ||
7689 | * src/symtab.h, src/symtab.c (bucket): Remove the line member. | |
7690 | * src/reader.c (rline_allocated): Remove, unused. | |
7691 | (symbol_list): Have a `line' member. | |
7692 | (symbol_list_new): New. | |
7693 | (readgram): Use it. | |
7694 | * src/print.c (print_grammar): Output the rule line numbers. | |
7695 | * tests/regression.at (Solved SR Conflicts) | |
7696 | (Unresolved SR Conflicts): Adjust. | |
7697 | Reported by Hans Aberg. | |
7698 | ||
a81b1d4a MA |
7699 | 2001-11-22 Marc Autret <autret_m@epita.fr> |
7700 | ||
7701 | * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0. | |
7702 | ||
c1ecb3c1 MA |
7703 | 2001-11-22 Marc Autret <autret_m@epita.fr> |
7704 | ||
7705 | * src/muscle_tab.c (muscle_init): Remove initialization of | |
7706 | skeleton muscle. | |
7707 | * src/output.c (output_master_parser): Do it here. | |
7708 | ||
fbe01355 AD |
7709 | 2001-11-20 Akim Demaille <akim@epita.fr> |
7710 | ||
7711 | * po/sv.po: New. | |
7712 | * configure.in (ALL_LINGUAS): Adjust. | |
7713 | * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no | |
7714 | longer contains strings to translate. | |
7715 | ||
81e895c0 AD |
7716 | 2001-11-19 Akim Demaille <akim@epita.fr> |
7717 | ||
7718 | * src/conflicts.c (conflicts_print): Add a missing \n. | |
7719 | ||
6bb1878b AD |
7720 | 2001-11-19 Akim Demaille <akim@epita.fr> |
7721 | ||
7722 | * src/nullable.c (nullable_print): New. | |
7723 | (set_nullable): Call it when tracing. | |
7724 | Better locality of variables. | |
7725 | ||
d9ec2d07 AD |
7726 | 2001-11-19 Akim Demaille <akim@epita.fr> |
7727 | ||
7728 | * src/print.c (print_actions): Better locality of variables. | |
7729 | ||
720e5c1b AD |
7730 | 2001-11-19 Akim Demaille <akim@epita.fr> |
7731 | ||
7732 | * src/derives.c (print_derives): Fix and enrich. | |
7733 | * src/closure.c (print_fderives): Likewise. | |
7734 | ||
fb908786 AD |
7735 | 2001-11-19 Akim Demaille <akim@epita.fr> |
7736 | ||
7737 | * src/closure.c (itemsetend): Remove, replaced with... | |
7738 | (itemsetsize): new. | |
7739 | ||
125ecb56 AD |
7740 | 2001-11-19 Akim Demaille <akim@epita.fr> |
7741 | ||
7742 | * src/LR0.c (kernel_end): Remove, replaced with... | |
7743 | (kernel_size): new. | |
7744 | ||
d8cf039f AD |
7745 | 2001-11-19 Akim Demaille <akim@epita.fr> |
7746 | ||
7747 | * src/conflicts.c (set_conflicts): Use arrays instead of pointers | |
7748 | to clarify. | |
7749 | ||
7bec0760 AD |
7750 | 2001-11-19 Akim Demaille <akim@epita.fr> |
7751 | ||
7752 | * src/closure.c (closure): Use arrays instead of pointers to clarify. | |
7753 | ||
c87d4863 AD |
7754 | 2001-11-19 Akim Demaille <akim@epita.fr> |
7755 | ||
7756 | * src/closure.c, src/derives.c, src/nullable.c: Adjust various | |
7757 | trace messages. | |
7758 | * src/LR0.c: Likewise. | |
7759 | (allocate_itemsets): Use arrays instead of pointers to clarify. | |
7760 | ||
9bfe901c AD |
7761 | 2001-11-19 Akim Demaille <akim@epita.fr> |
7762 | ||
7763 | * src/getargs.c (statistics_flag): Replace with... | |
7764 | (trace_flag): New. | |
7765 | (longopts): Accept --trace instead of --statistics. | |
7766 | * src/getargs.h, src/options.c: Adjust. | |
7767 | * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c, | |
7768 | * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE. | |
7769 | ||
97db7bd4 AD |
7770 | 2001-11-19 Akim Demaille <akim@epita.fr> |
7771 | ||
cc72668c | 7772 | * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer |
97db7bd4 AD |
7773 | pointers to clarify the code. |
7774 | (save_reductions, save_shifts): Factor common parts of alternatives. | |
7775 | ||
2c5f66ed AD |
7776 | 2001-11-19 Akim Demaille <akim@epita.fr> |
7777 | ||
7778 | * src/LR0.c (new_state, get_state): Complete TRACE code. | |
7779 | * src/closure.c: Include `reader.h' to get `tags', needed by the | |
7780 | trace code. | |
7781 | Rename the conditional DEBUG as TRACE. | |
7782 | Output consistently TRACEs to stderr, not stdout. | |
7783 | * src/derives.c: Likewise. | |
7784 | * src/reduce.c: (inaccessable_symbols): Using if is better style | |
7785 | than goto. | |
7786 | Use `#if TRACE' instead of `#if 0' for tracing code. | |
7787 | ||
300f275f AD |
7788 | 2001-11-19 Akim Demaille <akim@epita.fr> |
7789 | ||
7790 | * src/system.h (LIST_FREE, shortcpy): New. | |
7791 | * src/LR0.c: Use them. | |
7792 | * src/output.c (free_itemsets, free_reductions, free_shifts): | |
7793 | Remove, replaced by LIST_FREE. | |
7794 | ||
f59c437a AD |
7795 | 2001-11-19 Akim Demaille <akim@epita.fr> |
7796 | ||
7797 | * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC) | |
7798 | (REDUCTIONS_ALLOC): New. | |
7799 | * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory | |
7800 | allocation. | |
7801 | ||
6986fd9e AD |
7802 | 2001-11-19 Akim Demaille <akim@epita.fr> |
7803 | ||
7804 | * src/LR0.c (new_state): Complete trace code. | |
7805 | * src/nullable.c (set_nullable): Don't translate traces. | |
7806 | ||
4bc30f78 AD |
7807 | 2001-11-19 Akim Demaille <akim@epita.fr> |
7808 | ||
7809 | * src/print_graph.c (print_core): Better locality of variables. | |
7810 | * src/print.c (print_core): Likewise. | |
7811 | ||
08a946e0 AD |
7812 | 2001-11-19 Akim Demaille <akim@epita.fr> |
7813 | ||
7814 | * src/vcg.c: You do the output, so you are responsible of the | |
7815 | handling of VCG syntax, in particular: use quotearg. | |
7816 | * src/print_graph.c: Don't. | |
7817 | (print_actions): Don't output the actions as part of the nodes, | |
7818 | since that's the job of the edges. | |
7819 | (print_state): Don't output by hand: fill the node description, | |
9bfe901c | 7820 | and ask for its output. |
08a946e0 | 7821 | |
f0473484 AD |
7822 | 2001-11-19 Akim Demaille <akim@epita.fr> |
7823 | ||
cc72668c AD |
7824 | * src/bison.simple (yyparse): When verbosely reporting an error, |
7825 | no longer put additional quotes around token names. | |
f0473484 AD |
7826 | * tests/calc.at: Adjust. |
7827 | ||
e41dc700 AD |
7828 | 2001-11-19 Akim Demaille <akim@epita.fr> |
7829 | ||
7830 | * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'. | |
7831 | * src/reader.c (record_rule_lines, rline, rline_allocated): Remove. | |
7832 | * src/output.c: Adjust. | |
7833 | ||
652a871c AD |
7834 | 2001-11-19 Akim Demaille <akim@epita.fr> |
7835 | ||
7836 | * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of... | |
7837 | (rule_t): this. | |
7838 | * src/conflicts.c, src/reader.c, src/reduce.c: Adjust. | |
7839 | ||
b2ed6e58 AD |
7840 | 2001-11-19 Akim Demaille <akim@epita.fr> |
7841 | ||
7842 | * src/gram.h (rule_t): New. | |
7843 | (rule_table): New. | |
7844 | (rrhs, rlhs): Remove, part of state_t. | |
7845 | * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c, | |
7846 | * src/lalr.c, src/nullable.c, src/output.c, src/print.c, | |
7847 | * src/reader.c, src/reduce.c: Adjust. | |
7848 | ||
edad7067 AD |
7849 | 2001-11-19 Akim Demaille <akim@epita.fr> |
7850 | ||
7851 | * src/reader.c (symbols_output): New, extracted from... | |
7852 | (packsymbols): Here. | |
7853 | (reader): Call it. | |
7854 | ||
3feec034 AD |
7855 | 2001-11-19 Akim Demaille <akim@epita.fr> |
7856 | ||
7857 | * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with... | |
7858 | (maxrhs): this new function. | |
7859 | ||
ddcd5fdf AD |
7860 | 2001-11-19 Akim Demaille <akim@epita.fr> |
7861 | ||
cc72668c | 7862 | * src/lalr.c (F): New macro to access the variable F. |
ddcd5fdf AD |
7863 | Adjust. |
7864 | ||
bb527fc2 AD |
7865 | 2001-11-19 Akim Demaille <akim@epita.fr> |
7866 | ||
cc72668c | 7867 | * src/lalr.h (LA): New macro to access the variable LA. |
bb527fc2 AD |
7868 | * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c: |
7869 | * src/lalr.c: Adjust. | |
7870 | ||
a845a697 AD |
7871 | 2001-11-19 Akim Demaille <akim@epita.fr> |
7872 | ||
7873 | * src/lalr.c (initialize_LA): Only initialize LA. Let... | |
7874 | (set_state_table): handle the `lookaheads' members. | |
7875 | ||
f004bf6a AD |
7876 | 2001-11-19 Akim Demaille <akim@epita.fr> |
7877 | ||
cc72668c AD |
7878 | * src/lalr.h (lookaheads): Removed array, whose contents is now |
7879 | a member of... | |
f004bf6a AD |
7880 | (state_t): this structure. |
7881 | * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c: | |
7882 | Adjust. | |
7883 | ||
de326cc0 AD |
7884 | 2001-11-19 Akim Demaille <akim@epita.fr> |
7885 | ||
cc72668c AD |
7886 | * src/lalr.h (consistent): Removed array, whose contents is now |
7887 | a member of... | |
de326cc0 AD |
7888 | (state_t): this structure. |
7889 | * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c: | |
7890 | Adjust. | |
7891 | ||
90b4416b AD |
7892 | 2001-11-19 Akim Demaille <akim@epita.fr> |
7893 | ||
cc72668c AD |
7894 | * src/lalr.h (reduction_table, shift_table): Removed arrays, whose |
7895 | contents are now members of... | |
90b4416b AD |
7896 | (state_t): this structure. |
7897 | * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c: | |
7898 | Adjust. | |
7899 | ||
9703cc49 AD |
7900 | 2001-11-19 Akim Demaille <akim@epita.fr> |
7901 | ||
7902 | * src/lalr.h (state_t): New. | |
7903 | (state_table): Be a state_t * instead of a core **. | |
7904 | (accessing_symbol): Remove, part of state_t. | |
7905 | * src/lalr.c: Adjust. | |
7906 | (set_accessing_symbol): Merge into... | |
7907 | (set_state_table): this. | |
7908 | * src/print_graph.c, src/conflicts.c: Adjust. | |
7909 | ||
d803322e AD |
7910 | 2001-11-14 Akim Demaille <akim@epita.fr> |
7911 | ||
7912 | * tests/calc.at, tests/output.at, tests/regression.at, | |
7913 | * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g: | |
7914 | now the tests are run in private dirs, therefore AC_CLEANUP and | |
7915 | family can be simplified to 0-ary. | |
7916 | * tests/atlocal.in: Now that we run `elsewhere' than in tests/, | |
7917 | use abs. path to find config.h. | |
7918 | * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's | |
7919 | stderr, there can be way too much random noise. | |
7920 | Instead pass -Werror to GCC and rely on the exit status. | |
7921 | Reported by Wolfram Wagner. | |
7922 | ||
3d76b07d AD |
7923 | 2001-11-14 Akim Demaille <akim@epita.fr> |
7924 | ||
7925 | * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be | |
7926 | defined only if yyoverflow is defined, to avoid `warning: unused | |
7927 | variable `yyvs1''. | |
7928 | Reported by The Test Suite. | |
7929 | ||
09b503c8 AD |
7930 | 2001-11-14 Akim Demaille <akim@epita.fr> |
7931 | ||
7932 | * src/print.c: Include reduce.h. | |
7933 | Reported by Hans Aberg. | |
7934 | ||
7935 | 2001-11-14 Akim Demaille <akim@epita.fr> | |
7936 | ||
7937 | * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer): | |
7938 | Revert a previous patch: these are really const. | |
7939 | * src/conflicts.c (conflict_report): Additional useless pair of | |
7940 | braces to pacify GCC's warnings for `if () if () {} else {}'. | |
7941 | * src/lex.c (parse_percent_token): Replace equal_offset with | |
7942 | arg_offset. | |
7943 | arg is const. | |
7944 | Be sure to strdup `arg' when used, since there is no reason for | |
7945 | token_buffer not to change. | |
7946 | ||
0f37a994 AD |
7947 | 2001-11-14 Akim Demaille <akim@epita.fr> |
7948 | ||
7949 | * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper | |
7950 | definition. | |
7951 | * src/main.c (main): Use them. | |
7952 | Suggested by Hans Aberg. | |
7953 | ||
d39d93b8 AD |
7954 | 2001-11-12 Akim Demaille <akim@epita.fr> |
7955 | ||
7956 | * src/system.h (ngettext): Now that we use ngettext, be sure to | |
7957 | provide a default definition when NLS are not used. | |
7958 | ||
9edcd895 AD |
7959 | 2001-11-12 Akim Demaille <akim@epita.fr> |
7960 | ||
7961 | * doc/bison.texinfo: Use `$' as shell prompt, not `%'. | |
7962 | Use @kbd to denote user input. | |
7963 | (Language and Grammar): ANSIfy the example. | |
7964 | Adjust its layout for info/notinfo. | |
7965 | (Location Tracking Calc): Output error messages to stderr. | |
7966 | Output locations in a more GNUtically correct way. | |
7967 | Fix a couple of Englishos. | |
7968 | Adjust @group/@end group pairs. | |
7969 | ||
7da99ede AD |
7970 | 2001-11-12 Akim Demaille <akim@epita.fr> |
7971 | ||
e3aa65c5 | 7972 | %expect was not functioning at all. |
7da99ede AD |
7973 | |
7974 | * src/conflicts.c (expected_conflicts): Set to -1. | |
7975 | (conflict_report): Use ngettext. | |
7976 | (conflicts_print): Check %expect and make its violation an error. | |
7977 | * doc/bison.texinfo (Expect Decl): Adjust. | |
7978 | * configure.in (AM_GNU_GETTEXT): Ask for ngettext. | |
7979 | * tests/regression.at (%expect not enough, %expect right) | |
7980 | (%expect too much): New. | |
7981 | ||
ba9dda1a AD |
7982 | 2001-11-12 Akim Demaille <akim@epita.fr> |
7983 | ||
7984 | * tests/regression.at (Conflicts): Rename as... | |
7985 | (Unresolved SR Conflicts): this. | |
7986 | (Solved SR Conflicts): New. | |
7987 | ||
337c5bd1 AD |
7988 | 2001-11-12 Akim Demaille <akim@epita.fr> |
7989 | ||
7990 | * src/reduce.c (print_results): Rename as... | |
7991 | (reduce_output): This. | |
7992 | Output to OUT, passed as argument, instead of output_obstack. | |
7993 | (dump_grammar): Likewise. | |
7994 | (reduce_free): New. | |
7995 | Also free V1. | |
7996 | (reduce_grammar): No longer call reduce_output, since... | |
7997 | * src/print.c (print_results): do it. | |
7998 | * src/main.c (main): Call reduce_free; | |
7999 | ||
c73a41af AD |
8000 | 2001-11-12 Akim Demaille <akim@epita.fr> |
8001 | ||
8002 | * src/conflicts.c (print_reductions): Accept OUT as argument. | |
8003 | Output to it, not to output_obstack. | |
8004 | * src/print.c (print_actions): Adjust. | |
8005 | ||
0df87bb6 AD |
8006 | 2001-11-12 Akim Demaille <akim@epita.fr> |
8007 | ||
8008 | * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return | |
8009 | the result instead of using... | |
8010 | (src_total, rrc_total, src_count, rrc_count): Remove. | |
8011 | (any_conflicts): Remove. | |
8012 | (print_conflicts): Split into... | |
8013 | (conflicts_print, conflicts_output): New. | |
8014 | * src/conflicts.h: Adjust. | |
8015 | * src/main.c (main): Invoke both conflicts_output and conflicts_print. | |
0f37a994 | 8016 | * src/print.c (print_grammar): Issue `\n' between two rules. |
0df87bb6 AD |
8017 | * tests/regression.at (Conflicts): New. |
8018 | Reported by Tom Lane. | |
8019 | ||
e4d3d4de AD |
8020 | 2001-11-12 Akim Demaille <akim@epita.fr> |
8021 | ||
8022 | * tests/regression.at (Invalid input): Remove, duplicate with | |
8023 | ``Invalid input: 1''. | |
8024 | ||
6d7d248e AD |
8025 | 2001-11-12 Akim Demaille <akim@epita.fr> |
8026 | ||
8027 | * tests/torture.at (AT_DATA_STACK_TORTURE) | |
8028 | (Exploding the Stack Size with Alloca) | |
8029 | (Exploding the Stack Size with Malloc): New. | |
8030 | ||
e9e4c321 AD |
8031 | 2001-11-12 Akim Demaille <akim@epita.fr> |
8032 | ||
8033 | * src/bison.simple (YYSTACK_REALLOC): New. | |
8034 | (yyparse) [!yyoverflow]: Use it and free the old stack. | |
0f37a994 | 8035 | Reported by Per Allansson. |
e9e4c321 | 8036 | |
5f7e0832 AD |
8037 | 2001-11-12 Pascal Bart <pascal.bart@epita.fr> |
8038 | ||
8039 | * src/bison.simple: Define type yystype instead of YYSTYPE, and | |
8040 | define CPP macro, which substitute YYSTYPE by yystype. | |
8041 | * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do | |
8042 | with yyltype/YYLTYPE. This allows inclusion of the generated | |
8043 | header within the parser if the compiler, such as GGC, accepts | |
8044 | multiple equivalent #defines. | |
8045 | From Akim. | |
8046 | ||
e3f1699f AD |
8047 | 2001-11-05 Akim Demaille <akim@epita.fr> |
8048 | ||
8049 | * src/reader.c (symbols_output): New, extracted from... | |
8050 | (packsymbols): here. | |
8051 | (reader): Adjust. | |
8052 | ||
65be0866 AD |
8053 | 2001-11-05 Akim Demaille <akim@epita.fr> |
8054 | ||
8055 | * src/lex.c (parse_percent_token): s/quotearg/quote/. | |
8056 | ||
e4d910bf AD |
8057 | 2001-11-05 Akim Demaille <akim@epita.fr> |
8058 | ||
8059 | * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up | |
8060 | pattern. | |
8061 | ||
951366c1 AD |
8062 | 2001-11-05 Akim Demaille <akim@epita.fr> |
8063 | ||
8064 | * src/options.h (struct option_table_struct): set_flags is void*. | |
8065 | * src/options.c (longopts): Support `--output' and `%output'. | |
8066 | (usage): Adjust. | |
8067 | * src/lex.h (tok_setopt): Remove, replaced with... | |
8068 | (tok_intopt, tok_stropt): these new guys. | |
8069 | * src/lex.c (getopt.h): Not needed. | |
8070 | (token_buffer, unlexed_token_buffer): Not const. | |
8071 | (percent_table): Promote `-' over `_' in directive names. | |
8072 | Active `%name-prefix', `file-prefix', and `output'. | |
8073 | (parse_percent_token): Accept possible arguments to directives. | |
8074 | Promote `-' over `_' in directive names. | |
8075 | ||
d8988b2f AD |
8076 | 2001-11-04 Akim Demaille <akim@epita.fr> |
8077 | ||
8078 | * doc/bison.texinfo (Decl Summary): Split the list into | |
8079 | `directives for grammars' and `directives for bison'. | |
8080 | Sort'em. | |
8081 | Add description of `%name-prefix', `file-prefix', and `output'. | |
8082 | Promote `-' over `_' in directive names. | |
8083 | (Bison Options): s/%locactions/%locations/. Nice Freudian slip. | |
8084 | Simplify the description of `--name-prefix'. | |
8085 | Promote `-' over `_' in directive names. | |
8086 | Promote `--output' over `--output-file'. | |
8087 | Fix the description of `--defines'. | |
8088 | * tests/output.at: Exercise %file-prefix and %output. | |
8089 | ||
6468d18e AD |
8090 | 2001-11-02 Akim Demaille <akim@epita.fr> |
8091 | ||
8092 | * doc/refcard.tex: Update. | |
8093 | ||
6b7e85b9 AD |
8094 | 2001-11-02 Akim Demaille <akim@epita.fr> |
8095 | ||
8096 | * src/symtab.h (SUNDEF): New. | |
8097 | * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to | |
8098 | stand for `uninitialized', instead of 0. | |
8099 | * src/reader.c (packsymbols, parse_thong_decl): Adjust. | |
8100 | * src/lex.c (lex): Adjust. | |
8101 | ||
8102 | * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF. | |
8103 | Number it 0. | |
8104 | Let yylex return it instead of a plain 0. | |
8105 | Reported by Dick Streefland. | |
8106 | ||
cd5aafcf AD |
8107 | 2001-11-02 Akim Demaille <akim@epita.fr> |
8108 | ||
8109 | * tests/regression.at (Mixing %token styles): New test. | |
8110 | ||
037ca2f1 AD |
8111 | 2001-11-02 Akim Demaille <akim@epita.fr> |
8112 | ||
8113 | * src/reader.c (parse_thong_decl): Formatting changes. | |
8114 | (token_translations_init): New, extracted from... | |
8115 | (packsymbols): Here. | |
8116 | Adjust. | |
8117 | ||
270a173c AD |
8118 | 2001-11-01 Akim Demaille <akim@epita.fr> |
8119 | ||
8120 | * tests/regression.at (AT_TEST_CPP_GUARD_H): New. | |
8121 | Check that `9foo.y' produces correct cpp guards. | |
8122 | * src/files.c (compute_header_macro): Prepend `BISON_' to CPP | |
8123 | guards. | |
8124 | Reported by Wwp. | |
8125 | ||
561f9a30 AD |
8126 | 2001-11-01 Akim Demaille <akim@epita.fr> |
8127 | ||
8128 | * tests/regression.at (Invalid input: 2): New. | |
8129 | * src/lex.c (unlexed_token_buffer): New. | |
8130 | (lex, unlex): Adjust: when unlexing, be sure to save token_buffer | |
8131 | too. | |
8132 | Reported by Wwp. | |
8133 | ||
f987e9d2 AD |
8134 | 2001-11-01 Akim Demaille <akim@epita.fr> |
8135 | ||
8136 | * tests/calc.at: Catch up with 1.30. | |
8137 | * configure.in: Bump to 1.49a. | |
8138 | Adjust to newer Autotest. | |
8139 | ||
0846f581 PB |
8140 | 2001-10-19 Pascal Bart <pascal.bart@epita.fr> |
8141 | ||
8142 | * src/conflicts.c: Move global variables rrc_total and src_total ... | |
8143 | (print_conflicts): here. | |
8144 | * src/output.c (output): Free global variable user_toknums. | |
8145 | * src/lex.c (token_obstack): Become static. | |
8146 | ||
3c1a79b3 AD |
8147 | 2001-10-18 Akim Demaille <akim@epita.fr> |
8148 | ||
8149 | * tests/atlocal.in (GCC): Add. | |
8150 | * tests/calc.at: s/m4_match/m4_bmatch/. | |
8151 | s/m4_patsubst/m4_bpatsubst/. | |
8152 | (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC. | |
8153 | * configure.in: AC_SUBST(GCC). | |
8154 | ||
5d52e7d0 MA |
8155 | 2001-10-14 Marc Autret <autret_m@epita.fr> |
8156 | ||
8157 | * src/options.c (create_long_option_table): Fix. | |
8158 | ||
631aa1d3 AD |
8159 | 2001-10-10 Akim Demaille <akim@epita.fr> |
8160 | ||
8161 | * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA. | |
8162 | ||
f6ec6d13 AD |
8163 | 2001-10-04 Akim Demaille <akim@epita.fr> |
8164 | ||
8165 | * src/reader.c (parse_union_decl): Push the caracters in | |
8166 | union_obstack, not attrs_obstack. | |
8167 | ||
342b8b6e AD |
8168 | 2001-10-04 Akim Demaille <akim@epita.fr> |
8169 | ||
8170 | Merge in the branch 1.29. | |
8171 | ||
8172 | * src/reader.c (packsymbols): Use a temporary obstack for | |
8173 | `%%tokendef', since output_stack is already used elsewhere. | |
8174 | ||
8175 | 2001-10-02 Akim Demaille <akim@epita.fr> | |
8176 | ||
8177 | Bump 1.29d. | |
8178 | ||
8179 | 2001-10-02 Akim Demaille <akim@epita.fr> | |
8180 | ||
8181 | Version 1.29c. | |
8182 | ||
8183 | 2001-10-02 Akim Demaille <akim@epita.fr> | |
8184 | ||
8185 | * tests/regression.at (Invalid CPP headers): New. | |
8186 | From Alexander Belopolsky. | |
8187 | * src/files.c (compute_header_macro): Map non alnum chars to `_'. | |
8188 | ||
8189 | 2001-10-02 Akim Demaille <akim@epita.fr> | |
8190 | ||
8191 | * tests/regression.at (Invalid input): New. | |
8192 | * src/lex.c (lex): Be sure to set `token_buffer' in any case. | |
8193 | Reported by Shura. | |
8194 | ||
8195 | 2001-10-02 Akim Demaille <akim@epita.fr> | |
8196 | ||
8197 | * tests/calc.at: Now that --debug works, the tests must be adjusted. | |
8198 | ||
8199 | 2001-10-02 Akim Demaille <akim@epita.fr> | |
8200 | ||
8201 | * src/output.c (output_parser): Assert `skeleton'. | |
8202 | * src/files.c (skeleton_find): Look harder for skeletons on DOSish | |
8203 | systems. | |
8204 | From Shura. | |
8205 | ||
8206 | 2001-10-01 Marc Autret <autret_m@epita.fr> | |
8207 | ||
8208 | * src/lex.h: Echo modifications. | |
8209 | * src/lex.c (unlex): Parameter is now token_t. | |
8210 | From Hans Aberg. | |
8211 | ||
8212 | 2001-10-01 Marc Autret <autret_m@epita.fr> | |
8213 | ||
8214 | * src/main.c: Include lex.h. | |
8215 | From Hans Aberg. | |
8216 | ||
8217 | 2001-09-29 Akim Demaille <akim@epita.fr> | |
8218 | ||
8219 | * src/getargs.c (longopts): `--debug' is `-t', not `-d'. | |
8220 | ||
8221 | 2001-09-28 Akim Demaille <akim@epita.fr> | |
8222 | ||
8223 | * tests/testsuite.at: Update to newer Autotest. | |
8224 | * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped. | |
8225 | ||
8226 | 2001-09-27 Akim Demaille <akim@epita.fr> | |
8227 | ||
8228 | Position independent wrapper. | |
8229 | ||
8230 | * tests/bison: Remove. | |
8231 | * tests/bison.in: New. | |
8232 | * configure.in: Adjust. | |
8233 | ||
8234 | 2001-09-27 Paul Eggert <eggert@twinsun.com> | |
8235 | ||
8236 | Port quotearg fixes from tar 1.13.24. | |
8237 | ||
8238 | * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct | |
8239 | tm to be declared. | |
8240 | (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC. | |
8241 | (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT. | |
8242 | ||
8243 | * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4. | |
8244 | * m4/mbrtowc.m4: New file. | |
8245 | * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h. | |
8246 | Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc). | |
8247 | ||
8248 | 2001-09-27 Akim Demaille <akim@epita.fr> | |
8249 | ||
8250 | Bump to 1.29c. | |
8251 | ||
8252 | 2001-09-27 Akim Demaille <akim@epita.fr> | |
8253 | ||
8254 | Version 1.29b. | |
8255 | ||
8256 | 2001-09-25 Akim Demaille <akim@epita.fr> | |
8257 | ||
8258 | * src/system.h: Include `xalloc.h'. | |
8259 | Remove it from the C files. | |
8260 | * src/files.c (output_files): Free the obstacks. | |
8261 | * src/lex.c (init_lex): Rename as... | |
8262 | (lex_init): this. | |
8263 | (lex_free): New. | |
8264 | * src/main.c (main): Use it. | |
8265 | ||
8266 | 2001-09-24 Marc Autret <autret_m@epita.fr> | |
8267 | ||
8268 | * src/vcg.c (open_edge, close_edge, open_node, close_node): Change | |
8269 | to output informations in fout (FILE*). | |
8270 | (open_graph, close_graph): Likewise. | |
8271 | (output_graph, output_edge, output_node): Likewise. | |
8272 | * src/vcg.h: Update function prototypes. | |
8273 | * src/print_graph.c (print_graph): Open output graph file. | |
8274 | (print_actions): Adjust. | |
8275 | * src/files.h: Remove extern declaration. | |
8276 | * src/files.c: Remove graph_obstack declaration. | |
8277 | (open_files): Remove graph_obstack initialization. | |
8278 | (output_files): Remove graph_obstack saving. | |
8279 | ||
8280 | 2001-09-24 Marc Autret <autret_m@epita.fr> | |
8281 | ||
8282 | * src/files.c (compute_output_file_names): Fix. | |
8283 | ||
8284 | 2001-09-24 Marc Autret <autret_m@epita.fr>, | |
8285 | Akim Demaille <akim@epita.fr> | |
8286 | ||
8287 | * src/reader.c (reader): Remove call to free_symtab (). | |
8288 | * src/main.c (main): Call it here. | |
8289 | Include symtab.h. | |
8290 | * src/conflicts.c (initialize_conflicts): Rename as... | |
8291 | (solve_conflicts): this. | |
8292 | * src/print.c (print_core, print_actions, print_state) | |
8293 | (print_grammar): Dump to a file instead a `output_obstack'. | |
8294 | (print_results): Dump `output_obstack', and then proceed with the | |
8295 | FILE *. | |
8296 | * src/files.c (compute_output_file_names, close_files): New. | |
8297 | (output_files): Adjust. | |
8298 | * src/main.c (main): Adjust. | |
8299 | ||
8300 | 2001-09-23 Marc Autret <autret_m@epita.fr> | |
8301 | ||
8302 | * src/files.c (compute_header_macro): Computes header macro name | |
8303 | from spec_defines_file when given. | |
8304 | ||
8305 | 2001-09-23 Marc Autret <autret_m@epita.fr> | |
8306 | ||
8307 | * src/files.c (output_files): Add default extensions. | |
8308 | ||
8309 | 2001-09-22 Akim Demaille <akim@epita.fr> | |
8310 | ||
8311 | * src/conflicts.c (finalize_conflicts): Rename as... | |
8312 | (free_conflicts): this. | |
8313 | ||
8314 | 2001-09-22 Akim Demaille <akim@epita.fr> | |
8315 | ||
8316 | * src/gram.c (gram_free): Rename back as... | |
8317 | (dummy): this. | |
8318 | (output_token_translations): Free `token_translations'. | |
8319 | * src/symtab.c (free_symtab): Free the tag field. | |
8320 | ||
8321 | 2001-09-22 Akim Demaille <akim@epita.fr> | |
8322 | ||
8323 | Remove `translations' as it is always set to true. | |
8324 | ||
8325 | * src/gram.h: Adjust. | |
8326 | * src/reader.c (packsymbols, parse_token_decl): Adjust | |
8327 | * src/print.c (print_grammar): Adjust. | |
8328 | * src/output.c (output_token_translations): Adjust. | |
8329 | * src/lex.c (lex): Adjust. | |
8330 | * src/gram.c: Be sure the set pointers to NULL. | |
8331 | (dummy): Rename as... | |
8332 | (gram_free): this. | |
8333 | ||
8334 | 2001-09-22 Akim Demaille <akim@epita.fr> | |
8335 | ||
8336 | * configure.in: Invoke AM_LIB_DMALLOC. | |
8337 | * src/system.h: Use dmalloc. | |
8338 | * src/LR0.c: Be sure to have pointers initialized to NULL. | |
8339 | (allocate_itemsets): Allocate kernel_items only if needed. | |
8340 | ||
8341 | 2001-09-22 Akim Demaille <akim@epita.fr> | |
8342 | ||
8343 | * configure.in: Bump to 1.29b. | |
8344 | * tests/Makefile.am (DISTCLEANFILES): Add package.m4. | |
8345 | * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't | |
8346 | need xmalloc.c in calc.y. | |
8347 | From Pascal Bart. | |
8348 | ||
8349 | 2001-09-21 Akim Demaille <akim@epita.fr> | |
8350 | ||
8351 | Version 1.29a. | |
8352 | * Makefile.maint, config/config.guess, config/config.sub, | |
8353 | * config/missing: Update from masters. | |
8354 | * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend | |
8355 | upon package.m4. | |
8356 | * configure.in (ALL_LINGUAS): Add `tr'. | |
8357 | ||
8358 | 2001-09-21 Akim Demaille <akim@epita.fr> | |
8359 | ||
8360 | * tests/Makefile.am (package.m4): Move to... | |
8361 | ($(srcdir)/$(TESTSUITE)): here. | |
8362 | ||
8363 | 2001-09-20 Akim Demaille <akim@epita.fr> | |
8364 | ||
8365 | * src/complain.c: No longer try to be standalone: use system.h. | |
8366 | Don't assume __STDC__ is defined to 1. Just test if it is defined. | |
8367 | * src/complain.h: Likewise. | |
8368 | * src/reduce.c (useless_nonterminals, inaccessable_symbols): | |
8369 | Remove the unused variable `n'. | |
8370 | From Albert Chin-A-Young. | |
8371 | ||
8372 | 2001-09-18 Marc Autret <autret_m@epita.fr> | |
8373 | ||
8374 | * doc/bison.1: Update. | |
8375 | * doc/bison.texinfo (Bison Options): Update --defines and --graph | |
8376 | descriptions. | |
8377 | (Option Cross Key): Update. | |
8378 | Add --graph. | |
8379 | ||
8380 | 2001-09-18 Marc Autret <autret_m@epita.fr> | |
8381 | ||
8382 | * tests/regression.at: New test (comment in %union). | |
8383 | ||
8384 | 2001-09-18 Marc Autret <autret_m@epita.fr> | |
8385 | ||
8386 | * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment | |
8387 | do that. | |
8388 | Reported by Keith Browne. | |
8389 | ||
8390 | 2001-09-18 Marc Autret <autret_m@epita.fr> | |
8391 | ||
8392 | * tests/output.at: Add tests for --defines and --graph. | |
8393 | ||
8394 | 2001-09-18 Marc Autret <autret_m@epita.fr> | |
8395 | ||
8396 | * tests/output.at: Removes tests of %{header,src}_extension features. | |
8397 | ||
8398 | 2001-09-18 Akim Demaille <akim@epita.fr> | |
8399 | ||
8400 | * tests/Makefile.am (package.m4): New. | |
8401 | * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'. | |
8402 | (_AT_CHECK_CALC_ERROR): Likewise. | |
8403 | Factor the `, ' part of verbose error messages. | |
8404 | ||
8405 | 2001-09-18 Marc Autret <autret_m@epita.fr> | |
8406 | ||
8407 | * src/getargs.c (longopts): Declare --defines and --graph as options | |
8408 | with optional arguments. | |
8409 | * src/files.h: Add extern declarations. | |
8410 | * src/files.c (spec_graph_file, spec_defines_file): New. | |
8411 | (output_files): Update. | |
8412 | Remove CPP-outed code. | |
8413 | ||
8414 | 2001-09-18 Marc Autret <autret_m@epita.fr> | |
8415 | ||
8416 | Turn off %{source,header}_extension feature. | |
8417 | ||
8418 | * src/files.c (compute_exts_from_gf): Update. | |
8419 | (compute_exts_from_src): Update. | |
8420 | (output_files): CPP-out useless code. | |
8421 | * src/files.h: Remove {header,source}_extension extern declarations. | |
8422 | * src/reader.c (parse_dquoted_param): CPP-out. | |
8423 | (parse_header_extension_decl): Remove. | |
8424 | (parse_source_extension_decl): Remove. | |
8425 | (read_declarations): Remove cases tok_{hdrext,srcext}. | |
8426 | * src/lex.c (percent_table): Remove {header,source}_extension entries. | |
8427 | * src/lex.h (token_t): Remove tok_hdrext and tok_srcext. | |
8428 | ||
8429 | 2001-09-10 Akim Demaille <akim@epita.fr> | |
8430 | ||
8431 | * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT): | |
8432 | (AT_CHECK_BISON_PERCENT_FLAGS): Merge into... | |
8433 | (AT_CHECK_OUTPUT): this. | |
8434 | Merely check ls' exit status, its output is useless. | |
8435 | ||
8436 | 2001-09-10 Akim Demaille <akim@epita.fr> | |
8437 | ||
8438 | * tests/calc.at: Use m4_match. | |
8439 | (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'. | |
8440 | ||
8441 | 2001-09-10 Marc Autret <autret_m@epita.fr>, | |
8442 | Akim Demaille <akim@epita.fr> | |
8443 | ||
8444 | * src/vcg.h (graph_s): color, textcolor, bordercolor are now | |
8445 | enum color_e. | |
8446 | * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm | |
8447 | to `normal'. | |
8448 | * src/reader.c (parse_token_decl): Initialize token with tok_eof. | |
8449 | * src/lex.h: Adjust prototype. | |
8450 | (token_t): Add `tok_undef'. | |
8451 | * src/lex.c (struct percent_table_struct): Retval is now a token_t. | |
8452 | (parse_percent_token): Now returns token_t. | |
8453 | Add default statement in switch. | |
8454 | (lex): Separate `c' as an input variable, from the token_t result | |
8455 | part. | |
8456 | (unlexed): Is a token_t. | |
8457 | ||
8458 | 2001-09-10 Akim Demaille <akim@epita.fr> | |
8459 | ||
8460 | * configure.in: Bump to 1.29a. | |
8461 | ||
8462 | 2001-09-07 Akim Demaille <akim@epita.fr> | |
8463 | ||
8464 | Version 1.29. | |
8465 | ||
8466 | 2001-08-30 Akim Demaille <akim@epita.fr> | |
8467 | ||
8468 | * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove. | |
8469 | * m4/atconfig.m4: Remove. | |
8470 | * tests/testsuite.at, tests/atlocal.in, tests/output.at, | |
8471 | * tests/bison: New. | |
8472 | * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER, | |
8473 | m4_if, m4_patsubst, and m4_regexp. | |
8474 | * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an | |
8475 | `input' file instead of echo. | |
8476 | ||
8477 | 2001-08-29 Akim Demaille <akim@epita.fr> | |
8478 | ||
8479 | Bump to 1.28e. | |
8480 | ||
8481 | 2001-08-29 Akim Demaille <akim@epita.fr> | |
8482 | ||
8483 | Version 1.28d. | |
8484 | ||
8485 | 2001-08-29 Paul Eggert <eggert@twinsun.com> | |
8486 | ||
8487 | * src/bison.simple (yyparse): Don't take the address of an | |
8488 | item before the start of an array, as that doesn't conform to | |
8489 | the C Standard. | |
8490 | ||
8491 | 2001-08-29 Robert Anisko <anisko_r@epita.fr> | |
8492 | ||
8493 | * doc/bison.texinfo (Location Tracking Calc): New node. | |
8494 | ||
8495 | 2001-08-29 Paul Eggert <eggert@twinsun.com> | |
8496 | ||
8497 | * src/output.c (output): Do not define const, as this now | |
8498 | causes more problems than it cures. | |
8499 | ||
8500 | 2001-08-29 Akim Demaille <akim@epita.fr> | |
8501 | ||
8502 | * doc/bison.texinfo: Modernize `@node' and `@top' use: just name | |
8503 | the nodes. | |
8504 | Be sure to tag the `detailmenu'. | |
8505 | ||
8506 | 2001-08-29 Akim Demaille <akim@epita.fr> | |
8507 | ||
8508 | * Makefile.maint (do-po-update): Wget refuses to overwrite files: | |
8509 | download in a tmp dir. | |
8510 | ||
8511 | 2001-08-28 Marc Autret <autret_m@epita.fr> | |
8512 | ||
8513 | * config/depcomp: New file. | |
8514 | ||
8515 | 2001-08-28 Marc Autret <autret_m@epita.fr> | |
8516 | ||
8517 | * doc/bison.1 (mandoc): Adjust. | |
8518 | From Juan Manuel Guerrero. | |
8519 | ||
8520 | 2001-08-28 Marc Autret <autret_m@epita.fr> | |
8521 | ||
8522 | * src/print_graph.c (print_state): Fix. | |
8523 | ||
8524 | 2001-08-27 Marc Autret <autret_m@epita.fr> | |
8525 | ||
8526 | * src/vcg.h (classname_s, infoname_s, node_s): Constify the | |
8527 | char * members. | |
8528 | Echo modifications to the functions prototypes. | |
8529 | * src/vcg.c (add_classname, add_infoname): Adjust arguments. | |
8530 | ||
8531 | 2001-08-27 Marc Autret <autret_m@epita.fr> | |
8532 | ||
8533 | * src/vcg.c: Include `xalloc.h'. | |
8534 | (add_colorentry): New. | |
8535 | (add_classname): New. | |
8536 | (add_infoname): New. | |
8537 | * src/vcg.h: Add new prototypes. | |
8538 | ||
8539 | 2001-08-27 Akim Demaille <akim@epita.fr> | |
8540 | ||
8541 | * Makefile.maint: Sync. again with CVS Autoconf. | |
8542 | ||
8543 | 2001-08-27 Akim Demaille <akim@epita.fr> | |
8544 | ||
8545 | * Makefile.maint: Formatting changes. | |
8546 | (po-update, cvs-update, update): New targets. | |
8547 | (AMTAR): Remove. | |
8548 | ||
8549 | 2001-08-27 Akim Demaille <akim@epita.fr> | |
8550 | ||
8551 | * Makefile.am (AUTOMAKE_OPTIONS): 1.5. | |
8552 | * Makefile.maint: Sync. with CVS Autoconf. | |
8553 | ||
8554 | 2001-08-27 Marc Autret <autret_m@epita.fr> | |
8555 | ||
8556 | * src/vcg.h (struct infoname_s): New. | |
8557 | (struct colorentry_s): New. | |
8558 | (graph_s): New fields {vertical,horizontal}_order in structure. | |
8559 | Add `infoname' field. | |
8560 | Add `colorentry' field; | |
8561 | * src/vcg_defaults.h (G_VERTICAL_ORDER): New. | |
8562 | (G_HORIZONTAL_ORDER): New. | |
8563 | (G_INFONAME): New. | |
8564 | (G_COLORENTRY): New. | |
8565 | * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order. | |
8566 | Add output of `infoname'. | |
8567 | Add output of `colorentry'. | |
8568 | ||
8569 | 2001-08-27 Marc Autret <autret_m@epita.fr> | |
8570 | ||
8571 | * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'. | |
8572 | This one shadowed a global parameter. | |
8573 | ||
8574 | 2001-08-24 Marc Autret <autret_m@epita.fr> | |
8575 | ||
8576 | * src/print_graph.c (node_output_size): Declared POSIX `size_t' type, | |
8577 | instead of `unsigned'. | |
8578 | (print_state): Do not call obstack_object_size () in obstack_grow () | |
8579 | to avoid macro variables shadowing. | |
8580 | ||
8581 | 2001-08-23 Marc Autret <autret_m@epita.fr> | |
8582 | ||
8583 | * src/lex.c (percent_table): Typo: s/naem/name/. | |
8584 | Add graph option. | |
8585 | Normalize new options declarations. | |
8586 | ||
8587 | 2001-08-20 Pascal Bart <pascal.bart@epita.fr> | |
8588 | ||
8589 | * tests/suite.at: Exercise %header_extension and %source_extension. | |
8590 | ||
8591 | 2001-08-16 Marc Autret <autret_m@epita.fr> | |
8592 | ||
8593 | * src/reader.c (parse_dquoted_param): New. | |
8594 | (parse_header_extension_decl): Use it. | |
8595 | (parse_source_extension_decl): Likewise. | |
8596 | ||
8597 | 2001-08-16 Marc Autret <autret_m@epita.fr> | |
8598 | ||
8599 | * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'. | |
8600 | (get_xxxx_str): Use assert () instead of complain (). | |
8601 | Remove return invokations in default cases. | |
8602 | (get_decision_str): Modify default behaviour. Remove second argument. | |
8603 | Echo modifications on calls. | |
8604 | (output_graph): Fix. | |
8605 | ||
8606 | 2001-08-16 Marc Autret <autret_m@epita.fr> | |
8607 | ||
8608 | * src/getargs.c (usage): Update with ``-g, --graph''. | |
8609 | ||
8610 | 2001-08-16 Marc Autret <autret_m@epita.fr> | |
8611 | ||
8612 | * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'. | |
8613 | (Option Cross Key): Likewise. | |
8614 | * doc/bison.1: Update. | |
8615 | ||
1c8c2190 PB |
8616 | 2001-09-25 Pascal Bart <pascal.bart@epita.fr> |
8617 | ||
8618 | * src/output.c (output_master_parser): Don't finish action_obstack. | |
8619 | (output_parser): Don't care about the muscle action, here. | |
8620 | (prepare): Copy the action_obstack in the action muscle. | |
8621 | (output): Free action_obstack. | |
8622 | ||
180d45ba PB |
8623 | 2001-09-23 Pascal Bart <pascal.bart@epita.fr> |
8624 | ||
8625 | * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which | |
8626 | will contain `%union' declaration. | |
8627 | (parse_union_decl): Delete #line directive output. | |
8628 | (parse_union_decl): Substitute /attrs_obstack/union_obstack for all | |
8629 | informations about %union. | |
8630 | (parse_union_decl): Copy the union_obstack in the muscle stype. | |
8631 | * src/bison.simple: Add new #line directive. | |
8632 | Add typdef %%stype YYSTYPE. | |
8633 | ||
c51d1a19 PB |
8634 | 2001-09-23 Pascal Bart <pascal.bart@epita.fr> |
8635 | ||
8636 | * src/bison.simple: Add new `#line' directive. | |
8637 | ||
6f9344da PB |
8638 | 2001-09-22 Pascal Bart <pascal.bart@epita.fr> |
8639 | ||
8640 | * src/bison.simple: New `#line' directive. | |
8641 | * src/output.c (output_parser): Support new dynamic muscle input_line. | |
8642 | ||
652def80 MA |
8643 | 2001-09-22 Marc Autret <autret_m@epita.fr> |
8644 | ||
8645 | * src/output.c (output_master_parser): New. | |
8646 | (output_parser): Be more re-entrant. | |
8647 | ||
25b222fa MA |
8648 | 2001-09-21 Marc Autret <autret_m@epita.fr> |
8649 | ||
8650 | * src/reader.c (copy_definition, parse_union_decl): Update and use | |
8651 | `linef' muscle. | |
8652 | (copy_action): Likewise. | |
8653 | Use obstack_1grow (). | |
8654 | * src/muscle_tab.c (muscle_init): Add muscle `linef'. | |
8655 | ||
6bc35ae5 MA |
8656 | 2001-09-21 Marc Autret <autret_m@epita.fr> |
8657 | ||
8658 | * src/options.c (option_table): Adjust. | |
8659 | * src/lex.c (parse_percent_token): Fix. | |
8660 | ||
c0629aa1 PB |
8661 | 2001-09-20 Pascal Bart <pascal.bart@epita.fr> |
8662 | ||
8663 | * src/options.c (symtab.h): Include it, need by lex.h. | |
342b8b6e | 8664 | |
82b6d266 PB |
8665 | 2001-09-20 Pascal Bart <pascal.bart@epita.fr> |
8666 | ||
8667 | * src/lex.c (parse_percent_token): Change type of variable `tx', which | |
8668 | is now an option_table_struct*. | |
8669 | (option_strcmp): New function option_strcmp. | |
8670 | (parse_percent_token): Call option_strcmp. | |
8671 | * src/getargs.c (xalloc.h, options.h): Include it. | |
8672 | (getargs): Call create_long_option_table. | |
8673 | (getargs): Free longopts at the end of the function. | |
8674 | (shortopts): Move in options.c. | |
8675 | * src/options.c (create_long_option_table): New function. Convert | |
8676 | information from option_table to option structure. | |
8677 | * src/reader.c (options.h): Include it. | |
8678 | ||
8679 | * src/Makefile.am: Adjust. | |
8680 | * src/options.c (option_table): Create from longopts and percent_table. | |
8681 | * src/getargs.c (longopts): Delete. | |
8682 | * src/lex.c (struct percent_table_struct): Delete. | |
8683 | (percent_table): Delete. | |
8684 | (options.h): Include it. | |
8685 | * src/options.c: Create. | |
8686 | * src/options.h: Create. | |
8687 | Declare enum opt_access_e. | |
8688 | Define struct option_table_struct. | |
8689 | ||
75f5aaea MA |
8690 | 2001-09-20 Marc Autret <autret_m@epita.fr> |
8691 | ||
8692 | * doc/bison.texinfo: Adjust terminologies about prologue and epilogue | |
8693 | sections of Bison. | |
8694 | ||
f508cb0a PB |
8695 | 2001-09-19 Pascal Bart <pascal.bart@epita.fr> |
8696 | ||
8697 | * src/bison.simple: s/%%filename/%%skeleton. | |
8698 | * src/muscle_tab.c (getargs.h): Include it. | |
8699 | (muscle_init): Insert new muscle skeleton. | |
8700 | ||
13105fc1 PB |
8701 | 2001-09-18 Pascal Bart <pascal.bart@epita.fr> |
8702 | ||
8703 | * src/output.c (output_parser): Delete unused variable actions_dumped. | |
8704 | ||
b0c4483e PB |
8705 | 2001-09-07 Pascal Bart <pascal.bart@epita.fr> |
8706 | ||
8707 | * src/output.c (output): Delete call to reader_output_yylsp. | |
8708 | * src/reader.c (reader): Likewise. | |
8709 | * src/reader.h: Delete declaration of reader_output_yylsp. | |
342b8b6e | 8710 | |
11d82f03 MA |
8711 | 2001-09-02 Marc Autret <autret_m@epita.fr> |
8712 | ||
8713 | * src/reader.c: Include muscle_tab.h. | |
8714 | (parse_union_decl): Update. | |
8715 | (parse_macro_decl): Rename parse_muscle_decl. | |
8716 | Update to use renamed functions and variable. | |
8717 | (read_declarations, copy_action, read_additionnal_code, : Updated | |
8718 | with correct variables and functions names. | |
8719 | (packsymbols, reader): Likewise. | |
342b8b6e | 8720 | |
11d82f03 | 8721 | * src/reader.h (muscle_obstack): Extern declaration update. |
342b8b6e | 8722 | |
11d82f03 MA |
8723 | * src/output.c: Include muscle_tab.h |
8724 | In all functions using macro_insert, change by using muscle_insert (). | |
8725 | (macro_obstack): Rename muscle_obstack. | |
8726 | Echo modifications in the whole file. | |
8727 | (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT. | |
8728 | (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING. | |
8729 | (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX. | |
8730 | ||
8731 | * src/muscle_tab.h: Update double inclusion macros. | |
8732 | (macro_entry_s): Rename muscle_entry_s. | |
8733 | Update prototypes. | |
342b8b6e | 8734 | |
11d82f03 MA |
8735 | * src/muscle_tab.c: Include muscle_tab.h. |
8736 | Rename macro_tabble to muscle_table. | |
8737 | (mhash1, mhash2, mcmp): Use muscle_entry. | |
8738 | (macro_init): Rename muscle_init. Update. | |
8739 | (macro_insert): Rename muscle_insert. Update. | |
8740 | (macro_find): Rename muscle_find. Update. | |
8741 | ||
8742 | * src/main.c: Include muscle_tab.h. | |
8743 | (main): Call muscle_init (). | |
8744 | * src/Makefile.am (bison_SOURCES): Echo modifications. | |
8745 | ||
93a37297 MA |
8746 | 2001-09-02 Marc Autret <autret_m@epita.fr> |
8747 | ||
f753cd62 | 8748 | Now the files macro_tab.[ch] are named muscle_tab.[ch]. |
342b8b6e | 8749 | |
f753cd62 MA |
8750 | * src/muscle_tab.c, src/muscle_tab.h: Add files. |
8751 | ||
8752 | 2001-09-02 Marc Autret <autret_m@epita.fr> | |
8753 | ||
8754 | * src/macrotab.c, src/macrotab.h: Remove. | |
93a37297 | 8755 | |
682d48cd PB |
8756 | 2001-09-01 Pascal Bart <pascal.bart@epita.fr> |
8757 | ||
342b8b6e | 8758 | * src/reader.c (copy_guard): Use muscle to specify the `#line' |
682d48cd PB |
8759 | filename. |
8760 | ||
087c8fda MA |
8761 | 2001-09-01 Marc Autret <autret_m@epita.fr> |
8762 | ||
8763 | * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set | |
8764 | to an explicit value to activate the feature. We do it here. | |
8765 | ||
dda680cb PB |
8766 | 2001-08-31 Pascal Bart <pascal.bart@epita.fr> |
8767 | ||
8768 | * src/output.c (prepare): Delete the `filename' muscule insertion. | |
8769 | * src/reader.c (copy_action): Use `filename' muscule with `#line'. | |
8770 | (parse_union_decl): Likewise. | |
8771 | * src/macrotab.c (macro_init): Initialize filename by infile. | |
8772 | ||
9e644e64 MA |
8773 | 2001-08-31 Marc Autret <autret_m@epita.fr> |
8774 | ||
8775 | * src/bison.simple (YYLSP_NEEDED): New definition. | |
8776 | * src/output.c (prepare): Add macro insertion of `locations_flag' | |
8777 | ||
17da6427 PB |
8778 | 2001-08-31 Pascal Bart <pascal.bart@epita.fr> |
8779 | ||
8780 | * src/output.c (prepare): Delete insertion of previous muscles, | |
8781 | and insert the `prefix' muscles. | |
8782 | * src/macrotab.c (macro_init): Likewise. | |
8783 | (macro_init): Initialization prefix directive by `yy'. | |
342b8b6e | 8784 | * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval, |
17da6427 PB |
8785 | %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar, |
8786 | yylval, yydebug, yyerror, yynerrs and yyparse. | |
342b8b6e | 8787 | New directive `#define' to substitute yydebug, ... with option |
17da6427 PB |
8788 | name_prefix. |
8789 | ||
e8cb70b9 PB |
8790 | 2001-08-31 Pascal Bart <pascal.bart@epita.fr> |
8791 | ||
8792 | * src/main.c (main): Standardize. | |
8793 | * src/output.c (output_table_data, output_parser): Likewise. | |
8794 | * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise. | |
8795 | ||
63c2d5de MA |
8796 | 2001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr> |
8797 | ||
342b8b6e | 8798 | * src/reader.c (read_additionnal_code): Rename %%user_code to |
63c2d5de MA |
8799 | %%epilogue. |
8800 | * src/output.c (output): Rename %%declarations to %%prologue. | |
8801 | * src/bison.simple: Echo modifications. | |
342b8b6e | 8802 | |
d8cb5183 MA |
8803 | 2001-08-31 Marc Autret <autret_m@epita.fr> |
8804 | ||
8805 | * src/reader.c (readgram): CleanUp. | |
8806 | (output_token_defines): Likewise. | |
8807 | (packsymbols): Likewise. | |
8808 | (reader): Likewise. | |
8809 | * src/output.c (output): CPP-out useless code. | |
8810 | ||
6c686258 PB |
8811 | 2001-08-31 Pascal Bart <pascal.bart@epita.fr> |
8812 | ||
342b8b6e | 8813 | * src/reader.c (reader): Delete obsolete call to function |
6c686258 PB |
8814 | output_trailers and output_headers. |
8815 | * src/output.h: Remove obsolete functions prototypes of output_headers | |
8816 | and output_trailers. | |
8817 | ||
8f451ef7 PB |
8818 | 2001-08-30 Pascal Bart <pascal.bart@epita.fr> |
8819 | ||
8820 | * src/main.c: Include macrotab.h. | |
342b8b6e | 8821 | * src/macrotab.h (macro_entry_s): Constify fields. |
8f451ef7 PB |
8822 | Adjust functions prototypes. |
8823 | * src/macrotab.c (macro_insert): Constify key and value. | |
8824 | (macro_find): Constify key. | |
8825 | (macro_insert): Include 'xalloc.h' | |
8826 | (macro_insert): Use XMALLOC. | |
8827 | (macro_find): Constify return value. | |
8828 | * src/output.c (output_table_data): Rename table to table_data. | |
8829 | (output_parser): Constify macro_key, macro_value. | |
8830 | ||
997b6fd0 | 8831 | 2001-08-30 Marc Autret <autret_m@epita.fr> |
2ba3b73c MA |
8832 | |
8833 | * src/reader.c (parse_skel_decl): New. | |
342b8b6e | 8834 | (read_declarations): Add case `tok_skel', call parse_skel_decl (). |
2ba3b73c MA |
8835 | * src/lex.h (token_t): New token `tok_skel'. |
8836 | * src/lex.c (percent_table): Add skeleton option entry. | |
8837 | Standardize. | |
8838 | ||
ff48177d MA |
8839 | 2001-08-29 Marc Autret <autret_m@epita.fr> |
8840 | ||
8841 | * src/bison.simple: Add %%user_code directive at the end. | |
8842 | * src/reader.c (read_additionnal_code): New. | |
8843 | (reader): Use it. | |
8844 | * src/output.c (output_program): Remove. | |
8845 | (output): Update. | |
8846 | ||
b33160bf MA |
8847 | 2001-08-28 Marc Autret <autret_m@epita.fr> |
8848 | ||
8849 | * src/output.c (output_actions): Clean up. | |
4e5caae2 | 8850 | (output_gram): CPP-out useless code. |
b33160bf MA |
8851 | * src/reader.c (reader): Clean up, CPP-out useless code. |
8852 | ||
d1a2daf7 PB |
8853 | 2001-08-28 Pascal Bart <pascal.bart@epita.fr> |
8854 | ||
342b8b6e | 8855 | * src/output.c (output): Copy attrs_obstack in the '%%definitions' |
535c0e75 | 8856 | directive. |
d1a2daf7 PB |
8857 | * src/bison.simple: Add `%%definitions'. |
8858 | ||
2b763dfe MA |
8859 | 2001-08-28 Marc Autret <autret_m@epita.fr> |
8860 | ||
8861 | * config/depcomp: New file. | |
8862 | ||
f1a87ef6 PE |
8863 | 2001-08-27 Paul Eggert <eggert@twinsun.com> |
8864 | ||
8865 | * src/bison.simple (yyparse): Don't take the address of an | |
8866 | item before the start of an array, as that doesn't conform to | |
8867 | the C Standard. | |
8868 | ||
82e236e2 RA |
8869 | 2001-08-27 Robert Anisko <robert.anisko@epita.fr> |
8870 | ||
f1a87ef6 | 8871 | * src/output.c (output): Remove the initialization of the macro |
82e236e2 RA |
8872 | obstack. It was done too late here. |
8873 | ||
8874 | * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was | |
8875 | completely wrong. | |
8876 | (reader): Initialize the macro obstack here, since we need it to grow | |
8877 | '%define' directives. | |
8878 | ||
8879 | * src/reader.h: Declare the macro obstack as extern. | |
8880 | ||
b0cfa28a RA |
8881 | 2001-08-27 Robert Anisko <robert.anisko@epita.fr> |
8882 | ||
8883 | * src/output.c (output_parser): Fix. Store single '%' characters in | |
8884 | the output obstack instead of throwing them away. | |
8885 | ||
6fc74234 AD |
8886 | 2001-08-27 Akim Demaille <akim@epita.fr> |
8887 | ||
8888 | * Makefile.am (AUTOMAKE_OPTIONS): 1.5. | |
8889 | ||
9c76d118 RA |
8890 | 2001-08-25 Robert Anisko <robert.anisko@epita.fr> |
8891 | ||
8892 | * lib/Makefile.am: Adjust. | |
8893 | ||
a8289c62 RA |
8894 | 2001-08-25 Robert Anisko <robert.anisko@epita.fr> |
8895 | ||
8896 | * src/bison.simple: Update and add '%%' directives. | |
8897 | ||
b6610515 RA |
8898 | 2001-08-25 Robert Anisko <robert.anisko@epita.fr> |
8899 | ||
8900 | * src/reader.c (reader): Remove calls to 'output_headers' and | |
8901 | 'output_trailers'. Remove some C output. | |
8902 | (readgram): Disable a piece of code that was writing a default | |
8903 | definition for 'YYSTYPE'. | |
8904 | (reader_output_yylsp): Remove. | |
8905 | (packsymbols): Output token defintions to a macro. | |
8906 | (copy_definition): Disable C output. | |
6fc74234 | 8907 | |
b6610515 RA |
8908 | * src/reader.c (parse_macro_decl): New function used to parse macro |
8909 | declarations. | |
8910 | (copy_string2): Put the body of copy_string into this new function. | |
8911 | Add a parameter to let the caller choose whether he wants to copy the | |
8912 | string delimiters or not. | |
8913 | (copy_string): Be a simple call to copy_string2 with the last argument | |
8914 | bound to true. | |
8915 | (read_declarations): Add case for macro definition. | |
8916 | (copy_identifier): New. | |
6fc74234 | 8917 | (parse_macro_decl): Read macro identifiers using copy_identifier |
b6610515 RA |
8918 | rather than lex. |
8919 | ||
26f609ff RA |
8920 | 2001-08-25 Robert Anisko <robert.anisko@epita.fr> |
8921 | ||
8922 | * src/output.c (prepare): Add prefixed names. | |
8923 | (output_parser): Output semantic actions. | |
8924 | (output_parser): Fix bug on '%%line' directives. | |
6fc74234 | 8925 | |
26f609ff RA |
8926 | * src/output.c (output_headers): Remove. The C code printed by this |
8927 | function should now be in the skeletons. | |
8928 | (output_trailers): Remove. | |
8929 | (output): Disable call to 'reader_output_yylsp'. | |
8930 | (output_rule_data): Do not output tables to the table obstack. | |
8931 | ||
8932 | * src/output.c: Remove some C dedicated output. | |
8933 | Improve the use of macro and output obstacks. | |
8934 | (output_defines): Remove. | |
6fc74234 | 8935 | |
26f609ff RA |
8936 | * src/output.c (output_token_translations): Associate 'translate' |
8937 | table with a macro. No output to the table obstack. | |
8938 | (output_gram): Same for 'rhs' and 'prhs'. | |
8939 | (output_stos): Same for 'stos'. | |
8940 | (output_rule_data): Same for 'r1' and 'r2'. | |
8941 | (token_actions): Same for 'defact'. | |
8942 | (goto_actions): Same for 'defgoto'. | |
8943 | (output_base): Same for 'pact' and 'pgoto'. | |
8944 | (output_table): Same for 'table'. | |
8945 | (output_check): Same for 'check'. | |
6fc74234 | 8946 | |
26f609ff RA |
8947 | * src/output.c (output_table_data): New function. |
8948 | (output_short_table): Remove. | |
8949 | (output_short_or_char_table): Remove. | |
6fc74234 | 8950 | |
26f609ff RA |
8951 | * src/output.c (output_parser): Replace most of the skeleton copy code |
8952 | with something new. Skeletons are now processed character by character | |
8953 | rather than line by line, and Bison looks for '%%' macros. This is the | |
8954 | first step in making Bison's output process (a lot) more flexible. | |
8955 | (output_parser): Use the macro table. | |
8956 | ||
6f43b113 RA |
8957 | 2001-08-25 Robert Anisko <robert.anisko@epita.fr> |
8958 | ||
8959 | * src/main.c (main): Initialize the macro table. | |
8960 | ||
dd3127cf RA |
8961 | 2001-08-25 Robert Anisko <robert.anisko@epita.fr> |
8962 | ||
8963 | * src/lex.c (percent_table): Add tok_define. | |
8964 | * src/lex.h: Add tok_define. | |
8965 | ||
aa321494 RA |
8966 | 2001-08-25 Robert Anisko <robert.anisko@epita.fr> |
8967 | ||
8968 | * src/macrotab.c: New file. | |
8969 | * src/macrotab.h: New file. | |
8970 | * src/Makefile.am: Update. | |
8971 | ||
68bd3b6b RA |
8972 | 2001-08-25 Robert Anisko <robert.anisko@epita.fr> |
8973 | ||
8974 | * lib/hash.c: New file. | |
8975 | * lib/hash.h: New file. | |
8976 | * lib/Makefile.am: Update. | |
8977 | ||
45f8dd1e AD |
8978 | 2001-08-15 Akim Demaille <akim@epita.fr> |
8979 | ||
8980 | Version 1.28c. | |
8981 | ||
40a64a7a | 8982 | 2001-08-15 Marc Autret <autret_m@epita.fr> |
0b8afb77 AD |
8983 | |
8984 | * src/reader.c (readgram): Indent output macro YYSTYPE. | |
8985 | (packsymbols): Likewise. | |
8986 | (output_token_defines): Likewise. | |
8987 | * src/files.c: Standardize. | |
8988 | (compute_header_macro): New. | |
8989 | (defines_obstack_save): New. Use compute_header_macro. | |
8990 | (output_files): Update. Use defines_obstack_save. | |
8991 | ||
f9a8293a AD |
8992 | 2001-08-15 Akim Demaille <akim@epita.fr> |
8993 | ||
8994 | * doc/bison.texinfo (Table of Symbols): Document | |
8995 | YYSTACK_USE_ALLOCA. | |
8996 | ||
150ca7a7 AD |
8997 | 2001-08-15 Akim Demaille <akim@epita.fr> |
8998 | ||
8999 | * missing: Update from CVS Automake. | |
9000 | * config/config.guess, config/config.sub, config/texinfo.tex: | |
9001 | Update from gnu.org. | |
9002 | ||
69b5cec4 AD |
9003 | 2001-08-15 Akim Demaille <akim@epita.fr> |
9004 | ||
9005 | * Makefile.maint: Sync with CVS Autoconf. | |
9006 | ||
f2b5126e PB |
9007 | 2001-08-14 Pascal Bart <pascal.bart@epita.fr> |
9008 | ||
69b5cec4 | 9009 | * doc/bison.texinfo: Include GNU Free Documentation License from |
f2b5126e PB |
9010 | `fdl.texi'. |
9011 | * doc/fdl.texi: Add to package. | |
9012 | ||
4ecbf796 MA |
9013 | 2001-08-14 Marc Autret <autret_m@epita.fr> |
9014 | ||
9015 | Turn on %{source,header}_extension features. | |
9016 | ||
69b5cec4 | 9017 | * src/lex.c (percent_table): Un-CPP out header_extension and |
4ecbf796 MA |
9018 | source_extension. |
9019 | * src/files.c (compute_exts_from_gf): Compare pointers with NULL. | |
69b5cec4 | 9020 | (compute_exts_from_src): Remove conditions. It restores priorities |
4ecbf796 MA |
9021 | between options. |
9022 | ||
95fb5662 MA |
9023 | 2001-08-14 Marc Autret <autret_m@epita.fr> |
9024 | ||
9025 | * src/files.c (compute_base_names): Add extensions computing when | |
9026 | `--file-prefix' used. | |
9027 | Standardize function calls. | |
9028 | ||
78d09da9 MA |
9029 | 2001-08-13 Marc Autret <autret_m@epita.fr> |
9030 | ||
69b5cec4 | 9031 | * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users |
78d09da9 MA |
9032 | defining it (defined but null disables alloca). |
9033 | ||
5a009f2c MA |
9034 | 2001-08-13 Marc Autret <autret_m@epita.fr> |
9035 | ||
9036 | * src/bison.simple (_yy_memcpy): CPP reformat. | |
9037 | ||
1e41465a PB |
9038 | 2001-08-13 Pascal Bart <pascal.bart@epita.fr> |
9039 | ||
9040 | * tests/atconfig.in (CPPFLAGS): Fix. | |
9041 | ||
c67a198d PB |
9042 | 2001-08-10 Pascal Bart <pascal.bart@epita.fr> |
9043 | ||
79282c6c | 9044 | * doc/bison.texinfo: Include GNU General Public License from |
c67a198d PB |
9045 | `gpl.texi'. |
9046 | * doc/gpl.texi: Add to package. | |
9047 | ||
09a6de7e MA |
9048 | 2001-08-10 Marc Autret <autret_m@epita.fr> |
9049 | ||
9050 | * src/print_graph.h: Fix. | |
9051 | * src/reader.c (read_declarations): Use parse_header_extension_decl (). | |
9052 | ||
b77b9ee0 AD |
9053 | 2001-08-10 Akim Demaille <akim@epita.fr> |
9054 | ||
9055 | * src/system.h: Provide default declarations for stpcpy, strndup, | |
9056 | and strnlen. | |
9057 | ||
3e259915 MA |
9058 | 2001-08-10 Robert Anisko <anisko_r@epita.fr> |
9059 | ||
9060 | * doc/bison.texinfo (Locations): Update @$ stuff. | |
9061 | ||
ca96bc2d MA |
9062 | 2001-08-09 Robert Anisko <anisko_r@epita.fr> |
9063 | ||
9064 | * src/bison.simple (YYLLOC_DEFAULT): Update. | |
9065 | (yyparse): Adjust. | |
9066 | ||
fdc6758b MA |
9067 | 2001-08-08 Marc Autret <autret_m@epita.fr> |
9068 | ||
b77b9ee0 | 9069 | * doc/bison.texinfo: Change @samp{$<@dots{}>} to |
fdc6758b MA |
9070 | @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule. |
9071 | Reported by Fabrice Bauzac. | |
957d4dbf | 9072 | |
600cad3b MA |
9073 | 2001-08-08 Marc Autret <autret_m@epita.fr> |
9074 | ||
9075 | * src/vcg_default.h: Use NULL instead of 0 to initialize pointers. | |
9076 | * src/vcg.c (output_node): Fix. | |
9077 | * src/vcg.h: Cleanup. | |
9078 | * src/print_graph.c: Add comments. | |
b77b9ee0 | 9079 | (node_output_size): New global variable. Simplify the formatting of |
600cad3b | 9080 | the VCG graph output. |
b77b9ee0 | 9081 | (print_actions): Unused code is now used. It notifies the final state |
600cad3b | 9082 | and no action states in the VCG graph. It also give the reduce actions. |
b77b9ee0 | 9083 | The `shift and goto' edges are red and the `go to state' edges are |
600cad3b MA |
9084 | blue. |
9085 | Get the current node name and node_obstack by argument. | |
9086 | (node_obstack): New variable. | |
9087 | (print_state): Manage node_obstack. | |
9088 | (print_core): Use node_obstack given by argument. | |
9089 | A node is not only computed here but in print_actions also. | |
9090 | (print_graph): CPP out useless code instead of commenting it. | |
9091 | ||
976e528f AD |
9092 | 2001-08-07 Pascal Bart <pascal.bart@epita.fr> |
9093 | ||
9094 | * tests/atconfig.in (CPPFLAGS): Fix. | |
9095 | ||
20e8e5ca AD |
9096 | 2001-08-07 Akim Demaille <akim@epita.fr> |
9097 | ||
9098 | * src/print_graph.c (quote): New. | |
9099 | (print_core): Use it. | |
9100 | ||
957d4dbf | 9101 | 2001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr> |
3e3da797 | 9102 | |
3e3da797 AD |
9103 | * src/vcg.c (complain.h): Include it. |
9104 | Unepitaize `return' invocations. | |
c4b66126 | 9105 | [NDEBUG] (main): Remove. |
79282c6c | 9106 | * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members. |
c4b66126 AD |
9107 | * src/files.c (open_files): Initialize graph_obstack. |
9108 | * src/print_graph.c (print_actions): CPP out useless code. | |
9109 | (print_core): Don't output the last `\n' in labels. | |
9110 | Use `quote'. | |
9111 | * src/files.c (output_files): Output the VCG file. | |
9112 | * src/main.c (main): Invoke print_graph (); | |
3e3da797 | 9113 | |
957d4dbf | 9114 | 2001-08-06 Marc Autret <autret_m@epita.fr> |
22c2cbc0 AD |
9115 | |
9116 | Automaton VCG graph output. | |
9117 | Using option ``-g'' or long option ``--graph'', you can generate | |
9118 | a gram_filename.vcg file containing a VCG description of the LALR (1) | |
9119 | automaton of your grammar. | |
9120 | ||
9121 | * src/main.c: Call to print_graph() function. | |
9122 | * src/getargs.h: Update. | |
9123 | * src/getargs.c (options): Update to catch `-g' and `--graph' options. | |
9124 | (graph_flag): New flag. | |
9125 | (longopts): Update. | |
9126 | (getargs): Add case `g'. | |
9127 | * src/files.c (graph_obstack): New obstack struct. | |
9128 | (open_files): Initialize new obstack. | |
9129 | (output_files): Saves graph_obstack if required. | |
9130 | * src/files.h (graph_obstack): New extern declaration. | |
9131 | * src/Makefile.am: Add new source files. | |
9132 | ||
927c1557 | 9133 | 2001-08-06 Marc Autret <autret_m@epita.fr> |
ce4d5ce0 AD |
9134 | |
9135 | * src/print_graph.c, src/print_graph.h (graph): New. | |
9136 | * src/vcg.h: New file. | |
9137 | * src/vcg.c: New file, VCG graph handling. | |
9138 | ||
7333d403 AD |
9139 | 2001-08-06 Marc Autret <autret_m@epita.fr> |
9140 | ||
9141 | Add of %source_extension and %header_extension which specify | |
9142 | the source or/and the header output file extension. | |
9143 | ||
9144 | * src/files.c (compute_base_names): Remove initialisation of | |
9145 | src_extension and header_extension. | |
9146 | (compute_exts_from_gf): Update. | |
9147 | (compute_exts_from_src): Update. | |
9148 | (output_files): Update. | |
9149 | * src/reader.c (parse_header_extension_decl): New. | |
9150 | (parse_source_extension_decl): New. | |
9151 | (read_declarations): New case statements for the new tokens. | |
9152 | * src/lex.c (percent_table): Add entries for %source_extension | |
9153 | and %header_extension. | |
9154 | * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext. | |
9155 | ||
84163231 AD |
9156 | 2001-08-06 Marc Autret <autret_m@epita.fr> |
9157 | ||
9158 | * configure.in: Bump to 1.28c. | |
9159 | * doc/bison.texinfo: Texinfo thingies. | |
9160 | ||
8303fc42 AD |
9161 | 2001-08-04 Pascal Bart <pascal.bart@epita.fr> |
9162 | ||
9163 | * tests/atconfig.in (CPPFLAGS): Add. | |
9164 | * tests/calc.at (AT_CHECK): Use CPPFLAGS. | |
9165 | ||
70a84437 AD |
9166 | 2001-08-03 Akim Demaille <akim@epita.fr> |
9167 | ||
9168 | Version 1.28b. | |
9169 | ||
2ce10144 AD |
9170 | 2001-08-03 Akim Demaille <akim@epita.fr> |
9171 | ||
9172 | * tests/Makefile.am (check-local): Ship testsuite. | |
9173 | * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions. | |
9174 | Include `string.h'. | |
9175 | ||
1e3e4bc1 AD |
9176 | 2001-08-03 Akim Demaille <akim@epita.fr> |
9177 | ||
9178 | * configure.in: Try using -Wformat when compiling. | |
9179 | ||
42b45b7f AD |
9180 | 2001-08-03 Akim Demaille <akim@epita.fr> |
9181 | ||
9182 | * configure.in: Bump to 1.28b. | |
9183 | ||
8f13fe33 AD |
9184 | 2001-08-03 Akim Demaille <akim@epita.fr> |
9185 | ||
9186 | * src/complain.c: Adjust strerror_r portability issues. | |
9187 | ||
b37ba92c AD |
9188 | 2001-08-03 Akim Demaille <akim@epita.fr> |
9189 | ||
9190 | Version 1.28a. | |
9191 | ||
b0ce6046 AD |
9192 | 2001-08-03 Akim Demaille <akim@epita.fr> |
9193 | ||
9194 | * src/getargs.c, src/getarg.h (skeleton)): Constify. | |
9195 | * src/lex.c (literalchar): Avoid name clashes on `buf'. | |
9196 | * src/getargs.c: Include complain.h. | |
9197 | * src/files.c, src/files.h (skeleton_find): Avoid name clashes. | |
9198 | * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1. | |
9199 | ||
d01c415b AD |
9200 | 2001-08-03 Akim Demaille <akim@epita.fr> |
9201 | ||
9202 | * src/reader.c (readgram): Display hidden chars in error messages. | |
9203 | ||
459dd1a6 AD |
9204 | 2001-08-03 Akim Demaille <akim@epita.fr> |
9205 | ||
9206 | Update to gettext 0.10.39. | |
9207 | ||
53b74c0c AD |
9208 | 2001-08-03 Akim Demaille <akim@epita.fr> |
9209 | ||
9210 | * lib/strspn.c: New. | |
9211 | ||
234a3be3 AD |
9212 | 2001-08-01 Marc Autret <autret_m@epita.fr> |
9213 | ||
9214 | * doc/bison.texinfo: Update. | |
9215 | * doc/bison.1 (mandoc): Update. | |
9216 | * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h. | |
9217 | * src/files.c: Support output files extensions computing. | |
9218 | (src_extension): New static variable. | |
9219 | (header_extension): New static variable. | |
9220 | (tr): New function. | |
9221 | (get_extension_index): New function, gets the index of an extension | |
9222 | filename in a string. | |
9223 | (compute_exts_from_gf): New function, computes extensions from the | |
9224 | grammar file extension. | |
9225 | (compute_exts_from_src): New functions, computes extensions from the | |
9226 | C source file extension, file given by ``-o'' option. | |
9227 | (compute_base_names): Update. | |
9228 | (output_files): Update. | |
9229 | ||
847bf1f5 AD |
9230 | 2001-08-01 Robert Anisko <anisko_r@epita.fr> |
9231 | ||
d995fee7 | 9232 | * doc/bison.texi: Document @$. |
847bf1f5 AD |
9233 | (Locations): New section. |
9234 | ||
d074a105 AD |
9235 | 2001-07-18 Akim Demaille <akim@epita.fr> |
9236 | ||
9237 | * Makefile.maint, GNUmakefile: New, from Autoconf 2.52. | |
9238 | * config/prev-version.txt, config/move-if-change: New. | |
9239 | * Makefile.am: Adjust. | |
9240 | ||
3419715d AD |
9241 | 2001-07-08 Pascal Bart <pascal.bart@epita.fr> |
9242 | ||
9243 | * src/bison.simple (yyparse): Suppress warning `comparaison | |
9244 | between signed and unsigned'. | |
9245 | ||
62ab6972 AD |
9246 | 2001-07-05 Pascal Bart <pascal.bart@epita.fr> |
9247 | ||
9248 | * src/getargs.h (raw_flag): Remove. | |
9249 | * src/getargs.c: Die on `-r'/`--raw'. | |
9250 | * src/lex.c (parse_percent_token): Die on `%raw'. | |
9251 | * src/reader.c (output_token_defines): Suppress call to `raw_flag'. | |
9252 | * tests/calc.at: Suppress test with option `--raw'. | |
9253 | ||
1e24cc5b AD |
9254 | 2001-07-14 Akim Demaille <akim@epita.fr> |
9255 | ||
9256 | * config/: New. | |
9257 | * configure.in: Require Autoconf 2.50. | |
9258 | Update to gettext 0.10.38. | |
9259 | ||
32dfccf8 AD |
9260 | 2001-03-16 Akim Demaille <akim@epita.fr> |
9261 | ||
9262 | * doc/bison.texinfo: ANSIfy the examples. | |
9263 | ||
cd5bd6ac AD |
9264 | 2001-03-16 Akim Demaille <akim@epita.fr> |
9265 | ||
9266 | * getargs.c (skeleton): New variable. | |
9267 | (longopts): --skeleton is a new option. | |
9268 | (shortopts, getargs): -S is a new option. | |
9269 | * getargs.h: Declare skeleton. | |
9270 | * output.c (output_parser): Use it. | |
9271 | ||
5141b016 AD |
9272 | 2001-03-16 Akim Demaille <akim@epita.fr> |
9273 | ||
9274 | * m4/strerror_r.m4: New. | |
9275 | * m4/error.m4: Run AC_FUNC_STRERROR_R. | |
9276 | * lib/error.h, lib/error.c: Update. | |
9277 | ||
447992b9 AD |
9278 | 2001-03-16 Akim Demaille <akim@epita.fr> |
9279 | ||
9280 | * src/getargs.c (longopts): Clean up. | |
9281 | ||
274d42ce AD |
9282 | 2001-02-21 Akim Demaille <akim@epita.fr> |
9283 | ||
9284 | * src/reader.c (gensym): `gensym_count' is your own. | |
9285 | Use a static buf to create the symbol name, as token_buffer is no | |
9286 | longer a buffer. | |
9287 | ||
22c821f3 AD |
9288 | 2001-02-08 Akim Demaille <akim@epita.fr> |
9289 | ||
9290 | * src/conflicts.c (conflict_report): Be sure not to append to res | |
9291 | between two calls, which could happen if both first sprintf were | |
9292 | skipped, but not the first cp += strlen. | |
9293 | ||
18569462 AD |
9294 | 2001-02-08 Akim Demaille <akim@epita.fr> |
9295 | ||
9296 | * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c: | |
9297 | New, from fileutils 4.0.37. | |
9298 | * configure.in: Require Autoconf 2.49c. I took some time before | |
9299 | making this decision. This is the only way out for portability | |
9300 | issues in Bison, it would mean way too much duplicate effort to | |
9301 | import in Bison features implemented in 2.49c since 2.13. | |
9302 | AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above. | |
9303 | ||
0d8f3c8a AD |
9304 | 2001-02-02 Akim Demaille <akim@epita.fr> |
9305 | ||
9306 | * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37. | |
66075dcf | 9307 | * lib/xalloc.h, lib/xmalloc.c: Update. |
0d8f3c8a | 9308 | |
f17bcd1f AD |
9309 | 2001-01-19 Akim Demaille <akim@epita.fr> |
9310 | ||
9311 | Get rid of the ad hoc handling of token_buffer in the scanner: use | |
9312 | the obstacks. | |
9313 | ||
9314 | * src/lex.c (token_obstack): New. | |
9315 | (init_lex): Initialize it. No longer call... | |
9316 | (grow_token_buffer): this. Remove it. | |
9317 | Adjust all the places which used it to use the obstack. | |
9318 | ||
511e79b3 AD |
9319 | 2001-01-19 Akim Demaille <akim@epita.fr> |
9320 | ||
9321 | * src/lex.h: Rename all the tokens: | |
9322 | s/\bENDFILE\b/tok_eof/g; | |
9323 | s/\bIDENTIFIER\b/tok_identifier/g; | |
9324 | etc. | |
9325 | Let them be enums, not #define, to ease debugging. | |
9326 | Adjust all the code. | |
9327 | ||
0d6508ef AD |
9328 | 2001-01-18 Akim Demaille <akim@epita.fr> |
9329 | ||
9330 | * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private. | |
9331 | * src/lex.c (maxtoken, grow_token_buffer): Static. | |
9332 | ||
6deb4447 AD |
9333 | 2001-01-18 Akim Demaille <akim@epita.fr> |
9334 | ||
9335 | Since we now use obstacks, more % directives can be enabled. | |
9336 | ||
9337 | * src/lex.c (percent_table): Also accept `%yacc', | |
9338 | `%fixed_output_files', `%defines', `%no_parser', `%verbose', and | |
9339 | `%debug'. | |
9340 | Handle the actions for `%semantic_parser' and `%pure_parser' here, | |
9341 | instead of returning a token. | |
9342 | * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused. | |
9343 | * src/reader.c (read_declarations): Adjust. | |
9344 | * src/files.c (open_files): Don't call `compute_base_names', don't | |
9345 | compute `attrsfile' since they depend upon data which might be | |
9346 | *in* the input file now. | |
9347 | (output_files): Do it here. | |
9348 | * src/output.c (output_headers): Document the fact that this patch | |
9349 | introduces a guaranteed SEGV for semantic parsers. | |
9350 | * doc/bison.texinfo: Document them. | |
9351 | * tests/suite.at: Exercise these %options. | |
9352 | ||
ff4423cc AD |
9353 | 2000-12-20 Akim Demaille <akim@epita.fr> |
9354 | ||
9355 | Also handle the output file (--verbose) with obstacks. | |
9356 | ||
9357 | * files.c (foutput): Remove. | |
9358 | (output_obstack): New. | |
9359 | Adjust all dependencies. | |
9360 | * src/conflicts.c: Return a string. | |
9361 | * src/system.h (obstack_grow_string): Rename as... | |
9362 | (obstack_sgrow): this. Be ready to work with non literals. | |
9363 | (obstack_fgrow4): New. | |
9364 | ||
956dba3a AD |
9365 | 2000-12-20 Akim Demaille <akim@epita.fr> |
9366 | ||
9367 | * src/files.c (open_files): Fix the computation of short_base_name | |
9368 | in the case of `-o foo.tab.c'. | |
9369 | ||
337bab46 AD |
9370 | 2000-12-20 Akim Demaille <akim@epita.fr> |
9371 | ||
9372 | * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at) | |
9373 | (copy_dollar): Now that everything uses obstacks, get rid of the | |
9374 | FILE * parameters. | |
9375 | ||
5d3214b8 AD |
9376 | 2000-12-20 Akim Demaille <akim@epita.fr> |
9377 | ||
9378 | * src/files.c (open_files): Actually the `.output' file is based | |
9379 | on the short_base_name, not base_name. | |
9380 | * tests/suite.at (Checking output file names): Adjust. | |
9381 | ||
29092a57 AD |
9382 | 2000-12-20 Akim Demaille <akim@epita.fr> |
9383 | ||
9384 | * src/bison.s1: Remove, we now use directly... | |
9385 | * src/bison.simple: this. | |
9386 | * src/Makefile.am: Use pkgdata instead of data. | |
9387 | ||
ea5607fd AD |
9388 | 2000-12-20 Akim Demaille <akim@epita.fr> |
9389 | ||
9390 | * src/files.c (guard_obstack): New. | |
9391 | (open_files): Initialize it. | |
9392 | (output_files): Dump it... | |
9393 | * src/files.h: Export it. | |
9394 | * src/reader.c (copy_guard): Use it. | |
9395 | ||
27110317 AD |
9396 | 2000-12-19 Akim Demaille <akim@epita.fr> |
9397 | ||
9398 | * src/files.c (outfile, defsfile, actfile): Removed as global | |
9399 | vars. | |
9400 | (open_files): Don't compute them. | |
9401 | (output_files): Adjust. | |
9402 | (base_name, short_base_name): Be global. | |
9403 | Adjust dependencies. | |
9404 | ||
19c50364 AD |
9405 | 2000-12-19 Akim Demaille <akim@epita.fr> |
9406 | ||
9407 | * src/files.c (strsuffix): New. | |
9408 | (stringappend): Be just like strcat but allocate. | |
9409 | (base_names): Eve out from open_files. | |
9410 | Try to simplify the rather hairy computation of base_name and | |
9411 | short_base_name. | |
9412 | (open_files): Use it. | |
9413 | * tests/suite.at (Checking output file names): New test. | |
9414 | ||
573c1d9f AD |
9415 | 2000-12-19 Akim Demaille <akim@epita.fr> |
9416 | ||
9417 | * src/system.h (obstack_grow_literal_string): Rename as... | |
9418 | (obstack_grow_string): this. | |
9419 | * src/output.c (output_parser): Recognize `%% actions' instead of | |
9420 | `$'. | |
9421 | * src/bison.s1: s/$/%% actions/. | |
9422 | * src/bison.hairy: Likewise. | |
9423 | ||
ef7ddedd AD |
9424 | 2000-12-19 Akim Demaille <akim@epita.fr> |
9425 | ||
9426 | * src/output.c (output_parser): Compute the `#line' lines when | |
9427 | there are. | |
9428 | * src/Makefile.am (bison.simple): Be a simple copy of bison.s1. | |
9429 | Suggested by Hans Aberg. | |
9430 | ||
ff61dabd AD |
9431 | 2000-12-19 Akim Demaille <akim@epita.fr> |
9432 | ||
9433 | Let the handling of the skeleton files be local to the procedures | |
9434 | that use it. | |
9435 | ||
9436 | * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No | |
9437 | longer static. | |
9438 | (fparser, open_extra_files): Remove. | |
9439 | (open_files, output_files): Don't take care of fparser. | |
9440 | * src/files.h: Adjust. | |
9441 | * src/output.c (output_parser): Open and close the file to the | |
9442 | skeleton. | |
9443 | * src/reader.c (read_declarations): When %semantic_parser, open | |
9444 | fguard. | |
9445 | ||
55b96341 AD |
9446 | 2000-12-19 Akim Demaille <akim@epita.fr> |
9447 | ||
9448 | * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here... | |
9449 | * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here. | |
9450 | ||
358c15b7 AD |
9451 | 2000-12-19 Akim Demaille <akim@epita.fr> |
9452 | ||
9453 | * src/files.c (open_files): Yipee! We no longer need all the code | |
9454 | looking for `/tmp' since we have no tmp file. | |
9455 | ||
7de3329e AD |
9456 | 2000-12-19 Akim Demaille <akim@epita.fr> |
9457 | ||
9458 | * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C): | |
9459 | New macros. | |
9460 | * src/files.c (open_files): Less dependency on MSDOS etc. | |
9461 | ||
3abcd459 AD |
9462 | 2000-12-14 Akim Demaille <akim@epita.fr> |
9463 | ||
9464 | * src/bison.s1 (YYLLOC_DEFAULT): New macro. | |
9465 | Provide a default definition. | |
9466 | Use it when executing the default @ action. | |
9467 | * src/reader.c (reader_output_yylsp): No longer include | |
9468 | `timestamp' and `text' in the default YYLTYPE. | |
9469 | ||
2a91a95e AD |
9470 | 2000-12-12 Akim Demaille <akim@epita.fr> |
9471 | ||
9472 | * src/reader.c (copy_definition, parse_union_decl, copy_action) | |
9473 | (copy_guard): Quote the file names. | |
9474 | Reported by Laurent Mascherpa. | |
9475 | ||
14d3eb9b AD |
9476 | 2000-12-12 Akim Demaille <akim@epita.fr> |
9477 | ||
9478 | * src/output.c (output_headers, output_program, output): Be sure | |
9479 | to escape special characters when outputting filenames. | |
9480 | (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove. | |
9481 | (output_headers): Don't depend on them, Use ACTSTR. | |
9482 | ||
d7045ec6 AD |
9483 | 2000-11-17 Akim Demaille <akim@epita.fr> |
9484 | ||
9485 | * lib/obstack.h: Formatting changes. | |
9486 | (obstack_grow, obstack_grow0): Don't cast WHERE at all: it | |
9487 | prevents type checking. | |
9488 | (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't | |
9489 | cast the value to (void *): assigning a `foo *' to a `void *' | |
9490 | variable is valid. | |
9491 | (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int. | |
9492 | * src/reader.c (parse_union_decl): Typo: use obstack_1grow to | |
9493 | append characters. | |
9494 | ||
6fd54b73 AD |
9495 | 2000-11-17 Akim Demaille <akim@epita.fr> |
9496 | ||
9497 | * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename | |
9498 | as... | |
9499 | (suite.m4, regression.m4, calc.m4): these. | |
9500 | * tests/atgeneral.m4: Update from CVS Autoconf. | |
9501 | ||
4c50eae6 AD |
9502 | 2000-11-17 Akim Demaille <akim@epita.fr> |
9503 | ||
9504 | * tests/regression.m4 (%union and --defines): New test, | |
9505 | demonstrating a current bug in the obstack implementation. | |
9506 | ||
a35f64ea AD |
9507 | 2000-11-17 Akim Demaille <akim@epita.fr> |
9508 | ||
9509 | * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New | |
9510 | macros. | |
9511 | Use them to declare the variables which are global or local to | |
9512 | `yyparse'. | |
9513 | ||
7de23534 AD |
9514 | 2000-11-17 Akim Demaille <akim@epita.fr> |
9515 | ||
9516 | * acconfig.h: Remove, no longer used. | |
9517 | ||
aa7815f5 AD |
9518 | 2000-11-07 Akim Demaille <akim@epita.fr> |
9519 | ||
9520 | * src: s/Copyright (C)/Copyright/g. | |
9521 | ||
5af1f549 AD |
9522 | 2000-11-07 Akim Demaille <akim@epita.fr> |
9523 | ||
9524 | * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just | |
9525 | defining. | |
9526 | * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/. | |
9527 | ||
553e2b22 AD |
9528 | 2000-11-07 Akim Demaille <akim@epita.fr> |
9529 | ||
9530 | * src/bison.s1 (YYLEX): Use #if instead of #ifdef. | |
9531 | Merge in a single CPP if/else. | |
9532 | ||
8a4f41d6 AD |
9533 | 2000-11-07 Akim Demaille <akim@epita.fr> |
9534 | ||
9535 | * src/output.c (output): Remove useless variables. | |
9536 | * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second | |
9537 | argument `data' for consistency with the prototypes. | |
9538 | Qualify it `const'. | |
9539 | (obstack_copy, obstack_copy0): Rename the second argument as | |
9540 | `address' for consistency. Qualify it `const'. | |
9541 | * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow) | |
9542 | (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify | |
9543 | `const' their input argument (`data' or `address'). | |
9544 | Adjust the corresponding macros to include `const' in casts. | |
9545 | ||
095a3fb5 AD |
9546 | 2000-11-03 Akim Demaille <akim@epita.fr> |
9547 | ||
9548 | * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/. | |
9549 | s/PFILE1/BISON_HAIRY/. | |
9550 | Adjust dependencies. | |
9551 | ||
d1cdce7c AD |
9552 | 2000-11-03 Akim Demaille <akim@epita.fr> |
9553 | ||
090c5ebf | 9554 | For some reason, this was not applied. |
d1cdce7c AD |
9555 | |
9556 | * src/files.c [VMS]: No longer include `ssdef.h', no longer define | |
9557 | `unlink': it's no longer used. | |
9558 | ||
9311529b AD |
9559 | 2000-11-03 Akim Demaille <akim@epita.fr> |
9560 | ||
9561 | * src/files.c (skeleton_find): New function, eved out of... | |
9562 | (open_files, open_extra_files): here. | |
9563 | ||
d8880f69 AD |
9564 | 2000-11-03 Akim Demaille <akim@epita.fr> |
9565 | ||
9566 | Don't use `atexit'. | |
9567 | ||
9568 | * src/files.c (obstack_save): New function. | |
9569 | (done): Rename as... | |
9570 | (output_files): this. | |
9571 | Use `obstack_save'. | |
9572 | * src/main.c (main): Don't use `atexit' to register `done', since | |
9573 | it no longer has to remove tmp files, just call `output_files' | |
9574 | when there are no errors. | |
9575 | ||
0dbb648e AD |
9576 | 2000-11-02 Akim Demaille <akim@epita.fr> |
9577 | ||
9578 | * src/files.c [VMS]: No longer include `ssdef.h', no longer define | |
9579 | `unlink': it's no longer used. | |
9580 | * src/files.h: Formatting changes. | |
9581 | ||
896fe5c1 AD |
9582 | 2000-11-02 Akim Demaille <akim@epita.fr> |
9583 | ||
9584 | Remove the last uses of mktemp and unlink/delete. | |
9585 | ||
9586 | * src/files.c (fdefines, ftable): Removed. | |
9587 | (defines_ostack, table_obstack): New. | |
9588 | Adjust dependencies of the former into uses of the latter. | |
9589 | * src/output.c (output_short_or_char_table, output_short_table): | |
9590 | Convert to using obstacks. | |
9591 | * src/reader.c (copy_comment2): Accept one FILE * and two | |
9592 | obstacks. | |
9593 | (output_token_defines, reader_output_yylsp): Use obstacks. | |
9594 | * src/system.h (obstack_fgrow3): New. | |
9595 | ||
dd60faec AD |
9596 | 2000-11-01 Akim Demaille <akim@epita.fr> |
9597 | ||
9598 | Change each use of `fattrs' into a use of `attrs_obstack'. | |
9599 | ||
9600 | * src/reader.c (copy_at): Typo: s/yylloc/yyloc/. | |
9601 | * src/files.c (fattrs): Remove. | |
9602 | (attrs_obstack): New. | |
9603 | Adjust all dependencies. | |
9604 | (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile. | |
9605 | ||
8c7ebe49 AD |
9606 | 2000-11-01 Akim Demaille <akim@epita.fr> |
9607 | ||
9608 | Introduce obstacks. | |
9609 | Change each use of `faction' into a use of `action_obstack'. | |
9610 | ||
9611 | * lib/obstack.h, lib/obstack.c: New files. | |
9612 | * src/files.c (faction): Remove. | |
9613 | (action_obstack): New. | |
9614 | Adjust all dependencies. | |
9615 | ||
77aee789 AD |
9616 | 2000-10-20 Akim Demaille <akim@epita.fr> |
9617 | ||
9618 | * lib/quote.h (PARAMS): New macro. Use it. | |
9619 | ||
43591cec AD |
9620 | 2000-10-16 Akim Demaille <akim@epita.fr> |
9621 | ||
9622 | * src/output.c (output_short_or_char_table): New function. | |
9623 | (output_short_table, output_token_translations): Use it. | |
9624 | (goto_actions): Use output_short_table. | |
9625 | ||
1e9798d5 AD |
9626 | 2000-10-16 Akim Demaille <akim@epita.fr> |
9627 | ||
9628 | * src/symtab.c (bucket_new): New function. | |
9629 | (getsym): Use it. | |
9630 | ||
9631 | * src/output.c (output_short_table): New argument to display the | |
9632 | comment associated with the table. | |
9633 | Adjust dependencies. | |
9634 | (output_gram): Use it. | |
9635 | (output_rule_data): Nicer output layout for YYTNAME. | |
9636 | ||
f282676b AD |
9637 | 2000-10-16 Akim Demaille <akim@epita.fr> |
9638 | ||
9639 | * src/lex.c (read_typename): New function. | |
9640 | (lex): Use it. | |
9641 | * src/reader.c (copy_dollar): Likewise. | |
9642 | ||
550a72a3 AD |
9643 | 2000-10-16 Akim Demaille <akim@epita.fr> |
9644 | ||
9645 | * src/reader.c (copy_comment2): Expect the input stream to be on | |
9646 | the `/' which is suspected to open a comment, instead of being | |
9647 | called after `//' or `/*' was read. | |
9648 | (copy_comment, copy_definition, parse_union_decl, copy_action) | |
9649 | (copy_guard): Adjust. | |
9650 | ||
131e2fef AD |
9651 | 2000-10-16 Akim Demaille <akim@epita.fr> |
9652 | ||
9653 | * src/reader.c (parse_expect_decl): Use `skip_white_space' and | |
9654 | `read_signed_integer'. | |
9655 | ||
79282c5a AD |
9656 | 2000-10-16 Akim Demaille <akim@epita.fr> |
9657 | ||
9658 | * src/reader.c (copy_dollar): New function. | |
9659 | (copy_guard, copy_action): Use it. | |
9660 | ||
ff4a34be AD |
9661 | 2000-10-16 Akim Demaille <akim@epita.fr> |
9662 | ||
9663 | * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c: | |
9664 | * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4: | |
9665 | New files, from Fileutils 4.0.27. | |
9666 | * src/main.c (printable_version): Remove. | |
9667 | * src/lex.c, src/reader.c: Use `quote'. | |
9668 | ||
9669 | 2000-10-04 Akim Demaille <akim@epita.fr> | |
9670 | ||
9671 | * lib/error.c, lib/error.h: New files, needed by xmalloc.c. | |
9672 | ||
14ded682 AD |
9673 | 2000-10-04 Akim Demaille <akim@epita.fr> |
9674 | ||
9675 | * doc/bison.texinfo: Various typos spotted by Neil Booth. | |
9676 | ||
8e03724b AD |
9677 | 2000-10-04 Akim Demaille <akim@epita.fr> |
9678 | ||
9679 | When a literal string is used to define two different tokens, | |
9680 | `bison -v' segfaults. | |
9681 | Reported by Piotr Gackiewicz, and fixed by Neil Booth. | |
9682 | ||
9683 | * tests/regression.m4: New file. | |
9684 | Include the core of the sample provided by Piotr Gackiewicz. | |
9685 | * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed | |
9686 | properly. | |
9687 | ||
a9e64249 AD |
9688 | 2000-10-04 Akim Demaille <akim@epita.fr> |
9689 | ||
9690 | * src/reader.c (parse_expect_decl): Keep `count' within the size | |
9691 | of `buffer'. | |
9692 | From Neil Booth. | |
9693 | ||
da9abf43 AD |
9694 | 2000-10-02 Paul Eggert <eggert@twinsun.com> |
9695 | ||
9696 | * bison.s1 (yyparse): Assign the default value | |
9697 | unconditionally, to avoid a GCC warning and make the parser a | |
9698 | tad smaller. | |
9699 | ||
c33638bb AD |
9700 | 2000-10-02 Akim Demaille <akim@epita.fr> |
9701 | ||
9702 | * src/getargs.c (getargs): Don't dump `--help' on unrecognized | |
9703 | options. | |
9704 | ||
444c570a AD |
9705 | 2000-10-02 Akim Demaille <akim@epita.fr> |
9706 | ||
9707 | * src/derives.c, src/print.c, src/reduce.c: To ease the | |
9708 | translation, move some `\n' out of the translated strings. | |
9709 | ||
89cab50d AD |
9710 | 2000-10-02 Akim Demaille <akim@epita.fr> |
9711 | ||
9712 | The location tracking mechanism is precious for parse error | |
9713 | messages. Nevertheless, it is enabled only when `@n' is used in | |
9714 | the grammar, which is a different issue (you can use it in error | |
9715 | message, but not in the grammar per se). Therefore, there should | |
9716 | be another means to enable it. | |
9717 | ||
9718 | * src/getargs.c (getargs): Support `--locations'. | |
9719 | (usage): Report it. | |
9720 | * src/getargs.h (locationsflag): Export it. | |
9721 | * src/lex.c (percent_table): Support `%locations'. | |
9722 | * src/reader.c (yylsp_needed): Remove this variable, now replaced | |
9723 | with `locationsflag'. | |
9724 | * doc/bison.texinfo: Document `--locations' and `%locations'. | |
9725 | Sort the options. | |
9726 | * tests/calc.m4: Test it. | |
9727 | ||
9728 | For regularity of the names, replace each | |
9729 | (nolineflag, toknumflag, rawtokenumflag, noparserflag): with... | |
9730 | (no_lineflag, token_tableflag, rawflag, no_parserflag): this. | |
9731 | In addition replace each `flag' with `_flag'. | |
9732 | ||
d6c2cba0 AD |
9733 | 2000-10-02 Akim Demaille <akim@epita.fr> |
9734 | ||
9735 | Also test parse error messages, including with YYERROR_VERBOSE. | |
9736 | ||
9737 | * tests/calc.m4 (calc.y): Add support for `exp = exp' (non | |
9738 | associative). | |
9739 | Use it to check the computations. | |
9740 | Use it to check `nonassoc' is honored. | |
9741 | (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed | |
9742 | `--yyerror-verbose'. | |
9743 | (_AT_CHECK_CALC): Adjust to this option. | |
9744 | (_AT_CHECK_CALC_ERROR): New macro to check parse error messages. | |
9745 | ||
5a35a6cb AD |
9746 | 2000-10-02 Akim Demaille <akim@epita.fr> |
9747 | ||
9748 | Test also `--verbose', `--defines' and `--name-prefix'. Testing | |
9749 | the latter demonstrates a flaw in the handling of non debugging | |
9750 | parsers introduced by myself on 2000-03-16: `#define yydebug 0' | |
9751 | was used in order to simplify: | |
9752 | ||
9753 | #if YYDEBUG | |
9754 | if (yydebug) | |
9755 | { | |
9756 | ... | |
9757 | } | |
9758 | #endif | |
9759 | ||
9760 | into | |
9761 | ||
9762 | if (yydebug) | |
9763 | { | |
9764 | ... | |
9765 | } | |
9766 | ||
9767 | unfortunately this leads to a CPP conflict when | |
9768 | `--name-prefix=foo' is used since it produces `#define yydebug | |
9769 | foodebug'. | |
9770 | ||
9771 | * src/bison.s1 [!YYDEBUG]: Do not define yydebug. | |
9772 | (YYDPRINTF): New macro. | |
9773 | Spread its use. | |
9774 | * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from | |
9775 | the bison options. | |
9776 | Also test `--verbose', `--defines' and `--name-prefix'. | |
9777 | ||
71da9eea AD |
9778 | 2000-10-02 Akim Demaille <akim@epita.fr> |
9779 | ||
9780 | Improve the readability of the produced parsers. | |
9781 | ||
9782 | * src/bison.s1: Formatting changes. | |
9783 | Improve the comment related to the `$' mark. | |
9784 | (yydefault): Don't fall through to `yyresume': `goto' there. | |
9785 | * src/output.c (output_parser): When the `$' is met, skip the end | |
9786 | of its line. | |
9787 | New variable, `number_of_dollar_signs', to check there's exactly | |
9788 | one `$' in the parser skeleton. | |
9789 | ||
95e36146 AD |
9790 | 2000-10-02 Akim Demaille <akim@epita.fr> |
9791 | ||
9792 | * lib/xstrdup.c: New file, from the fileutils. | |
9793 | * src/reader.c (parse_token_decl, get_type_name, parse_type_decl) | |
9794 | (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup' | |
9795 | instead of strlen + xmalloc + strcpy. | |
9796 | * src/symtab.c (copys): Remove, use xstrdup instead. | |
9797 | ||
d7020c20 AD |
9798 | 2000-10-02 Akim Demaille <akim@epita.fr> |
9799 | ||
9800 | * src/gram.h (associativity): New enum type which replaces the | |
9801 | former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with | |
9802 | `right_assoc', `left_assoc' and `non_assoc'. | |
9803 | Adjust all dependencies. | |
9804 | * src/reader.c: Formatting changes. | |
9805 | (LTYPESTR): Don't define it, use it as a literal in | |
9806 | `reader_output_yylsp'. | |
9807 | * src/symtab.h (symbol_class): New enum type which replaces the | |
9808 | former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with | |
9809 | `sunknown', `stoken and `snterm'. | |
9810 | ||
1916f98e AD |
9811 | 2000-10-02 Akim Demaille <akim@epita.fr> |
9812 | ||
9813 | * src/getargs.c (fixed_outfiles): Rename as... | |
9814 | (yaccflag): for consistency and accuracy. | |
9815 | Adjust dependencies. | |
9816 | ||
d7913476 AD |
9817 | 2000-10-02 Akim Demaille <akim@epita.fr> |
9818 | ||
9819 | Use the more standard files `xalloc.h' and `xmalloc.c' instead of | |
9820 | Bison's `allocate.c' and `alloc.h'. This patch was surprisingly | |
9821 | difficult and introduced a lot of core dump. It turns out that | |
9822 | Bison used an implementation of `xmalloc' based on `calloc', and | |
9823 | at various places it does depend upon the initialization to 0. I | |
9824 | have not tried to isolate the pertinent places, and all the former | |
9825 | calls to Bison's `xmalloc' are now using `XCALLOC'. Someday, | |
9826 | someone should address this issue. | |
9827 | ||
9828 | * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove. | |
9829 | * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New | |
9830 | files. | |
9831 | Adjust dependencies. | |
9832 | * src/warshall.h: New file. | |
9833 | Propagate. | |
9834 | ||
340ef489 AD |
9835 | 2000-10-02 Akim Demaille <akim@epita.fr> |
9836 | ||
9837 | Various anti-`extern in *.c' changes. | |
9838 | ||
9839 | * src/system.h: Include `assert.h'. | |
9840 | ||
b2ca4022 AD |
9841 | 2000-10-02 Akim Demaille <akim@epita.fr> |
9842 | ||
9843 | * src/state.h (nstates, final_state, first_state, first_shift) | |
9844 | (first_reduction): Move their exportation from here... | |
9845 | * src/LR0.h: to here. | |
9846 | Adjust dependencies. | |
9847 | * src/getargs.c (statisticsflag): New variable. | |
9848 | Add support for `--statistics'. | |
9849 | Adjust dependencies. | |
9850 | ||
9851 | Remove a lot of now useless `extern' statements in most files. | |
9852 | ||
403b315b AD |
9853 | 2000-10-02 Akim Demaille <akim@epita.fr> |
9854 | ||
9855 | * src/LR0.h: New file. | |
9856 | Propagate its use. | |
9857 | ||
07a58c13 AD |
9858 | 2000-10-02 Akim Demaille <akim@epita.fr> |
9859 | ||
9860 | * src/print.h: New file. | |
9861 | Propagate its use. | |
9862 | * src/print.c: Formatting and ordering changes. | |
9863 | (verbose, terse): Replace with... | |
9864 | (print_results): this new function. | |
9865 | Adjust dependencies. | |
9866 | ||
0619caf0 AD |
9867 | 2000-10-02 Akim Demaille <akim@epita.fr> |
9868 | ||
9869 | * src/conflicts.c (conflict_report): New function. | |
9870 | (conflict_log, verbose_conflict_log): Replace with... | |
9871 | (print_conflicts): this function. | |
9872 | Adjust dependencies. | |
9873 | * src/conflicts.h: New file. | |
9874 | Propagate its inclusion. | |
9875 | ||
3519ec76 AD |
9876 | 2000-10-02 Akim Demaille <akim@epita.fr> |
9877 | ||
9878 | * src/nullable.h: New file. | |
9879 | Propagate its inclusion. | |
9880 | * src/nullable.c: Formatting changes. | |
9881 | ||
015acc48 AD |
9882 | 2000-10-02 Akim Demaille <akim@epita.fr> |
9883 | ||
9884 | * src/reduce.h: New file. | |
9885 | Propagate its inclusion. | |
9886 | * src/reduce.c: Topological sort and other formatting changes. | |
9887 | (bool, TRUE, FALSE): Move their definition to... | |
9888 | * src/system.h: here. | |
9889 | ||
8963a27b AD |
9890 | 2000-10-02 Akim Demaille <akim@epita.fr> |
9891 | ||
9892 | * src/files.c: Formatting changes. | |
9893 | (tryopen, tryclose, openfiles): Rename as... | |
9894 | (xfopen, xfclose, open_files): this. | |
9895 | (stringappend): static. | |
9896 | * src/files.h: Complete the list of exported symbols. | |
9897 | Propagate its use. | |
9898 | ||
a70083a3 AD |
9899 | 2000-10-02 Akim Demaille <akim@epita.fr> |
9900 | ||
9901 | * src/reader.h: New file. | |
9902 | Propagate its use instead of tedious list of `extern' and | |
9903 | prototypes. | |
9904 | * src/reader.c: Formatting changes, topological sort, | |
9905 | s/register//. | |
9906 | ||
abadc117 AD |
9907 | 2000-10-02 Akim Demaille <akim@epita.fr> |
9908 | ||
9909 | * src/lex.h: Prototype `lex.c' exported functions. | |
9910 | * src/reader.c: Adjust. | |
9911 | * src/lex.c: Formatting changes. | |
9912 | (safegetc): Rename as... | |
9913 | (xgetc): this. | |
9914 | ||
720d742f AD |
9915 | 2000-10-02 Akim Demaille <akim@epita.fr> |
9916 | ||
9917 | * src/lalr.h: New file. | |
9918 | Propagate its inclusion instead of prototypes and `extern'. | |
9919 | * src/lalr.c: Formatting changes, topological sorting etc. | |
9920 | ||
f2acea59 AD |
9921 | 2000-10-02 Akim Demaille <akim@epita.fr> |
9922 | ||
9923 | * src/output.c (token_actions): Introduce a temporary array, | |
9924 | YYDEFACT, that makes it possible for this function to use | |
9925 | output_short_table. | |
9926 | ||
d019d655 AD |
9927 | 2000-10-02 Akim Demaille <akim@epita.fr> |
9928 | ||
9929 | `user_toknums' is output as a `short[]' in `output.c', while it is | |
9930 | defined as a `int[]' in `reader.c'. For consistency with the | |
9931 | other output tables, `user_toknums' is now defined as a table of | |
9932 | shorts. | |
9933 | ||
9934 | * src/reader.c (user_toknums): Be a short table instead of an int | |
9935 | table. | |
9936 | Adjust dependencies. | |
9937 | ||
9938 | Factor the short table outputs. | |
9939 | ||
9940 | * src/output.c (output_short_table): New function. | |
9941 | * src/output.c (output_gram, output_stos, output_rule_data) | |
9942 | (output_base, output_table, output_check): Use it. | |
9943 | ||
6c89f1c1 AD |
9944 | 2000-10-02 Akim Demaille <akim@epita.fr> |
9945 | ||
9946 | * src/output.c (output): Topological sort of the functions, in | |
9947 | order to get rid of the `static' prototypes. | |
9948 | No longer use `register'. | |
9949 | * src/output.h: New file. | |
9950 | Propagate its inclusion in files explicitly prototyping functions | |
9951 | from output.c. | |
9952 | ||
d9efd181 AD |
9953 | 2000-09-21 Akim Demaille <akim@epita.fr> |
9954 | ||
9955 | * src/atgeneral.m4: Update from Autoconf. | |
9956 | ||
c29240e7 | 9957 | 2000-09-21 Akim Demaille <akim@epita.fr> |
2fa6973e AD |
9958 | |
9959 | * src/closure.h: New file. | |
9960 | * src/closure.c: Formatting changes, topological sort over the | |
9961 | functions, use of closure.h. | |
9962 | (initialize_closure, finalize_closure): Rename as... | |
9963 | (new_closure, free_closure): these. Adjust dependencies. | |
9964 | * src/LR0.c: Formatting changes, topological sort, use of | |
9965 | cloture.h. | |
9966 | (initialize_states): Rename as... | |
9967 | (new_states): this. | |
9968 | * src/Makefile.am (noinst_HEADERS): Adjust. | |
9969 | ||
499daa50 AD |
9970 | 2000-09-20 Akim Demaille <akim@epita.fr> |
9971 | ||
9972 | * src/acconfig.h: Don't protect config.h against multiple | |
9973 | inclusion. | |
9974 | Don't define PARAMS. | |
9975 | * src/system.h: Define PARAMS. | |
9976 | Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the | |
9977 | purpose of config.h. system.h must not try to fix wrong | |
9978 | definitions in config.h. | |
9979 | ||
cc84fd5d AD |
9980 | 2000-09-20 Akim Demaille <akim@epita.fr> |
9981 | ||
9982 | * src/derives.h: New file. | |
9983 | * src/main.c, src/derives.h: Use it. | |
9984 | Formatting changes. | |
9985 | * src/Makefile.am (noinst_HEADERS): Adjust. | |
9986 | ||
db5b3a89 AD |
9987 | 2000-09-20 Akim Demaille <akim@epita.fr> |
9988 | ||
9989 | * tests/atgeneral.m4: Update from Autoconf. | |
9990 | * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC) | |
9991 | (AT_CHECK_CALC): New macros. | |
9992 | Use these macros to test bison with options `', `--raw', | |
9993 | `--debug', `--yacc', `--yacc --debug'. | |
9994 | ||
ceed8467 AD |
9995 | 2000-09-19 Akim Demaille <akim@epita.fr> |
9996 | ||
9997 | * src/output.c: Formatting changes. | |
9998 | * src/machine.h: Remove, leaving its contents in... | |
9999 | * src/system.h: here. | |
10000 | Include stdio.h. | |
10001 | Adjust all dependencies on stdio.h and machine.h. | |
10002 | * src/getargs.h: New file. | |
10003 | Let all `extern' declarations about getargs.c be replaced with | |
10004 | inclusion of `getargs.h'. | |
10005 | * src/Makefile.am (noinst_HEADERS): Adjust. | |
10006 | ||
10007 | * tests/calc.m4 (yyin): Be initialized in main, not on the global | |
10008 | scope. | |
10009 | (yyerror): Returns void, not int. | |
10010 | * doc/bison.texinfo: Formatting changes. | |
10011 | ||
05a1d24b AD |
10012 | 2000-09-19 Akim Demaille <akim@epita.fr> |
10013 | ||
10014 | * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not | |
10015 | portable. | |
10016 | ||
cbd25751 AD |
10017 | 2000-09-18 Akim Demaille <akim@epita.fr> |
10018 | ||
10019 | * configure.in: Append WARNING_CFLAGS to CFLAGS. | |
10020 | * src/Makefile.am (INCLUDES): Don't. | |
10021 | Be ready to fetch headers in lib/. | |
10022 | ||
13863333 AD |
10023 | 2000-09-18 Akim Demaille <akim@epita.fr> |
10024 | ||
10025 | * doc/bison.texinfo: Update the copyright. | |
10026 | ANSIfy and GNUify the examples. | |
10027 | Remove the old menu. | |
10028 | ||
0d533154 AD |
10029 | 2000-09-18 Akim Demaille <akim@epita.fr> |
10030 | ||
10031 | First set of tests: use the `calc' example from the documentation. | |
10032 | ||
10033 | * src/bison.s1 (yyparse): Condition the code using `yytname' which | |
10034 | is defined only when YYDEBUG is. | |
10035 | * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13. | |
10036 | * src/files.c (tryopen, tryclose): Formatting changes. | |
10037 | Move to the top and be static. | |
10038 | * src/reader.c (read_signed_integer): Likewise. | |
10039 | * tests/calc.m4: New file. | |
10040 | * Makefile.am, suite.m4: Adjust. | |
10041 | * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY. | |
10042 | ||
e79137ac AD |
10043 | 2000-09-18 Akim Demaille <akim@epita.fr> |
10044 | ||
10045 | Add support for an Autotest test suite for Bison. | |
10046 | ||
10047 | * m4/m4.m4, m4/atconfig.m4: New files. | |
10048 | * m4/Makefile.am (EXTRA_DIST): Adjust. | |
10049 | * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New | |
10050 | files. | |
10051 | * src/getargs.c: Display a more standard --version message. | |
10052 | * src/reader.c (reader): Formatting changes. | |
10053 | No longer depend upon VERSION_STRING. | |
10054 | * configure.in: No longer use `dnl'. | |
10055 | Set up the test suite and the new directory `tests/. | |
10056 | (VERSION_STRING): Remove. | |
10057 | ||
27821bff AD |
10058 | 2000-04-14 Akim Demaille <akim@epita.fr> |
10059 | ||
10060 | * src/reader.c (copy_comment2): New function, same as former | |
10061 | `copy_comment', but outputs into two FILE *. | |
10062 | (copy_comment): Use it. | |
10063 | (parse_union_decl): Use it. | |
10064 | (get_type, parse_start_decl): Use the same `invalid' message. | |
10065 | (parse_start_decl, parse_union_decl): Use the same `multiple' | |
10066 | message. | |
10067 | (parse_union_decl, copy_guard, copy_action): Use the same | |
10068 | `unmatched' message. | |
10069 | * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'. | |
10070 | ||
cfe5fbc0 AD |
10071 | 2000-03-31 Akim Demaille <akim@epita.fr> |
10072 | ||
10073 | * src/files.c (tryopen, tryclose): Move to the top. | |
10074 | Be static. | |
10075 | ||
cb7db13e AD |
10076 | 2000-03-31 Akim Demaille <akim@epita.fr> |
10077 | ||
10078 | * src/main.c (main): Don't call `done', exit does it. | |
10079 | ||
a0f6b076 AD |
10080 | 2000-03-31 Akim Demaille <akim@epita.fr> |
10081 | ||
36281465 AD |
10082 | * allocate.c: s/return (foo)/return foo/. |
10083 | * lalr.c: Likewise. | |
10084 | * LR0.c: Likewise. | |
10085 | * output.c: Likewise. | |
10086 | * reader.c: Likewise. | |
10087 | * symtab.c: Likewise. | |
10088 | * vmsgetargs.c: Likewise. | |
10089 | ||
10090 | 2000-03-31 Akim Demaille <akim@epita.fr> | |
10091 | ||
10092 | Clean up the error reporting functions. | |
a0f6b076 AD |
10093 | |
10094 | * src/report.c: New file. | |
10095 | * src/report.h: Likewise. | |
10096 | * src/Makefile.am: Adjust. | |
10097 | * m4/error.m4: New file. | |
10098 | * m4/Makefile.am: Adjust. | |
10099 | * configure.in (jm_PREREQ_ERROR): Call it. | |
10100 | * src/main.c (int_to_string, banner, fatal_banner, warn_banner): | |
10101 | Remove. | |
10102 | (fatal, fatals): Remove. All callers use complain.c::fatal. | |
10103 | (warn, warni, warns, warnss, warnss): Remove. All callers use | |
10104 | complain.c::complain. | |
10105 | (toomany): Remove, use fatal instead. | |
10106 | * src/files.c (done): No argument, use complain_message_count. | |
10107 | * src/main.c (main): Register `done' to `atexit'. | |
10108 | ||
10109 | * src/getargs.c (usage): More `fputs', less `fprintf'. | |
10110 | ||
18539825 AD |
10111 | 2000-03-28 Akim Demaille <akim@epita.fr> |
10112 | ||
10113 | * lib/: New directory. | |
10114 | * Makefile.am (SUBDIRS): Adjust. | |
10115 | * configure.in: Adjust. | |
10116 | (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's | |
10117 | useless. | |
10118 | * src/alloca.c: Moved to lib/. | |
10119 | * src/getopt.c: Likewise. | |
10120 | * src/getopt1.c: Likewise. | |
10121 | * src/getopt.h: Likewise. | |
10122 | * src/ansi2knr.c: Likewise. | |
10123 | * src/ansi2knr.1: Likewise. | |
10124 | * src/Makefile.am: Adjust. | |
10125 | * lib/Makefile.am: New file. | |
10126 | ||
9f306f2a AD |
10127 | 2000-03-28 Akim Demaille <akim@epita.fr> |
10128 | ||
10129 | * src/getargs.c (usage): Refresh the help message. | |
10130 | ||
0ba347b6 AD |
10131 | 2000-03-17 Akim Demaille <akim@epita.fr> |
10132 | ||
10133 | * src/getopt1.c: Updated from textutils 2.0e | |
10134 | * src/getopt.c: Likewise. | |
10135 | * src/getopt.h: Likewise. | |
10136 | ||
dbe7f271 AD |
10137 | 2000-03-17 Akim Demaille <akim@epita.fr> |
10138 | ||
10139 | * src/Makefile.am (bison.simple): Fix the awk program: quote only | |
10140 | the file name, not the whole `#line LINE FILE'. | |
10141 | ||
75bbe78d AD |
10142 | 2000-03-17 Akim Demaille <akim@epita.fr> |
10143 | ||
10144 | On syntax errors, report the token on which we choked. | |
10145 | ||
aa5fd0ee AD |
10146 | * src/bison.s1 (yyparse): In the label yyerrlab, when |
10147 | YYERROR_VERBOSE, add yychar in msg. | |
75bbe78d | 10148 | |
7b306f52 AD |
10149 | 2000-03-17 Akim Demaille <akim@epita.fr> |
10150 | ||
aa5fd0ee | 10151 | * src/reader.c (copy_at): New function. |
7b306f52 AD |
10152 | (copy_guard): Use it. |
10153 | (copy_action): Use it. | |
10154 | ||
e87b5700 AD |
10155 | 2000-03-17 Akim Demaille <akim@epita.fr> |
10156 | ||
10157 | Be kind to translators, save some useless translations. | |
10158 | ||
aa5fd0ee | 10159 | * src/main.c (banner): New function. |
e87b5700 AD |
10160 | (fatal_banner): Use it. |
10161 | (warn_banner): Use it. | |
10162 | ||
ae3c3164 AD |
10163 | 2000-03-17 Akim Demaille <akim@epita.fr> |
10164 | ||
aa5fd0ee AD |
10165 | * src/reader.c (copy_definition): Use copy_string and |
10166 | copy_comment. Removed now unused `match', `ended', | |
10167 | `cplus_comment'. | |
ae3c3164 AD |
10168 | (copy_comment, copy_string): Moved, to be visible from |
10169 | copy_definition. | |
10170 | ||
4dc58e7c AD |
10171 | 2000-03-17 Akim Demaille <akim@epita.fr> |
10172 | ||
aa5fd0ee AD |
10173 | * src/reader.c (copy_string): Declare `static inline'. No |
10174 | problems with inline, since it is checked by configure. | |
4dc58e7c AD |
10175 | (copy_comment): Likewise. |
10176 | ||
0a6384c4 AD |
10177 | 2000-03-17 Akim Demaille <akim@epita.fr> |
10178 | ||
aa5fd0ee | 10179 | * src/reader.c (packsymbols): Formatting changes. |
0a6384c4 | 10180 | |
3cef001a AD |
10181 | 2000-03-17 Akim Demaille <akim@epita.fr> |
10182 | ||
aa5fd0ee | 10183 | * src/reader.c (copy_comment): New function, factored out from: |
3cef001a AD |
10184 | (copy_action): Use it. Removed now unused `match', `ended', |
10185 | `cplus_comment'. | |
10186 | (copy_guard): Likewise. | |
10187 | ||
ca36d2ef AD |
10188 | 2000-03-17 Akim Demaille <akim@epita.fr> |
10189 | ||
aa5fd0ee | 10190 | * src/reader.c (copy_string): New function, factored out from: |
ca36d2ef AD |
10191 | (copy_action): Use it. |
10192 | (copy_guard): Likewise. | |
10193 | ||
6666f98f AD |
10194 | 2000-03-17 Akim Demaille <akim@epita.fr> |
10195 | ||
10196 | Change the handling of @s so that they behave exactly like $s. | |
10197 | There is now a pseudo variable @$ (readble and writable), location | |
10198 | of the lhs of the rule (by default ranging from the location of | |
10199 | the first symbol of the rhs, to the location of the last symbol, | |
10200 | or, if the rhs is empty, YYLLOC). | |
10201 | ||
10202 | * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of | |
10203 | yyval. | |
10204 | (yyparse): When providing a default semantic action, provide a | |
10205 | default location action. | |
10206 | (after the $): No longer change `*YYLSP', just stack YYLOC the | |
10207 | same way you stack YYVAL. | |
10208 | * src/reader.c (read_declarations): Use warns. | |
10209 | (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'. | |
10210 | (copy_action, case '@'): Likewise. | |
10211 | Use a standard error message, to save useless work from | |
10212 | translators. | |
10213 | ||
41aca2e0 AD |
10214 | 2000-03-17 Akim Demaille <akim@epita.fr> |
10215 | ||
aa5fd0ee AD |
10216 | * src/bison.s1: Formatting and cosmetics changes. |
10217 | * src/reader.c: Likewise. | |
41aca2e0 AD |
10218 | Update the Copyright notice. |
10219 | ||
dc08c1d5 AD |
10220 | 2000-03-17 Akim Demaille <akim@epita.fr> |
10221 | ||
aa5fd0ee AD |
10222 | * src/bison.s1 (#line): All set to `#line' only, since the |
10223 | Makefile now handles them. | |
dc08c1d5 | 10224 | |
9ee3c97b AD |
10225 | 2000-03-16 Akim Demaille <akim@epita.fr> |
10226 | ||
10227 | * src/output.c (output_rule_data): Output the documentation of | |
10228 | some of the tables. | |
10229 | (Copyright notice): Update. | |
10230 | Formatting changes. | |
10231 | ||
0de741ca AD |
10232 | 2000-03-16 Akim Demaille <akim@epita.fr> |
10233 | ||
10234 | * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to | |
10235 | remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough. | |
10236 | One `#if YYDEBUG' remains, since it uses variables which are | |
10237 | defined only if `YYDEBUG != 0'. | |
10238 | ||
bb10be54 AD |
10239 | 2000-03-16 Akim Demaille <akim@epita.fr> |
10240 | ||
10241 | * src/bison.s1 (yyparse): Reorganize the definitions of the stacks | |
10242 | and related variables so that the similarities are highlighted. | |
10243 | ||
b07b484a AD |
10244 | 2000-03-16 Akim Demaille <akim@epita.fr> |
10245 | ||
10246 | * src/bison.s1: Properly indent CPP directives. | |
10247 | ||
361f60b3 AD |
10248 | 2000-03-16 Akim Demaille <akim@epita.fr> |
10249 | ||
10250 | * src/bison.s1: Properly indent the `alloca' CPP section. | |
10251 | ||
8c44d3ec AD |
10252 | 2000-03-16 Akim Demaille <akim@epita.fr> |
10253 | ||
10254 | Do not hard code values of directories in `configure.in'. | |
10255 | Update the `configure' tool chain. | |
10256 | ||
10257 | * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by | |
10258 | src/makefile.am. | |
10259 | (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED. | |
10260 | (AC_OUTPUT): Add m4/Makefile. | |
10261 | Bump to bison 1.28a, 1.29 has never been released. | |
10262 | * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are | |
10263 | handled via src/Makefile.am. | |
10264 | (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS, | |
10265 | HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by | |
10266 | autoheader. | |
10267 | * Makefile.am (SUBDIRS): Add m4. | |
10268 | (ACLOCAL_AM_FLAGS): New variable. | |
10269 | (AUTOMAKE_OPTIONS): Add check-news. | |
10270 | * src/Makefile.am (bison.simple): Use awk to replace #line lines with | |
10271 | the proper line number and file name. | |
10272 | (DEFS): Propagate the location of bison library files and of the | |
10273 | locale files. | |
10274 | (INCLUDES): Added `-I ..' so that one can compile with srcdir != | |
10275 | builddir. | |
10276 | * acinclude.m4: Remove, replaced by the directory m4. | |
10277 | * m4/Makefile.am (EXTRA_DIST): New variable. | |
10278 | * m4/gettext.m4: New file, from the fileutils. | |
10279 | * m4/lcmessage.m4: Likewise | |
10280 | * m4/progtest.m4: Likewise. | |
10281 | * m4/bison-decl.m4: New file, extracted from former acinclude.m4. | |
10282 | ||
f95997e7 AD |
10283 | 2000-03-10 Akim Demaille <akim@epita.fr> |
10284 | ||
10285 | * src/closure.c: | |
10286 | Formatting changes of various comments. | |
10287 | Respect the GNU coding standards at various places. | |
10288 | Don't use `_()' when no translation is needed. | |
10289 | ||
10290 | 1999-12-13 Jesse Thilo <jthilo@gnu.org> | |
10291 | ||
10292 | * src/files.c: | |
10293 | OS/2 honors TMPDIR environment variable. | |
10294 | ||
10295 | 1999-12-13 Jesse Thilo <jthilo@gnu.org> | |
10296 | ||
10297 | * doc/bison.texinfo: Tweaked spelling and grammar. | |
10298 | Updated ISBN. | |
10299 | Removed reference to price of printed copy. | |
10300 | Mention BISON_SIMPLE and BISON_HAIRY. | |
10301 | ||
10302 | 1999-12-13 Jesse Thilo <jthilo@gnu.org> | |
10303 | ||
10304 | * configure.in, NEWS: | |
10305 | Bison 1.29 released. | |
10306 | ||
10307 | 1999-10-27 Jesse Thilo <jthilo@gnu.org> | |
10308 | ||
10309 | * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex: | |
10310 | Added reference card. | |
10311 | ||
10312 | 1999-07-26 Jesse Thilo <jthilo@gnu.org> | |
10313 | ||
10314 | * po/ru.po: Added Russian translation. | |
10315 | ||
10316 | 1999-07-26 Jesse Thilo <jthilo@gnu.org> | |
10317 | ||
10318 | * configure.in: Added Russian translation. | |
10319 | ||
10320 | 1999-07-06 Jesse Thilo <jthilo@gnu.org> | |
10321 | ||
10322 | * configure.in, NEWS, README: | |
10323 | Released version 1.28. | |
10324 | ||
10325 | 1999-06-14 Jesse Thilo <jthilo@gnu.org> | |
10326 | ||
10327 | * src/system.h: | |
10328 | Squashed redefinition warning on some systems. | |
10329 | ||
10330 | * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c: | |
10331 | Have configure build version string instead of relying on ANSI string | |
10332 | concatentation. | |
10333 | ||
10334 | 1999-06-14 Jesse Thilo <jthilo@gnu.org> | |
10335 | ||
10336 | * po/POTFILES.in: Got rid of version.c. | |
10337 | ||
10338 | 1999-06-14 Jesse Thilo <jthilo@gnu.org> | |
10339 | ||
10340 | * acconfig.h, configure.in: | |
10341 | Have configure build version string instead of relying on ANSI string | |
10342 | concatentation. | |
10343 | ||
10344 | 1999-06-08 Jesse Thilo <jthilo@gnu.org> | |
10345 | ||
10346 | * doc/bison.1: | |
10347 | Dropped mention of `+' for long-named options. | |
10348 | ||
10349 | 1999-05-30 Jesse Thilo <jthilo@gnu.org> | |
10350 | ||
10351 | * src/files.c: Added <unistd.h> for unlink(). | |
10352 | ||
10353 | * src/Makefile.am, src/system.h: | |
10354 | I18n fixes. | |
10355 | ||
10356 | 1999-05-30 Jesse Thilo <jthilo@gnu.org> | |
10357 | ||
10358 | * README: Added a FAQ list. | |
10359 | ||
10360 | * configure.in, acconfig.h: | |
10361 | I18n fixes. | |
10362 | ||
10363 | 1999-05-30 Jesse Thilo <jthilo@gnu.org> | |
10364 | ||
10365 | * doc/FAQ, doc/Makefile.am: | |
10366 | Added a FAQ list. | |
10367 | ||
10368 | 1999-05-19 Jesse Thilo <jthilo@gnu.org> | |
10369 | ||
10370 | * src/alloc.h, src/symtab.h, src/version.c: | |
10371 | Protected inclusion of "config.h" with HAVE_CONFIG_H. | |
10372 | ||
10373 | 1999-04-18 Jesse Thilo <jthilo@gnu.org> | |
10374 | ||
10375 | * src/.cvsignore, src/Makefile.am: | |
10376 | Reorganized: sources in `src', documentation in `doc'. | |
10377 | ||
10378 | * src/lex.c (literalchar): | |
10379 | fixed the code for escaping double quotes (thanks | |
10380 | Jonathan Czisny.) | |
10381 | ||
10382 | 1999-04-18 Jesse Thilo <jthilo@gnu.org> | |
10383 | ||
10384 | * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in: | |
10385 | Adjusted paths to reflect directory reorganization. | |
10386 | ||
10387 | 1999-04-18 Jesse Thilo <jthilo@gnu.org> | |
10388 | ||
10389 | * doc/.cvsignore, doc/Makefile.am: | |
10390 | Reorganized: sources in `src', documentation in `doc'. | |
10391 | ||
10392 | 1999-04-18 Jesse Thilo <jthilo@gnu.org> | |
10393 | ||
10394 | * configure.in: | |
10395 | Updated AC_INIT file to reflect directory reorganization. | |
10396 | ||
10397 | * configure.in, .cvsignore, Makefile.am, POTFILES.in: | |
10398 | Reorganized: sources in `src', documentation in `doc'. | |
10399 | ||
10400 | 1999-04-13 Jesse Thilo <jthilo@gnu.org> | |
10401 | ||
10402 | * src/allocate.c: | |
10403 | Don't declare calloc() and realloc() if not necessary. | |
10404 | ||
10405 | 1999-04-13 Jesse Thilo <jthilo@gnu.org> | |
10406 | ||
10407 | * configure.in, acconfig.h, acinclude.m4: | |
10408 | Don't declare calloc() and realloc() if not necessary. | |
10409 | ||
10410 | 1999-03-23 Jesse Thilo <jthilo@gnu.org> | |
10411 | ||
10412 | * po/.cvsignore: Added i18n support. | |
10413 | ||
10414 | 1999-03-23 Jesse Thilo <jthilo@gnu.org> | |
10415 | ||
10416 | * acconfig.h, configure.in, Makefile.am: | |
10417 | Added i18n support. | |
10418 | ||
10419 | 1999-03-22 Jesse Thilo <jthilo@gnu.org> | |
10420 | ||
10421 | * src/bison.s1: Fixed #line numbers. | |
10422 | ||
10423 | 1999-03-15 Jesse Thilo <jthilo@gnu.org> | |
10424 | ||
10425 | * po/es.po, po/fr.po, po/nl.po, po/de.po: | |
10426 | Added PO files from Translation Project. | |
10427 | ||
10428 | 1999-03-03 Jesse Thilo <jthilo@gnu.org> | |
10429 | ||
10430 | * Makefile.am: | |
10431 | Added support for non-ANSI compilers (ansi2knr). | |
10432 | ||
10433 | 1999-02-16 Jesse Thilo <jthilo@gnu.org> | |
10434 | ||
10435 | * configure.in: Bumped version number to 1.27. | |
10436 | ||
10437 | * Makefile.am: | |
10438 | Added `bison.simple' to list of files removed by `make distclean'. | |
10439 | ||
10440 | 1999-02-12 Jesse Thilo <jthilo@gnu.org> | |
10441 | ||
10442 | * src/files.c, src/files.h: | |
10443 | Defined locations of parser files in config.h instead of Makefile. | |
10444 | ||
10445 | 1999-02-12 Jesse Thilo <jthilo@gnu.org> | |
10446 | ||
10447 | * acconfig.h, acinclude.m4, configure.in, Makefile.am: | |
10448 | Defined locations of parser files in config.h instead of Makefile. | |
10449 | ||
10450 | 1999-02-09 Jesse Thilo <jthilo@gnu.org> | |
10451 | ||
10452 | * Makefile.am: | |
10453 | Removed inappropriate use of $< macro. | |
10454 | ||
10455 | 1999-02-05 Jesse Thilo <jthilo@gnu.org> | |
10456 | ||
10457 | * po/Makefile.in.in, po/POTFILES.in: | |
10458 | Add `po' directory skeleton. | |
10459 | ||
10460 | 1999-01-27 Jesse Thilo <jthilo@gnu.org> | |
10461 | ||
10462 | * README: Document help-bison list. | |
10463 | ||
10464 | * configure.in: Add check for mkstemp(). | |
10465 | ||
10466 | 1999-01-20 Jesse Thilo <jthilo@gnu.org> | |
10467 | ||
10468 | * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c: | |
10469 | Hush a few compiler warnings. | |
10470 | ||
10471 | * src/files.c: | |
10472 | Add tryclose(), which verifies that fclose was successful. | |
10473 | Hush a couple of compiler warnings. | |
10474 | ||
10475 | 1999-01-20 Jesse Thilo <jthilo@gnu.org> | |
10476 | ||
10477 | * Makefile.am, OChangeLog: | |
10478 | ChangeLog is now automatically generated. Include the old version as | |
10479 | OChangeLog. | |
10480 | ||
10481 | 1999-01-14 Jesse Thilo <jthilo@gnu.org> | |
10482 | ||
10483 | * src/gram.h, src/lalr.c, src/lex.c, src/lex.h, src/machine.h, src/main.c, src/nullable.c, src/output.c, src/print.c, src/reader.c, src/reduce.c, src/state.h, src/symtab.c, src/symtab.h, src/types.h, src/vmsgetargs.c, src/warshall.c, src/allocate.c, src/alloc.h, src/bison.s1, src/closure.c, src/conflicts.c, src/derives.c, src/files.c, src/files.h, src/getargs.c, src/gram.c, src/LR0.c: | |
10484 | Update FSF address. | |
10485 | ||
10486 | 1999-01-14 Jesse Thilo <jthilo@gnu.org> | |
10487 | ||
10488 | * doc/bison.texinfo: Fix formatting glitch. | |
10489 | ||
10490 | * doc/bison.texinfo: Update FSF address. | |
10491 | ||
10492 | 1999-01-14 Jesse Thilo <jthilo@gnu.org> | |
10493 | ||
10494 | * acconfig.h: Update FSF address. | |
10495 | ||
10496 | 1999-01-08 Jesse Thilo <jthilo@gnu.org> | |
10497 | ||
10498 | * src/system.h: | |
10499 | Don't define PACKAGE here, since config.h defines it. | |
10500 | ||
10501 | 1998-12-30 Jesse Thilo <jthilo@gnu.org> | |
10502 | ||
10503 | * src/reader.c: Update copyright date. | |
10504 | ||
10505 | * src/main.c: | |
10506 | Ditch sprintf to statically-sized buffers in fatal/warn functions in | |
10507 | favor of output directly to stderr (avoids buffer overruns). | |
10508 | ||
10509 | * src/reader.c: Some checks for premature EOF. | |
10510 | ||
10511 | * src/allocate.c, src/alloc.h, src/closure.c, src/conflicts.c, src/derives.c, src/getargs.c, src/gram.c, src/lalr.c, src/lex.c, src/LR0.c, src/main.c, src/nullable.c, src/output.c, src/print.c, src/reduce.c, src/symtab.c, src/symtab.h, src/warshall.c: | |
10512 | Use prototypes if the compiler understands them. | |
10513 | ||
10514 | * src/files.c: Honor TMPDIR on Unix hosts. | |
10515 | Use prototypes if the compiler understands them. | |
10516 | ||
10517 | * src/reader.c: | |
10518 | Fix a couple of buffer overrun bugs. | |
10519 | Use prototypes if the compiler understands them. | |
10520 | ||
10521 | * src/system.h: Include unistd.h and ctype.h. | |
10522 | Use #ifdef instead of #if for NLS symbols. | |
10523 | ||
10524 | 1998-12-30 Jesse Thilo <jthilo@gnu.org> | |
10525 | ||
10526 | * doc/bison.texinfo: | |
10527 | Delete comment "consider using @set for edition number, etc..." since | |
10528 | we now are doing so. | |
10529 | ||
10530 | 1998-12-30 Jesse Thilo <jthilo@gnu.org> | |
10531 | ||
10532 | * configure.in: | |
10533 | Use prototypes if the compiler understands them. | |
10534 | ||
10535 | * NEWS: Document 1.26 highlights. | |
10536 | ||
10537 | * Makefile.am: Require Automake 1.3 or later. | |
10538 | ||
10539 | * acconfig.h: | |
10540 | Use prototypes if the compiler understands them. | |
10541 | ||
10542 | 1998-12-29 Jesse Thilo <jthilo@gnu.org> | |
10543 | ||
10544 | * src/version.c: | |
10545 | Use VERSION symbol from automake for version number. | |
10546 | ||
10547 | 1998-12-29 Jesse Thilo <jthilo@gnu.org> | |
10548 | ||
10549 | * acconfig.h, configure.in, version.cin: | |
10550 | Use VERSION symbol from automake for version number. | |
10551 | ||
10552 | 1998-11-28 Jesse Thilo <jthilo@gnu.org> | |
10553 | ||
10554 | * Makefile.am: | |
10555 | Distribute original version of simple parser (bison.s1), not built | |
10556 | version (bison.simple). | |
10557 | ||
10558 | 1998-11-28 Jesse Thilo <jthilo@gnu.org> | |
10559 | ||
10560 | * doc/bison.texinfo: Add info dir entry. | |
10561 | ||
10562 | * doc/bison.texinfo: | |
10563 | Let automake put version number into documentation. | |
10564 | ||
10565 | 1998-11-26 Jesse Thilo <jthilo@gnu.org> | |
10566 | ||
10567 | * src/bison.cld, src/build.com, src/vmshlp.mar: | |
10568 | Add non-RCS files from /gd/gnu/bison. | |
10569 | ||
10570 | 1998-11-26 Jesse Thilo <jthilo@gnu.org> | |
10571 | ||
10572 | * doc/bison.1: | |
10573 | Document the BISON_HAIRY and BISON_SIMPLE variables. | |
10574 | ||
10575 | 1998-11-25 Jesse Thilo <jthilo@gnu.org> | |
10576 | ||
10577 | * src/version.c: Build version.c automatically. | |
10578 | ||
10579 | * src/reader.c: | |
10580 | Fix token numbering (used to start at 258, not 257). | |
10581 | ||
10582 | * src/system.h: Include config.h. | |
10583 | ||
10584 | * src/getargs.c: Update bug report address. | |
10585 | ||
10586 | * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h: | |
10587 | Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org. | |
10588 | ||
10589 | 1998-11-25 Jesse Thilo <jthilo@gnu.org> | |
10590 | ||
10591 | * Makefile.am: | |
10592 | Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1). | |
10593 | ||
10594 | * configure.in, version.cin: | |
10595 | Build version.c automatically. | |
10596 | ||
10597 | * AUTHORS: Add AUTHORS file. | |
10598 | ||
10599 | * README: Update bug report address. | |
10600 | ||
10601 | * bison.simple: | |
10602 | Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1). | |
10603 | ||
10604 | * configure.in, Makefile.am, Makefile.in, stamp-h.in: | |
10605 | Add automake stuff. | |
10606 | ||
10607 | 1998-11-25 Jesse Thilo <jthilo@gnu.org> | |
10608 | ||
10609 | * doc/bison.texinfo: Clean up some formatting. | |
10610 | ||
10611 | 1998-05-05 Richard Stallman <rms@gnu.org> | |
10612 | ||
10613 | * doc/bison.texinfo: | |
10614 | Explain better why to make a pure parser. | |
10615 | ||
10616 | 1998-01-05 Richard Stallman <rms@gnu.org> | |
10617 | ||
10618 | * src/files.c (openfiles): | |
10619 | [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to | |
10620 | find a temporary directory, if possible. Do not unlink files while | |
10621 | they are open. | |
10622 | ||
10623 | 1997-08-25 Richard Stallman <rms@gnu.org> | |
10624 | ||
10625 | * src/reader.c (stack_offset;): | |
10626 | Change some warni to warns. | |
10627 | ||
10628 | * src/lex.c (literalchar): Use warns, not warni. | |
10629 | ||
10630 | 1997-06-28 Richard Stallman <rms@gnu.org> | |
10631 | ||
10632 | * src/bison.s1: Add a Bison version comment. | |
10633 | ||
10634 | * src/main.c (fatal, warn, berror): | |
10635 | Use program_name. | |
10636 | ||
10637 | 1997-06-28 Richard Stallman <rms@gnu.org> | |
10638 | ||
10639 | * Makefile.in (bison_version): New variable. | |
10640 | (dist): Use that variable. | |
10641 | (bison.s1): Substitute the Bison version into bison.simple. | |
10642 | ||
10643 | * bison.simple: Add a Bison version comment. | |
10644 | ||
10645 | 1997-06-18 Richard Stallman <rms@gnu.org> | |
10646 | ||
10647 | * src/main.c (fatal, warn, berror): | |
10648 | Make error messages standard. | |
10649 | (toomany): Improve error message text. | |
10650 | ||
10651 | * src/LR0.c, src/closure.c, src/conflicts.c, src/derives.c, src/files.c, src/lalr.c, src/lex.c, src/nullable.c, src/output.c, src/print.c, src/reader.c, src/reduce.c, src/symtab.c: | |
10652 | new.h renamed to alloc.h. | |
10653 | ||
10654 | 1997-06-18 Richard Stallman <rms@gnu.org> | |
10655 | ||
10656 | * Makefile.in: new.h renamed to alloc.h. | |
10657 | ||
10658 | 1997-05-24 Richard Stallman <rms@gnu.org> | |
10659 | ||
10660 | * src/lex.c (literalchar): | |
10661 | Fix the code for escaping \, " and '. | |
10662 | ||
10663 | (lex): Avoid trouble when there are many chars | |
10664 | to discard in a char literal with just several chars in it. | |
10665 | ||
10666 | 1997-05-17 Richard Stallman <rms@gnu.org> | |
10667 | ||
10668 | * src/bison.s1: | |
10669 | Use malloc, if using alloca is troublesome. | |
10670 | (YYSTACK_USE_ALLOCA): New flag macro. | |
10671 | Define it for some systems and compilers. | |
10672 | (YYSTACK_ALLOC): New macro. | |
10673 | (yyparse): Use YYSTACK_ALLOC to allocate stack. | |
10674 | If it was malloc'd, free it. | |
10675 | ||
10676 | 1997-05-17 Richard Stallman <rms@gnu.org> | |
10677 | ||
10678 | * bison.simple: | |
10679 | Use malloc, if using alloca is troublesome. | |
10680 | (YYSTACK_USE_ALLOCA): New flag macro. | |
10681 | Define it for some systems and compilers. | |
10682 | (YYSTACK_ALLOC): New macro. | |
10683 | (yyparse): Use YYSTACK_ALLOC to allocate stack. | |
10684 | If it was malloc'd, free it. | |
10685 | ||
10686 | 1997-04-23 Richard Stallman <rms@gnu.org> | |
10687 | ||
10688 | * src/bison.s1: | |
10689 | (alloca) [__hpux]: Always define as __builtin_alloca. | |
10690 | ||
10691 | 1997-04-23 Richard Stallman <rms@gnu.org> | |
10692 | ||
10693 | * bison.simple: | |
10694 | (alloca) [__hpux]: Always define as __builtin_alloca. | |
10695 | ||
10696 | 1997-04-22 Richard Stallman <rms@gnu.org> | |
10697 | ||
10698 | * src/bison.s1: | |
10699 | [__hpux]: Include alloca.h (right for HPUX 10) | |
10700 | instead of declaring alloca (right for HPUX 9). | |
10701 | ||
10702 | * src/bison.s1 (__yy_memcpy): | |
10703 | Declare arg `count' as unsigned int. | |
10704 | (yyparse): Cast third arg to __yy_memcpy to unsigned int. | |
10705 | ||
10706 | 1997-04-22 Richard Stallman <rms@gnu.org> | |
10707 | ||
10708 | * bison.simple: | |
10709 | [__hpux]: Include alloca.h (right for HPUX 10) | |
10710 | instead of declaring alloca (right for HPUX 9). | |
10711 | ||
10712 | * bison.simple (__yy_memcpy): | |
10713 | Declare arg `count' as unsigned int. | |
10714 | (yyparse): Cast third arg to __yy_memcpy to unsigned int. | |
10715 | ||
10716 | 1997-01-03 Richard Stallman <rms@gnu.org> | |
10717 | ||
10718 | * src/allocate.c: [__STDC__ or _MSC_VER]: | |
10719 | Declare calloc and realloc to return void *. | |
10720 | ||
10721 | 1997-01-02 Richard Stallman <rms@gnu.org> | |
10722 | ||
10723 | * src/system.h: | |
10724 | [_MSC_VER]: Include stdlib.h and process.h. | |
10725 | [_MSC_VER] (getpid): Define as macro--translate it to _getpid. | |
10726 | ||
10727 | * src/main.c (main): Return FAILURE as a value. | |
10728 | (printable_version): Declare arg as int, not char. | |
10729 | ||
10730 | 1997-01-02 Richard Stallman <rms@gnu.org> | |
10731 | ||
10732 | * Makefile.in (dist): | |
10733 | Explicitly check for symlinks, and copy them. | |
10734 | ||
10735 | 1996-12-19 Richard Stallman <rms@gnu.org> | |
10736 | ||
10737 | * src/files.c: | |
10738 | [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined. | |
10739 | ||
10740 | 1996-12-18 Paul Eggert <eggert@gnu.org> | |
10741 | ||
10742 | * src/bison.s1 (yyparse): | |
10743 | If __GNUC__ and YYPARSE_PARAM are both defined, | |
10744 | declare yyparse to have a void * argument. | |
10745 | ||
10746 | 1996-12-18 Paul Eggert <eggert@gnu.org> | |
10747 | ||
10748 | * bison.simple (yyparse): | |
10749 | If __GNUC__ and YYPARSE_PARAM are both defined, | |
10750 | declare yyparse to have a void * argument. | |
10751 | ||
10752 | 1996-12-17 Richard Stallman <rms@gnu.org> | |
10753 | ||
10754 | * src/reduce.c (nbits): Add some casts. | |
10755 | ||
10756 | 1996-08-12 Richard Stallman <rms@gnu.org> | |
10757 | ||
10758 | * src/bison.s1: Test _MSDOS as well as _MSDOS_. | |
10759 | ||
10760 | 1996-08-12 Richard Stallman <rms@gnu.org> | |
10761 | ||
10762 | * bison.simple: Test _MSDOS as well as _MSDOS_. | |
10763 | ||
10764 | 1996-07-31 Richard Stallman <rms@gnu.org> | |
10765 | ||
10766 | * src/bison.s1: | |
10767 | [__sun && __i386]: Include alloca.h. | |
10768 | ||
10769 | 1996-07-31 Richard Stallman <rms@gnu.org> | |
10770 | ||
10771 | * bison.simple: | |
10772 | [__sun && __i386]: Include alloca.h. | |
10773 | ||
10774 | 1996-07-30 Richard Stallman <rms@gnu.org> | |
10775 | ||
10776 | * src/bison.s1: Comment change. | |
10777 | ||
10778 | * src/bison.s1: Test _MSDOS_, not MSDOS. | |
10779 | ||
10780 | 1996-07-30 Richard Stallman <rms@gnu.org> | |
10781 | ||
10782 | * bison.simple: Comment change. | |
10783 | ||
10784 | * bison.simple: Test _MSDOS_, not MSDOS. | |
10785 | ||
10786 | 1996-06-01 Richard Stallman <rms@gnu.org> | |
10787 | ||
10788 | * src/reduce.c, src/reader.c, src/print.c, src/output.c, src/nullable.c, src/lex.c, src/lalr.c, src/getargs.c, src/derives.c, src/conflicts.c, src/closure.c, src/allocate.c: | |
10789 | Insert `_' macro around many string constants. | |
10790 | ||
10791 | * src/main.c: | |
10792 | Insert `_' macro around many string constants. | |
10793 | ||
10794 | (main): Call setlocale, bindtextdomain and textdomain. | |
10795 | ||
10796 | * src/system.h: [HAVE_LOCALE_H]: Include locale.h. | |
10797 | [! HAVE_LOCALE_H] (setlocale): Define as no-op. | |
10798 | [ENABLE_NLS]: Include libintl.h. | |
10799 | [ENABLE_NLS] (gettext): Define. | |
10800 | [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions. | |
10801 | (N_, PACKAGE, LOCALEDIR): New macros. | |
10802 | ||
10803 | 1996-06-01 Richard Stallman <rms@gnu.org> | |
10804 | ||
10805 | * POTFILES.in: New file. | |
10806 | ||
10807 | * Makefile.in (allocate.o): | |
10808 | Define target explicitly. | |
10809 | ||
10810 | * Makefile.in (CFLAGS): Set to @CFLAGS@. | |
10811 | (LDFLAGS): Set to @LDFLAGS@. | |
10812 | (configure): Run autoconf only if preceding `cd' succeeds. | |
10813 | (bison.s1): Redirect output to temporary file then move the | |
10814 | temporary to the target, rather than redirecting directly to bison.s1. | |
10815 | (clean): Remove config.status and config.log. | |
10816 | (distclean): Don't remove config.status here. | |
10817 | ||
10818 | 1996-05-12 Richard Stallman <rms@gnu.org> | |
10819 | ||
10820 | * src/bison.s1: | |
10821 | (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t. | |
10822 | ||
10823 | 1996-05-12 Richard Stallman <rms@gnu.org> | |
10824 | ||
10825 | * bison.simple: | |
10826 | (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t. | |
10827 | ||
10828 | 1996-05-11 Richard Stallman <rms@gnu.org> | |
10829 | ||
10830 | * src/bison.s1 (__yy_memcpy): | |
10831 | Really reorder the args, as was supposedly done on Feb 14 1995. | |
10832 | (yyparse): Calls changed accordingly. | |
10833 | ||
10834 | 1996-05-11 Richard Stallman <rms@gnu.org> | |
10835 | ||
10836 | * Makefile.in (dist): Don't use $(srcdir). | |
10837 | ||
10838 | * bison.simple (__yy_memcpy): | |
10839 | Really reorder the args, as was supposedly done on Feb 14 1995. | |
10840 | (yyparse): Calls changed accordingly. | |
10841 | ||
10842 | 1996-01-27 Richard Stallman <rms@gnu.org> | |
10843 | ||
10844 | * src/output.c (output_rule_data): | |
10845 | Test YYERROR_VERBOSE in the conditional | |
10846 | around the definition of ttyname. | |
10847 | ||
10848 | 1995-12-29 Richard Stallman <rms@gnu.org> | |
10849 | ||
10850 | * src/bison.s1: | |
10851 | Fix line numbers in #line commands. | |
10852 | ||
10853 | 1995-12-29 Richard Stallman <rms@gnu.org> | |
10854 | ||
10855 | * bison.simple: | |
10856 | Fix line numbers in #line commands. | |
10857 | ||
10858 | 1995-12-27 Richard Stallman <rms@gnu.org> | |
10859 | ||
10860 | * src/bison.s1 (YYPARSE_PARAM_DECL): | |
10861 | In C++, make it always null. | |
10862 | (YYPARSE_PARAM_ARG): New macro. | |
10863 | (yyparse): Use YYPARSE_PARAM_ARG. | |
10864 | ||
10865 | 1995-12-27 Richard Stallman <rms@gnu.org> | |
10866 | ||
10867 | * bison.simple (YYPARSE_PARAM_DECL): | |
10868 | In C++, make it always null. | |
10869 | (YYPARSE_PARAM_ARG): New macro. | |
10870 | (yyparse): Use YYPARSE_PARAM_ARG. | |
10871 | ||
10872 | 1995-11-29 Richard Stallman <rms@gnu.org> | |
10873 | ||
10874 | * doc/bison.texinfo: | |
10875 | Describe literal string tokens, %raw, %no_lines, %token_table. | |
10876 | ||
10877 | 1995-11-29 Daniel Hagerty <hag@gnu.org> | |
10878 | ||
10879 | * doc/bison.texinfo: Fixed update date | |
10880 | ||
10881 | 1995-10-16 Richard Stallman <rms@gnu.org> | |
10882 | ||
10883 | * src/version.c: Version 1.25. | |
10884 | ||
10885 | 1995-10-16 Richard Stallman <rms@gnu.org> | |
10886 | ||
10887 | * NEWS: *** empty log message *** | |
10888 | ||
10889 | 1995-10-16 Richard Stallman <rms@gnu.org> | |
10890 | ||
10891 | * doc/bison.1, doc/bison.rnh: | |
10892 | Add new options. | |
10893 | ||
10894 | 1995-10-15 Richard Stallman <rms@gnu.org> | |
10895 | ||
10896 | * src/vmsgetargs.c, src/getargs.c: | |
10897 | Added -n, -k, and -raw switches. | |
10898 | (noparserflag, toknumflag, rawtoknumflag): New variables. | |
10899 | ||
10900 | * src/symtab.h (SALIAS): | |
10901 | New #define for adding aliases to %token. | |
10902 | (struct bucket): Added `alias' field. | |
10903 | ||
10904 | * src/reduce.c (reduce_grammar): | |
10905 | Revise error message. | |
10906 | (print_notices): Remove final `.' from error message. | |
10907 | ||
10908 | * src/reader.c (reader_output_yylsp): | |
10909 | New function. | |
10910 | (readgram): Use `#if 0' around code that accepted %command | |
10911 | inside grammar rules: The documentation doesn't allow it, | |
10912 | and it will fail since the %command processors scan for the next %. | |
10913 | (parse_token_decl): Extended the %token | |
10914 | declaration to allow a multi-character symbol as an alias. | |
10915 | (parse_thong_decl): New function. | |
10916 | (read_declarations): Added %thong declarations. | |
10917 | (read_declarations): Handle NOOP to deal with allowing | |
10918 | % declarations as another means to specify the flags. | |
10919 | (readgram): Allow %prec prior to semantics embedded in a rule. | |
10920 | (skip_to_char, read_declarations, copy_definition) | |
10921 | (parse_token_decl, parse_start_decl, parse_type_decl) | |
10922 | (parse_assoc_decl, parse_union_decl, parse_expect_decl) | |
10923 | (get_type_name, copy_guard, copy_action, readgram) | |
10924 | (get_type, packsymbols): Revised most error messages. | |
10925 | Changed `fatal' to `warnxxx' to avoid aborting for error. | |
10926 | Revised and use multiple warnxxx functions to avoid using VARARGS1. | |
10927 | (read_declarations): Improve the error message for | |
10928 | an invalid character. Do not abort. | |
10929 | (read_declarations, copy_guard, copy_action): Use | |
10930 | printable_version to avoid unprintable characters in printed output. | |
10931 | (parse_expect_decl): Error if argument to %expect exceeds 10 digits. | |
10932 | (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type): | |
10933 | Allow the type of a non-terminal can be given | |
10934 | more than once, as long as all specifications give the same type. | |
10935 | ||
10936 | * src/output.c: | |
10937 | (output_headers, output_trailers, output, output_gram) | |
10938 | (output_rule_data): Implement noparserflag variable. | |
10939 | Implement toknumflag variable. | |
10940 | (output): Call reader_output_yylsp to output LTYPESTR. | |
10941 | ||
10942 | * src/main.c (main): | |
10943 | If reader sees an error, don't process the grammar. | |
10944 | (fatals): Updated to not use VARARGS1. | |
10945 | (printable_version, int_to_string, warn, warni, warns, warnss) | |
10946 | (warnsss): New error reporting functions. Avoid abort for error. | |
10947 | ||
10948 | * src/lex.h: | |
10949 | Added THONG and NOOP for alias processing. | |
10950 | Added SETOPT for the new code that allows setting options with %flags. | |
10951 | ||
10952 | * src/lex.c: | |
10953 | Include getopt.h. Add some extern decls. | |
10954 | (safegetc): New function to deal with EOF gracefully. | |
10955 | (literalchar); new function to deal with reading \ escapes. | |
10956 | (lex): Use literalchar. | |
10957 | (lex): Implemented "..." tokens. | |
10958 | (literalchar, lex, parse_percent_token): Made tokenbuffer | |
10959 | always contain the token. This includes growing the token | |
10960 | buffer while reading an integer. | |
10961 | (parse_percent_token): Replaced if-else statement with percent_table. | |
10962 | (parse_percent_token): Added % declarations as another | |
10963 | way to specify the flags -n, -l, and -r. Also added hooks for | |
10964 | -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires | |
10965 | major changes to files.c. | |
10966 | (lex) Retain in the incoming stream a character following | |
10967 | an incorrect '/'. | |
10968 | (skip_white_space, lex): Revised most error messages | |
10969 | and changed fatal to warn to avoid aborting. | |
10970 | (percent_table): Added %thong declarations. | |
10971 | ||
10972 | * src/gram.h: Comment changes. | |
10973 | ||
10974 | * src/files.c (openfiles, open_extra_files, done): | |
10975 | Add faction flag | |
10976 | and actfile file. Handle noparserflag. Both for -n switch. | |
10977 | ||
10978 | * src/conflicts.c (resolve_sr_conflict): | |
10979 | Remove use of alloca. | |
10980 | ||
10981 | 1995-06-01 Jim Meyering <meyering@gnu.org> | |
10982 | ||
10983 | * doc/bison.texinfo: *** empty log message *** | |
10984 | ||
10985 | 1995-05-06 Richard Stallman <rms@gnu.org> | |
10986 | ||
10987 | * src/bison.s1: Comment change. | |
10988 | ||
10989 | 1995-05-06 Richard Stallman <rms@gnu.org> | |
10990 | ||
10991 | * bison.simple: Comment change. | |
10992 | ||
10993 | 1995-05-03 Richard Stallman <rms@gnu.org> | |
10994 | ||
10995 | * src/version.c: Version now 1.24. | |
10996 | ||
10997 | * src/bison.s1: Change distribution terms. | |
10998 | ||
10999 | * src/version.c: Version now 1.23. | |
11000 | ||
11001 | 1995-05-03 Richard Stallman <rms@gnu.org> | |
11002 | ||
11003 | * doc/bison.texinfo: | |
11004 | Rewrite "Conditions for Using Bison". | |
11005 | Update version to 1.24. | |
11006 | ||
11007 | 1995-05-03 Richard Stallman <rms@gnu.org> | |
11008 | ||
11009 | * bison.simple: Change distribution terms. | |
11010 | ||
11011 | 1995-02-23 Richard Stallman <rms@gnu.org> | |
11012 | ||
11013 | * src/files.c: Test __VMS_POSIX as well as VMS. | |
11014 | ||
11015 | 1995-02-14 Jim Meyering <meyering@gnu.org> | |
11016 | ||
11017 | * src/bison.s1 (__yy_memcpy): | |
11018 | Renamed from __yy_bcopy to avoid | |
11019 | confusion. Reverse FROM and TO arguments to be consistent with | |
11020 | those of memcpy. | |
11021 | ||
11022 | 1995-02-14 Jim Meyering <meyering@gnu.org> | |
11023 | ||
11024 | * bison.simple (__yy_memcpy): | |
11025 | Renamed from __yy_bcopy to avoid | |
11026 | confusion. Reverse FROM and TO arguments to be consistent with | |
11027 | those of memcpy. | |
11028 | ||
11029 | 1994-11-10 David J. MacKenzie <djm@gnu.org> | |
11030 | ||
11031 | * NEWS: reformat | |
11032 | ||
11033 | * NEWS: New file. | |
11034 | ||
11035 | * Makefile.in (DISTFILES): Include NEWS. | |
11036 | ||
11037 | * Makefile.in (DISTFILES): | |
11038 | Include install-sh, not install.sh. | |
11039 | ||
11040 | * configure.in: Update to Autoconf v2 macro names. | |
11041 | ||
11042 | 1994-10-05 David J. MacKenzie <djm@gnu.org> | |
11043 | ||
11044 | * Makefile.in: fix typo | |
11045 | ||
11046 | * Makefile.in (prefix, exec_prefix): | |
11047 | Let configure set them. | |
11048 | ||
11049 | 1994-09-28 David J. MacKenzie <djm@gnu.org> | |
11050 | ||
11051 | * Makefile.in: Set datadir to $(prefix)/share. | |
11052 | ||
11053 | 1994-09-15 Richard Stallman <rms@gnu.org> | |
11054 | ||
11055 | * src/bison.s1: | |
11056 | Update copyright notice and GPL version. | |
11057 | ||
11058 | 1994-09-15 Richard Stallman <rms@gnu.org> | |
11059 | ||
11060 | * bison.simple: | |
11061 | Update copyright notice and GPL version. | |
11062 | ||
11063 | 1994-07-12 Richard Stallman <rms@gnu.org> | |
11064 | ||
11065 | * src/reduce.c, src/reader.c: | |
11066 | entered into RCS | |
11067 | ||
11068 | 1994-05-05 David J. MacKenzie <djm@gnu.org> | |
11069 | ||
11070 | * Makefile.in: entered into RCS | |
11071 | ||
11072 | 1994-03-26 Richard Stallman <rms@gnu.org> | |
11073 | ||
11074 | * src/bison.s1: entered into RCS | |
11075 | ||
11076 | 1994-03-26 Richard Stallman <rms@gnu.org> | |
11077 | ||
11078 | * bison.simple: entered into RCS | |
11079 | ||
11080 | 1994-03-25 Richard Stallman <rms@gnu.org> | |
11081 | ||
11082 | * src/main.c: entered into RCS | |
11083 | ||
11084 | 1994-03-24 Richard Stallman <rms@gnu.org> | |
11085 | ||
11086 | * src/conflicts.c: entered into RCS | |
11087 | ||
11088 | 1994-01-02 Richard Stallman <rms@gnu.org> | |
11089 | ||
11090 | * Makefile.in: *** empty log message *** | |
11091 | ||
11092 | 1993-11-21 Richard Stallman <rms@gnu.org> | |
11093 | ||
11094 | * src/bison.s1: *** empty log message *** | |
11095 | ||
11096 | 1993-11-21 Richard Stallman <rms@gnu.org> | |
11097 | ||
11098 | * doc/bison.texinfo: entered into RCS | |
11099 | ||
11100 | * doc/bison.texinfo: *** empty log message *** | |
11101 | ||
11102 | 1993-11-21 Richard Stallman <rms@gnu.org> | |
11103 | ||
11104 | * bison.simple: *** empty log message *** | |
11105 | ||
11106 | 1993-10-25 David J. MacKenzie <djm@gnu.org> | |
11107 | ||
11108 | * doc/bison.texinfo: *** empty log message *** | |
11109 | ||
11110 | 1993-10-19 Richard Stallman <rms@gnu.org> | |
11111 | ||
11112 | * src/bison.s1: *** empty log message *** | |
11113 | ||
11114 | 1993-10-19 Richard Stallman <rms@gnu.org> | |
11115 | ||
11116 | * bison.simple: *** empty log message *** | |
11117 | ||
11118 | 1993-10-14 Richard Stallman <rms@gnu.org> | |
11119 | ||
11120 | * src/bison.s1: *** empty log message *** | |
11121 | ||
11122 | 1993-10-14 Richard Stallman <rms@gnu.org> | |
11123 | ||
11124 | * bison.simple: *** empty log message *** | |
11125 | ||
11126 | 1993-09-14 David J. MacKenzie <djm@gnu.org> | |
11127 | ||
11128 | * doc/bison.texinfo: *** empty log message *** | |
11129 | ||
11130 | 1993-09-13 Noah Friedman <friedman@gnu.org> | |
11131 | ||
11132 | * Makefile.in: *** empty log message *** | |
11133 | ||
11134 | 1993-09-10 Richard Stallman <rms@gnu.org> | |
11135 | ||
11136 | * src/conflicts.c: *** empty log message *** | |
11137 | ||
11138 | * src/system.h: entered into RCS | |
11139 | ||
11140 | 1993-09-10 Richard Stallman <rms@gnu.org> | |
11141 | ||
11142 | * doc/bison.1: entered into RCS | |
11143 | ||
11144 | 1993-09-06 Noah Friedman <friedman@gnu.org> | |
11145 | ||
11146 | * src/version.c: entered into RCS | |
11147 | ||
11148 | 1993-09-06 Noah Friedman <friedman@gnu.org> | |
11149 | ||
11150 | * Makefile.in: *** empty log message *** | |
11151 | ||
11152 | 1993-07-30 David J. MacKenzie <djm@gnu.org> | |
11153 | ||
11154 | * Makefile.in: *** empty log message *** | |
11155 | ||
11156 | 1993-07-24 Richard Stallman <rms@gnu.org> | |
11157 | ||
11158 | * src/bison.s1: *** empty log message *** | |
11159 | ||
11160 | 1993-07-24 Richard Stallman <rms@gnu.org> | |
11161 | ||
11162 | * bison.simple: *** empty log message *** | |
11163 | ||
11164 | 1993-07-08 David J. MacKenzie <djm@gnu.org> | |
11165 | ||
11166 | * Makefile.in: *** empty log message *** | |
11167 | ||
11168 | 1993-07-04 Richard Stallman <rms@gnu.org> | |
11169 | ||
11170 | * src/bison.s1: *** empty log message *** | |
11171 | ||
11172 | 1993-07-04 Richard Stallman <rms@gnu.org> | |
11173 | ||
11174 | * bison.simple: *** empty log message *** | |
11175 | ||
11176 | 1993-06-26 David J. MacKenzie <djm@gnu.org> | |
11177 | ||
11178 | * src/getargs.c: entered into RCS | |
11179 | ||
11180 | 1993-06-26 David J. MacKenzie <djm@gnu.org> | |
11181 | ||
11182 | * doc/bison.texinfo: *** empty log message *** | |
11183 | ||
11184 | * doc/bison.1: New file. | |
11185 | ||
11186 | 1993-06-25 Richard Stallman <rms@gnu.org> | |
11187 | ||
11188 | * src/getargs.c: New file. | |
11189 | ||
11190 | 1993-06-16 Richard Stallman <rms@gnu.org> | |
11191 | ||
11192 | * src/bison.s1: *** empty log message *** | |
11193 | ||
11194 | 1993-06-16 Richard Stallman <rms@gnu.org> | |
11195 | ||
11196 | * bison.simple: *** empty log message *** | |
11197 | ||
11198 | 1993-06-03 Richard Stallman <rms@gnu.org> | |
11199 | ||
11200 | * src/bison.s1: New file. | |
11201 | ||
11202 | 1993-06-03 Richard Stallman <rms@gnu.org> | |
11203 | ||
11204 | * doc/bison.texinfo: *** empty log message *** | |
11205 | ||
11206 | 1993-06-03 Richard Stallman <rms@gnu.org> | |
11207 | ||
11208 | * bison.simple: New file. | |
11209 | ||
11210 | 1993-05-19 Richard Stallman <rms@gnu.org> | |
11211 | ||
11212 | * doc/bison.texinfo: New file. | |
11213 | ||
11214 | 1993-05-07 Noah Friedman <friedman@gnu.org> | |
11215 | ||
11216 | * Makefile.in: *** empty log message *** | |
11217 | ||
11218 | 1993-04-28 Noah Friedman <friedman@gnu.org> | |
11219 | ||
11220 | * src/reader.c: *** empty log message *** | |
11221 | ||
11222 | 1993-04-23 Noah Friedman <friedman@gnu.org> | |
11223 | ||
11224 | * src/alloc.h: entered into RCS | |
11225 | ||
11226 | 1993-04-20 David J. MacKenzie <djm@gnu.org> | |
11227 | ||
11228 | * src/version.c: *** empty log message *** | |
11229 | ||
11230 | * src/files.c, src/allocate.c: | |
11231 | entered into RCS | |
11232 | ||
11233 | * src/reader.c: *** empty log message *** | |
11234 | ||
11235 | * src/lex.c: entered into RCS | |
11236 | ||
11237 | * src/conflicts.c: New file. | |
11238 | ||
11239 | * src/symtab.c: entered into RCS | |
11240 | ||
11241 | * src/alloc.h: New file. | |
11242 | ||
11243 | * src/LR0.c: entered into RCS | |
11244 | ||
11245 | 1993-04-18 Noah Friedman <friedman@gnu.org> | |
11246 | ||
11247 | * src/reader.c: New file. | |
11248 | ||
11249 | * src/version.c: *** empty log message *** | |
11250 | ||
11251 | 1993-04-18 Noah Friedman <friedman@gnu.org> | |
11252 | ||
11253 | * Makefile.in: *** empty log message *** | |
11254 | ||
11255 | 1993-04-17 Noah Friedman <friedman@gnu.org> | |
11256 | ||
11257 | * Makefile.in: *** empty log message *** | |
11258 | ||
11259 | 1993-04-15 Richard Stallman <rms@gnu.org> | |
11260 | ||
11261 | * src/main.c, src/files.c: | |
11262 | New file. | |
11263 | ||
11264 | 1993-04-15 Noah Friedman <friedman@gnu.org> | |
11265 | ||
11266 | * configure.in: entered into RCS | |
11267 | ||
11268 | * configure.in: *** empty log message *** | |
11269 | ||
11270 | * configure.in: New file. | |
11271 | ||
11272 | 1993-04-14 Richard Stallman <rms@gnu.org> | |
11273 | ||
11274 | * Makefile.in: New file. | |
11275 | ||
11276 | 1993-04-13 Richard Stallman <rms@gnu.org> | |
11277 | ||
11278 | * src/version.c: New file. | |
11279 | ||
11280 | 1993-03-25 Richard Stallman <rms@gnu.org> | |
11281 | ||
11282 | * src/output.c: entered into RCS | |
11283 | ||
11284 | 1992-09-25 Richard Stallman <rms@gnu.org> | |
11285 | ||
11286 | * configure.bat: entered into RCS | |
11287 | ||
11288 | 1992-06-22 Richard Stallman <rms@gnu.org> | |
11289 | ||
11290 | * src/vmsgetargs.c: entered into RCS | |
11291 | ||
11292 | 1992-06-22 Richard Stallman <rms@gnu.org> | |
11293 | ||
11294 | * doc/bison.rnh: entered into RCS | |
11295 | ||
11296 | 1992-04-20 David J. MacKenzie <djm@gnu.org> | |
11297 | ||
11298 | * README: entered into RCS | |
11299 | ||
11300 | 1992-01-22 Richard Stallman <rms@gnu.org> | |
11301 | ||
11302 | * src/machine.h: entered into RCS | |
11303 | ||
11304 | 1991-12-21 Richard Stallman <rms@gnu.org> | |
11305 | ||
11306 | * src/lalr.c, src/closure.c: | |
11307 | entered into RCS | |
11308 | ||
11309 | 1991-12-20 Richard Stallman <rms@gnu.org> | |
11310 | ||
11311 | * src/state.h: entered into RCS | |
11312 | ||
11313 | 1991-12-18 Richard Stallman <rms@gnu.org> | |
11314 | ||
11315 | * src/print.c, src/nullable.c, src/derives.c: | |
11316 | entered into RCS | |
11317 | ||
11318 | 1991-11-03 David J. MacKenzie <djm@gnu.org> | |
11319 | ||
11320 | * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h: | |
11321 | entered into RCS | |
11322 | ||
11323 | 1988-09-09 Richard Stallman <rms@gnu.org> | |
11324 | ||
11325 | * src/bison.hairy: entered into RCS | |
11326 | ||
11327 | 1987-12-16 Richard Stallman <rms@gnu.org> | |
11328 | ||
11329 | * REFERENCES: entered into RCS | |
dc546b0f | 11330 | |
f294a2c2 AD |
11331 | ----- |
11332 | ||
33167b8b | 11333 | Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996, 1997, |
dc546b0f | 11334 | 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. |
f294a2c2 | 11335 | |
33167b8b | 11336 | This file is part of Bison, the GNU Compiler Compiler. |
f294a2c2 | 11337 | |
33167b8b | 11338 | Bison is free software; you can redistribute it and/or modify |
f294a2c2 AD |
11339 | it under the terms of the GNU General Public License as published by |
11340 | the Free Software Foundation; either version 2, or (at your option) | |
11341 | any later version. | |
11342 | ||
33167b8b | 11343 | Bison is distributed in the hope that it will be useful, |
f294a2c2 AD |
11344 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
11345 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
11346 | GNU General Public License for more details. | |
11347 | ||
11348 | You should have received a copy of the GNU General Public License | |
33167b8b | 11349 | along with Bison; see the file COPYING. If not, write to |
f294a2c2 AD |
11350 | the Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
11351 | Boston, MA 02111-1307, USA. |