]>
Commit | Line | Data |
---|---|---|
be14ade5 AD |
1 | 2002-11-12 Albert Chin-A-Young <china@thewrittenword.com> |
2 | ||
3 | * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the | |
4 | duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq | |
5 | linker. | |
6 | ||
05291fbc AD |
7 | 2002-11-12 Akim Demaille <akim@epita.fr> |
8 | ||
9 | * Makefile.maint: Sync with Autoconf: | |
10 | (local_updates): New. | |
11 | ||
1f5fd52e AD |
12 | 2002-11-12 Akim Demaille <akim@epita.fr> |
13 | ||
14 | * po/POTFILES.in (src/lalr.c, src/state.c): Remove | |
15 | ||
283f1e64 AD |
16 | 2002-11-12 Akim Demaille <akim@epita.fr> |
17 | ||
18 | * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the | |
19 | locations. | |
20 | ||
886b69d1 AD |
21 | 2002-11-12 Akim Demaille <akim@epita.fr> |
22 | ||
23 | * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT, | |
24 | not yyvalue. | |
25 | ||
3df37415 AD |
26 | 2002-11-12 Akim Demaille <akim@epita.fr> |
27 | ||
28 | * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New. | |
29 | Use it to test the GLR parser. | |
30 | ||
7bd6c77e AD |
31 | 2002-11-12 Akim Demaille <akim@epita.fr> |
32 | ||
33 | * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton | |
34 | defines it. | |
35 | * data/glr.c (yystos): New. | |
36 | (b4_yysymprint_generate, b4_yydestruct_generate): Invoke. | |
37 | (YYDSYMPRINT): New. | |
38 | (yyval): Don't define it, it is handled via M4. | |
39 | (yyrecoverParseError): Free verbosely the discarded symbols. | |
40 | * data/yacc.c (yysymprint): Remove, rather... | |
41 | (b4_yysymprint_generate): invoke. | |
42 | * data/c.m4 (b4_yysymprint_generate): New. | |
43 | Accept pointers as arguments, as opposed to the version from | |
44 | yacc.c. | |
45 | (b4_yydestruct_generate): Likewise. | |
46 | * tests/cations.at (Printers and Destructors): Use Bison directives | |
47 | instead of CPP macros. | |
48 | Don't rely on internal details. | |
49 | ||
b0400cc6 AD |
50 | 2002-11-12 Akim Demaille <akim@epita.fr> |
51 | ||
52 | * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New. | |
53 | * data/yacc.c: Rename yychar1 as yytoken, as in glr.c. | |
54 | Don't work on yychar (i.e., do set it to YYEMPTY, don't match | |
55 | it against YYEMPTY and so forth), work on yytoken (i.e., set | |
56 | it to YYEMPTY etc.). | |
57 | (yydestruct): Replace with a b4_yydestruct_generate invocation. | |
58 | (b4_symbol_actions): Remove. | |
59 | * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands | |
60 | for 0, end-of-input. | |
61 | ||
72f889cc AD |
62 | 2002-11-12 Akim Demaille <akim@epita.fr> |
63 | ||
64 | * doc/bison.texinfo (Destructor Decl): New. | |
65 | ||
b1ae9233 AD |
66 | 2002-11-12 Akim Demaille <akim@epita.fr> |
67 | ||
68 | * src/tables.c (tables_generate): Use free for pointers that | |
69 | cannot be NULL, not XFREE. | |
70 | (pack_vector): Use assert, not fatal, for bound violations. | |
71 | * src/state.c (state_new): Likewise. | |
72 | * src/reader.c (reader): Likewise. | |
73 | * src/lalr.c (set_goto_map): Likewise. | |
72f889cc | 74 | * src/location.h (LOCATION_PRINT): If first_line is 0, just issue |
b1ae9233 AD |
75 | the file name. |
76 | ||
7ec2d4cd AD |
77 | 2002-11-12 Akim Demaille <akim@epita.fr> |
78 | ||
79 | * src/scan-gram.l, src/reader.h (scanner_last_string_free): | |
80 | Restore. | |
81 | * src/scan-gram.l (last_string): Is global to the file, not to | |
82 | yylex. | |
83 | * src/parse-gram.y (input): Don't append the epilogue here, | |
84 | (epilogue.opt): do it here, and free the scanner's obstack. | |
85 | * src/reader.c (epilogue_set): Rename as... | |
86 | (epilogue_augment): this. | |
87 | * data/c.m4 (b4_epilogue): Defaults to empty. | |
88 | ||
573a6cd3 AD |
89 | 2002-11-12 Akim Demaille <akim@epita.fr> |
90 | ||
91 | * src/getargs.c (long_options): Remove duplicates. | |
92 | * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar: | |
93 | Remove. | |
94 | * doc/bison.rnh: Remove. | |
95 | * doc/bison.texinfo (VMS Invocation): Remove. | |
96 | ||
95612cfa AD |
97 | 2002-11-12 Akim Demaille <akim@epita.fr> |
98 | ||
99 | * src/struniq.h, src/struniq.c (struniq_t): Is const. | |
100 | (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New. | |
101 | ||
102 | Use struniq for symbols. | |
103 | ||
104 | * src/symtab.h (symbol_t): The tag member is a struniq. | |
105 | (symbol_type_set): Adjust. | |
106 | * src/symtab.c (symbol_new): Takes a struniq. | |
107 | (symbol_free): Don't free the tag member. | |
108 | (hash_compare_symbol_t, hash_symbol_t): Rename as... | |
109 | (hash_compare_symbol, hash_symbol): these. | |
110 | Use the fact that tags as struniqs. | |
111 | (symbol_get): Use struniq_new. | |
112 | * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get): | |
113 | Returns a strniq. | |
114 | * src/reader.h (merger_list, grammar_currentmerge_set): The name | |
115 | and type members are struniqs. | |
116 | * src/reader.c (get_merge_function) | |
117 | (grammar_current_rule_merge_set): Adjust. | |
118 | (TYPE, current_type): Are struniq. | |
119 | ||
120 | Use struniq for file names. | |
121 | ||
122 | * src/files.h, src/files.c (infile): Split into... | |
123 | (grammar_file, current_file): these. | |
124 | * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust. | |
125 | * src/reduce.c (reduce_print): Likewise. | |
126 | * src/getargs.c (getargs): Likewise. | |
127 | * src/complain.h, src/complain.c: Likewise. | |
128 | * src/main.c (main): Call struniqs_new early enough to use it for | |
129 | file names. | |
130 | Don't free the input file name. | |
131 | ||
3e6656f9 AD |
132 | 2002-11-12 Akim Demaille <akim@epita.fr> |
133 | ||
134 | * src/symtab.c (symbol_free): Remove dead deactivated code: | |
135 | type_name are properly removed. | |
136 | Don't use XFREE to free items that cannot be NULL. | |
137 | * src/struniq.h, src/struniq.c: New. | |
138 | * src/main.c (main): Initialize/free struniqs. | |
139 | * src/parse-gram.y (%union): Add astruniq member. | |
140 | (yyprint): Adjust. | |
141 | * src/scan-gram.l (<{tag}>): Return a struniq. | |
142 | Free the obstack bit that used to store it. | |
143 | * src/symtab.h (symbol_t): The 'type_name' member is a struniq. | |
144 | ||
7672019c PE |
145 | 2002-11-11 Paul Eggert <eggert@twinsun.com> |
146 | ||
147 | Revamp to fix many (but not all) of the C- and M4-related quoting | |
148 | problems. Among other things, this fixes the Bison bug reported | |
149 | by Jan Hubicka when processing the Bash grammar; see: | |
150 | <http://mail.gnu.org/pipermail/bison-patches/2002-November/001329.html> | |
151 | ||
152 | Use new @ escapes consistently. Represent brackets with @{ and @} | |
153 | rather than @<:@ and @:>@, since this works a bit better with dumb | |
154 | editors like vi. Represent @ with @@, since @ is now consistently | |
155 | an escape. Use @oline@ and @ofile@ rather than __oline__ and | |
156 | __ofile__, to avoid unexpected expansions. Similarly, use @output | |
157 | rather than #output. | |
158 | ||
159 | * data/c.m4 (b4_copyright): Omit file name from comment, since | |
160 | the file name could contain "*/". | |
161 | (b4_synclines_flag): Don't quote the 2nd argument; it should already | |
162 | be quoted. All uses changed. | |
163 | ||
164 | * data/glr.c: Use new @ escapes consistently. | |
165 | (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name, | |
166 | b4_output_header_suffix, b4_output_header_name, b4_header_guard): | |
167 | Remove, since they couldn't handle arbitrary characters in file | |
168 | names. | |
169 | * data/lalr1.cc: Likewise. | |
170 | * data/yacc.c: Likewise. | |
171 | ||
172 | * src/files.c (output_infix): Remove; all uses removed. | |
173 | * src/files.h: Likewise. | |
174 | ||
175 | * data/glr.c: Remove use of "#ifdef b4_header_guard", since it | |
176 | mishandled funny characters in file names, and anyway it isn't | |
177 | needed any more. | |
178 | * data/yacc.c: Likewise. | |
179 | * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard. | |
180 | ||
181 | * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would. | |
182 | * data/yacc.c: Likewise. | |
183 | ||
184 | * src/muscle_tab.c: Include quotearg.h, since we need to quote C | |
185 | strings now. | |
186 | (muscle_init): Quote filename as a C string. | |
187 | * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused. | |
188 | (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros. | |
189 | * src/output.c (escaped_file_name_output): New function. | |
190 | (prepare_symbols): Quote tokens for M4. | |
191 | (prepare): Don't insert output_infix, output_prefix, | |
192 | output_parser_name, output_header_name; this is now down by scan-skel. | |
193 | Insert skeleton as a C string. | |
194 | ||
195 | * src/output.c (user_actions_output, symbol_destructors_output, | |
196 | symbol_printers_output): Quote filenames for C and M4. | |
197 | * src/reader.c (prologue_augment, epilogue_set): Likewise. | |
198 | ||
199 | * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash | |
200 | escapes other than \\ and \'; this simplifies the code. | |
201 | (<SC_STRING>): Likewise, for \\ and \". | |
202 | (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE, | |
203 | SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too. | |
204 | Use new escapes @{ and @} for [ and ]. | |
205 | ||
206 | * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing | |
207 | them with auto vars. | |
208 | Switch to new escape scheme, where @ is the escape character uniformly. | |
209 | Abort if a stray escape character is found. Avoid unbounded input | |
210 | buffer when parsing non-escaped text. | |
211 | ||
212 | * tests/input.at (Torturing the Scanner): Add tests that @oline@, | |
213 | __oline__, #output, $@, and @{ do not have unintended meanings. | |
214 | ||
acea4f3b PE |
215 | 2002-11-09 Paul Eggert <eggert@twinsun.com> |
216 | ||
217 | Fix the test failure due to GCC warnings described in | |
218 | <http://mail.gnu.org/pipermail/bug-bison/2002-November/001815.html>. | |
219 | * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which | |
220 | evaluate to 0 if it's impossible for NINF to be in the respective | |
221 | table. | |
222 | (yygetLRActions, yyrecoverParseError): Use them. | |
223 | ||
224 | * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were | |
225 | counted in the token inserted at end of file. Now takes | |
226 | location_t *, not location_t, so that the location can be | |
227 | adjusted. All uses changed. | |
228 | ||
229 | * tests/regression.at (Invalid inputs): Adjust wording in | |
230 | diagnostic to match the new behavior. | |
231 | ||
232 | * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR, | |
233 | AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR, | |
234 | AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x)) | |
235 | abort ();'. This reduces the runtime of the "Many lookaheads" | |
236 | test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running | |
237 | GCC 3.2. | |
238 | ||
20ef1ad5 PE |
239 | 2002-11-07 Paul Eggert <eggert@twinsun.com> |
240 | ||
241 | * src/parse-gram.y (CHARACTER): Remove unused token. | |
242 | All uses removed. | |
243 | ||
244 | * src/scan-gram.l: Remove stack option. We no longer use the | |
245 | stack, since the stack was never deeper than 1; instead, use the | |
246 | new auto var c_context to record the stacked value. | |
247 | ||
248 | Remove nounput option. At an unexpected end of file, we now unput | |
249 | the minimal input necessary to end cleanly; this simplifies the | |
250 | code. | |
251 | ||
252 | Avoid unbounded token sizes where this is easy. | |
253 | ||
254 | (unexpected_end_of_file): New function. | |
255 | Use it to systematize the error message on unexpected EOF. | |
256 | (last-string): Now auto, not static. | |
257 | (YY_OBS_FREE): Remove unnecessary do while (0) wrapper. | |
258 | (scanner_last_string_free): Remove; not used. | |
259 | (percent_percent_count): Move decl to just before use. | |
260 | (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file, | |
261 | not the (never otherwised-used) CHARACTER. | |
262 | ||
93724f13 AD |
263 | 2002-11-07 Akim Demaille <akim@epita.fr> |
264 | ||
265 | Let yyerror always receive the msg as last argument, so that | |
266 | yyerror can be variadic. | |
267 | ||
268 | * data/yacc.c (b4_yyerror_args): New. | |
269 | Use it when calling yyerror. | |
270 | * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New. | |
271 | Use it when calling yyerror. | |
272 | * doc/bison.texinfo (Error Reporting): Adjust. | |
273 | * tests/calc.at (_AT_DATA_CALC_Y): Adjust. | |
274 | * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust. | |
275 | ||
6e40b4eb AD |
276 | 2002-11-06 Akim Demaille <akim@epita.fr> |
277 | ||
278 | #line should have quoted strings. | |
279 | Ideally, this should be done by m4_quotearg. | |
280 | ||
281 | * src/scan-skel.l: Include quotearg.h. | |
282 | Quote __ofile__. | |
283 | * src/output.c (symbol_printers_output) | |
284 | (symbol_destructors_output): Quote the file name. | |
285 | ||
2dfbfc12 AD |
286 | 2002-11-06 Akim Demaille <akim@epita.fr> |
287 | ||
288 | * tests/regression.at (Invalid inputs): Adjust to the recent | |
289 | messages. | |
290 | ||
437c2d80 AD |
291 | 2002-11-06 Akim Demaille <akim@epita.fr> |
292 | ||
293 | Restore --no-lines. | |
294 | Reported by Jim Kent. | |
295 | ||
296 | * data/c.m4 (b4_syncline): New. | |
297 | * data/glr.c, data/yacc.c, data/lalr1.cc: Use it. | |
298 | * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline. | |
299 | * src/output.c (user_actions_output): Likewise. | |
300 | (prepare): Define 'b4_synclines_flag'. | |
2dfbfc12 | 301 | * src/muscle_tab.c (muscle_init): Don't define b4_linef. |
437c2d80 | 302 | |
900c5db5 AD |
303 | 2002-11-06 Akim Demaille <akim@epita.fr> |
304 | ||
305 | * src/main.c (main): Free `infile'. | |
306 | * src/scan-gram.l (handle_syncline): New. | |
307 | Recognize `#line'. | |
308 | * src/output.c (user_actions_output, symbol_destructors_output) | |
309 | (symbol_printers_output): Use the location's file name, not | |
310 | infile. | |
311 | * src/reader.c (prologue_augment, epilogue_set): Likewise. | |
312 | ||
e183b123 | 313 | 2002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU> |
51b4a04c | 314 | |
e183b123 | 315 | * src/tables.c (matching_state): Don't allow states to match if |
51b4a04c | 316 | either has GLR conflict entries. |
e183b123 | 317 | |
193eb6b7 PE |
318 | 2002-11-05 Paul Eggert <eggert@twinsun.com> |
319 | ||
e183b123 PE |
320 | * src/scan-gram.l: Use more accurate diagnostics, e.g. |
321 | "integer out of range" rather than "invalid value". | |
322 | * tests/input.at (Invalid $n, Invalid @n): Change expected wording | |
323 | accordingly. | |
324 | ||
193eb6b7 PE |
325 | Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires. |
326 | Also, remove one static variable in the scanner. | |
327 | ||
328 | * src/scan-gram.l (braces_level): Now auto, not static. | |
329 | Initialize to zero if the compiler is being picky. | |
330 | (INITIAL): Clear braces_level instead of incrementing it. | |
331 | (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code, | |
332 | as POSIX 1003.1-2001 requires. | |
333 | * src/system.h (IF_LINT): New macro, taken from coreutils. | |
334 | * configure.ac: Define "lint" if --enable-gcc-warnings. | |
335 | ||
29c01725 AD |
336 | 2002-11-05 Akim Demaille <akim@epita.fr> |
337 | ||
338 | * src/scan-gram.l: When it starts with `%', complain about the | |
339 | whole directive, not just that `invalid character: %'. | |
340 | ||
8aeac3ca AD |
341 | 2002-11-04 Akim Demaille <akim@epita.fr> |
342 | ||
343 | * Makefile.maint: Update from Autoconf. | |
344 | (update, cvs-update, po-update, do-po-update): New. | |
345 | ||
793a58bb AD |
346 | 2002-11-04 Akim Demaille <akim@epita.fr> |
347 | ||
348 | * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex | |
349 | and yyerror. | |
350 | Have yyerror `use' its arguments. | |
351 | * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF | |
352 | returns true when location & yacc & pure & parse-param. | |
353 | (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments. | |
354 | ||
c4d720cd AD |
355 | 2002-11-04 Akim Demaille <akim@epita.fr> |
356 | ||
357 | * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid | |
358 | clashes. | |
359 | * src/scan-gram.l: Use [\'] instead of ['] to pacify | |
360 | font-lock-mode. | |
361 | Use complain_at. | |
362 | Use quote, not quote_n since LOCATION_PRINT no longer uses the | |
363 | slot 0. | |
364 | ||
613a0dc5 PE |
365 | 2002-11-03 Paul Eggert <eggert@twinsun.com> |
366 | ||
367 | * src/reader.c (get_merge_function, grammar_current_rule_check): | |
368 | Use consistent diagnostics for reporting type name clashes. | |
369 | Quote the types with <>, for consistency with Yacc. | |
370 | * tests/input.at (Type Clashes): Adjust to diagnostic changes. | |
371 | ||
2a8d363a AD |
372 | 2002-11-03 Akim Demaille <akim@epita.fr> |
373 | ||
374 | * data/c.m4 (b4_identification, b4_user_args, b4_parse_param): | |
375 | New. | |
376 | * data/yacc.m4 (b4_pure_args, b4_Pure_args): New. | |
377 | (b4_parse_param): Remove. | |
378 | Use b4_identification. | |
379 | Propagate b4_pure_args where needed to pass them to yyerror. | |
380 | * data/glr.m4 (b4_parse_param): Remove. | |
381 | (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args) | |
382 | (b4_lpure_formals): New. | |
383 | Use b4_identification. | |
384 | (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by | |
385 | b4_user_formals and b4_user_args. | |
386 | (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer) | |
387 | (yyreportAmbiguity): When using a pure parser, also need | |
388 | the location, and the parse-params. | |
389 | Adjust callers. | |
390 | (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError): | |
391 | When using a pure parser, also need the parse-params. | |
392 | Adjust callers. | |
393 | * tests/calc.at: Test pure (%pure-parser) and absolutely pure | |
394 | (%pure-parser + %parse-param) LALR and GLR parsers. | |
395 | (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF, | |
396 | AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF, | |
397 | AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF. | |
398 | (_AT_DATA_CALC_Y): Equip for purity of yyerror. | |
399 | (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF. | |
400 | * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity. | |
401 | * doc/bison.texinfo: Untabify the whole file. | |
402 | (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM. | |
403 | (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM. | |
404 | (Error Reporting): Adjust to these new directives. | |
405 | Document %error-verbose, deprecate YYERROR_VERBOSE. | |
406 | ||
9e32add8 AD |
407 | 2002-11-03 Akim Demaille <akim@epita.fr> |
408 | ||
409 | * tests/calc.at: Change all the AT_CHECK_CALC_LALR and | |
410 | AT_CHECK_CALC_GLR invocations to use % directives, instead of | |
411 | command line options. | |
412 | * tests/cxx-type.at: Formatting changes. | |
413 | ||
b02d90a5 PE |
414 | 2002-11-03 Paul Eggert <eggert@twinsun.com> |
415 | ||
416 | * src/scan-gram.l: Revamp to fix POSIX incompatibilities, | |
417 | to count columns correctly, and to check for invalid inputs. | |
9e32add8 | 418 | |
b02d90a5 PE |
419 | Use mbsnwidth to count columns correctly. Account for tabs, too. |
420 | Include mbswidth.h. | |
421 | (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS. | |
422 | (extend_location): New function. | |
423 | (YY_LINES): Remove. | |
424 | ||
425 | Handle CRLF in C code rather than in Lex code. | |
426 | (YY_INPUT): New macro. | |
427 | (no_cr_read): New function. | |
428 | ||
429 | Scan UCNs, even though we don't fully handle them yet. | |
430 | (convert_ucn_to_byte): New function. | |
431 | ||
432 | Handle backslash-newline correctly in C code. | |
433 | (SC_LINE_COMMENT, SC_YACC_COMMENT): New states. | |
434 | (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.; | |
435 | all uses changed. | |
436 | (tag, splice): New EREs. Do not allow NUL or newline in tags. | |
437 | Use {splice} wherever C allows backslash-newline. | |
438 | YY_STEP after space, newline, vertical-tab. | |
439 | ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT). | |
9e32add8 | 440 | |
b02d90a5 PE |
441 | (letter, id): Don't assume ASCII; e.g., spell out a-z. |
442 | ||
443 | ({int}, handle_action_dollar, handle_action_at): Check for integer | |
444 | overflow. | |
9e32add8 | 445 | |
b02d90a5 PE |
446 | (YY_STEP): Omit trailing semicolon, so that it's more like C. |
447 | ||
448 | (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00 | |
449 | as well as \000. Check for UCHAR_MAX, not 255. | |
450 | Allow \x with an arbitrary positive number of digits, as in C. | |
451 | Check for overflow here. | |
452 | Allow \? and UCNs, for compatibility with C. | |
453 | ||
454 | (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision | |
455 | with quote slot used by complain_at. | |
456 | ||
457 | * tests/input.at: Add tests for backslash-newline, m4 quotes | |
458 | in symbols, long literals, and funny escapes in strings. | |
459 | ||
460 | * configure.ac (jm_PREREQ_MBSWIDTH): Add. | |
461 | * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c. | |
462 | * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext. | |
463 | * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4. | |
464 | * m4/mbswidth.m4: New file, from GNU coreutils. | |
465 | ||
466 | * doc/bison.texinfo (Grammar Outline): Document // comments. | |
467 | (Symbols): Document that trigraphs have no special meaning in Bison, | |
468 | nor is backslash-newline allowed. | |
469 | (Actions): Document that trigraphs have no special meaning. | |
470 | ||
471 | * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove; | |
472 | no longer used. | |
473 | ||
474 | 2002-11-02 Paul Eggert <eggert@twinsun.com> | |
475 | ||
476 | * src/reader.c: Don't include quote.h; not needed. | |
477 | (get_merge_function): Reword warning to be consistent with | |
478 | type clash diagnostic in grammar_current_rule_check. | |
479 | ||
480 | * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two | |
481 | bug in trigraph handling. | |
482 | ||
483 | * src/output.c (prepare_symbols): When printing token names, | |
484 | escape "[" as "@<:@" and likewise for "]". | |
485 | ||
486 | * src/system.h (errno): Remove declaration, as we are now | |
487 | assuming C89 or better, and C89 guarantees errno. | |
488 | ||
762b212b PE |
489 | 2002-10-30 Paul Eggert <eggert@twinsun.com> |
490 | ||
491 | * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write): | |
492 | Check for close failures. | |
493 | * src/files.h (xfclose): Return void, not int, since it always | |
494 | returned zero. | |
495 | * src/files.c (xfclose): Likewise. Report I/O error if ferror | |
496 | indicates one. | |
497 | * src/output.c (output_skeleton): Use xfclose rather than fclose | |
498 | and ferror. xfclose now checks ferror. | |
499 | ||
500 | * data/glr.c (YYLEFTMOST_STATE): Remove. | |
501 | (yyreportTree): Use a stack-based leftmost state. This avoids | |
502 | our continuing battles with bogus warnings about initializers. | |
503 | ||
56100c60 AD |
504 | 2002-10-30 Akim Demaille <akim@epita.fr> |
505 | ||
506 | * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only | |
507 | #if. | |
508 | ||
51b4a04c PH |
509 | 2002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU> |
510 | ||
511 | * tests/glr-regr1.at: New test for reported regressions. | |
512 | * tests/testsuite.at: Add glr-regr1.at test. | |
513 | * tests/Makefile.am: Add glr-regr1.at test. | |
e183b123 | 514 | |
bf1ebda2 PE |
515 | 2002-10-24 Paul Eggert <eggert@twinsun.com> |
516 | ||
5c16c6b1 PE |
517 | Version 1.75a. |
518 | ||
bf1ebda2 PE |
519 | * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration. |
520 | * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since | |
521 | we use malloc. Don't assume 'A' through 'Z' are contiguous. | |
522 | Don't assume strdup exists; POSIX says its an XSI extension. | |
523 | Check for buffer overflow on input. | |
524 | ||
b526ee61 AD |
525 | 2002-10-24 Akim Demaille <akim@epita.fr> |
526 | ||
527 | * src/output.c (output_skeleton): Don't disable M4sugar comments | |
528 | too soon: it results in comments being expanded. | |
529 | * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the | |
530 | first output. | |
531 | ||
f1886bb2 AD |
532 | 2002-10-24 Akim Demaille <akim@epita.fr> |
533 | ||
534 | * data/yacc.c (m4_int_type): New. | |
535 | * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed | |
536 | char' as only yacc.c wants K&R portability. | |
537 | * data/glr.c (yysigned_char): Remove. | |
538 | * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name. | |
539 | Reported by Quoc Peyrot. | |
540 | ||
c5576256 PE |
541 | 2002-10-23 Paul Eggert <eggert@twinsun.com> |
542 | ||
543 | * src/main.c (main): With --trace=time, report times even if a | |
544 | non-fatal error occurs. Formerly, the times were reported in some | |
545 | such cases but not in others. | |
546 | * src/reader.c (reader): Just return if a complaint has been issued, | |
547 | instead of exiting, so that 'main' can report times. | |
548 | ||
27b0ffea AD |
549 | 2002-10-22 Akim Demaille <akim@epita.fr> |
550 | ||
551 | * src/system.h: Include sys/types. | |
552 | Reported by Bert Deknuydt. | |
553 | ||
223a7883 PE |
554 | 2002-10-23 Paul Eggert <eggert@twinsun.com> |
555 | ||
556 | * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX. | |
557 | Suggested by Art Haas. | |
558 | ||
559 | 2002-10-22 Paul Eggert <eggert@twinsun.com> | |
560 | ||
561 | * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit | |
562 | decl; not needed any more. | |
563 | * src/main.c (main): Use return to exit, undoing yesterday's change. | |
564 | The last OS that we could find where this wouldn't work is | |
565 | SunOS 3.5, and that's too old to worry about now. | |
566 | ||
567 | * data/glr.c (struct yyltype): Define members even when not | |
568 | doing locations. This is more consistent with yacc.c, and it | |
569 | works around the following bug reports: | |
570 | http://mail.gnu.org/pipermail/bug-bison/2002-October/001764.html | |
571 | http://mail.gnu.org/pipermail/bug-bison/2002-October/001769.html | |
572 | and I hope it also fixes this bug report: | |
573 | http://mail.gnu.org/pipermail/bug-bison/2002-October/001748.html | |
27b0ffea | 574 | |
223a7883 PE |
575 | * doc/bison.texinfo: Minor spelling and typographical fixes. Use |
576 | @acronym consistently. Standardize on "Yacc" instead of "YACC", | |
577 | "Algol" instead of "ALGOL". Give a bit more history about BNF. | |
578 | ||
8b76775a AD |
579 | 2002-10-22 Akim Demaille <akim@epita.fr> |
580 | ||
581 | * data/README: New. | |
582 | ||
6db10d14 PE |
583 | 2002-10-21 Paul Eggert <eggert@twinsun.com> |
584 | ||
585 | Be consistent about 'bool'; the old code used an enum in one | |
586 | module and an int in another, and this violates the C standard. | |
587 | * m4/stdbool.m4: New file, from coreutils 4.5.3. | |
588 | * configure.ac (AC_HEADER_STDBOOL): Add. | |
589 | * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4. | |
590 | * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a) | |
591 | * src/symtab.c (hash_compare_symbol_t): Likewise. | |
592 | * src/system.h (bool, false, true): Use a definition consistent | |
593 | with ../lib/hash.c. All uses changed. | |
594 | ||
595 | * src/complain.c (warning_issued): Renamed from warn_message_count, | |
596 | so that we needn't worry about integer overflow (!). | |
597 | Now of type bool. All uses changed. | |
598 | (complaint_issued): Renamed from complain_message_count; likewise. | |
599 | ||
600 | * src/main.c (main): Use exit to exit with failure. | |
27b0ffea | 601 | |
6db10d14 PE |
602 | * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS |
603 | rather than 1 and 0. | |
604 | * src/main.c (main): Likewise. | |
605 | * src/getargs.c (getargs): Likewise. | |
606 | * src/reader.c (reader): Likewise. | |
607 | ||
608 | * src/getarg.c (getargs): Remove duplicate code for | |
609 | "Try `bison --help'". | |
610 | ||
611 | * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2. | |
612 | What was that "2" for? | |
613 | ||
614 | * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)). | |
615 | * src/getargs.c (usage): Likewise. | |
616 | ||
617 | * src/getargs.c (getargs): When there are too few operands, report | |
618 | the last one. When there are too many, report the first extra | |
619 | one. This is how diffutils does it. | |
620 | ||
92a060fd PE |
621 | 2002-10-20 Paul Eggert <eggert@twinsun.com> |
622 | ||
623 | Remove K&R vestiges. | |
624 | * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove. | |
625 | * src/complain.c (VA_START): Remove. Assume prototypes. | |
626 | (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro. | |
627 | (private_strerror, warn_at, warn, complain_at, complain, fatal_at, | |
628 | fatal): Assume prototypes. | |
629 | * src/complain.h: Assume prototypes. | |
630 | * src/system.h (PARAMS): Remove. | |
631 | Include <limits.h> unconditionally, since it's guaranteeed even | |
632 | for a freestanding C89 compiler. | |
633 | (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them. | |
634 | * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype. | |
8b76775a | 635 | |
e7cb57c0 AD |
636 | 2002-10-20 Akim Demaille <akim@epita.fr> |
637 | ||
638 | * src/muscle_tab.c (muscle_grow): Remove trailing debugging code. | |
639 | * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New. | |
640 | (yyuserAction, yydoAction, yyglrReduce, yyresolveValue) | |
641 | (yyresolveStates, yyresolveAction, yyresolveStack) | |
642 | (yyprocessOneStack): Use them. | |
643 | (yy_reduce_print): New. | |
644 | * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param. | |
645 | ||
0245f82d AD |
646 | 2002-10-20 Akim Demaille <akim@epita.fr> |
647 | ||
648 | * data/c.m4 (b4_c_ansi_args): Recognize functions with no | |
649 | arguments and output `void'. | |
650 | (b4_c_function): Rename as... | |
651 | (b4_c_function_def): this. | |
652 | (b4_c_function_decl, b4_c_ansi_function_def) | |
653 | (b4_c_ansi_function_decl): New. | |
654 | Change the interpretation of the arguments: before `int, foo', now | |
655 | `int foo, foo'. | |
656 | * data/yacc.c (yyparse): Prototype and define thanks to these. | |
657 | Adjust b4_c_function_def uses. | |
658 | * data/glr.c (yyparse): Likewise, but ANSI only. | |
659 | ||
39912f52 AD |
660 | 2002-10-20 Akim Demaille <akim@epita.fr> |
661 | ||
662 | * src/output.c (prepare): Move the definition of `tokens_number', | |
663 | `nterms_number', `undef_token_number', `user_token_number_max' | |
664 | to... | |
665 | (prepare_tokens): Here. | |
666 | (prepare_tokens): Rename as... | |
667 | (prepare_symbols): this. | |
668 | (prepare): Move the definition of `rules_number' to... | |
669 | (prepare_rules): here. | |
670 | (prepare): Move the definition of `last', `final_state_number', | |
671 | `states_number' to... | |
672 | (prepare_states): here. | |
673 | * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'. | |
674 | ||
20c1e2ad AD |
675 | 2002-10-20 Akim Demaille <akim@epita.fr> |
676 | ||
677 | * src/tables.h, src/tables.c, src/output.c: Comment changes. | |
678 | ||
21964f43 AD |
679 | 2002-10-20 Akim Demaille <akim@epita.fr> |
680 | ||
681 | * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to... | |
682 | * data/c.m4: here. | |
683 | ||
66d30cd4 AD |
684 | 2002-10-20 Akim Demaille <akim@epita.fr> |
685 | ||
686 | * src/output.c (prepare): Use MUSCLE_INSERT_STRING. | |
687 | * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as | |
688 | `pair'. | |
689 | (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth', | |
690 | `name' to... | |
691 | * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type) | |
692 | (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name): | |
693 | These. | |
694 | ||
95f2c9fe PE |
695 | 2002-10-19 Paul Eggert <eggert@twinsun.com> |
696 | ||
697 | Do not create a temporary file, as that involves security and | |
698 | cleanup headaches. Instead, use a pair of pipes. | |
699 | Derived from a suggestion by Florian Krohm. | |
700 | * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files. | |
701 | * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove. | |
702 | * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove. | |
703 | (BISON_PREREQ_SUBPIPE): Add. | |
704 | * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c. | |
705 | Add subpipe.h, subpipe.c. | |
706 | * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4. | |
707 | * po/POTFILES.in: Add lib/subpipe.c. | |
708 | * src/output.c: Include "subpipe.h". | |
709 | (m4_invoke): Remove decl. | |
710 | (scan_skel): New decl. | |
711 | (output_skeleton): Use pipe rather than temporary file for m4 input. | |
712 | Check that m4sugar.m4 is readable, to avoid deadlock. | |
713 | Check for pipe I/O error. | |
714 | * src/scan-skel.l (readpipe): Remove decl. | |
715 | (scan_skel): New function, to be used in place of m4_invoke. | |
716 | Read from stream rather than file. | |
66d30cd4 | 717 | |
95f2c9fe PE |
718 | * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to |
719 | float, as this generates a warning on Solaris 8 + GCC 3.2 with | |
720 | --enable-gcc-warnings. Instead, divide into 1.0 rather than 1; | |
721 | this generates a more-accurate value anyway. | |
722 | ||
723 | * lib/timevar.c (timervar_accumulate): Rename locals to | |
724 | avoid confusion with similarly-named more-global. | |
725 | * src/muscle_tab.c (muscle_pair_list_grow): Likewise. | |
726 | ||
727 | * src/output.c (prepare): Use xstrdup to convert char const * | |
728 | to char *, to avoid GCC warning. | |
729 | ||
c19988b7 AD |
730 | 2002-10-19 Akim Demaille <akim@epita.fr> |
731 | ||
732 | * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS, | |
733 | LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS. | |
734 | Use them to have `calc.y' ready for %pure-parser. | |
735 | * data/yacc.c (YYLEX): Pass a yylex return type to | |
736 | b4_c_function_call. | |
737 | ||
ae7453f2 AD |
738 | 2002-10-19 Akim Demaille <akim@epita.fr> |
739 | ||
740 | Prototype support of %lex-param and %parse-param. | |
741 | ||
742 | * src/parse-gram.y: Add the definition of the %lex-param and | |
743 | %parse-param tokens, plus their rules. | |
744 | Drop the `_' version of %glr-parser. | |
745 | Add the "," token. | |
746 | * src/scan-gram.l (INITIAL): Scan them. | |
747 | * src/muscle_tab.c: Comment changes. | |
748 | (muscle_insert, muscle_find): Rename `pair' as `probe'. | |
749 | * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused. | |
750 | (muscle_entry_s): The `value' member is no longer const. | |
751 | Adjust all dependencies. | |
752 | * src/muscle_tab.c (muscle_init): Adjust: use | |
753 | MUSCLE_INSERT_STRING. | |
754 | Initialize the obstack earlier. | |
755 | * src/muscle_tab.h, src/muscle_tab.c (muscle_grow) | |
756 | (muscle_pair_list_grow): New. | |
757 | * data/c.m4 (b4_c_function_call, b4_c_args): New. | |
758 | * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param. | |
759 | * tests/calc.at: Use %locations, not --locations. | |
760 | (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser. | |
761 | ||
0e575721 AD |
762 | 2002-10-19 Akim Demaille <akim@epita.fr> |
763 | ||
764 | * src/getargs.c (usage): Take status as argument and exit | |
765 | accordingly. | |
766 | Report the traditional `Try ... --help' message when status != 0. | |
767 | (usage, version): Don't take a FILE * as arg, it is pointless. | |
768 | (getargs): When there is an incorrect number of arguments, make it | |
769 | an error, and report it GNUlically thanks to `usage ()'. | |
770 | ||
724ce7f5 PE |
771 | 2002-10-18 Paul Eggert <eggert@twinsun.com> |
772 | ||
3a781eb2 PE |
773 | * data/glr.c (yyreportParseError): Don't assume that sprintf |
774 | yields the length of the printed string, as this is not true | |
775 | on SunOS 4.1.4. Reported by Peter Klein. | |
776 | ||
724ce7f5 PE |
777 | * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc. |
778 | * tests/conflicts.at (%nonassoc and eof): Likewise. | |
779 | Fixes SunOS 4.1.4 test failure reported by Peter Klein. | |
780 | ||
473d0a75 AD |
781 | 2002-10-17 Akim Demaille <akim@epita.fr> |
782 | ||
783 | * src/getargs.h (trace_e): Add trace_scan, and trace_parse. | |
784 | * src/getargs.c (trace_types, trace_args): Adjust. | |
785 | * src/reader.c (grammar_current_rule_prec_set) | |
786 | (grammar_current_rule_dprec_set, grammar_current_rule_merge_set): | |
787 | Standardize error messages. | |
788 | And s/@prec/%prec/! | |
789 | (reader): Use trace_flag to enable scanner/parser debugging, | |
790 | instead of an adhoc scheme. | |
791 | * src/scan-gram.l: Remove trailing debugging code. | |
792 | ||
e76d2469 PE |
793 | 2002-10-16 Paul Eggert <eggert@twinsun.com> |
794 | ||
93e2236a PE |
795 | * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as |
796 | MUSCLE_TAB_H. | |
797 | ||
e76d2469 PE |
798 | * NEWS: Officially drop support for building Bison with K&R C, |
799 | since it didn't work anyway and it's not worth worrying about. | |
800 | * Makefile.maint (wget_files): Remove ansi2knr.c. | |
801 | (ansi2knr.c-url_prefix): Remove. | |
802 | * lib/.cvsignore: Remove ansi2knr, ansi2knr.*. | |
803 | * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove. | |
804 | * src/Makefile.am (AUTOMAKE_OPTIONS): Remove. | |
805 | ||
5bd1c419 PE |
806 | 2002-10-15 Paul Eggert <eggert@twinsun.com> |
807 | ||
808 | Stop using the "enum_" trick for K&R-style function definitions; | |
809 | it confused me, and I was the author! Instead, assume that people | |
810 | who want to use K&R C compilers (when using these modules in GCC, | |
811 | perhaps?) will run ansi2knr. | |
812 | ||
813 | * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove. | |
814 | All uses of "enum_" changed to "enum ". | |
815 | * lib/ebitset.c (enum_ebitset_find_mode): Likewise. | |
816 | * lib/lbitset.c (enum_lbitset_find_mode): Likewise. | |
e76d2469 | 817 | |
5bd1c419 PE |
818 | * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or, |
819 | abitset_and_or_cmp, abitset_andn, abitset_andn_cmp, | |
820 | abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy, | |
821 | abitset_copy1, abitset_disjoint_p, abitset_empty_p, | |
822 | abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse, | |
823 | abitset_not, abitset_ones, abitset_or, abitset_or_and, | |
824 | abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set, | |
825 | abitset_size, abitset_small_list, abitset_subset_p, abitset_test, | |
826 | abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero): | |
827 | Use function prototypes; this removes the need for declaring | |
828 | static functions simply to provide their prototypes. | |
829 | * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_, | |
830 | bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_, | |
831 | bitset_count_, bitset_create, bitset_dump, bitset_first, | |
832 | bitset_free, bitset_init, bitset_last, bitset_next, | |
833 | bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p, | |
834 | bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev, | |
835 | bitset_print, bitset_release_memory, bitset_toggle_, | |
836 | bitset_type_choose, bitset_type_get, bitset_type_name_get, | |
837 | debug_bitset): Likewise. | |
838 | * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise. | |
839 | * lib/bitset_stats.c (bitset_log_histogram_print, | |
840 | bitset_percent_histogram_print, bitset_stats_and, | |
841 | bitset_stats_and_cmp, bitset_stats_and_or, | |
842 | bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp, | |
843 | bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy, | |
844 | bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p, | |
845 | bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable, | |
846 | bitset_stats_equal_p, bitset_stats_free, bitset_stats_init, | |
847 | bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not, | |
848 | bitset_stats_ones, bitset_stats_or, bitset_stats_or_and, | |
849 | bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print, | |
850 | bitset_stats_print_1, bitset_stats_read, bitset_stats_reset, | |
851 | bitset_stats_set, bitset_stats_size, bitset_stats_subset_p, | |
852 | bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get, | |
853 | bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp, | |
854 | bitset_stats_zero): Likewise. | |
855 | * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free, | |
856 | bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure, | |
857 | bitsetv_dump, debug_bitsetv): Likewise. | |
858 | * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn, | |
859 | ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_, | |
860 | ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add, | |
861 | ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find, | |
862 | ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove, | |
863 | ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p, | |
864 | ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list, | |
865 | ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp, | |
866 | ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset, | |
867 | ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test, | |
868 | ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero): | |
869 | Likewise. | |
870 | * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp, | |
871 | lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy, | |
872 | lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc, | |
873 | lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free, | |
874 | lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p, | |
875 | lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init, | |
876 | lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones, | |
877 | lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune, | |
878 | lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size, | |
879 | lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor, | |
880 | lbitset_xor_cmp, lbitset_zero): Likewise. | |
e76d2469 | 881 | |
ae26e1f0 AD |
882 | 2002-10-14 Akim Demaille <akim@epita.fr> |
883 | ||
884 | Version 1.75. | |
885 | ||
d43baf71 AD |
886 | 2002-10-14 Akim Demaille <akim@epita.fr> |
887 | ||
888 | * tests/Makefile.am (maintainer-check-posix): New. | |
889 | ||
7ebc83e3 AD |
890 | 2002-10-14 Akim Demaille <akim@epita.fr> |
891 | ||
892 | * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc | |
893 | member. | |
894 | ||
05846dae AD |
895 | 2002-10-14 Akim Demaille <akim@epita.fr> |
896 | ||
897 | * src/tables.c (table_ninf_remap): base -> tab. | |
898 | Reported by Matt Rosing. | |
899 | ||
1318e37d PE |
900 | 2002-10-14 Paul Eggert <eggert@twinsun.com> |
901 | ||
447fbb17 PE |
902 | * tests/action.at, tests/calc.at, tests/conflicts.at, |
903 | tests/cxx-type.at, tests/headers.at, tests/input.at, | |
904 | tests/regression.at, tests/synclines.at, tests/torture.at: | |
905 | Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c", | |
906 | so that the tests still work even if POSIXLY_CORRECT is set. | |
907 | * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise. | |
05846dae | 908 | |
1318e37d PE |
909 | * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char, |
910 | for portability to K&R hosts. Fix typo: signed char is guaranteed | |
911 | only to 127, not to 128. | |
912 | * data/glr.c (yysigned_char): New type. | |
913 | * data/yacc.c (yysigned_char): Likewise. | |
914 | * tests/regression.at (Web2c Actions): signed char -> yysigned_char. | |
915 | ||
cc0f0794 PE |
916 | 2002-10-13 Paul Eggert <eggert@twinsun.com> |
917 | ||
5038f418 PE |
918 | * data/yacc.c (yyparse): Rewrite to avoid "comparison is always |
919 | true due to limited range of data type" warning from GCC. | |
920 | ||
cc0f0794 PE |
921 | * data/c.m4 (b4_token_defines): Protect against double-inclusion |
922 | by wrapping enum yytokentype's definition inside #ifndef | |
923 | YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12. | |
924 | ||
6fed0802 AD |
925 | 2002-10-13 Akim Demaille <akim@epita.fr> |
926 | ||
927 | * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction): | |
928 | Un yy- yyrhs to avoid the name clash with the global YYRHS. | |
929 | ||
32f0598d AD |
930 | 2002-10-13 Akim Demaille <akim@epita.fr> |
931 | ||
932 | * Makefile.maint: Update from Autoconf 2.54. | |
933 | * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54. | |
934 | ||
7ea9a33f AD |
935 | 2002-10-13 Akim Demaille <akim@epita.fr> |
936 | ||
937 | * src/print.c (print_state): Separate the list of solved conflicts | |
938 | from the other items. | |
939 | * tests/conflicts.at (Resolved SR Conflicts): Adjust. | |
940 | ||
ea99527d AD |
941 | 2002-10-13 Akim Demaille <akim@epita.fr> |
942 | ||
943 | Let nondeterministic skeletons be usable with deterministic | |
944 | tables. | |
945 | ||
946 | With the patch, GAWK compiled by GCC without -O2 passes its test | |
947 | suite using a GLR parser driven by LALR tables. It fails with -O2 | |
948 | because `struct stat' gives two different answers on my machine: | |
949 | 88 (definition of an auto var) and later 96 (memset on this var). | |
950 | Hence the stack is badly corrumpted. The headers inclusion is to | |
951 | blame: if I move the awk.h inclusion before GLR's system header | |
952 | inclusion, the two struct stat have the same size. | |
953 | ||
954 | * src/tables.c (pack_table): Always create conflict_table. | |
955 | (token_actions): Always create conflict_list. | |
956 | * data/glr.c (YYFLAG): Remove, unused. | |
957 | ||
f377f69f AD |
958 | 2002-10-13 Akim Demaille <akim@epita.fr> |
959 | ||
960 | * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code. | |
961 | (O0FLAGS): New. | |
962 | (VALGRIND, GXX): New. | |
963 | * tests/atlocal.in (CFLAGS): Use O0FLAGS. | |
964 | * tests/bison.in: Run $PREBISON a pre-command. | |
965 | * tests/Makefile.am (maintainer-check, maintainer-check-valgrind) | |
966 | (maintainer-check-g++): New. | |
967 | * Makefile.am (maintainer-check): New. | |
968 | ||
2a1fe6ed AD |
969 | 2002-10-13 Akim Demaille <akim@epita.fr> |
970 | ||
971 | * data/glr.c: Formatting changes. | |
972 | Tweak some trace messages to match yacc.c's. | |
973 | ||
f50adbbd AD |
974 | 2002-10-13 Akim Demaille <akim@epita.fr> |
975 | ||
976 | GLR parsers sometimes raise parse errors instead of performing the | |
977 | default reduction. | |
978 | Reported by Charles-Henry de Boysson. | |
979 | ||
980 | * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't | |
981 | check the length of the traces when %glr. | |
982 | (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from | |
983 | GLR's traces. | |
984 | (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New. | |
985 | Test GLR parsers. | |
986 | * data/glr.c (YYLEFTMOST_STATE): Fix its value. | |
987 | (yyltype): Remove the yy prefix from the member names. | |
988 | (yytable): Complete its comment. | |
989 | (yygetLRActions): Map error action number from YYTABLE from | |
990 | YYTABLE_NINF to 0. | |
991 | (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF | |
992 | (which was a bug: it should have been YYTABEL_NINF, and yet it was | |
993 | not satisfying as we could compare an YYACTION computed from | |
994 | YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the | |
995 | only value for error actions. | |
996 | (yyreportParseError): In verbose parse error messages, don't issue | |
997 | `error' in the list of expected tokens. | |
998 | * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the | |
999 | next action to perform to match glr.c's decoding. | |
1000 | (yytable): Complete its comment. | |
1001 | ||
bcbad5b9 PE |
1002 | 2002-10-13 Paul Eggert <eggert@twinsun.com> |
1003 | ||
1004 | Fix problem reported by Henrik Grubbstroem in | |
1005 | <http://mail.gnu.org/pipermail/bug-bison/2002-October/001670.html>: | |
1006 | "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected, | |
1007 | because the Bison parser reads the second action before reducing | |
1008 | the first one. | |
1009 | * src/scan-gram.l (rule_length): New static var. | |
1010 | Use it to keep track of the rule length in the scanner, since | |
1011 | we can't expect the parser to be in lock-step sync with the scanner. | |
1012 | (handle_action_dollar, handle_action_at): Use this var. | |
1013 | * tests/actions.at (Exotic Dollars): Test for the problem. | |
05846dae | 1014 | |
14904b89 PE |
1015 | 2002-10-12 Paul Eggert <eggert@twinsun.com> |
1016 | ||
1fe611e5 PE |
1017 | * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>. |
1018 | * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>. | |
1019 | Include <sys/time.h> when checking for clock_t and struct tms. | |
1020 | Use same include order as source. | |
1021 | This is for the SunOS 4.1.4 porting bug reported by Peter Klein in | |
1022 | <http://mail.gnu.org/pipermail/bug-bison/2002-October/001674.html>. | |
05846dae | 1023 | |
1fe611e5 PE |
1024 | * lib/timevar.c: Update copyright date and clarify comments. |
1025 | (get_time) [IN_GCC]: Keep the GCC version for reference. | |
05846dae | 1026 | |
1fe611e5 PE |
1027 | * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import |
1028 | GCC version as of today, then merge Bison's changes. | |
1029 | Change "GCC" to "Bison" in copyright notice. timevar.def's | |
1030 | author is Akim, so change that too. | |
1031 | ||
98194095 PE |
1032 | * src/reader.c (grammar_current_rule_check): |
1033 | Don't worry about the default action if $$ is untyped. | |
1034 | Prevents bogus warnings reported by Jim Gifford in | |
1035 | <http://mail.gnu.org/pipermail/bug-bison/2002-October/001673.html>. | |
1036 | ||
14904b89 PE |
1037 | * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE. |
1038 | * data/glr.c, data/lalr1.cc, data/yacc.c: | |
1039 | Output token definitions before the first part of user declarations. | |
1040 | Fixes compatibility problem reported by Jim Gifford for kbd in | |
1041 | <http://mail.gnu.org/pipermail/bug-bison/2002-October/001672.html>. | |
1042 | ||
ff6dca18 PE |
1043 | 2002-10-11 Paul Eggert <eggert@twinsun.com> |
1044 | ||
1045 | * data/yacc.c (yyreport_parse_error): Remove, putting its body into... | |
1046 | (yyparse): here. This undoes some of the 2002-07-25 change. | |
1047 | Compatibility problem reported by Ralf S. Engelschall with | |
1048 | OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>. | |
1049 | ||
eb714592 AD |
1050 | 2002-10-11 Akim Demaille <akim@epita.fr> |
1051 | ||
1052 | * tests/regression.at Characters Escapes): New. | |
1053 | * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and | |
1054 | characters. | |
1055 | Reported by Jan Nieuwenhuizen. | |
1056 | ||
b7195100 AD |
1057 | 2002-10-11 Akim Demaille <akim@epita.fr> |
1058 | ||
1059 | * po/id.po: New. | |
1060 | ||
f28a0f2d PE |
1061 | 2002-10-10 Paul Eggert <eggert@twinsun.com> |
1062 | ||
1063 | Portability fixes for bitsets; this also avoids several GCC | |
1064 | warnings. | |
1065 | ||
1066 | * lib/abitset.c: Include <stddef.h>, for offsetof. | |
1067 | * lib/lbitset.c: Likewise. | |
1068 | ||
1069 | * lib/abitset.c (abitset_bytes): Return a size that is aligned | |
1070 | properly for vectors of objects. Do not assume that adding a | |
1071 | header size to a multiple of a word size yields a value that is | |
1072 | properly aligned for the whole union. | |
1073 | * lib/bitsetv.c (bitsetv_alloc): Likewise. | |
1074 | ||
1075 | * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new, | |
1076 | unique names for structures. | |
1077 | * lib/ebitset.c (ebitset_bytes): Likewise. | |
1078 | * lib/lbitset.c (lbitset_bytes): Likewise. | |
1079 | ||
1080 | * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p, | |
1081 | abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p, | |
1082 | abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn, | |
1083 | abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor, | |
1084 | abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp, | |
1085 | abitset_andn_or, abitset_andn_or_cmp, abitset_or_and, | |
1086 | abitset_or_and_cmp, abitset_copy): Supply prototype decls, | |
1087 | to improve the type-checking that GCC can do. | |
1088 | * lib/bitset.c (bitset_op4_cmp): Likewise. | |
1089 | * lib/bitset_stats.c (bitset_stats_count, | |
1090 | bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero, | |
1091 | bitset_stats_copy, bitset_stats_disjoint_p, | |
1092 | bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p, | |
1093 | bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn, | |
1094 | bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp, | |
1095 | bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or, | |
1096 | bitset_stats_and_or_cmp, bitset_stats_andn_or, | |
1097 | bitset_stats_andn_or_cmp, bitset_stats_or_and, | |
1098 | bitset_stats_or_and_cmp): Likewise. | |
1099 | * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn, | |
1100 | lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor, | |
1101 | lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not, | |
1102 | lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise. | |
1103 | ||
1104 | * lib/abitset.h: Include bitset.h, not bbitset.h. | |
1105 | * lib/ebitset.h: Likewise. | |
1106 | * lib/lbitset.h: Likewise. | |
1107 | ||
1108 | * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types. | |
1109 | All instances of parameters of type enum bitset_opts are now of | |
1110 | type enum_bitset_opts, to conform to the C Standard, and similarly | |
1111 | for enum_bitset_type. | |
1112 | * lib/ebitset.c (enum_ebitset_find_mode): Likewise. | |
1113 | * lib/lbitset.c (enum_lbitset_find_mode): Likewise. | |
1114 | ||
1115 | Do not use "struct bitset_struct" to mean different things in | |
1116 | different modules. Not only is this confusing, it violates | |
1117 | the C Standard, which requires that structure types in different | |
1118 | modules must be compatible if one is to be passed to the other. | |
1119 | * lib/bbitset.h (bitset): Now points to a union, not to a struct. | |
1120 | All instances of "struct bitset_struct *" replaced with "bitset". | |
1121 | * lib/bitset.h (struct bitset_struct): Remove, replacing with.... | |
1122 | (union bitset_union, struct abitset_struct, struct ebitset_struct, | |
1123 | struct lbitset_struct, struct bitset_stats_struct): New types. | |
1124 | All uses of struct bitset_struct changed to union bitset_union, | |
1125 | etc. | |
1126 | * lib/abitset.c (struct abitset_struct, abitset, | |
1127 | struct bitset_struct): Remove. | |
1128 | * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats, | |
1129 | struct bitset_struct): Remove. | |
1130 | * lib/ebitset.c (struct ebitset_struct, ebitset, struct | |
1131 | bitset_struct): Remove. | |
1132 | * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct): | |
1133 | Likewise. | |
1134 | ||
1135 | Do not call a function of type T using a call that assumes the | |
1136 | function is of a different type U. Standard C requires that a | |
1137 | function must be called with a type that is compatible with its | |
1138 | definition. | |
1139 | * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_): | |
1140 | New decls. | |
1141 | * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_): | |
1142 | New functions. | |
1143 | * lib/ebitset.c (PFV): Remove. | |
1144 | * lib/lbitset.c (PFV): Likewise. | |
1145 | * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or, | |
1146 | ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New | |
1147 | decls. | |
1148 | (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions. | |
1149 | (ebitset_vtable): Use them. | |
1150 | * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or, | |
1151 | lbitset_xor): New functions. | |
1152 | (lbitset_vtable): Use them. | |
1153 | ||
1154 | * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p): | |
1155 | Declare. | |
1156 | ||
1157 | * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a | |
1158 | GCC warning. | |
1159 | * lib/lbitset.c (LBITSET_CURRENT1): Likewise. | |
1160 | Use offsetof, for simplicity. | |
1161 | ||
6fbe4984 PE |
1162 | 2002-10-06 Paul Eggert <eggert@twinsun.com> |
1163 | ||
1164 | * lib/bitset.h (bitset_reset): Do not assume that bitset_word is | |
1165 | the same width as int. This reapplies a hunk of the 2002-08-12 patch | |
1166 | <http://mail.gnu.org/pipermail/bison-patches/2002-August/001111.html>, | |
1167 | which was inadvertently undone by the 2002-09-30 patch. | |
1168 | * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is | |
1169 | the same width as int. | |
1170 | ||
420f93c8 PE |
1171 | 2002-10-04 Paul Eggert <eggert@twinsun.com> |
1172 | ||
1173 | Version 1.50. | |
1174 | ||
1175 | * configure.ac (AC_INIT), NEWS: Increment version number. | |
1176 | ||
1177 | * doc/bison.texinfo: Minor spelling, grammar, and white space | |
1178 | fixes. | |
1179 | (Symbols): Mention that any negative value returned from yylex | |
1180 | signifies end-of-input. Warn about negative chars. Mention | |
1181 | the portable Standard C character set. | |
1182 | ||
1183 | The GNU coding standard says CFLAGS and YFLAGS are reserved | |
1184 | for the installer to set. | |
1185 | * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS. | |
1186 | * src/Makefile.am (AM_CFLAGS): Likewise. | |
1187 | (AM_YFLAGS): Renamed from YFLAGS. | |
1188 | ||
1189 | Fix some MAX and MIN problems. | |
1190 | * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN. | |
1191 | * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX. | |
1192 | * src/symtab.h (SYMBOL_NUMBER_MAX): New macro. | |
1193 | * src/reader.c (reader): Use it. | |
1194 | ||
1195 | * tests/regression.at (Braces parsing): Use grep, not fgrep, as | |
1196 | POSIX 1003.1-2001 has removed fgrep. | |
1197 | ||
1198 | 2002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz> | |
1199 | ||
1200 | * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be | |
1201 | interpreted as signed. | |
1202 | * lib/ebitset.c (ebitset_list): Fix bug. | |
1203 | ||
ff68026d PE |
1204 | 2002-10-01 Paul Eggert <eggert@twinsun.com> |
1205 | ||
1206 | More fixes for 64-bit hosts and large bitsets. | |
1207 | ||
1208 | * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list, | |
1209 | abitset_size, abitset_list, abitset_list_reverse, abitset_list): | |
1210 | Use bitset_bindex, not int or unsigned int or size_t, to count bits. | |
1211 | * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count, | |
1212 | struct bitset_vtable.list, struct bitset_vtable.list_reverse, | |
1213 | bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last, | |
1214 | bitset_count_): Likewise. | |
1215 | * lib/bitset.h (bitset_iterator.num, bitset_iterator.i, | |
1216 | bitset_first, bitset_last): Likewise. | |
1217 | * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list, | |
1218 | bitset_stats_list_reverse, bitset_stats_size, | |
1219 | bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse): | |
1220 | Likewise. | |
1221 | * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise. | |
1222 | * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free, | |
1223 | bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure, | |
1224 | bitsetv_reflexive_transitive_closure): Likewise. | |
1225 | * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise. | |
1226 | * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse): | |
1227 | Likewise. | |
1228 | * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge): | |
1229 | Likewise. | |
420f93c8 | 1230 | |
ff68026d PE |
1231 | * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes): |
1232 | Use size_t, not unsigned int, to count bytes. | |
1233 | * lib/abitset.h (abitset_bytes): Likewise. | |
1234 | * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc): | |
1235 | Likewise. | |
1236 | * lib/bitset.h (bitset_bytes): Likewise. | |
1237 | * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise. | |
1238 | * lib/bitset_stats.h (bitset_stats_bytes): Likewise. | |
1239 | * lib/bitsetv.c (bitsetv_alloc): Likewise. | |
1240 | * lib/ebitset.c (ebitset_bytes): Likewise. | |
1241 | * lib/ebitset.h (ebitset_bytes): Likewise. | |
1242 | * lib/lbitset.c (lbitset_bytes): Likewise. | |
1243 | * lib/lbitset.h (lbitset_bytes): Likewise. | |
420f93c8 | 1244 | |
ff68026d PE |
1245 | * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p, |
1246 | abitset_subset_p, abitset_disjoint_p, abitset_and, | |
1247 | abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or, | |
1248 | abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or, | |
1249 | abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp, | |
1250 | abitset_or_and, abitset_or_and_cmp): | |
1251 | Use bitset_windex instead of unsigned int. | |
1252 | * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise. | |
1253 | * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow, | |
1254 | ebitset_elt_add, ebitset_elt_remove, ebitset_weed, | |
1255 | ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init): | |
1256 | Likewise. | |
1257 | * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise. | |
420f93c8 | 1258 | |
ff68026d PE |
1259 | * lib/bitset.c (bitset_print): |
1260 | Use proper printf formats for widths of integer types. | |
1261 | * lib/bitset_stats.c (bitset_percent_histogram_print, | |
1262 | bitset_log_histogram_print, bitset_stats_print_1): Likewise. | |
1263 | * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise. | |
1264 | * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise. | |
1265 | * lib/lbitset.c (lbitset_bytes): Likewise. | |
420f93c8 | 1266 | |
ff68026d PE |
1267 | * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX, |
1268 | BITSET_SIZE_MAX): New macros. | |
1269 | (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that | |
1270 | sizeof (bitset_word) == sizeof (bitset_windex). All uses changed | |
1271 | to BITSET_WINDEX_MAX. | |
1272 | ||
1273 | * lib/bitset.c (bitset_next, bitset_prev, bitset_first, | |
1274 | bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value, | |
1275 | since we now return the bitset_bindex type (not int). | |
1276 | ||
1277 | * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow | |
1278 | when computing sizes. | |
1279 | * lib/ebitset.c (ebitset_elts_grow): Likewise. | |
1280 | ||
1281 | * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation | |
1282 | and avoid cast to unsigned. | |
1283 | ||
6aa452a6 AD |
1284 | 2002-09-30 Akim Demaille <akim@epita.fr> |
1285 | ||
1286 | * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h, | |
1287 | * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c: | |
1288 | Updates from Michael Hayes. | |
1289 | ||
927f7817 AD |
1290 | 2002-09-30 Art Haas <ahaas@neosoft.com> |
1291 | ||
1292 | * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER | |
1293 | invocations. | |
1294 | * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not | |
1295 | defined. | |
1296 | ||
9738f41e AD |
1297 | 2002-09-27 Akim Demaille <akim@epita.fr> |
1298 | ||
1299 | Version 1.49c. | |
1300 | ||
a5c75d7f AD |
1301 | 2002-09-27 Akim Demaille <akim@epita.fr> |
1302 | ||
1303 | * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7. | |
1304 | (Because of AC_LIBSOURCE). | |
1305 | ||
8280e179 AD |
1306 | 2002-09-27 Akim Demaille <akim@epita.fr> |
1307 | ||
1308 | Playing with Autoscan. | |
1309 | ||
1310 | * configure.ac: Remove the old LIBOBJ tweaks. | |
1311 | (AC_REPLACE_FUNCS): Add strrchr and strtol. | |
1312 | * lib/strrchr.c: New. | |
1313 | * lib/strtol.c: New, from the Coreutils 4.5.1. | |
1314 | ||
ae64af35 AD |
1315 | 2002-09-27 Akim Demaille <akim@epita.fr> |
1316 | ||
1317 | Playing with Autoscan. | |
1318 | ||
1319 | * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New. | |
1320 | * lib/Makefile.am (libbison_a_SOURCES): No longer include | |
1321 | argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd. | |
1322 | * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the | |
1323 | Coreutils 4.5.1. | |
1324 | ||
d1a1114f AD |
1325 | 2002-09-24 Akim Demaille <akim@epita.fr> |
1326 | ||
1327 | * doc/bison.texinfo (Stack Overflow): xref to Recursion. | |
1328 | (Frequently Asked Questions, Parser Stack Overflow): New. | |
1329 | ||
b906441c AD |
1330 | 2002-09-13 Akim Demaille <akim@epita.fr> |
1331 | ||
1332 | Playing with autoscan. | |
1333 | ||
1334 | * src/reader.c (get_merge_function): Use xstrdup, not strdup. | |
1335 | * src/files.c (skeleton_find): Remove, unused. | |
1336 | * m4/memcmp.m4: New, from the Coreutils 4.5.1. | |
1337 | * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP. | |
1338 | ||
bd701811 AD |
1339 | 2002-09-13 Akim Demaille <akim@epita.fr> |
1340 | ||
1341 | * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3. | |
1342 | * Makefile.am (AUTOMAKE_OPTIONS): Don't. | |
1343 | ||
e0a13e7b AD |
1344 | 2002-09-13 Akim Demaille <akim@epita.fr> |
1345 | ||
1346 | * configure.ac: Require 2.54. | |
1347 | s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/. | |
1348 | s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/. | |
1349 | * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4: | |
1350 | Remove, provided by Autoconf macros. | |
1351 | ||
c97011bf AD |
1352 | 2002-09-12 Akim Demaille <akim@epita.fr> |
1353 | ||
1354 | * m4/prereq.m4: Update, from Coreutils 4.5.1. | |
1355 | ||
d862b1be AD |
1356 | 2002-09-12 Akim Demaille <akim@epita.fr> |
1357 | ||
1358 | * m4/prereq.m4: Update, from Fileutils 4.1.5. | |
1359 | * configure.ac (jm_PREREQ_TEMPNAME): Invoke it. | |
1360 | Reported by Martin Mokrejs. | |
1361 | ||
3d38c03a AD |
1362 | 2002-09-10 Akim Demaille <akim@epita.fr> |
1363 | ||
1364 | * src/parse-gram.y: Associate a human readable string to each | |
1365 | token type. | |
1366 | * tests/regression.at (Invalid inputs): Adjust. | |
1367 | ||
b6347355 AD |
1368 | 2002-09-10 Gary V. Vaughan <gary@gnu.org> |
1369 | ||
1370 | * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships | |
1371 | with an Autoconf-2.5x style configure.ac. | |
1372 | ||
09ba4ab2 PE |
1373 | 2002-09-06 Paul Eggert <eggert@twinsun.com> |
1374 | ||
1375 | * doc/bison.texinfo (Conditions): Make explicit that the GPL | |
1376 | exception applies only to yacc.c. This is a modification of a | |
1377 | patch originally suggested by Akim Demaille. | |
1378 | ||
21846f69 AD |
1379 | 2002-09-06 Akim Demaille <akim@epita.fr> |
1380 | ||
09ba4ab2 PE |
1381 | * data/c.m4 (b4_copyright): Move the GPL exception comment from |
1382 | here to... | |
1383 | * data/yacc.c: here. | |
1384 | ||
21846f69 AD |
1385 | * data/lalr1.cc (struct yyltype): Don't define it, since we use |
1386 | LocationType. | |
1387 | (b4_ltype): Default to yy::Location from location.hh. | |
1388 | ||
c0ad8bf3 AD |
1389 | 2002-09-04 Jim Meyering <jim@meyering.net> |
1390 | ||
1391 | * data/yacc.c: Guard the declaration of yytoknum also with | |
1392 | `#ifdef YYPRINT', so it is declared only when used. | |
1393 | ||
3a93251e AD |
1394 | 2002-09-04 Akim Demaille <akim@epita.fr> |
1395 | ||
1396 | * configure.in: Rename as... | |
1397 | * configure.ac: this. | |
1398 | Bump to 1.49c. | |
1399 | ||
427c0dda AD |
1400 | 2002-09-04 Akim Demaille <akim@epita.fr> |
1401 | ||
1402 | * src/assoc.c, src/closure.c, src/gram.c, src/injections.c, | |
1403 | * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't | |
1404 | translate maintainer only messages. | |
1405 | ||
6a254321 PE |
1406 | 2002-08-12 Paul Eggert <eggert@twinsun.com> |
1407 | ||
645e30d1 PE |
1408 | Version 1.49b. |
1409 | ||
6a254321 PE |
1410 | * Makefile.am (SUBDIRS): Remove intl. |
1411 | (DISTCLEANFILES): Remove. | |
1412 | * NEWS: Mention that GNU M4 is now required. Clarify what is | |
1413 | meant by "larger grammars". Mention the pt_BR translation. | |
1414 | * configure.in (AC_CHECK_DECLS): Add getenv, getopt. | |
1415 | (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var. | |
1416 | Bump version from 0.11.2 to 0.11.5. | |
1417 | (BISON_PREREQ_STAGE): Remove. | |
1418 | (AM_GNU_GETTEXT): Use external gettext. | |
1419 | (AC_OUTPUT): Remove intl/Makefile. | |
1420 | ||
1421 | * config/depcomp, config/install-sh: Sync with Automake 1.6.3. | |
1422 | ||
1423 | * data/glr.c: Include string.h, for strlen. | |
1424 | (yyreportParseError): Use size_t for yysize. | |
1425 | (yy_yypstack): No longer nested inside yypstates, as nested | |
1426 | functions are not portable. Do not assume size_t is the | |
1427 | same width as int. | |
1428 | (yypstates): Do not assume that ptrdiff_t is the same width | |
1429 | as int, and similarly for yyposn and YYINDEX. | |
1430 | ||
1431 | * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage. | |
1432 | ||
1433 | * lib/Makefile.am (INCLUDES): Do not include from the intl | |
1434 | directory, which has been removed. | |
1435 | * src/Makefile.am (INCLUDES): Likewise. | |
1436 | ||
1437 | * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h. | |
1438 | (bitsets_sources, additional_bitsets_sources, timevars_sources): | |
1439 | New vars. | |
1440 | ||
1441 | * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension. | |
1442 | * tests/Makefile.am (EXTRA_DIST): Likewise. | |
1443 | ||
1444 | * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list): | |
1445 | Do not assume that bitset_windex is the same width as unsigned. | |
1446 | ||
1447 | * lib/abitset.c (abitset_unused_clear): Do not assume that | |
1448 | bitset_word is the same width as int. | |
1449 | * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise. | |
1450 | * lib/bitset.h (bitset_set, bitset_reset): Likewise. | |
1451 | * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise. | |
1452 | * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise. | |
1453 | * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise. | |
1454 | ||
1455 | * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for | |
1456 | portability to one's complement hosts!). | |
1457 | * lib/ebitset.c (ebitset_op1): Likewise. | |
1458 | * lib/lbitset.c (lbitset_op1): Likewise. | |
1459 | ||
1460 | * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar. | |
1461 | * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h, | |
1462 | lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c: | |
1463 | Sync with fileutils. | |
1464 | * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c, | |
1465 | lib/gettext.h: Sync with diffutils. | |
1466 | ||
1467 | * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c, | |
1468 | lib/strspn.c, lib/tempname.c: Use GPL, not LGPL. | |
1469 | ||
1470 | * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use | |
1471 | PROTOTYPES to check for prototypes, and "defined __STDC__" to | |
1472 | check for void *. | |
1473 | ||
1474 | * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not | |
1475 | size_t; the old version tried to do this but casted improperly. | |
1476 | (bitset_bindex, bitset_windex): Now size_t, not unsigned long. | |
1477 | (bitset_test): Now returns int, not unsigned long. | |
1478 | ||
1479 | * lib/bitset_stats.c: Include "gettext.h". | |
1480 | (_): New macro. | |
1481 | (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't | |
1482 | name locals "index", as it generates unnecessary warnings on some | |
1483 | hosts that have an "index" function. | |
1484 | ||
1485 | * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print, | |
1486 | bitset_stats_read, bitset_stats_write): Wrap strings in _() if | |
1487 | they need translation. | |
1488 | * src/LR0.c (state_list_append, new_itemsets, get_state, | |
1489 | append_states, generate_states): Likewise. | |
1490 | * src/assoc.c (assoc_to_string): Likewise. | |
1491 | * src/closure.c (print_closure, set_firsts, closure): Likewise. | |
1492 | * src/gram.c (grammar_dump): Likewise. | |
1493 | * src/injections.c (injections_compute): Likewise. | |
1494 | * src/lalr.c (lookaheads_print): Likewise. | |
1495 | * src/relation.c (relation_transpose): Likewise. | |
1496 | * src/scan-gram.l: Likewise. | |
1497 | * src/tables.c (table_grow, pack_vector): Likewise. | |
1498 | ||
1499 | * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4, | |
1500 | glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4. | |
1501 | * m4/malloc.m4, m4/realloc.m4: Sync with diffutils. | |
1502 | * m4/mbstate_t.m4: Sync with fileutils. | |
1503 | * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T. | |
1504 | ||
1505 | * po/LINGUAS: Add pt_BR. | |
1506 | * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c, | |
1507 | src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c, | |
1508 | lib/timevar.c. | |
1509 | Use src/parse-gram.y instead of src/parse-gram.c, as the gettext | |
1510 | manual recommends. | |
1511 | Similarly, use src/scan-gram.l instead of src/scan-gram.c. | |
1512 | ||
1513 | * src/complain.c (strerror_r): Remove decl; not needed. | |
1514 | (strerror): Use same pattern as ../lib/error.c. | |
1515 | ||
1516 | * src/files.c, src/files.h (compute_header_macro): Remove; unused. | |
1517 | ||
1518 | * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int. | |
1519 | ||
1520 | * src/main.c (main): Cast result of bindtextdomain and textdomain | |
1521 | to void, to avoid a GCC warning when --disable-nls is in effect. | |
1522 | ||
1523 | * src/scan-gram.l: Use strings rather than escapes when possible, | |
1524 | to minimize the number of warnings from xgettext. | |
1525 | (handle_action_dollar, handle_action_at): Don't use isdigit, | |
1526 | as it mishandles negative chars and it may not work as expected | |
1527 | outside the C locale. | |
1528 | ||
1529 | * src/symtab.c (symbol_get): Don't cast LHS of an assignment; | |
1530 | this is a GCC extension and is not portable to other compilers. | |
1531 | ||
1532 | * src/system.h (alloca): Use same pattern as ../lib/error.c. | |
1533 | Do not include <ctype.h>; no longer needed. | |
1534 | Do not include <malloc.h>; no longer needed (and generates | |
1535 | warnings on OpenBSD 3.0). | |
1536 | ||
1537 | * tests/cxx-type.at (yylex): Do not pass signed char to isupper; | |
1538 | it's not portable. | |
1539 | ||
1540 | * tests/regression.at: Do not use 'cc -c input.c -o input'; | |
1541 | Sun C rejects this. Instead, use 'cc -c input.c -o input.o'. | |
1542 | ||
1543 | * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero | |
1544 | exit status as failure, not just exit status 1. Sun C exits | |
1545 | with status 2 sometimes. | |
1546 | ||
1547 | * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro. | |
1548 | Use it for the two large tests. | |
1549 | ||
c8f002c7 AD |
1550 | 2002-08-02 Akim Demaille <akim@epita.fr> |
1551 | ||
1552 | * src/conflicts.c (conflicts_output): Don't output rules never | |
1553 | reduced here, since anyway that computation doesn't work. | |
1554 | * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p) | |
1555 | (rule_useless_p, rule_never_reduced_p): New. | |
1556 | (grammar_rules_partial_print): Use a filter instead of a range. | |
1557 | Display the title only if needed. | |
1558 | (grammar_rules_print): Adjust. | |
1559 | (grammar_rules_never_reduced_report): New. | |
1560 | * src/tables.c (action_row): Move the computation of rules never | |
1561 | reduced to... | |
1562 | (token_actions): here. | |
1563 | * src/main.c (main): Make the parser before making the report, so | |
1564 | that rules never reduced are computed. | |
1565 | Call grammar_rules_never_reduced_report. | |
1566 | * src/print.c (print_results): Report rules never reduced. | |
1567 | * tests/conflicts.at, tests/reduce.at: Adjust. | |
1568 | ||
cd08e51e AD |
1569 | 2002-08-01 Akim Demaille <akim@epita.fr> |
1570 | ||
1571 | Instead of attaching lookaheads and duplicating the rules being | |
1572 | reduced by a state, attach the lookaheads to the reductions. | |
1573 | ||
1574 | * src/state.h (state_t): Remove the `lookaheads', | |
1575 | `lookaheads_rule' member. | |
1576 | (reductions_t): Add a `lookaheads' member. | |
1577 | Use a regular array for the `rules'. | |
1578 | * src/state.c (reductions_new): Initialize the lookaheads member | |
1579 | to 0. | |
1580 | (state_rule_lookaheads_print): Adjust. | |
1581 | * src/state.h, src/state.c (state_reductions_find): New. | |
1582 | * src/conflicts.c (resolve_sr_conflict, set_conflicts) | |
1583 | (count_rr_conflicts): Adjust. | |
1584 | * src/lalr.c (LArule): Remove. | |
1585 | (add_lookback_edge): Adjust. | |
1586 | (state_lookaheads_count): New. | |
1587 | (states_lookaheads_initialize): Merge into... | |
1588 | (initialize_LA): this. | |
1589 | (lalr_free): Adjust. | |
1590 | * src/main.c (main): Don't free nullable and derives too early: it | |
1591 | is used by --verbose. | |
1592 | * src/print.c, src/print_graph.c, src/tables.c: Adjust. | |
1593 | ||
bb0027a9 AD |
1594 | 2002-08-01 Akim Demaille <akim@epita.fr> |
1595 | ||
1596 | * src/derives.h, src/derives.c (derives): A `rule_t***' instead of | |
1597 | `rule_number_t**'. | |
1598 | (set_derives, free_derives): Rename as... | |
1599 | (derives_compute, derives_free): this. | |
1600 | Adjust all dependencies. | |
1601 | * src/nullable.c (set_nullable, free_nullable): Rename as... | |
1602 | (nullable_compute, nullable_free): these. | |
1603 | (rule_list_t): Store rule_t *, not rule_number_t. | |
1604 | * src/state.c (state_rule_lookaheads_print): Directly compare rule | |
1605 | pointers, instead of their numbers. | |
1606 | * src/main.c (main): Call nullable_free, and derives_free earlier, | |
1607 | as they were lo longer used. | |
1608 | ||
3325ddc4 AD |
1609 | 2002-08-01 Akim Demaille <akim@epita.fr> |
1610 | ||
1611 | * lib/timevar.c (get_time): Include children time. | |
1612 | * src/lalr.h (LA, LArule): Don't export them: used with the | |
1613 | state_t. | |
1614 | * src/lalr.c (LA, LArule): Static. | |
1615 | * src/lalr.h, src/lalr.c (lalr_free): New. | |
1616 | * src/main.c (main): Call it. | |
1617 | * src/tables.c (pack_vector): Check whether loc is >= to the | |
1618 | table_size, not >. | |
1619 | (pack_tables): Don't free froms, tos, conflict_tos, and pos... | |
1620 | (tables_generate): do it, since that's also it which allocates | |
1621 | them. | |
1622 | Don't free LA and LArule, main does. | |
1623 | ||
c6f1a33c AD |
1624 | 2002-07-31 Akim Demaille <akim@epita.fr> |
1625 | ||
1626 | Separate parser tables computation and output. | |
1627 | ||
1628 | * src/output.c (nvectors, base_t, base, base_ninf, conflict_table) | |
1629 | (conflict_list, conflict_list_cnt, table, check, table_ninf) | |
1630 | (yydefgoto, yydefact, high): Move to... | |
1631 | * src/tables.h, src/tables.c: here. | |
1632 | * src/output.c (vector_number_t, VECTOR_NUMBER_MAX) | |
1633 | (VECTOR_NUMBER_MIN, state_number_to_vector_number) | |
1634 | (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN) | |
1635 | (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX) | |
1636 | (ACTION_MIN, actrow, order, nentries, pos, conflrow) | |
1637 | (conflict_list_free, table_size, lowzero, table_grow, conflict_row) | |
1638 | (action_row, save_row, token_actions, save_column, default_goto) | |
1639 | (goto_actions, sort_actions, matching_state, pack_vector) | |
1640 | (table_ninf_remap, pack_table, prepare_actions): Move to... | |
1641 | * src/tables.c: here. | |
1642 | * src/tables.h, src/tables.c(tables_generate, tables_free): New. | |
1643 | * src/output.c (token_actions, output_base, output_conflicts) | |
1644 | (output_check): Merge into... | |
1645 | (prepare_actions): this. | |
1646 | (actions_output): Rename as... | |
1647 | (user_actions_output): this. | |
1648 | * src/main.c (main): Call tables_generate and tables_free. | |
1649 | ||
1509d42f AD |
1650 | 2002-07-31 Akim Demaille <akim@epita.fr> |
1651 | ||
1652 | Steal GCC's --time-report support. | |
1653 | ||
1654 | * lib/timevar.c, lib/timevar.h, lib/timevar.def: New, | |
1655 | stolen/adjusted from GCC. | |
1656 | * m4/stage.m4: Remove time related checks. | |
1657 | * m4/timevar.m4: New. | |
1658 | * configure.in: Adjust. | |
1659 | * src/system.h: Adjust to using timevar.h. | |
1660 | * src/getargs.h, src/getargs.c: Support trace_time for | |
1661 | --trace=time. | |
1662 | * src/main.c (stage): Remove. | |
1663 | (main): Replace `stage' invocations with timevar calls. | |
1664 | * src/output.c: Insert pertinent timevar calls. | |
1665 | ||
273a74fa AD |
1666 | 2002-07-31 Akim Demaille <akim@epita.fr> |
1667 | ||
1668 | Let --trace have arguments. | |
1669 | ||
1670 | * src/getargs.h (enum trace_e): New. | |
1671 | * src/getargs.c (trace_args, trace_types, trace_argmatch): New. | |
1672 | (long_options, short_options): --trace/-T takes an optional | |
1673 | argument. | |
1674 | Change all the uses of trace_flag to reflect the new flags. | |
1675 | * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets. | |
1676 | ||
1677 | Strengthen `stage' portability. | |
1678 | ||
1679 | * m4/stage.m4 (BISON_PREREQ_STAGE): New. | |
1680 | * configure.in: Use it. | |
1681 | Don't check for malloc.h and sys/times.h. | |
1682 | * src/system.h: Include them when appropriate. | |
1683 | * src/main.c (stage): Compile only when mallinfo, struct mallinfo, | |
1684 | times and struct tms are available. | |
1685 | ||
217598da AD |
1686 | 2002-07-30 Akim Demaille <akim@epita.fr> |
1687 | ||
1688 | In verbose parse error message, don't report `error' as an | |
1689 | expected token. | |
1690 | * tests/actions.at (Printers and Destructors): Adjust. | |
1691 | * tests/calc.at (Calculator $1): Adjust. | |
1692 | * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose | |
1693 | error message, do not report the parser accepts the error token in | |
1694 | that state. | |
1695 | ||
52489d44 AD |
1696 | 2002-07-30 Akim Demaille <akim@epita.fr> |
1697 | ||
1698 | Normalize conflict related messages. | |
1699 | ||
1700 | * src/complain.h, src/complain.c (warn, complain): New. | |
1701 | * src/conflicts.c (conflicts_print): Use them. | |
1702 | (conflict_report_yacc): New, extracted from... | |
1703 | (conflicts_print): here. | |
1704 | * tests/conflicts.at, tests/existing.at: Adjust. | |
1705 | ||
e8832397 AD |
1706 | 2002-07-30 Akim Demaille <akim@epita.fr> |
1707 | ||
1708 | Report rules which are never reduced by the parser: those hidden | |
1709 | by conflicts. | |
1710 | ||
1711 | * src/LR0.c (save_reductions): Don't make the final state too | |
1712 | different: save its reduction (accept) instead of having a state | |
1713 | without any action (no shift or goto, no reduce). | |
1714 | Note: the final state is now a ``regular'' state, i.e., the | |
1715 | parsers now contain `reduce 0' as default reduction. | |
1716 | Nevertheless, since they decide to `accept' when yystate = | |
1717 | final_state, they still will not reduce rule 0. | |
1718 | * src/print.c (print_actions, print_reduction): Adjust. | |
1719 | * src/output.c (action_row): Track reduced rules. | |
1720 | (token_actions): Report rules never reduced. | |
1721 | * tests/conflicts.at, tests/regression.at: Adjust. | |
1722 | ||
caf23d24 AD |
1723 | 2002-07-30 Akim Demaille <akim@epita.fr> |
1724 | ||
1725 | `stage' was accidently included in a previous patch. | |
1726 | Initiate its autoconfiscation. | |
1727 | ||
1728 | * configure.in: Look for malloc.h and sys/times.h. | |
1729 | * src/main.c (stage): Adjust. | |
1730 | Report only when trace_flag. | |
1731 | ||
640748ee AD |
1732 | 2002-07-29 Akim Demaille <akim@epita.fr> |
1733 | ||
1734 | * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not | |
1735 | state_number_t. | |
1736 | (errs_t): symbol_t*, not symbol_number_t. | |
1737 | (reductions_t): rule_t*, not rule_number_t. | |
1738 | (FOR_EACH_SHIFT): New. | |
1739 | * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c | |
1740 | * src/print.c, src/print_graph.c: Adjust. | |
1741 | ||
88bce5a2 AD |
1742 | 2002-07-29 Akim Demaille <akim@epita.fr> |
1743 | ||
1744 | Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $. | |
1745 | ||
1746 | * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as... | |
1747 | (endtoken, accept): these. | |
1748 | * src/reader.c (reader): Set endtoken's default tag to "$end". | |
1749 | Set undeftoken's tag to "$undefined" instead of "$undefined.". | |
1750 | * doc/bison.texinfo (Table of Symbols): Mention $accept and $end. | |
1751 | Adjust. | |
1752 | ||
1bfb97db AD |
1753 | 2002-07-29 Akim Demaille <akim@epita.fr> |
1754 | ||
1755 | * src/reduce.c (reduce_grammar): When the language is empty, | |
1756 | complain about the start symbol, not the axiom. | |
1757 | Use its location. | |
1758 | * tests/reduce.at (Empty Language): New. | |
1759 | ||
fc5734fe AD |
1760 | 2002-07-26 Akim Demaille <akim@epita.fr> |
1761 | ||
1762 | * src/reader.h, src/reader.c (gram_error): ... can't get | |
1763 | yycontrol without making too strong assumptions on the parser | |
1764 | itself. | |
1765 | * src/output.c (prepare_tokens): Use the real 0th value of | |
1766 | token_translations instead of `0'. | |
1767 | * src/parse-gram.y (yyerror): Don't rely on yycontrol being | |
1768 | visible here. | |
1769 | * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc | |
1770 | for the time being: %locations ought to provide it to yyerror. | |
1771 | ||
3650b4b8 AD |
1772 | 2002-07-25 Akim Demaille <akim@epita.fr> |
1773 | ||
1774 | * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1. | |
1775 | * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./. | |
1776 | * tests/regression.at (Web2c Actions): Adjust. | |
1777 | ||
4b3d3a8e AD |
1778 | 2002-07-25 Akim Demaille <akim@epita.fr> |
1779 | ||
1780 | Stop storing rules from 1 to nrules + 1. | |
1781 | ||
1782 | * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c | |
1783 | * src/nullable.c, src/output.c, src/print.c, src/reader.c | |
1784 | * src/reduce.c: Allocate and free from &rules[0], not &rules[1]. | |
1785 | Iterate from 0 to nrules. | |
1786 | Use rule_number_as_item_number and item_number_as_rule_number. | |
1787 | Adjust to `derive' now containing possibly 0. | |
1788 | * src/gram.h (rule_number_as_item_number, item_number_as_rule_number): | |
1789 | Handle the `- 1' part in rule numbers from/to item numbers. | |
1790 | * src/conflicts.c (log_resolution): Fix the message which reversed | |
1791 | shift and reduce. | |
1792 | * src/output.c (action_row): Initialize default_rule to -1. | |
1793 | (token_actions): Adjust. | |
1794 | * tests/sets.at (Nullable, Firsts): Fix the previously bogus | |
1795 | expected output. | |
1796 | * tests/conflicts.at (Resolved SR Conflicts): Likewise. | |
1797 | ||
4a2a22f4 AD |
1798 | 2002-07-25 Akim Demaille <akim@epita.fr> |
1799 | ||
1800 | * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg) | |
1801 | (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls) | |
1802 | (b4_c_knr_arg_decl): New. | |
1803 | * data/yacc.c: Use it to define yysymprint, yydestruct, and | |
1804 | yyreport_parse_error. | |
1805 | ||
b8df3223 AD |
1806 | 2002-07-25 Akim Demaille <akim@epita.fr> |
1807 | ||
1808 | * data/yacc.c (yyreport_parse_error): New, extracted from... | |
1809 | (yyparse): here. | |
1810 | (yydestruct, yysymprint): Move above yyparse. | |
1811 | Be K&R compliant. | |
1812 | ||
a762e609 AD |
1813 | 2002-07-25 Akim Demaille <akim@epita.fr> |
1814 | ||
1815 | * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New, | |
1816 | replace... | |
1817 | (b4_sint_type, b4_uint_type): these. | |
1818 | * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for. | |
1819 | * tests/regression.at (Web2c Actions): Adjust. | |
1820 | ||
12b0043a AD |
1821 | 2002-07-25 Akim Demaille <akim@epita.fr> |
1822 | ||
1823 | * src/gram.h (TIEM_NUMBER_MAX): New. | |
1824 | (item_number_of_rule_number, rule_number_of_item_number): Rename | |
1825 | as... | |
1826 | (rule_number_as_item_number, item_number_as_rule_number): these. | |
1827 | Adjust dependencies. | |
1828 | * src/output.c (vector_number_t, VECTOR_NUMBER_MAX) | |
1829 | (VECTOR_NUMBER_MIN, state_number_to_vector_number) | |
1830 | (symbol_number_to_vector_number): New. | |
1831 | (order): Of vector_number_t* type. | |
1832 | (base_t, BASE_MAX, BASE_MIN): New. | |
1833 | (froms, tos, width, pos, check): Of base_t type. | |
1834 | (action_number_t, ACTION_MIN, ACTION_MAX): New. | |
1835 | (actrow): Of action_number_t type. | |
1836 | (conflrow): Of unsigned int type. | |
1837 | (table_ninf, base_ninf): New. | |
1838 | (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value. | |
1839 | (muscle_insert_int_table, muscle_insert_base_table) | |
1840 | (muscle_insert_rule_number_table): New. | |
1841 | (prepare_tokens): Output `toknum' as int_table. | |
1842 | (action_row): Returns a rule_number_t. | |
1843 | Use ACTION_MIN, not SHRT_MIN. | |
1844 | (token_actions): yydefact is rule_number_t*. | |
1845 | (table_ninf_remap): New. | |
1846 | (pack_table): Use it for `base' and `table'. | |
1847 | * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove, | |
1848 | replaced with... | |
1849 | (YYPACT_NINF, YYTABLE_NINF): these. | |
1850 | (yypact, yytable): Compute their types instead of hard-coded | |
1851 | `short'. | |
1852 | * tests/regression.at (Web2c Actions): Adjust. | |
1853 | ||
5dde258a AD |
1854 | 2002-07-19 Akim Demaille <akim@epita.fr> |
1855 | ||
1856 | * src/scan-gram.l (id): Can start with an underscore. | |
1857 | ||
a945ec39 AD |
1858 | 2002-07-16 Akim Demaille <akim@epita.fr> |
1859 | ||
1860 | * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New. | |
1861 | Adjust all former `associativity' dependencies. | |
1862 | * src/symtab.c (symbol_new): Default associativity is `undef', not | |
1863 | `right'. | |
1864 | (symbol_check_alias_consistence): Adjust. | |
1865 | ||
fae437e8 AD |
1866 | 2002-07-09 Akim Demaille <akim@epita.fr> |
1867 | ||
1868 | * doc/bison.texinfo: Properly set the ``header'' part. | |
1869 | Use @dircategory ``GNU programming tools'' as per Texinfo's | |
1870 | documentation. | |
1871 | Use @copying. | |
1872 | ||
1a715ef2 AD |
1873 | 2002-07-09 Akim Demaille <akim@epita.fr> |
1874 | ||
1875 | * lib/quotearg.h: Protect against multiple inclusions. | |
1876 | * src/location.h (location_t): Add a `file' member. | |
1877 | (LOCATION_RESET, LOCATION_PRINT): Adjust. | |
1878 | * src/complain.c (warn_at, complain_at, fatal_at): Drop | |
1879 | `error_one_per_line' support. | |
1880 | ||
a5d50994 AD |
1881 | 2002-07-09 Akim Demaille <akim@epita.fr> |
1882 | ||
1883 | * src/complain.h, src/complain.c (warn, complain): Remove, unused. | |
1884 | * src/reader.c (lineno): Remove. | |
1885 | Adjust all dependencies. | |
1886 | (get_merge_function): Take a location and use complain_at. | |
1887 | * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise. | |
1888 | * tests/regression.at (Invalid inputs, Mixing %token styles): | |
1889 | Adjust. | |
1890 | ||
b275314e AD |
1891 | 2002-07-09 Akim Demaille <akim@epita.fr> |
1892 | ||
1893 | * src/parse-gram.y (rules_or_grammar_declaration): Add an error | |
1894 | recovery rule, and forbid extensions when --yacc. | |
1895 | (gram_error): Use complain_at. | |
1896 | * src/reader.c (reader): Exit if there were parse errors. | |
1897 | ||
865b9df1 AD |
1898 | 2002-07-09 Akim Demaille <akim@epita.fr> |
1899 | ||
1900 | * tests/synclines.at (AT_SYNCLINES_COMPILE): New. | |
1901 | (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs. | |
1902 | Reported by R Blake <blakers@mac.com>. | |
1903 | ||
c76e14da AD |
1904 | 2002-07-09 Akim Demaille <akim@epita.fr> |
1905 | ||
1906 | * data/yacc.c: Output the copyright notive in the header. | |
1907 | ||
7db2ed2d AD |
1908 | 2002-07-03 Akim Demaille <akim@epita.fr> |
1909 | ||
1910 | * src/output.c (froms, tos): Are state_number_t. | |
1911 | (save_column): sp, sp1, and sp2 are state_number_t. | |
1912 | (prepare): Rename `final' as `final_state_number', `nnts' as | |
1913 | `nterms_number', `nrules' as `rules_number', `nstates' as | |
1914 | `states_number', and `ntokens' as `tokens_number'. Remove `nsym', | |
1915 | unused. | |
1916 | * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust. | |
1917 | * data/lalr1.cc (nsym_): Remove, unused. | |
1918 | ||
e68e0410 AD |
1919 | 2002-07-03 Akim Demaille <akim@epita.fr> |
1920 | ||
1921 | * src/lalr.h, src/lalr.c (goto_number_t): New. | |
1922 | * src/lalr.c (goto_list_t): New. | |
1923 | Propagate them. | |
1924 | * src/nullable.c (rule_list_t): New. | |
1925 | Propagate. | |
1926 | * src/types.h: Remove. | |
1927 | ||
e1a4f3a4 AD |
1928 | 2002-07-03 Akim Demaille <akim@epita.fr> |
1929 | ||
1930 | * src/closure.c (print_fderives): Use rule_rhs_print. | |
1931 | * src/derives.c (print_derives): Use rule_rhs_print. | |
1932 | (rule_list_t): New, replaces `shorts'. | |
1933 | (set_derives): Add comments. | |
1934 | * tests/sets.at (Nullable, Firsts): Adjust. | |
1935 | ||
536545f3 AD |
1936 | 2002-07-03 Akim Demaille <akim@epita.fr> |
1937 | ||
1938 | * src/output.c (prepare_actions): Free `tally' and `width'. | |
1939 | (prepare_actions): Allocate and free `order'. | |
1940 | * src/symtab.c (symbols_free): Free `symbols'. | |
1941 | * src/scan-gram.l (scanner_free): Clear Flex's scanners memory. | |
1942 | * src/output.c (m4_invoke): Move to... | |
1943 | * src/scan-skel.l: here. | |
1944 | (<<EOF>>): Close yyout, and free its name. | |
1945 | ||
8b752b00 AD |
1946 | 2002-07-03 Akim Demaille <akim@epita.fr> |
1947 | ||
1948 | Fix some memory leaks, and fix a bug: state 0 was examined twice. | |
1949 | ||
1950 | * src/LR0.c (new_state): Merge into... | |
1951 | (state_list_append): this. | |
1952 | (new_states): Merge into... | |
1953 | (generate_states): here. | |
1954 | (set_states): Don't ensure a proper `errs' state member here, do it... | |
1955 | * src/conflicts.c (conflicts_solve): here. | |
1956 | * src/state.h, src/state.c: Comment changes. | |
1957 | (state_t): Rename member `shifts' as `transitions'. | |
1958 | Adjust all dependencies. | |
1959 | (errs_new): For consistency, also take the values as argument. | |
1960 | (errs_dup): Remove. | |
1961 | (state_errs_set): New. | |
1962 | (state_reductions_set, state_transitions_set): Assert that no | |
1963 | previous value was assigned. | |
1964 | (state_free): New. | |
1965 | (states_free): Use it. | |
1966 | * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as | |
1967 | temporary storage: use `errs' and `nerrs' as elsewhere. | |
1968 | (set_conflicts): Allocate and free this `errs'. | |
1969 | ||
613f5e1a AD |
1970 | 2002-07-02 Akim Demaille <akim@epita.fr> |
1971 | ||
1972 | * lib/libiberty.h: New. | |
1973 | * lib: Update the bitset implementation from upstream. | |
1974 | * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c, | |
1975 | * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE. | |
1976 | * src/main.c: Adjust bitset stats calls. | |
1977 | ||
26e0cadc PE |
1978 | 2002-07-01 Paul Eggert <eggert@twinsun.com> |
1979 | ||
1980 | * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned | |
1981 | char, so that negative chars don't collide with $. | |
1982 | ||
1154cced AD |
1983 | 2002-06-30 Akim Demaille <akim@epita.fr> |
1984 | ||
1985 | Have the GLR tests be `warning' checked, and fix the warnings. | |
1986 | ||
1987 | * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG | |
1988 | (yyuserAction, yyreportAmbiguity): `Use' all the arguments. | |
1989 | (yyremoveDeletes): `yyi' and `yyj' are size_t. | |
1990 | Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies. | |
1991 | (yyaddDeferredAction): static. | |
1992 | (yyglrReduce): yyi, yyk, amd yyposn are size_t. | |
1993 | (yyreportParseError): yyprefix is const. | |
1994 | yytokenp is used only when verbose. | |
1995 | (yy__GNUC__): Replace with __GNUC__. | |
1996 | (yypdumpstack): yyi is size_t. | |
1997 | (yypreference): Un-yy local variables and arguments, to avoid | |
1998 | clashes with `yyr1'. Anyway, we are not in the user name space. | |
1999 | (yytname_size): be an int, as is compared with ints. | |
2000 | * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New. | |
2001 | Use them. | |
2002 | * tests/cxx-gram.at: Use quotation to protect $1. | |
2003 | Use AT_COMPILE to enable warnings hunts. | |
2004 | Prototype yylex and yyerror. | |
2005 | `Use' argc. | |
2006 | Include `string.h', not `strings.h'. | |
2007 | Produce and prototype stmtMerge only when used. | |
2008 | yylex takes a location. | |
2009 | ||
97650f4e AD |
2010 | 2002-06-30 Akim Demaille <akim@epita.fr> |
2011 | ||
2012 | We spend a lot of time in quotearg, in particular when --verbose. | |
2013 | ||
2014 | * src/symtab.c (symbol_get): Store a quoted version of the key. | |
2015 | (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove. | |
2016 | Adjust all callers. | |
2017 | ||
d2576365 AD |
2018 | 2002-06-30 Akim Demaille <akim@epita.fr> |
2019 | ||
2020 | * src/state.h (reductions_t): Rename member `nreds' as num. | |
2021 | (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'. | |
2022 | * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types. | |
2023 | ||
ccaf65bc AD |
2024 | 2002-06-30 Akim Demaille <akim@epita.fr> |
2025 | ||
2026 | * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT) | |
2027 | (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED) | |
2028 | (shifts_to): Rename as... | |
2029 | (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION) | |
2030 | (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE) | |
2031 | (TRANSITION_IS_DISABLED, transitions_to): these. | |
2032 | ||
87675353 AD |
2033 | 2002-06-30 Akim Demaille <akim@epita.fr> |
2034 | ||
2035 | * src/print.c (print_shifts, print_gotos): Merge into... | |
2036 | (print_transitions): this. | |
2037 | (print_transitions, print_errs, print_reductions): Align the | |
2038 | lookaheads columns. | |
2039 | (print_core, print_transitions, print_errs, print_state, | |
2040 | print_grammar): Output empty lines separator before, not after. | |
2041 | (state_default_rule_compute): Rename as... | |
2042 | (state_default_rule): this. | |
2043 | * tests/conflicts.at (Defaulted Conflicted Reduction), | |
2044 | (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust. | |
2045 | * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust. | |
2046 | ||
ce4ccb4b AD |
2047 | 2002-06-30 Akim Demaille <akim@epita.fr> |
2048 | ||
2049 | Display items as we display rules. | |
2050 | ||
2051 | * src/gram.h, src/gram.c (rule_lhs_print): New. | |
2052 | * src/gram.c (grammar_rules_partial_print): Use it. | |
2053 | * src/print.c (print_core): Likewise. | |
2054 | * tests/conflicts.at (Defaulted Conflicted Reduction), | |
2055 | (Unresolved SR Conflicts): Adjust. | |
2056 | (Unresolved SR Conflicts): Adjust and rename as... | |
2057 | (Resolved SR Conflicts): this, as was meant. | |
2058 | * tests/regression.at (Web2c Report): Adjust. | |
2059 | ||
bc933ef1 AD |
2060 | 2002-06-30 Akim Demaille <akim@epita.fr> |
2061 | ||
2062 | * src/print.c (state_default_rule_compute): New, extracted from... | |
2063 | (print_reductions): here. | |
2064 | Pessimize, but clarify the code. | |
2065 | * tests/conflicts.at (Defaulted Conflicted Reduction): New. | |
2066 | ||
53d4308d AD |
2067 | 2002-06-30 Akim Demaille <akim@epita.fr> |
2068 | ||
2069 | * src/output.c (action_row): Let default_rule be always a rule | |
2070 | number. | |
2071 | ||
574fb2d5 AD |
2072 | 2002-06-30 Akim Demaille <akim@epita.fr> |
2073 | ||
2074 | * src/closure.c (print_firsts, print_fderives, closure): | |
2075 | Use BITSET_EXECUTE. | |
2076 | * src/lalr.c (lookaheads_print): Likewise. | |
2077 | * src/state.c (state_rule_lookaheads_print): Likewise. | |
2078 | * src/print_graph.c (print_core): Likewise. | |
2079 | * src/print.c (print_reductions): Likewise. | |
2080 | * src/output.c (action_row): Likewise. | |
2081 | Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL. | |
2082 | ||
05811fd7 AD |
2083 | 2002-06-30 Akim Demaille <akim@epita.fr> |
2084 | ||
2085 | * src/print_graph.c: Use report_flag. | |
2086 | ||
0e4d5753 AD |
2087 | 2002-06-30 Akim Demaille <akim@epita.fr> |
2088 | ||
2089 | * src/lalr.c (traverse, digraph, matrix_print, transpose): Move | |
2090 | to... | |
2091 | * src/relation.h, src/relation.c (traverse, relation_digraph) | |
2092 | (relation_print, relation_transpose): New. | |
2093 | ||
24c7d800 AD |
2094 | 2002-06-30 Akim Demaille <akim@epita.fr> |
2095 | ||
2096 | * src/state.h, src/state.c (shifts_to): New. | |
2097 | * src/lalr.c (build_relations): Use it. | |
2098 | ||
9222837b AD |
2099 | 2002-06-30 Akim Demaille <akim@epita.fr> |
2100 | ||
2101 | * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number) | |
2102 | (item_number_of_rule_number, rule_number_of_item_number): New. | |
2103 | * src/LR0.c, src/closure.c, src/derives.c, src/derives.h, | |
2104 | * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c, | |
2105 | * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h: | |
2106 | Propagate their use. | |
2107 | Much remains to be done, in particular wrt `shorts' from types.h. | |
2108 | ||
260008e5 AD |
2109 | 2002-06-30 Akim Demaille <akim@epita.fr> |
2110 | ||
2111 | * src/symtab.c (symbol_new): Initialize the `printer' member. | |
2112 | ||
8a731ca8 AD |
2113 | 2002-06-30 Akim Demaille <akim@epita.fr> |
2114 | ||
2115 | * src/LR0.c (save_reductions): Remove, replaced by... | |
2116 | * src/state.h, src/state.c (state_reductions_set): New. | |
2117 | (reductions, errs): Rename as... | |
2118 | (reductions_t, errs_t): these. | |
2119 | Adjust all dependencies. | |
2120 | ||
32e1e0a4 AD |
2121 | 2002-06-30 Akim Demaille <akim@epita.fr> |
2122 | ||
2123 | * src/LR0.c (state_list_t, state_list_append): New. | |
2124 | (first_state, last_state): Now symbol_list_t. | |
2125 | (this_state): Remove. | |
2126 | (new_itemsets, append_states, save_reductions): Take a state_t as | |
2127 | argument. | |
2128 | (set_states, generate_states): Adjust. | |
2129 | (save_shifts): Remove, replaced by... | |
2130 | * src/state.h, src/state.c (state_shifts_set): New. | |
2131 | (shifts): Rename as... | |
2132 | (shifts_t): this. | |
2133 | Adjust all dependencies. | |
2134 | * src/state.h (state_t): Remove the `next' member. | |
2135 | ||
e5fb6710 AD |
2136 | 2002-06-30 Akim Demaille <akim@epita.fr> |
2137 | ||
2138 | * src/vcg.c (quote): Use slot 2, since we often pass symbol tag | |
2139 | escaped in slot 0. | |
2140 | ||
c7ca99d4 AD |
2141 | 2002-06-30 Akim Demaille <akim@epita.fr> |
2142 | ||
2143 | Use hash.h for the state hash table. | |
2144 | ||
2145 | * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove. | |
2146 | (allocate_storage): Use state_hash_new. | |
2147 | (free_storage): Use state_hash_free. | |
2148 | (new_state, get_state): Adjust. | |
2149 | * src/lalr.h, src/lalr.c (states): Move to... | |
2150 | * src/states.h (state_t): Remove the `link' member, no longer | |
2151 | used. | |
2152 | * src/states.h, src/states.c: here. | |
2153 | (state_hash_new, state_hash_free, state_hash_lookup) | |
2154 | (state_hash_insert, states_free): New. | |
2155 | * src/states.c (state_table, state_compare, state_hash): New. | |
2156 | * src/output.c (output_actions): Do not free states now, since we | |
2157 | still need to know the final_state number in `prepare', called | |
2158 | afterwards. Do it... | |
2159 | * src/main.c (main): here: call states_free after `output'. | |
2160 | ||
df0e7316 AD |
2161 | 2002-06-30 Akim Demaille <akim@epita.fr> |
2162 | ||
2163 | * src/state.h, src/state.c (state_new): New, extracted from... | |
2164 | * src/LR0.c (new_state): here. | |
2165 | * src/state.h (STATE_ALLOC): Move to... | |
2166 | * src/state.c: here. | |
2167 | * src/LR0.h, src/LR0.c (nstates, final_state): Move to... | |
2168 | * src/state.h, src/state.c: here. | |
2169 | ||
39f41916 AD |
2170 | 2002-06-30 Akim Demaille <akim@epita.fr> |
2171 | ||
2172 | * src/reader.c (gensym): Rename as... | |
2173 | * src/symtab.h, src/symtab.c (dummy_symbol_get): this. | |
2174 | (getsym): Rename as... | |
2175 | (symbol_get): this. | |
2176 | ||
d57650a5 AD |
2177 | 2002-06-30 Akim Demaille <akim@epita.fr> |
2178 | ||
2179 | * src/state.h (state_number_t, STATE_NUMBER_MAX): New. | |
2180 | * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h, | |
2181 | * src/output.c, src/print.c, src/print_graph.c: Propagate. | |
2182 | * src/LR0.h, src/LR0.h (final_state): Is a state_t*. | |
2183 | ||
5a08f1ce AD |
2184 | 2002-06-30 Akim Demaille <akim@epita.fr> |
2185 | ||
2186 | Make the test suite pass with warnings checked. | |
2187 | ||
2188 | * tests/actions.at (Printers and Destructors): Improve. | |
2189 | Avoid unsigned vs. signed issues. | |
2190 | * tests/calc.at: Don't exercise the scanner here, do it... | |
2191 | * tests/input.at (Torturing the Scanner): here. | |
2192 | ||
720623af PH |
2193 | 2002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU> |
2194 | ||
88e7e941 | 2195 | * data/glr.c: Correct typo in Emacs-mode directive. Slightly |
720623af PH |
2196 | reorganize first lines parallel to yacc.c. |
2197 | ||
fb8135fa AD |
2198 | 2002-06-28 Akim Demaille <akim@epita.fr> |
2199 | ||
2200 | * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define) | |
2201 | (b4_token_enum, b4_token_defines): New, factored from... | |
2202 | * data/lalr1.cc, data/yacc.c, glr.c: here. | |
2203 | ||
41442480 AD |
2204 | 2002-06-28 Akim Demaille <akim@epita.fr> |
2205 | ||
2206 | * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for | |
2207 | unused variables. | |
2208 | * src/output.c (merger_output): static. | |
2209 | ||
e0e5bf84 AD |
2210 | 2002-06-28 Akim Demaille <akim@epita.fr> |
2211 | ||
2212 | * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../. | |
2213 | * src/conflicts.c (conflicts_total_count): `i' is unsigned, to | |
2214 | pacify GCC. | |
2215 | * src/output.c (save_row): Initialize all the variables to pacify GCC. | |
e0e5bf84 | 2216 | |
676385e2 PH |
2217 | 2002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU> |
2218 | ||
2219 | Accumulated changelog for new GLR parsing features. | |
2220 | ||
6a254321 | 2221 | * src/conflicts.c (count_total_conflicts): Change name to |
676385e2 PH |
2222 | conflicts_total_count. |
2223 | * src/conflicts.h: Ditto. | |
2224 | * src/output.c (token_actions): Use the new name. | |
2225 | (output_conflicts): Change conflp => conflict_list_heads, and | |
2226 | confl => conflict_list for better readability. | |
2227 | * data/glr.c: Use the new names. | |
2228 | * NEWS: Add self to GLR announcement. | |
e0e5bf84 | 2229 | |
676385e2 PH |
2230 | * src/reader.c (free_merger_functions): Cleanup: XFREE->free. |
2231 | ||
2232 | * doc/bison.texinfo (GLR Parsers): Make corrections suggested by | |
2233 | Akim Demaille. | |
2234 | ||
2235 | * data/bison.glr: Change name to glr.c | |
2236 | * data/glr.c: Renamed from bison.glr. | |
2237 | * data/Makefile.am: Add glr.c | |
e0e5bf84 AD |
2238 | |
2239 | * src/getargs.c: | |
2240 | ||
676385e2 PH |
2241 | * src/symlist.h: Add dprec and merger fields to symbol_list_s. |
2242 | * src/symlist.c (symbol_list_new): Initialize dprec and merger fields. | |
e0e5bf84 | 2243 | |
676385e2 PH |
2244 | Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU> |
2245 | ||
2246 | * data/bison.glr: Be sure to restore the | |
2247 | current #line when returning to the skeleton contents after having | |
2248 | exposed the input file's #line. | |
2249 | ||
2250 | Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU> | |
2251 | ||
2252 | * data/bison.glr: Bring up to date with changes to bison.simple. | |
2253 | ||
2254 | Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU> | |
2255 | ||
2256 | * data/bison.glr: Correct definitions that use b4_prefix. | |
2257 | Various reformatting. | |
2258 | (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack. | |
2259 | (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove | |
2260 | yytokenp argument; now part of stack. | |
2261 | (yychar): Define to behave as documented. | |
2262 | (yyclearin): Ditto. | |
e0e5bf84 | 2263 | |
676385e2 PH |
2264 | Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU> |
2265 | ||
2266 | * src/reader.h: Add declaration for free_merger_functions. | |
2267 | ||
2268 | * src/reader.c (merge_functions): New variable. | |
2269 | (get_merge_function): New function. | |
2270 | (free_merger_functions): New function. | |
2271 | (readgram): Check for %prec that is not followed by a symbol. | |
2272 | Handle %dprec and %merge declarations. | |
2273 | (packgram): Initialize dprec and merger fields in rules array. | |
2274 | ||
2275 | * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list, | |
2276 | conflict_list_cnt, conflict_list_free): New variables. | |
2277 | (table_grow): Also grow conflict_table. | |
e0e5bf84 | 2278 | (prepare_rules): Output dprec and merger tables. |
676385e2 | 2279 | (conflict_row): New function. |
e0e5bf84 | 2280 | (action_row): Output conflict lists for GLR parser. Don't use |
676385e2 PH |
2281 | default reduction in conflicted states for GLR parser so that there |
2282 | are spaces for the conflict lists. | |
2283 | (save_row): Also save conflict information. | |
2284 | (token_actions): Allocate conflict list. | |
2285 | (merger_output): New function. | |
2286 | (pack_vector): Pack conflict table, too. | |
2287 | (output_conflicts): New function to output yyconflp and yyconfl. | |
2288 | (output_check): Allocate conflict_tos. | |
2289 | (output_actions): Output conflict tables, also. | |
2290 | (output_skeleton): Output b4_mergers definition. | |
2291 | (prepare): Output b4_max_rhs_length definition. | |
2292 | Use 'bison.glr' as default skeleton for GLR parsers. | |
2293 | ||
2294 | * src/gram.c (glr_parser): New flag. | |
2295 | (grammar_free): Call free_merger_functions. | |
2296 | ||
2297 | * src/conflicts.c (count_rr_conflicts): Augment to optionally count | |
2298 | all pairs of conflicting reductions, rather than just all tokens | |
2299 | causing conflicts. Needed to size conflict tables. | |
e0e5bf84 | 2300 | (conflicts_output): Modify call to count_rr_conflicts for new |
676385e2 PH |
2301 | interface. |
2302 | (conflicts_print): Ditto. | |
2303 | (count_total_conflicts): New function. | |
2304 | ||
2305 | * src/reader.h (merger_list): New type. | |
2306 | (merge_functions): New variable. | |
2307 | ||
2308 | * src/lex.h (tok_dprec, tok_merge): New token types. | |
2309 | ||
2310 | * src/gram.h (rule_s): Add dprec and merger fields. | |
2311 | (glr_parser): New flag. | |
2312 | ||
2313 | * src/conflicts.h (count_total_conflicts): New function. | |
2314 | ||
2315 | * src/options.c (option_table): Add %dprec, %merge, and %glr-parser. | |
2316 | ||
2317 | * doc/bison.texinfo (Generalized LR Parsing): New section. | |
2318 | (GLR Parsers): New section. | |
2319 | (Language and Grammar): Mention GLR parsing. | |
2320 | (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR | |
2321 | Correct typo ("tge" -> "the"). | |
2322 | ||
2323 | * data/bison.glr: New skeleton for GLR parsing. | |
2324 | ||
2325 | * tests/cxx-gram.at: New tests for GLR parsing. | |
2326 | ||
2327 | * tests/testsuite.at: Include cxx-gram.at. | |
2328 | ||
2329 | * tests/Makefile.am: Add cxx-gram.at. | |
e0e5bf84 | 2330 | |
676385e2 PH |
2331 | * src/parse-gram.y: |
2332 | ||
2333 | * src/scan-gram.l: Add %dprec, %glr-parser, %merge. | |
2334 | ||
2335 | * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser. | |
e0e5bf84 | 2336 | |
b5480d74 | 2337 | 2002-06-27 Akim Demaille <akim@epita.fr> |
e2aaf4c4 AD |
2338 | |
2339 | * src/options.h, src/options.c: Remove. | |
2340 | * src/getargs.c (short_options, long_options): New. | |
2341 | ||
60491a94 AD |
2342 | 2002-06-27 Akim Demaille <akim@epita.fr> |
2343 | ||
2344 | * data/bison.simple, data/bison.c++: Rename as... | |
2345 | * data/yacc.c, data/lalr1.cc: these. | |
2346 | * doc/bison.texinfo (Environment Variables): Remove. | |
2347 | ||
9be0c25b AD |
2348 | 2002-06-25 Raja R Harinath <harinath@cs.umn.edu> |
2349 | ||
2350 | * src/getargs.c (report_argmatch): Initialize strtok(). | |
2351 | ||
1ae72863 AD |
2352 | 2002-06-20 Akim Demaille <akim@epita.fr> |
2353 | ||
2354 | * data/bison.simple (b4_symbol_actions): New, replaces... | |
2355 | (b4_symbol_destructor, b4_symbol_printer): these. | |
2356 | (yysymprint): Be sure to call YYPRINT only for tokens, and using | |
2357 | user token numbers. | |
2358 | ||
87542d29 AD |
2359 | 2002-06-20 Akim Demaille <akim@epita.fr> |
2360 | ||
2361 | * data/bison.simple (yydestructor): Rename as... | |
2362 | (yydestruct): this. | |
2363 | ||
1a31ed21 AD |
2364 | 2002-06-20 Akim Demaille <akim@epita.fr> |
2365 | ||
2366 | * src/symtab.h, src/symtab.c (symbol_type_set) | |
2367 | (symbol_destructor_set, symbol_precedence_set): The location is | |
2368 | the last argument. | |
2369 | Adjust all callers. | |
2370 | ||
e776192e AD |
2371 | 2002-06-20 Akim Demaille <akim@epita.fr> |
2372 | ||
2373 | * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser | |
2374 | internals. | |
2375 | * src/reader.h, src/reader.c (grammar_current_rule_prec_set): | |
2376 | Takes a location. | |
2377 | * src/symtab.h, src/symtab.c (symbol_class_set) | |
2378 | (symbol_user_token_number_set): Likewise. | |
2379 | Adjust all callers. | |
2380 | Promote complain_at. | |
2381 | * tests/input.at (Type Clashes): Adjust. | |
2382 | ||
5c1180b3 AD |
2383 | 2002-06-20 Akim Demaille <akim@epita.fr> |
2384 | ||
2385 | * data/bison.simple (YYLEX): Fix the declaration when | |
2386 | %pure-parser. | |
2387 | ||
e3170060 AD |
2388 | 2002-06-20 Akim Demaille <akim@epita.fr> |
2389 | ||
2390 | * data/bison.simple (yysymprint): Don't print the token number, | |
2391 | just its name. | |
2392 | * tests/actions.at (Destructors): Rename as... | |
2393 | (Printers and Destructors): this. | |
2394 | Also exercise %printer. | |
2395 | ||
253862fd AD |
2396 | 2002-06-20 Akim Demaille <akim@epita.fr> |
2397 | ||
2398 | * data/bison.simple (YYDSYMPRINT): New. | |
2399 | Use it to remove many of the #if YYDEBUG/if (yydebug). | |
2400 | ||
366eea36 AD |
2401 | 2002-06-20 Akim Demaille <akim@epita.fr> |
2402 | ||
2403 | * src/symtab.h, src/symtab.c (symbol_t): printer and | |
2404 | printer_location are new members. | |
2405 | (symbol_printer_set): New. | |
2406 | * src/parse-gram.y (PERCENT_PRINTER): New token. | |
2407 | Handle its associated rule. | |
2408 | * src/scan-gram.l: Adjust. | |
2409 | (handle_destructor_at, handle_destructor_dollar): Rename as... | |
2410 | (handle_symbol_code_at, handle_symbol_code_dollar): these. | |
2411 | * src/output.c (symbol_printers_output): New. | |
2412 | (output_skeleton): Call it. | |
2413 | * data/bison.simple (yysymprint): New. Cannot be named yyprint | |
2414 | since there are already many grammar files with a user `yyprint'. | |
2415 | Replace the calls to YYPRINT to calls to yysymprint. | |
2416 | * tests/calc.at: Adjust. | |
2417 | * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was | |
2418 | taking advantage of parser very internal details (stack size!). | |
2419 | ||
4f25ebb0 AD |
2420 | 2002-06-20 Akim Demaille <akim@epita.fr> |
2421 | ||
2422 | * src/scan-gram.l: Complete the scanner with the missing patterns | |
2423 | to pacify Flex. | |
2424 | Use `quote' and `symbol_tag_get' where appropriate. | |
2425 | ||
93b68a0e AD |
2426 | 2002-06-19 Akim Demaille <akim@epita.fr> |
2427 | ||
2428 | * tests/actions.at (Destructors): Augment to test locations. | |
2429 | * data/bison.simple (yydestructor): Pass it the current location | |
2430 | if locations are enabled. | |
2431 | Prototype only when __STDC__ or C++. | |
2432 | Change the argument names to move into the yy name space: there is | |
2433 | user code here. | |
2434 | ||
58612f1d AD |
2435 | 2002-06-19 Akim Demaille <akim@epita.fr> |
2436 | ||
74310291 AD |
2437 | * data/bison.simple (b4_pure_if): New. |
2438 | Use it instead of #ifdef YYPURE. | |
2439 | ||
2440 | 2002-06-19 Akim Demaille <akim@epita.fr> | |
2441 | ||
2442 | * data/bison.simple (b4_location_if): New. | |
58612f1d AD |
2443 | Use it instead of #ifdef YYLSP_NEEDED. |
2444 | ||
f25bfb75 AD |
2445 | 2002-06-19 Akim Demaille <akim@epita.fr> |
2446 | ||
2447 | Prepare @$ in %destructor, but currently don't bind it in the | |
2448 | skeleton, as %location use is not cleaned up yet. | |
2449 | ||
2450 | * src/scan-gram.l (handle_dollar, handle_destructor_at) | |
2451 | (handle_action_at): New. | |
2452 | (handle_at, handle_action_dollar, handle_destructor_dollar): Take | |
2453 | a braced_code_t and a location as additional arguments. | |
2454 | (handle_destructor_dollar): Instead of requiring `b4_eval', just | |
2455 | unquote one when outputting `b4_dollar_dollar'. | |
2456 | Adjust callers. | |
2457 | * data/bison.simple (b4_eval): Remove. | |
2458 | (b4_symbol_destructor): Adjust. | |
2459 | * tests/input.at (Invalid @n): Adjust. | |
2460 | ||
c732d2c6 AD |
2461 | 2002-06-19 Zack Weinberg <zack@codesourcery.com> |
2462 | ||
2463 | * doc/bison.texinfo: Document ability to have multiple | |
2464 | prologue sections. | |
2465 | ||
8c165d89 AD |
2466 | 2002-06-18 Akim Demaille <akim@epita.fr> |
2467 | ||
2468 | * src/files.c (compute_base_names): When computing the output file | |
2469 | names from the input file name, strip the directory part. | |
2470 | ||
ca98bf57 AD |
2471 | 2002-06-18 Akim Demaille <akim@epita.fr> |
2472 | ||
2473 | * data/bison.simple.new: Comment changes. | |
2474 | Reported by Andreas Schwab. | |
2475 | ||
0bfb02ff AD |
2476 | 2002-06-18 Matt Kraai <kraai@alumni.cmu.edu> |
2477 | ||
2478 | * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that | |
2479 | there are no `label `yyoverflowlab' defined but not used' warnings | |
2480 | when yyoverflow is defined. | |
2481 | ||
24c0aad7 AD |
2482 | 2002-06-18 Akim Demaille <akim@epita.fr> |
2483 | ||
2484 | * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a | |
2485 | new member. | |
2486 | (symbol_destructor_set): Adjust. | |
2487 | * src/output.c (symbol_destructors_output): Output the destructor | |
2488 | locations. | |
2489 | Output the symbol name. | |
2490 | * data/bison.simple (b4_symbol_destructor): Adjust. | |
2491 | ||
5719c109 AD |
2492 | 2002-06-18 Cris Bailiff <c.bailiff@awayweb.com> |
2493 | and Akim Demaille <akim@epita.fr> | |
2494 | ||
2495 | * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy | |
2496 | what's left on the stack when the error recovery hits EOF. | |
2497 | * tests/actions.at (Destructors): Complete to exercise this case. | |
2498 | ||
9280d3ef AD |
2499 | 2002-06-17 Akim Demaille <akim@epita.fr> |
2500 | ||
2501 | * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of | |
2502 | arguments is really empty, not only equal to `[]'. | |
2503 | * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new | |
2504 | member. | |
2505 | (symbol_destructor_set): New. | |
2506 | * src/output.c (symbol_destructors_output): New. | |
2507 | * src/reader.h (brace_code_t, current_braced_code): New. | |
2508 | * src/scan-gram.l (BRACED_CODE): Use it to branch on... | |
2509 | (handle_dollar): Rename as... | |
2510 | (handle_action_dollar): this. | |
2511 | (handle_destructor_dollar): New. | |
2512 | * src/parse-gram.y (PERCENT_DESTRUCTOR): New. | |
2513 | (grammar_declaration): Use it. | |
2514 | * data/bison.simple (yystos): Is always defined. | |
2515 | (yydestructor): New. | |
2516 | * tests/actions.at (Destructors): New. | |
2517 | * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep. | |
2518 | ||
dafdc66f AD |
2519 | 2002-06-17 Akim Demaille <akim@epita.fr> |
2520 | ||
2521 | * src/symlist.h, src/symlist.c (symbol_list_length): New. | |
2522 | * src/scan-gram.l (handle_dollar, handle_at): Compute the | |
2523 | rule_length only when needed. | |
2524 | * src/output.c (actions_output, token_definitions_output): Output | |
2525 | the full M4 block. | |
2526 | * src/symtab.c: Don't access directly to the symbol tag, use | |
2527 | symbol_tag_get. | |
2528 | * src/parse-gram.y: Use symbol_list_free. | |
2529 | ||
56c47203 AD |
2530 | 2002-06-17 Akim Demaille <akim@epita.fr> |
2531 | ||
2532 | * src/reader.h, src/reader.c (symbol_list, symbol_list_new) | |
2533 | (symbol_list_prepend, get_type_name): Move to... | |
2534 | * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new) | |
2535 | (symbol_list_prepend, symbol_list_n_type_name_get): here. | |
2536 | Adjust all callers. | |
2537 | (symbol_list_free): New. | |
2538 | * src/scan-gram.l (handle_dollar): Takes a location. | |
2539 | * tests/input.at (Invalid $n): Adjust. | |
2540 | ||
1e0bab92 AD |
2541 | 2002-06-17 Akim Demaille <akim@epita.fr> |
2542 | ||
2543 | * src/reader.h, src/reader.c (symbol_list_new): Export it. | |
2544 | (symbol_list_prepend): New. | |
2545 | * src/parse-gram.y (%union): `list' is a new member. | |
2546 | (symbols.1): New, replaces... | |
2547 | (terms_to_prec.1, nterms_to_type.1): these. | |
2548 | * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set) | |
2549 | Take a location as additional argument. | |
2550 | Adjust all callers. | |
2551 | ||
04e60654 AD |
2552 | 2002-06-15 Akim Demaille <akim@epita.fr> |
2553 | ||
2554 | * src/parse-gram.y: Move %token in the declaration section so that | |
2555 | we don't depend upon CVS Bison. | |
2556 | ||
10e5b8bd AD |
2557 | 2002-06-15 Akim Demaille <akim@epita.fr> |
2558 | ||
2559 | * src/state.h, src/state.c (state_rule_lookaheads_print): New. | |
2560 | * src/print.c (print_core): Use it. | |
2561 | ||
9801d40c AD |
2562 | 2002-06-15 Akim Demaille <akim@epita.fr> |
2563 | ||
2564 | * src/conflicts.c (log_resolution): Accept the rule involved in | |
2565 | the sr conflicts instead of the lookahead number that points to | |
2566 | that rule. | |
2567 | (flush_reduce): Accept the current lookahead vector as argument, | |
2568 | instead of the index in LA. | |
2569 | (resolve_sr_conflict): Accept the current number of lookahead | |
2570 | bitset to consider for the STATE, instead of the index in LA. | |
2571 | (set_conflicts): Adjust. | |
2572 | * src/lalr.c, src/lalr.h, src/state.h: Comment changes. | |
2573 | ||
c0263492 AD |
2574 | 2002-06-15 Akim Demaille <akim@epita.fr> |
2575 | ||
2576 | * src/state.h (state_t): Replace the `lookaheadsp' member, a | |
2577 | short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**). | |
2578 | Adjust all dependencies. | |
2579 | * src/lalr.c (initialize_lookaheads): Split into... | |
2580 | (states_lookaheads_count, states_lookaheads_initialize): these. | |
2581 | (lalr): Adjust. | |
2582 | ||
9757c359 AD |
2583 | 2002-06-15 Akim Demaille <akim@epita.fr> |
2584 | ||
2585 | * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved | |
2586 | out of... | |
2587 | (grammar_rules_print): here. | |
2588 | * src/reduce.c (reduce_output): Use it. | |
2589 | * tests/reduce.at (Useless Rules, Reduced Automaton) | |
2590 | (Underivable Rules): Adjust. | |
2591 | ||
6b98e4b5 AD |
2592 | 2002-06-15 Akim Demaille <akim@epita.fr> |
2593 | ||
2594 | Copy BYacc's nice way to report the grammar. | |
2595 | ||
2596 | * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print): | |
2597 | New. | |
2598 | Don't print the rules' location, it is confusing and useless. | |
2599 | (rule_print): Use grammar_rhs_print. | |
2600 | * src/print.c (print_grammar): Use grammar_rules_print. | |
2601 | ||
6b98e4b5 AD |
2602 | 2002-06-15 Akim Demaille <akim@epita.fr> |
2603 | ||
2604 | Complete and rationalize `useless thing' warnings. | |
2605 | ||
2606 | * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n) | |
2607 | (symbol_tag_print): New. | |
2608 | Use them everywhere in place of accessing directly the tag member. | |
2609 | * src/gram.h, src/gram.c (rule_print): New. | |
2610 | Use it where a rule used to be printed `by hand'. | |
2611 | * src/reduce.c (nonterminals_reduce): Report the use nonterminals. | |
2612 | (reduce_grammar_tables): Report the useless rules. | |
2613 | (reduce_print): Useless things are a warning, not an error. | |
2614 | Report it as such. | |
2615 | * tests/reduce.at (Useless Nonterminals, Useless Rules): | |
2616 | (Reduced Automaton, Underivable Rules): Adjust. | |
2617 | * tests/regression.at (Web2c Report, Web2c Report): Adjust. | |
2618 | * tests/conflicts.at (Unresolved SR Conflicts) | |
2619 | (Solved SR Conflicts): Adjust. | |
2620 | ||
ee000ba4 AD |
2621 | 2002-06-15 Akim Demaille <akim@epita.fr> |
2622 | ||
2623 | Let symbols have a location. | |
2624 | ||
2625 | * src/symtab.h, src/symtab.c (symbol_t): Location is a new member. | |
2626 | (getsym): Adjust. | |
2627 | Adjust all callers. | |
2628 | * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at): | |
2629 | Use location_t, not int. | |
2630 | * src/symtab.c (symbol_check_defined): Take advantage of the | |
2631 | location. | |
2632 | * tests/regression.at (Invalid inputs): Adjust. | |
2633 | ||
8efe435c AD |
2634 | 2002-06-15 Akim Demaille <akim@epita.fr> |
2635 | ||
2636 | * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New. | |
2637 | (input): Don't try to initialize yylloc here, do it in the | |
2638 | scanner. | |
2639 | * src/scan-gram.l (YY_USER_INIT): Initialize yylloc. | |
2640 | * src/gram.h (rule_t): Change line and action_line into location | |
2641 | and action_location, of location_t type. | |
2642 | Adjust all dependencies. | |
2643 | * src/location.h, src/location.c (empty_location): New. | |
2644 | * src/reader.h, src/reader.c (grammar_start_symbol_set) | |
2645 | (grammar_symbol_append, grammar_rule_begin, grammar_rule_end) | |
2646 | (grammar_current_rule_symbol_append) | |
2647 | (grammar_current_rule_action_append): Expect a location as argument. | |
2648 | * src/reader.c (grammar_midrule_action): Adjust to attach an | |
2649 | action's location as dummy symbol location. | |
2650 | * src/symtab.h, src/symtab.c (startsymbol_location): New. | |
2651 | * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust | |
2652 | the line numbers. | |
2653 | ||
1921f1d7 AD |
2654 | 2002-06-14 Akim Demaille <akim@epita.fr> |
2655 | ||
2656 | Grammar declarations may be found in the grammar section. | |
2657 | ||
2658 | * src/parse-gram.y (rules_or_grammar_declaration): New. | |
2659 | (declarations): Each declaration may end with a semicolon, not | |
2660 | just... | |
2661 | (grammar_declaration): `"%union"'. | |
2662 | (grammar): Branch to rules_or_grammar_declaration. | |
2663 | ||
4515534c AD |
2664 | 2002-06-14 Akim Demaille <akim@epita.fr> |
2665 | ||
2666 | * src/main.c (main): Invoke scanner_free. | |
2667 | ||
f958596b AD |
2668 | 2002-06-14 Akim Demaille <akim@epita.fr> |
2669 | ||
2670 | * src/output.c (m4_invoke): Extracted from... | |
2671 | (output_skeleton): here. | |
2672 | Free tempfile. | |
2673 | ||
2c569025 AD |
2674 | 2002-06-14 Akim Demaille <akim@epita.fr> |
2675 | ||
2676 | * src/parse-gram.y (directives, directive, gram) | |
2677 | (grammar_directives, precedence_directives, precedence_directive): | |
2678 | Rename as... | |
2679 | (declarations, declaration, grammar, grammar_declaration) | |
2680 | (precedence_declaration, precedence_declarator): these. | |
2681 | (symbol_declaration): New. | |
2682 | ||
592e8d4d AD |
2683 | 2002-06-14 Akim Demaille <akim@epita.fr> |
2684 | ||
2685 | * src/files.c (action_obstack): Remove, unused. | |
2686 | (output_obstack): Remove it, and all its dependencies, as it is no | |
2687 | longer needed. | |
2688 | * src/reader.c (epilogue_set): Build the epilogue in the | |
2689 | muscle_obstack. | |
2690 | * src/output.h, src/output.c (muscle_obstack): Move to... | |
2691 | * src/muscle_tab.h, src/muscle_tab.h: here. | |
2692 | (muscle_init): Initialize muscle_obstack. | |
2693 | (muscle_free): New. | |
2694 | * src/main.c (main): Call it. | |
2695 | ||
0c15323d AD |
2696 | 2002-06-14 Akim Demaille <akim@epita.fr> |
2697 | ||
2698 | * src/location.h: New, extracted from... | |
2699 | * src/reader.h: here. | |
2700 | * src/Makefile.am (noinst_HEADERS): Merge into | |
2701 | (bison_SOURCES): this. | |
2702 | Add location.h. | |
2703 | * src/parse-gram.y: Use location_t instead of Bison's. | |
2704 | * src/reader.h, src/reader.c (prologue_augment, epilogue_set): | |
2705 | Use location_t instead of ints. | |
2706 | ||
e96c9728 AD |
2707 | 2002-06-14 Akim Demaille <akim@epita.fr> |
2708 | ||
2709 | * data/bison.simple, data/bison.c++: Be sure to restore the | |
2710 | current #line when returning to the skeleton contents after having | |
2711 | exposed the input file's #line. | |
2712 | ||
75d1fe16 AD |
2713 | 2002-06-12 Akim Demaille <akim@epita.fr> |
2714 | ||
2715 | * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too | |
2716 | eager. | |
2717 | * tests/actions.at (Exotic Dollars): New. | |
2718 | ||
6c35d22c AD |
2719 | 2002-06-12 Akim Demaille <akim@epita.fr> |
2720 | ||
2721 | * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst | |
2722 | ['"/] too eagerly. | |
2723 | * tests/input.at (Torturing the Scanner): New. | |
2724 | ||
1d6412ad AD |
2725 | 2002-06-11 Akim Demaille <akim@epita.fr> |
2726 | ||
2727 | * src/scan-gram.l (YY_OBS_INIT): Remove, replace with... | |
2728 | [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE] | |
2729 | [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment. | |
2730 | * src/reader.h, src/scan-gram.l (scanner_initialize): this. | |
2731 | * src/reader.c (reader): Use it. | |
2732 | ||
4cdb01db AD |
2733 | 2002-06-11 Akim Demaille <akim@epita.fr> |
2734 | ||
2735 | * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval. | |
2736 | Adjust all callers. | |
2737 | (scanner_last_string_free): New. | |
2738 | ||
44995b2e AD |
2739 | 2002-06-11 Akim Demaille <akim@epita.fr> |
2740 | ||
2741 | * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as... | |
2742 | (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these. | |
2743 | (last_string, YY_OBS_FREE): New. | |
2744 | Use them when returning an ID. | |
2745 | ||
e9955c83 AD |
2746 | 2002-06-11 Akim Demaille <akim@epita.fr> |
2747 | ||
2748 | Have Bison grammars parsed by a Bison grammar. | |
2749 | ||
2750 | * src/reader.c, src/reader.h (prologue_augment): New. | |
2751 | * src/reader.c (copy_definition): Remove. | |
2752 | ||
2753 | * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment) | |
2754 | (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action) | |
2755 | (grammar_current_rule_prec_set, grammar_current_rule_check) | |
2756 | (grammar_current_rule_symbol_append) | |
2757 | (grammar_current_rule_action_append): Export. | |
2758 | * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_ | |
2759 | (symbol_list_action_append): Remove. | |
2760 | Hook the routines from reader. | |
2761 | * src/scan-gram.l: In INITIAL, characters and strings are tokens. | |
2762 | * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now. | |
2763 | ||
2764 | * src/reader.c (read_declarations): Remove, unused. | |
2765 | ||
2766 | * src/parse-gram.y: Handle the epilogue. | |
2767 | * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as... | |
2768 | (grammar_start_symbol_set): this. | |
2769 | * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet. | |
2770 | * src/reader.c (readgram): Remove, unused. | |
2771 | (reader): Adjust to insert eoftoken and axiom where appropriate. | |
2772 | ||
2773 | * src/reader.c (copy_dollar): Replace with... | |
2774 | * src/scan-gram.h (handle_dollar): this. | |
2775 | * src/parse-gram.y: Remove `%thong'. | |
2776 | ||
2777 | * src/reader.c (copy_at): Replace with... | |
2778 | * src/scan-gram.h (handle_at): this. | |
2779 | ||
2780 | * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at): | |
2781 | New. | |
2782 | ||
2783 | * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the | |
2784 | time being. | |
2785 | ||
2786 | * src/reader.h, src/reader.c (grammar_rule_end): New. | |
2787 | ||
2788 | * src/parse.y (current_type, current_class): New. | |
2789 | Implement `%nterm', `%token' support. | |
2790 | Merge `%term' into `%token'. | |
2791 | (string_as_id): New. | |
2792 | * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the | |
2793 | type name. | |
2794 | ||
2795 | * src/parse-gram.y: Be sure to handle properly the beginning of | |
2796 | rules. | |
2797 | ||
2798 | * src/parse-gram.y: Handle %type. | |
2799 | * src/reader.c (grammar_rule_end): Call grammar_current_rule_check. | |
2800 | ||
2801 | * src/parse-gram.y: More directives support. | |
2802 | * src/options.c: No longer handle source directives. | |
2803 | ||
2804 | * src/parse-gram.y: Fix %output. | |
2805 | ||
2806 | * src/parse-gram.y: Handle %union. | |
2807 | Use the prologue locations. | |
2808 | * src/reader.c (parse_union_decl): Remove. | |
2809 | ||
2810 | * src/reader.h, src/reader.c (epilogue_set): New. | |
2811 | * src/parse-gram.y: Use it. | |
2812 | ||
2813 | * data/bison.simple, data/bison.c++: b4_stype is now either not | |
2814 | defined, then default to int, or to the contents of %union, | |
2815 | without `union' itself. | |
2816 | Adjust. | |
2817 | * src/muscle_tab.c (muscle_init): Don't predefine `stype'. | |
2818 | ||
2819 | * src/output.c (actions_output): Don't output braces, as they are | |
2820 | already handled by the scanner. | |
2821 | ||
2822 | * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of | |
2823 | characters to themselves. | |
2824 | ||
2825 | * tests/reduce.at (Reduced Automaton): End the grammars with %% so | |
2826 | that the epilogue has a proper #line. | |
2827 | ||
2828 | * src/parse-gram.y: Handle precedence/associativity. | |
2829 | ||
2830 | * src/symtab.c (symbol_precedence_set): Requires the symbol to be | |
2831 | a terminal. | |
2832 | * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters. | |
2833 | * tests/calc.at: Do not use `%token "foo"' as it makes not sense | |
2834 | at all to define terminals that cannot be emitted. | |
2835 | ||
2836 | * src/scan-gram.l: Escape M4 characters. | |
2837 | ||
2838 | * src/scan-gram.l: Working properly with escapes in user | |
2839 | strings/characters. | |
2840 | ||
2841 | * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR) | |
2842 | (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING' | |
2843 | grammar. | |
2844 | Use more modest sizes, as for the time being the parser does not | |
2845 | release memory, and therefore the process swallows a huge amount | |
2846 | of memory. | |
2847 | ||
2848 | * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the | |
2849 | stricter %token grammar. | |
2850 | ||
2851 | * src/symtab.h (associativity): Add `undef_assoc'. | |
2852 | (symbol_precedence_set): Do nothing when passed an undef_assoc. | |
2853 | * src/symtab.c (symbol_check_alias_consistence): Adjust. | |
2854 | ||
2855 | * tests/regression.at (Invalid %directive): Remove, as it is now | |
2856 | meaningless. | |
2857 | (Invalid inputs): Adjust to the new error messages. | |
2858 | (Token definitions): The new grammar doesn't allow too many | |
2859 | eccentricities. | |
2860 | ||
2861 | * src/lex.h, src/lex.c: Remove. | |
2862 | * src/reader.c (lastprec, skip_to_char, read_signed_integer) | |
2863 | (copy_character, copy_string2, copy_string, copy_identifier) | |
2864 | (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl) | |
2865 | (parse_muscle_decl, parse_dquoted_param, parse_skel_decl) | |
2866 | (parse_action): Remove. | |
2867 | * po/POTFILES.in: Adjust. | |
2868 | ||
2e047461 AD |
2869 | 2002-06-11 Akim Demaille <akim@epita.fr> |
2870 | ||
2871 | * src/reader.c (parse_action): Don't store directly into the | |
2872 | rule's action member: return the action as a string. | |
2873 | Don't require `rule_length' as an argument: compute it. | |
2874 | (grammar_current_rule_symbol_append) | |
2875 | (grammar_current_rule_action_append): New, eved out from | |
2876 | (readgram): here. | |
2877 | Remove `action_flag', `rulelength', unused now. | |
2878 | ||
9af3fbce AD |
2879 | 2002-06-11 Akim Demaille <akim@epita.fr> |
2880 | ||
2881 | * src/reader.c (grammar_current_rule_prec_set). | |
2882 | (grammar_current_rule_check): New, eved out from... | |
2883 | (readgram): here. | |
2884 | Remove `xaction', `first_rhs': useless. | |
2885 | * tests/input.at (Type clashes): New. | |
2886 | * tests/existing.at (GNU Cim Grammar): Adjust. | |
2887 | ||
1485e106 AD |
2888 | 2002-06-11 Akim Demaille <akim@epita.fr> |
2889 | ||
2890 | * src/reader.c (grammar_midrule_action): New, Eved out from | |
2891 | (readgram): here. | |
2892 | ||
da4160c3 AD |
2893 | 2002-06-11 Akim Demaille <akim@epita.fr> |
2894 | ||
2895 | * src/reader.c (grammar_rule_begin, previous_rule, current_rule): | |
2896 | New. | |
2897 | (readgram): Use them as replacement of inlined code, crule and | |
2898 | crule1. | |
2899 | ||
f6d0f937 AD |
2900 | 2002-06-11 Akim Demaille <akim@epita.fr> |
2901 | ||
2902 | * src/reader.c (grammar_end, grammar_symbol_append): New. | |
2903 | (readgram): Use them. | |
2904 | Make the use of `p' as local as possible. | |
2905 | ||
69078d4b AD |
2906 | 2002-06-10 Akim Demaille <akim@epita.fr> |
2907 | ||
2908 | GCJ's parser requires the tokens to be defined before the prologue. | |
2909 | ||
2910 | * data/bison.simple: Output the token definition before the user's | |
2911 | prologue. | |
2912 | * tests/regression.at (Braces parsing, Duplicate string) | |
2913 | (Mixing %token styles): Check the output from bison. | |
2914 | (Early token definitions): New. | |
2915 | ||
5e424082 AD |
2916 | 2002-06-10 Akim Demaille <akim@epita.fr> |
2917 | ||
2918 | * src/symtab.c (symbol_user_token_number_set): Don't complain when | |
2919 | assigning twice the same user number to a token, so that we can | |
2920 | use it in... | |
2921 | * src/lex.c (lex): here. | |
2922 | Also use `symbol_class_set' instead of hand written code. | |
2923 | * src/reader.c (parse_assoc_decl): Likewise. | |
2924 | ||
44536b35 AD |
2925 | 2002-06-10 Akim Demaille <akim@epita.fr> |
2926 | ||
2927 | * src/symtab.c, src/symtab.c (symbol_class_set) | |
2928 | (symbol_user_token_number_set): New. | |
2929 | * src/reader.c (parse_token_decl): Use them. | |
2930 | Use a switch instead of ifs. | |
2931 | Use a single argument. | |
2932 | ||
8b9f2372 AD |
2933 | 2002-06-10 Akim Demaille <akim@epita.fr> |
2934 | ||
2935 | Remove `%thong' support as it is undocumented, unused, duplicates | |
2936 | `%token's job, and creates useless e-mail traffic with people who | |
2937 | want to know what it is, why it is undocumented, unused, and | |
2938 | duplicates `%token's job. | |
2939 | ||
2940 | * src/reader.c (parse_thong_decl): Remove. | |
2941 | * src/options.c (option_table): Remove "thong". | |
2942 | * src/lex.h (tok_thong): Remove. | |
2943 | ||
3ae2b51f AD |
2944 | 2002-06-10 Akim Demaille <akim@epita.fr> |
2945 | ||
2946 | * src/symtab.c, src/symtab.c (symbol_type_set) | |
2947 | (symbol_precedence_set): New. | |
2948 | * src/reader.c (parse_type_decl, parse_assoc_decl): Use them. | |
2949 | (value_components_used): Remove, unused. | |
2950 | ||
2f1afb73 AD |
2951 | 2002-06-09 Akim Demaille <akim@epita.fr> |
2952 | ||
2953 | Move symbols handling code out of the reader. | |
2954 | ||
2955 | * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken) | |
2956 | (axiom): Move to... | |
2957 | * src/symtab.h, src/symtab.c: here. | |
2958 | ||
2959 | * src/gram.c (start_symbol): Remove: use startsymbol->number. | |
2960 | * src/reader.c (startval): Rename as... | |
2961 | * src/symtab.h, src/symtab.c (startsymbol): this. | |
2962 | * src/reader.c: Adjust. | |
2963 | ||
2964 | * src/reader.c (symbol_check_defined, symbol_make_alias) | |
2965 | (symbol_check_alias_consistence, symbol_pack, symbol_translation) | |
2966 | (token_translations_init) | |
2967 | Move to... | |
2968 | * src/symtab.c: here. | |
2969 | * src/reader.c (packsymbols): Move to... | |
2970 | * src/symtab.h, src/symtab.c (symbols_pack): here. | |
2971 | * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as | |
2972 | argument. | |
2973 | ||
e9bca3ad AD |
2974 | 2002-06-03 Akim Demaille <akim@epita.fr> |
2975 | ||
2976 | * src/muscle_tab.c (muscle_insert, muscle_find): Declarations, | |
2977 | then statements. | |
2978 | ||
86eff183 AD |
2979 | 2002-06-03 Akim Demaille <akim@epita.fr> |
2980 | ||
2981 | * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize | |
2982 | structs with non literals. | |
2983 | * src/scan-skel.l: never-interactive. | |
2984 | * src/conflicts.c (enum conflict_resolution_e): No trailing | |
2985 | comma. | |
2986 | * src/getargs.c (usage): Split long literal strings. | |
2987 | Reported by Hans Aberg. | |
2988 | ||
717be197 AD |
2989 | 2002-05-28 Akim Demaille <akim@epita.fr> |
2990 | ||
2991 | * data/bison.c++: Use C++ ostreams. | |
2992 | (cdebug_): New member. | |
2993 | ||
670ddffd AD |
2994 | 2002-05-28 Akim Demaille <akim@epita.fr> |
2995 | ||
2996 | * src/output.c (output_skeleton): Be sure to allocate enough room | |
2997 | for `/' _and_ for `\0' in full_skeleton. | |
2998 | ||
769b430f AD |
2999 | 2002-05-28 Akim Demaille <akim@epita.fr> |
3000 | ||
3001 | * data/bison.c++: Catch up with bison.simple: | |
3002 | 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU> | |
3003 | and Paul Eggert <eggert@twinsun.com>: `error' handing. | |
3004 | 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_, | |
3005 | and popping traces. | |
3006 | ||
7067cb36 PH |
3007 | 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU> |
3008 | ||
3009 | * src/output.c (output_skeleton): Put an explicit path in front of | |
3010 | the skeleton file name, rather than relying on the -I directory, | |
3011 | to partially alleviate effects of having a skeleton file lying around | |
3012 | in the current directory. | |
769b430f | 3013 | |
4a713ec2 PH |
3014 | 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU> |
3015 | ||
769b430f | 3016 | * src/conflicts.c (log_resolution): Correct typo: |
4a713ec2 PH |
3017 | obstack_printf should be obstack_fgrow1. |
3018 | ||
b408954b AD |
3019 | 2002-05-26 Akim Demaille <akim@epita.fr> |
3020 | ||
3021 | * src/state.h (state_t): `solved_conflicts' is a new member. | |
3022 | * src/LR0.c (new_state): Set it to 0. | |
3023 | * src/conflicts.h, src/conflicts.c (print_conflicts) | |
3024 | (free_conflicts, solve_conflicts): Rename as... | |
3025 | (conflicts_print, conflicts_free, conflicts_solve): these. | |
3026 | Adjust callers. | |
3027 | * src/conflicts.c (enum conflict_resolution_e) | |
3028 | (solved_conflicts_obstack): New, used by... | |
3029 | (log_resolution): this. | |
3030 | Adjust to attach the conflict resolution to each state. | |
3031 | Complete the description with the precedence/associativity | |
3032 | information. | |
3033 | (resolve_sr_conflict): Adjust. | |
3034 | * src/print.c (print_state): Output its solved_conflicts. | |
3035 | * tests/conflicts.at (Unresolved SR Conflicts) | |
3036 | (Solved SR Conflicts): Exercise --report=all. | |
3037 | ||
a49aecd5 AD |
3038 | 2002-05-26 Akim Demaille <akim@epita.fr> |
3039 | ||
3040 | * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c, | |
3041 | * src/nullable.c, src/output.c, src/print.c, src/print_graph.c, | |
3042 | * src/reader.c, src/reduce.c, src/state.h, src/symtab.h | |
3043 | (token_number_t, item_number_as_token_number) | |
3044 | (token_number_as_item_number, muscle_insert_token_number_table): | |
3045 | Rename as... | |
3046 | (symbol_number_t, item_number_as_symbol_number) | |
3047 | (symbol_number_as_item_number, muscle_insert_symbol_number_table): | |
3048 | these, since it is more appropriate. | |
3049 | ||
5504898e AD |
3050 | 2002-05-26 Akim Demaille <akim@epita.fr> |
3051 | ||
3052 | * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional | |
3053 | `Error:' lines. | |
3054 | * data/bison.simple (yystos) [YYDEBUG]: New. | |
3055 | (yyparse) [YYDEBUG]: Display the symbols which are popped during | |
3056 | error recovery. | |
3057 | * tests/regression.at (Web2c Actions): Adjust: yystos is output now. | |
3058 | ||
ec3bc396 AD |
3059 | 2002-05-25 Akim Demaille <akim@epita.fr> |
3060 | ||
3061 | * doc/bison.texinfo (Debugging): Split into... | |
3062 | (Tracing): this new section, its former contents, and... | |
3063 | (Understanding): this new section. | |
3064 | * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced | |
3065 | by... | |
3066 | (report_flag): this. | |
3067 | Adjust all dependencies. | |
3068 | (report_args, report_types, report_argmatch): New. | |
3069 | (usage, getargs): Report/support -r, --report. | |
3070 | * src/options.h | |
3071 | (struct option_table_struct): Rename as.., | |
3072 | (struct option_table_s): this. | |
3073 | Rename the `set_flag' member to `flag' to match with getopt_long's | |
3074 | struct. | |
3075 | * src/options.c (option_table): Split verbose into an entry for | |
3076 | %verbose, and another for --verbose. | |
3077 | Support --report/-r, so remove -r from the obsolete --raw. | |
3078 | * src/print.c: Attach full item sets and lookaheads reports to | |
3079 | report_flag instead of trace_flag. | |
3080 | * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1. | |
3081 | ||
78df8250 PE |
3082 | 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU> |
3083 | and Paul Eggert <eggert@twinsun.com> | |
769b430f | 3084 | |
78df8250 PE |
3085 | * data/bison.simple (yyparse): Correct error handling to conform to |
3086 | POSIX and yacc. Specifically, after syntax error is discovered, | |
3087 | do not reduce further before shifting the error token. | |
3088 | Clean up the code a bit by removing the labels yyerrdefault, | |
3089 | yyerrhandle, yyerrpop. | |
3090 | * NEWS: Document the above. | |
3091 | ||
c0c9ea05 PH |
3092 | 2002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU> |
3093 | ||
3094 | * data/bison.simple (yyr1): Don't use yy_token_number_type as element | |
3095 | type; it isn't always big enough, since it doesn't necessarily | |
3096 | include non-terminals. | |
769b430f | 3097 | (yytranslate): Expand definition of yy_token_number_type, so that |
c0c9ea05 PH |
3098 | the latter can be removed. |
3099 | (yy_token_number_type): Remove, only one use. | |
3100 | * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple--- | |
3101 | don't use TokenNumberType as element type. | |
769b430f | 3102 | |
c0c9ea05 PH |
3103 | * tests/regression.at: Modify expected output to agree with change |
3104 | to yyr1 and yytranslate. | |
769b430f | 3105 | |
6390a83f FK |
3106 | 2002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com> |
3107 | ||
3108 | * src/reader.c (parse_action): Use copy_character instead of | |
3109 | obstack_1grow. | |
3110 | ||
db7c8e9a AD |
3111 | 2002-05-13 Akim Demaille <akim@epita.fr> |
3112 | ||
3113 | * tests/regression.at (Token definitions): Prototype yylex and | |
3114 | yyerror. | |
3115 | ||
fcc61800 PH |
3116 | 2002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU> |
3117 | ||
158c687b | 3118 | * src/scan-skel.l: Correct off-by-one error in handling of __oline__. |
fcc61800 PH |
3119 | * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect |
3120 | 32-bit arithmetic. | |
3121 | * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto. | |
3122 | ||
5683e9b2 AD |
3123 | 2002-05-07 Akim Demaille <akim@epita.fr> |
3124 | ||
3125 | * tests/synclines.at: Be sure to prototype yylex and yyerror to | |
3126 | avoid GCC warnings. | |
3127 | ||
0c2d3f4c AD |
3128 | 2002-05-07 Akim Demaille <akim@epita.fr> |
3129 | ||
3130 | Kill GCC warnings. | |
3131 | ||
3132 | * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop | |
3133 | over the RHS of each rule. | |
3134 | * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int. | |
3135 | * src/state.h (state_t): Member `nitems' is unsigned short. | |
3136 | * src/LR0.c (get_state): Adjust. | |
3137 | * src/reader.c (packgram): Likewise. | |
3138 | * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type | |
3139 | `Type'. | |
3140 | (muscle_insert_int_table): Remove, unused. | |
3141 | (prepare_rules): Remove `max'. | |
3142 | ||
1565b720 AD |
3143 | 2002-05-06 Akim Demaille <akim@epita.fr> |
3144 | ||
3145 | * src/closure.c (print_firsts): Display of the symbol tags. | |
3146 | (bitmatrix_print): Move to... | |
3147 | * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump): | |
3148 | here. | |
3149 | * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust. | |
3150 | ||
cfaee611 AD |
3151 | 2002-05-06 Akim Demaille <akim@epita.fr> |
3152 | ||
3153 | * src/muscle_tab.c (muscle_m4_output): Must return TRUE for | |
3154 | hash_do_for_each. | |
3155 | ||
458be8e0 AD |
3156 | 2002-05-06 Akim Demaille <akim@epita.fr> |
3157 | ||
3158 | * src/LR0.c (new_state, get_state): Instead of using the global | |
3159 | `kernel_size' and `kernel_base', have two new arguments: | |
3160 | `core_size' and `core'. | |
3161 | Adjust callers. | |
3162 | ||
a900a624 AD |
3163 | 2002-05-06 Akim Demaille <akim@epita.fr> |
3164 | ||
3165 | * src/reader.c (packgram): No longer end `ritem' with a 0 | |
3166 | sentinel: it is not used. | |
3167 | ||
d4e7d3a1 AD |
3168 | 2002-05-05 Akim Demaille <akim@epita.fr> |
3169 | ||
3170 | New experimental feature: display the lookaheads in the report and | |
3171 | graph. | |
3172 | ||
3173 | * src/print (print_core): When --trace-flag, display the rules | |
3174 | lookaheads. | |
3175 | * src/print_graph.c (print_core): Likewise. | |
3176 | Swap the arguments. | |
3177 | Adjust caller. | |
3178 | ||
39ceb25b AD |
3179 | 2002-05-05 Akim Demaille <akim@epita.fr> |
3180 | ||
3181 | * tests/torture.at (Many lookaheads): New test. | |
3182 | ||
5372019f AD |
3183 | 2002-05-05 Akim Demaille <akim@epita.fr> |
3184 | ||
3185 | * src/output.c (GENERATE_OUTPUT_TABLE): Replace with... | |
3186 | (GENERATE_MUSCLE_INSERT_TABLE): this. | |
3187 | (output_int_table, output_unsigned_int_table, output_short_table) | |
3188 | (output_token_number_table, output_item_number_table): Replace with... | |
3189 | (muscle_insert_int_table, muscle_insert_unsigned_int_table) | |
3190 | (muscle_insert_short_table, muscle_insert_token_number_table) | |
3191 | (muscle_insert_item_number_table): these. | |
3192 | Adjust all callers. | |
3193 | (prepare_tokens): Don't free `translations', since... | |
3194 | * src/reader.h, src/reader.c (grammar_free): do it. | |
3195 | Move to... | |
3196 | * src/gram.h, src/gram.c (grammar_free): here. | |
3197 | * data/bison.simple, data/bison.c++: b4_token_number_max is now | |
3198 | b4_translate_max. | |
3199 | ||
5df5f6d5 AD |
3200 | 2002-05-05 Akim Demaille <akim@epita.fr> |
3201 | ||
3202 | * src/output.c (output_unsigned_int_table): New. | |
3203 | (prepare_rules): `i' is unsigned. | |
3204 | `prhs', `rline', `r2' are unsigned int. | |
3205 | Rename muscle `rhs_number_max' as `rhs_max'. | |
3206 | Output muscles `prhs_max', `rline_max', and `r2_max'. | |
3207 | Free rline and r1. | |
3208 | * data/bison.simple, data/bison.c++: Adjust to use these muscles | |
3209 | to compute types instead of constant types. | |
3210 | * tests/regression.at (Web2c Actions): Adjust. | |
3211 | ||
b87f8b21 AD |
3212 | 2002-05-04 Akim Demaille <akim@epita.fr> |
3213 | ||
3214 | * src/symtab.h (SALIAS, SUNDEF): Rename as... | |
3215 | (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these. | |
3216 | Adjust dependencies. | |
3217 | * src/output.c (token_definitions_output): Be sure not to output a | |
3218 | `#define 'a'' when fed with `%token 'a' "a"'. | |
3219 | * tests/regression.at (Token definitions): New. | |
3220 | ||
8bb936e4 PE |
3221 | 2002-05-03 Paul Eggert <eggert@twinsun.com> |
3222 | ||
3223 | * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE | |
3224 | for K&R C. | |
3225 | ||
3226 | 2002-05-03 gettextize <bug-gnu-gettext@gnu.org> | |
3227 | ||
3228 | * Makefile.am (SUBDIRS): Remove intl. | |
3229 | (EXTRA_DIST): Add config/config.rpath. | |
3230 | ||
53c71a12 AD |
3231 | 2002-05-03 Akim Demaille <akim@epita.fr> |
3232 | ||
3233 | * data/bison.simple (m4_if): Don't output empty enums. | |
3234 | And actually, output valid enum definitions :(. | |
3235 | ||
289dd0cf AD |
3236 | 2002-05-03 Akim Demaille <akim@epita.fr> |
3237 | ||
3238 | * configure.bat: Remove, completely obsolete. | |
3239 | * Makefile.am (EXTRA_DIST): Adjust. | |
3240 | Don't distribute config.rpath... | |
3241 | * config/Makefile.am (EXTRA_DIST): Do it. | |
3242 | ||
db85e524 AD |
3243 | 2002-05-03 Akim Demaille <akim@epita.fr> |
3244 | ||
3245 | * configure.in (GETTEXT_VERSION): New. | |
3246 | Suggested by Bruno Haible for the forthcoming Gettext 0.10.3. | |
3247 | ||
83ccf991 AD |
3248 | 2002-05-03 Akim Demaille <akim@epita.fr> |
3249 | ||
3250 | * data/bison.simple (b4_token_enum): New. | |
3251 | (b4_token_defines): Use it to output tokens both as #define and | |
3252 | enums. | |
3253 | Suggested by Paul Eggert. | |
3254 | * src/output.c (token_definitions_output): Don't output spurious | |
3255 | white spaces. | |
3256 | ||
1f418995 AD |
3257 | 2002-05-03 Akim Demaille <akim@epita.fr> |
3258 | ||
3259 | * data/m4sugar/m4sugar.m4: Update from CVS Autoconf. | |
3260 | ||
45119f04 RA |
3261 | 2002-05-02 Robert Anisko <robert@lrde.epita.fr> |
3262 | ||
3263 | * data/bison.c++: Adapt expansion of $s and @s to the C++ parser. | |
3264 | Update the stack class, give a try to deque as the default container. | |
3265 | ||
b2d52318 AD |
3266 | 2002-05-02 Akim Demaille <akim@epita.fr> |
3267 | ||
3268 | * data/bison.simple (yyparse): Do not implement @$ = @1. | |
3269 | (YYLLOC_DEFAULT): Adjust to do it. | |
3270 | * doc/bison.texinfo (Location Default Action): Fix. | |
3271 | ||
3a8b4109 AD |
3272 | 2002-05-02 Akim Demaille <akim@epita.fr> |
3273 | ||
3274 | * src/reader.c (parse_braces): Merge into... | |
3275 | (parse_action): this. | |
3276 | ||
84614e13 AD |
3277 | 2002-05-02 Akim Demaille <akim@epita.fr> |
3278 | ||
3279 | * configure.in (ALL_LINGUAS): Remove. | |
3280 | * po/LINGUAS, hr.po: New. | |
3281 | ||
fdbcd8e2 AD |
3282 | 2002-05-02 Akim Demaille <akim@epita.fr> |
3283 | ||
3284 | Remove the so called hairy (semantic) parsers. | |
3285 | ||
3286 | * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove. | |
3287 | * src/gram.h, src/gram.c (semantic_parser): Remove. | |
3288 | (rule_t): Remove the guard and guard_line members. | |
3289 | * src/lex.h (token_t): remove tok_guard. | |
3290 | * src/options.c (option_table): Remove %guard and %semantic_parser | |
3291 | support. | |
3292 | * src/output.c, src/output.h (guards_output): Remove. | |
3293 | (prepare): Adjust. | |
3294 | (token_definitions_output): Don't output the `T' | |
3295 | tokens (???). | |
3296 | (output_skeleton): Don't output the guards. | |
3297 | * src/files.c, src/files.c (attrsfile): Remove. | |
3298 | * src/reader.c (symbol_list): Remove the guard and guard_line | |
3299 | members. | |
3300 | Adjust dependencies. | |
3301 | (parse_guard): Remove. | |
3302 | * data/bison.hairy: Remove. | |
3303 | * doc/bison.texinfo (Environment Variables): Remove occurrences of | |
3304 | BISON_HAIRY. | |
3305 | ||
82b6cb3f AD |
3306 | 2002-05-02 Akim Demaille <akim@epita.fr> |
3307 | ||
3308 | * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action) | |
3309 | (parse_guard): Rename the formal argument `stack_offset' as | |
3310 | `rule_length', which is more readable. | |
3311 | Adjust callers. | |
3312 | (copy_at, copy_dollar): Instead of outputting the hard coded | |
3313 | values of $$, $n and so forth, output invocation to b4_lhs_value, | |
3314 | b4_lhs_location, b4_rhs_value, and b4_rhs_location. | |
900c877b AD |
3315 | Note: this patch partially drops `semantic-parser' support: it |
3316 | always does `rule_length - n', where semantic parsers ought to | |
3317 | always use `-n'. | |
82b6cb3f AD |
3318 | * data/bison.simple, data/bison.c++ (b4_lhs_value) |
3319 | (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New. | |
3320 | ||
6cbfbcc5 AD |
3321 | 2002-05-02 Akim Demaille <akim@epita.fr> |
3322 | ||
3323 | * configure.in (AC_INIT): Bump to 1.49b. | |
3324 | (AM_INIT_AUTOMAKE): Short invocation. | |
3325 | ||
b8548114 AD |
3326 | 2002-05-02 Akim Demaille <akim@epita.fr> |
3327 | ||
3328 | Version 1.49a. | |
3329 | ||
c20cd1fa AD |
3330 | 2002-05-01 Akim Demaille <akim@epita.fr> |
3331 | ||
3332 | * src/skeleton.h: Remove. | |
3333 | ||
8a9566d4 AD |
3334 | 2002-05-01 Akim Demaille <akim@epita.fr> |
3335 | ||
3336 | * src/skeleton.h: Fix the #endif. | |
3337 | Reported by Magnus Fromreide. | |
3338 | ||
8c6d399a PE |
3339 | 2002-04-26 Paul Eggert <eggert@twinsun.com> |
3340 | ||
3341 | * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL): | |
3342 | Define if we define YYSTYPE and YYLTYPE, respectively. | |
b756bb75 | 3343 | (YYCOPY): Fix [] quoting problem in the non-GCC case. |
8a9566d4 | 3344 | |
2b7ed18a RA |
3345 | 2002-04-25 Robert Anisko <robert@lrde.epita.fr> |
3346 | ||
3347 | * src/scan-skel.l: Postprocess quadrigraphs. | |
3348 | ||
3349 | * src/reader.c (copy_character): New function, used to output | |
3350 | single characters while replacing `[' and `]' with quadrigraphs, to | |
3351 | avoid troubles with M4 quotes. | |
3352 | (copy_comment): Output characters with copy_character. | |
3353 | (read_additionnal_code): Likewise. | |
3354 | (copy_string2): Likewise. | |
3355 | (copy_definition): Likewise. | |
3356 | ||
3357 | * tests/calc.at: Exercise M4 quoting. | |
3358 | ||
34a89c50 AD |
3359 | 2002-04-25 Akim Demaille <akim@epita.fr> |
3360 | ||
3361 | * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space | |
3362 | between `!' and the command. | |
3363 | Reported by Paul Eggert. | |
3364 | ||
0dd1580a RA |
3365 | 2002-04-24 Robert Anisko <robert@lrde.epita.fr> |
3366 | ||
3367 | * tests/calc.at: Exercise prologue splitting. | |
3368 | ||
3369 | * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and | |
3370 | `b4_post_prologue' instead of `b4_prologue'. | |
3371 | ||
3372 | * src/output.c (prepare): Add the `pre_prologue' and `post_prologue' | |
3373 | muscles. | |
3374 | (output): Free pre_prologue_obstack and post_prologue_obstack. | |
3375 | * src/files.h, src/files.c (attrs_obstack): Remove. | |
3376 | (pre_prologue_obstack, post_prologue_obstack): New. | |
3377 | * src/reader.c (copy_definition): Add a parameter to specify the | |
3378 | obstack to fill, instead of using attrs_obstack unconditionally. | |
3379 | (read_declarations): Pass pre_prologue_obstack to copy_definition if | |
3380 | `%union' has not yet been seen, pass post_prologue_obstack otherwise. | |
3381 | ||
83c1796f PE |
3382 | 2002-04-23 Paul Eggert <eggert@twinsun.com> |
3383 | ||
3384 | * data/bison.simple: Remove unnecessary commentary and white | |
3385 | space differences from 1_29-branch. | |
3386 | Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE). | |
3387 | ||
3388 | (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY, | |
3389 | YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or | |
3390 | if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial | |
3391 | constructors or destructors. | |
3392 | ||
3393 | (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack. | |
3394 | ||
1207eeac AD |
3395 | 2002-04-23 Akim Demaille <akim@epita.fr> |
3396 | ||
3397 | * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels. | |
3398 | * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's | |
3399 | location with columns. | |
3400 | * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'. | |
3401 | All reported by Paul Eggert. | |
3402 | ||
78ab8f67 AD |
3403 | 2002-04-22 Akim Demaille <akim@epita.fr> |
3404 | ||
3405 | * src/reduce.c (dump_grammar): Move to... | |
3406 | * src/gram.h, src/gram.c (grammar_dump): here. | |
3407 | Be sure to separate long item numbers. | |
3408 | Don't read the members of a rule's prec if its nil. | |
3409 | ||
133c20e2 AD |
3410 | 2002-04-22 Akim Demaille <akim@epita.fr> |
3411 | ||
3412 | * src/output.c (table_size, table_grow): New. | |
3413 | (MAXTABLE): Remove, replace uses with table_size. | |
3414 | (pack_vector): Instead of dying when the table is too big, grow it. | |
3415 | ||
9515e8a7 AD |
3416 | 2002-04-22 Akim Demaille <akim@epita.fr> |
3417 | ||
3418 | * data/bison.simple (yyr1): Its type is that of a token number. | |
3419 | * data/bison.c++ (r1_): Likewise. | |
3420 | * tests/regression.at (Web2c Actions): Adjust. | |
3421 | ||
23c5a174 AD |
3422 | 2002-04-22 Akim Demaille <akim@epita.fr> |
3423 | ||
3424 | * src/reader.c (token_translations_init): 256 is now the default | |
3425 | value for the error token, i.e., it will be assigned another | |
3426 | number if the user assigned 256 to one of her tokens. | |
3427 | (reader): Don't force 256 to error. | |
3428 | * doc/bison.texinfo (Symbols): Adjust. | |
3429 | * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR) | |
3430 | (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3 | |
3431 | etc. instead of 10, 20, 30 (which was used to `jump' over error | |
3432 | (256) and undefined (2)). | |
3433 | ||
5fbb0954 AD |
3434 | 2002-04-22 Akim Demaille <akim@epita.fr> |
3435 | ||
3436 | Propagate more token_number_t. | |
3437 | ||
3438 | * src/gram.h (token_number_as_item_number) | |
3439 | (item_number_as_token_number): New. | |
3440 | * src/output.c (GENERATE_OUTPUT_TABLE): New. | |
3441 | Use it to create output_item_number_table and | |
3442 | output_token_number_table. | |
3443 | * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c, | |
3444 | * src/lex.c, src/nullable.c, src/output.c, src/print.c, | |
3445 | * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h, | |
3446 | * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts. | |
3447 | ||
4f940944 AD |
3448 | 2002-04-22 Akim Demaille <akim@epita.fr> |
3449 | ||
3450 | * src/output.h, src/output.c (get_lines_number): Remove. | |
3451 | ||
3ded9a63 AD |
3452 | 2002-04-19 Akim Demaille <akim@epita.fr> |
3453 | ||
3454 | * doc/bison.texinfo (Actions): Make clear that `|' is not the same | |
3455 | as Lex/Flex'. | |
3456 | (Debugging): More details about enabling the debugging features. | |
3457 | (Table of Symbols): Describe $$, $n, @$, and @n. | |
3458 | Suggested by Tim Josling. | |
3459 | ||
e0c471a9 AD |
3460 | 2002-04-19 Akim Demaille <akim@epita.fr> |
3461 | ||
3462 | * doc/bison.texinfo: Remove the uses of the obsolete @refill. | |
3463 | ||
fecc10cd AD |
3464 | 2002-04-10 Akim Demaille <akim@epita.fr> |
3465 | ||
3466 | * src/system.h: Rely on HAVE_LIMITS_H. | |
3467 | Suggested by Paul Eggert. | |
3468 | ||
51dec47b AD |
3469 | 2002-04-09 Akim Demaille <akim@epita.fr> |
3470 | ||
3471 | * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the | |
3472 | full stderr, and strip it according to the bison options, instead | |
3473 | of composing the error message from different bits. | |
3474 | This makes it easier to check for several error messages. | |
3475 | Adjust all the invocations. | |
3476 | Add an invocation exercising the error token. | |
3477 | Add an invocation demonstrating a stupid error message. | |
3478 | (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0. | |
3479 | Adjust the tests. | |
3480 | Error message are for stderr, not stdout. | |
3481 | ||
007a50a4 AD |
3482 | 2002-04-09 Akim Demaille <akim@epita.fr> |
3483 | ||
3484 | * src/gram.h, src/gram.c (error_token_number): Remove, use | |
3485 | errtoken->number. | |
3486 | * src/reader.c (reader): Don't specify the user token number (2) | |
3487 | for $undefined, as it uselessly prevents using it. | |
3488 | * src/gram.h (token_number_t): Move to... | |
3489 | * src/symtab.h: here. | |
3490 | (state_t.number): Is a token_number_t. | |
3491 | * src/print.c, src/reader.c: Use undeftoken->number instead of | |
3492 | hard coded 2. | |
3493 | (Even though this 2 is not the same as above: the number of the | |
3494 | undeftoken remains being 2, it is its user token number which | |
3495 | might not be 2). | |
3496 | * src/output.c (prepare_tokens): Rename the `maxtok' muscle with | |
3497 | `user_token_number_max'. | |
3498 | Output `undef_token_number'. | |
3499 | * data/bison.simple, data/bison.c++: Use them. | |
3500 | Be sure to map invalid yylex return values to | |
3501 | `undef_token_number'. This saves us from gratuitous SEGV. | |
3502 | ||
3503 | * tests/conflicts.at (Solved SR Conflicts) | |
3504 | (Unresolved SR Conflicts): Adjust. | |
3505 | * tests/regression.at (Web2c Actions): Adjust. | |
3506 | ||
06446ccf AD |
3507 | 2002-04-08 Akim Demaille <akim@epita.fr> |
3508 | ||
3509 | * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/. | |
3510 | Adding #line. | |
3511 | Remove the duplicate `typedefs'. | |
3512 | (RhsNumberType): Fix the declaration and various other typos. | |
3513 | Use __ofile__. | |
3514 | * data/bison.simple: Use __ofile__. | |
3515 | * src/scan-skel.l: Handle __ofile__. | |
3516 | ||
62a3e4f0 AD |
3517 | 2002-04-08 Akim Demaille <akim@epita.fr> |
3518 | ||
3519 | * src/gram.h (item_number_t): New, the type of item numbers in | |
3520 | RITEM. Note that it must be able to code symbol numbers as | |
3521 | positive number, and the negation of rule numbers as negative | |
3522 | numbers. | |
3523 | Adjust all dependencies (pretty many). | |
3524 | * src/reduce.c (rule): Remove this `short *' pointer: use | |
3525 | item_number_t. | |
3526 | * src/system.h (MINSHORT, MAXSHORT): Remove. | |
3527 | Include `limits.h'. | |
3528 | Adjust dependencies to using SHRT_MAX and SHRT_MIN. | |
3529 | (shortcpy): Remove. | |
3530 | (MAXTABLE): Move to... | |
3531 | * src/output.c (MAXTABLE): here. | |
3532 | (prepare_rules): Use output_int_table to output rhs. | |
3533 | * data/bison.simple, data/bison.c++: Adjust. | |
3534 | * tests/torture.at (Big triangle): Move the limit from 254 to | |
3535 | 500. | |
3536 | * tests/regression.at (Web2c Actions): Ajust. | |
3537 | ||
3538 | Trying with bigger grammars shows various phenomena: at 3000 (28Mb | |
3539 | of grammar file) bison is killed by my system, at 2000 (12Mb) bison | |
3540 | passes, but produces negative #line number, once fixed, GCC is | |
3541 | killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of | |
3542 | C), it passes. | |
3543 | * src/state.h (state_h): Code input lines on ints, not shorts. | |
3544 | ||
bb88b0fc AD |
3545 | 2002-04-08 Akim Demaille <akim@epita.fr> |
3546 | ||
3547 | * src/reduce.c (reduce_grammar): First reduce the nonterminals, | |
3548 | and then the grammar. | |
3549 | ||
9a636f47 AD |
3550 | 2002-04-08 Akim Demaille <akim@epita.fr> |
3551 | ||
3552 | * src/system.h: No longer using strndup. | |
3553 | ||
680e8701 AD |
3554 | 2002-04-07 Akim Demaille <akim@epita.fr> |
3555 | ||
3556 | * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New. | |
3557 | * src/output.c (output_table_data): Return the longest number. | |
3558 | (prepare_tokens): Output `token_number_max'). | |
3559 | * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type): | |
3560 | New. | |
3561 | Use them to define yy_token_number_type/TokenNumberType. | |
3562 | Use this type for yytranslate. | |
3563 | * tests/torture.at (Big triangle): Push the limit from 124 to | |
3564 | 253. | |
3565 | * tests/regression.at (Web2c Actions): Adjust. | |
3566 | ||
817e9f41 AD |
3567 | 2002-04-07 Akim Demaille <akim@epita.fr> |
3568 | ||
3569 | * tests/torture.at (Big triangle): New. | |
3570 | (GNU AWK Grammar, GNU Cim Grammar): Move to... | |
3571 | * tests/existing.at: here. | |
3572 | ||
5123689b AD |
3573 | 2002-04-07 Akim Demaille <akim@epita.fr> |
3574 | ||
3575 | * src/gram.h, src/gram.c (nitems): Remove, it is an alias of | |
3576 | nritems. | |
3577 | Adjust dependencies. | |
3578 | ||
f3849179 AD |
3579 | 2002-04-07 Akim Demaille <akim@epita.fr> |
3580 | ||
3581 | * src/reader.c: Normalize increments to prefix form. | |
3582 | ||
bd02036a AD |
3583 | 2002-04-07 Akim Demaille <akim@epita.fr> |
3584 | ||
3585 | * src/reader.c, symtab.c: Remove debugging code. | |
3586 | ||
db8837cb AD |
3587 | 2002-04-07 Akim Demaille <akim@epita.fr> |
3588 | ||
3589 | Rename all the `bucket's as `symbol_t'. | |
3590 | ||
3591 | * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c, | |
3592 | * src/reader.c, src/reader.h, src/reduce.c, src/state.h, | |
3593 | * src/symtab.c, src/symtab.h (bucket): Rename as... | |
3594 | (symbol_t): this. | |
3595 | (symbol_list_new, bucket_check_defined, bucket_make_alias) | |
3596 | (bucket_check_alias_consistence, bucket_pack, bucket_translation) | |
3597 | (bucket_new, bucket_free, hash_compare_bucket, hash_bucket) | |
3598 | (buckets_new, buckets_free, buckets_do): Rename as... | |
3599 | (symbol_list_new, symbol_check_defined, symbol_make_alias) | |
3600 | (symbol_check_alias_consistence, symbol_pack, symbol_translation) | |
3601 | (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t) | |
3602 | (symbols_new, symbols_free, symbols_do): these. | |
3603 | ||
72a23c97 AD |
3604 | 2002-04-07 Akim Demaille <akim@epita.fr> |
3605 | ||
3606 | Use lib/hash for the symbol table. | |
3607 | ||
3608 | * src/gram.c (ntokens): Initialize to 1, to reserve a slot for | |
3609 | EOF. | |
3610 | * src/lex.c (lex): Set the `number' member of new terminals. | |
3611 | * src/reader.c (bucket_check_defined, bucket_make_alias) | |
3612 | (bucket_check_alias_consistence, bucket_translation): New. | |
3613 | (reader, grammar_free, readgram, token_translations_init) | |
3614 | (packsymbols): Adjust. | |
3615 | (reader): Number the predefined tokens. | |
3616 | * src/reduce.c (inaccessable_symbols): Just use hard coded numbers | |
3617 | for predefined tokens. | |
3618 | * src/symtab.h (bucket): Remove all the hash table related | |
3619 | members. | |
3620 | * src/symtab.c (symtab): Replace by... | |
3621 | (bucket_table): this. | |
3622 | (bucket_new, bucket_free, hash_compare_bucket, hash_bucket) | |
3623 | (buckets_new, buckets_do): New. | |
3624 | ||
280a38c3 AD |
3625 | 2002-04-07 Akim Demaille <akim@epita.fr> |
3626 | ||
3627 | * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems) | |
3628 | (start_symbol, max_user_token_number, semantic_parser) | |
3629 | (error_token_number): Initialize. | |
3630 | * src/reader.c (grammar, start_flag, startval, typed, lastprec): | |
3631 | Initialize. | |
3632 | (reader): Don't. | |
3633 | (errtoken, eoftoken, undeftoken, axiom): Extern. | |
3634 | ||
03b31c0c AD |
3635 | 2002-04-07 Akim Demaille <akim@epita.fr> |
3636 | ||
3637 | * src/gram.h (rule_s): prec and precsym are now pointers | |
3638 | to the bucket giving the priority/associativity. | |
3639 | Member `associativity' removed: useless. | |
3640 | * src/reduce.c, src/conflicts.c: Adjust. | |
3641 | ||
8b3df748 AD |
3642 | 2002-04-07 Akim Demaille <akim@epita.fr> |
3643 | ||
3644 | * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c: | |
3645 | Properly escape the symbols' TAG when outputting them. | |
3646 | ||
e601aa1d AD |
3647 | 2002-04-07 Akim Demaille <akim@epita.fr> |
3648 | ||
3649 | * src/lalr.h (LA): Is a bitsetv, not bitset*. | |
3650 | ||
b0299a2e AD |
3651 | 2002-04-07 Akim Demaille <akim@epita.fr> |
3652 | ||
3653 | * src/lalr.h, src/lalr.c (LAruleno): Replace with... | |
3654 | (LArule): this, which is an array to rule_t*. | |
3655 | * src/print.c, src/conflicts.c: Adjust. | |
3656 | ||
d7e1f00c AD |
3657 | 2002-04-07 Akim Demaille <akim@epita.fr> |
3658 | ||
3659 | * src/gram.h (rule_t): Rename `number' as `user_number'. | |
3660 | `number' is a new member. | |
3661 | Adjust dependencies. | |
3662 | * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number. | |
3663 | ||
cc9305dd AD |
3664 | 2002-04-07 Akim Demaille <akim@epita.fr> |
3665 | ||
3666 | As a result of the previous patch, it is no longer needed | |
3667 | to reorder ritem itself. | |
3668 | ||
3669 | * src/reduce.c (reduce_grammar_tables): Don't sort RITEM. | |
3670 | ||
b0940840 AD |
3671 | 2002-04-07 Akim Demaille <akim@epita.fr> |
3672 | ||
3673 | Be sure never to walk through RITEMS, but use only data related to | |
3674 | the rules themselves. RITEMS should be banished. | |
3675 | ||
3676 | * src/output.c (output_token_translations): Rename as... | |
3677 | (prepare_tokens): this. | |
3678 | In addition to `translate', prepare the muscles `tname' and | |
3679 | `toknum', which were handled by... | |
3680 | (output_rule_data): this. | |
3681 | Remove, and move the remainder of its outputs into... | |
3682 | (prepare_rules): this new routines, which also merges content from | |
3683 | (output_gram): this. | |
3684 | (prepare_rules): Be sure never to walk through RITEMS. | |
3685 | (output_stos): Rename as... | |
3686 | (prepare_stos): this. | |
3687 | (output): Always invoke prepare_states, after all, just don't use it | |
3688 | in the output if you don't need it. | |
3689 | ||
643a5994 AD |
3690 | 2002-04-07 Akim Demaille <akim@epita.fr> |
3691 | ||
3692 | * src/LR0.c (new_state): Display `nstates' as the name of the | |
3693 | newly created state. | |
3694 | Adjust to initialize first_state and last_state if needed. | |
3695 | Be sure to distinguish the initial from the final state. | |
3696 | (new_states): Create the itemset of the initial state, and use | |
3697 | new_state. | |
3698 | * src/closure.c (closure): Now that the initial state has its | |
3699 | items properly set, there is no need for a special case when | |
3700 | creating `ruleset'. | |
3701 | ||
3702 | As a result, now the rule 0, reducing to $axiom, is visible in the | |
3703 | outputs. Adjust the test suite. | |
3704 | ||
3705 | * tests/conflicts.at (Solved SR Conflicts) | |
3706 | (Unresolved SR Conflicts): Adjust. | |
3707 | * tests/regression.at (Web2c Report, Rule Line Numbers): Idem. | |
3708 | * tests/conflicts.at (S/R in initial): New. | |
3709 | ||
b4c4ccc2 AD |
3710 | 2002-04-07 Akim Demaille <akim@epita.fr> |
3711 | ||
3712 | * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over | |
3713 | the RHS of the rules. | |
3714 | * src/output.c (output_gram): Likewise. | |
3715 | ||
bba97eb2 AD |
3716 | 2002-04-07 Akim Demaille <akim@epita.fr> |
3717 | ||
3718 | * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's | |
3719 | bucket. | |
3720 | Adjust all dependencies. | |
3721 | * src/reduce.c (nonterminals_reduce): Don't forget to renumber the | |
3722 | `number' of the buckets too. | |
3723 | * src/gram.h: Include `symtab.h'. | |
3724 | (associativity): Move to... | |
3725 | * src/symtab.h: here. | |
3726 | No longer include `gram.h'. | |
3727 | ||
c3b407f4 AD |
3728 | 2002-04-07 Akim Demaille <akim@epita.fr> |
3729 | ||
3730 | * src/gram.h, src/gram.c (rules_rhs_length): New. | |
3731 | (ritem_longest_rhs): Use it. | |
3732 | * src/gram.h (rule_t): `number' is a new member. | |
3733 | * src/reader.c (packgram): Set it. | |
3734 | * src/reduce.c (reduce_grammar_tables): Move the useless rules at | |
3735 | the end of `rules', and count them out of `nrules'. | |
3736 | (reduce_output, dump_grammar): Adjust. | |
3737 | * src/print.c (print_grammar): It is no longer needed to check for | |
3738 | the usefulness of a rule, as useless rules are beyond `nrules + 1'. | |
3739 | * tests/reduce.at (Reduced Automaton): New test. | |
3740 | ||
11652ab3 AD |
3741 | 2002-04-07 Akim Demaille <akim@epita.fr> |
3742 | ||
3743 | * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a | |
3744 | lacking `+ 1' to nrules, Bison reported as useless a token if it | |
3745 | was used solely to set the precedence of the last rule... | |
3746 | ||
26b23c1a AD |
3747 | 2002-04-07 Akim Demaille <akim@epita.fr> |
3748 | ||
3749 | * data/bison.c++, data/bison.simple: Don't output the current file | |
3750 | name in #line, to avoid useless diffs between two identical | |
3751 | outputs under different names. | |
3752 | ||
18bcecb0 AD |
3753 | 2002-04-07 Akim Demaille <akim@epita.fr> |
3754 | ||
3755 | * src/closure.c, src/print.c, src/reader.c, src/reduce.c: | |
3756 | Normalize loops to using `< nrules + 1', not `<= nrules'. | |
3757 | ||
fa770c86 AD |
3758 | 2002-04-07 Akim Demaille <akim@epita.fr> |
3759 | ||
3760 | * TODO: Update. | |
3761 | ||
d9b739c3 AD |
3762 | 2002-04-07 Akim Demaille <akim@epita.fr> |
3763 | ||
3764 | * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename | |
3765 | bucket.value as bucket.number. | |
3766 | ||
99013900 AD |
3767 | 2002-04-07 Akim Demaille <akim@epita.fr> |
3768 | ||
3769 | * src/closure.c, src/derives.c, src/gram.h, src/lalr.c, | |
3770 | * src/nullable.c, src/output.c, src/print.c, src/print_graph.c, | |
3771 | * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the | |
3772 | RHS, instead of being an index in RITEMS. | |
3773 | ||
e966383b PE |
3774 | 2002-04-04 Paul Eggert <eggert@twinsun.com> |
3775 | ||
3776 | * doc/bison.texinfo: Update copyright date. | |
3777 | (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII. | |
3778 | (Symbols): Warn about running Bison in one character set, | |
3779 | but compiling and/or running in an incompatible one. | |
3780 | Warn about character code 256, too. | |
3781 | ||
3782 | 2002-04-03 Paul Eggert <eggert@twinsun.com> | |
3783 | ||
3784 | * src/bison.data (YYSTACK_ALLOC): Depend on whether | |
3785 | YYERROR_VERBOSE is nonzero, not whether it is defined. | |
3786 | ||
3787 | Merge changes from bison-1_29-branch. | |
c307773e | 3788 | |
8d6c48b9 PE |
3789 | 2002-03-20 Paul Eggert <eggert@twinsun.com> |
3790 | ||
3791 | Merge fixes from Debian bison_1.34-1.diff. | |
3792 | ||
3793 | * configure.in (AC_PREREQ): 2.53. | |
3794 | ||
e53c6322 AD |
3795 | 2002-03-20 Akim Demaille <akim@epita.fr> |
3796 | ||
3797 | * src/conflicts.c (log_resolution): Argument `resolution' is const. | |
3798 | ||
9ffbeca7 PE |
3799 | 2002-03-19 Paul Eggert <eggert@twinsun.com> |
3800 | ||
21db0b2a PE |
3801 | * src/bison.simple (YYCOPY): New macro. |
3802 | (YYSTACK_RELOCATE): Use it. | |
3803 | Remove Type arg; no longer needed. All callers changed. | |
3804 | (yymemcpy): Remove; no longer needed. | |
3805 | ||
9ffbeca7 PE |
3806 | * Makefile.am (AUTOMAKE_OPTIONS): 1.6. |
3807 | * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove. | |
3808 | ||
642cb8f8 AD |
3809 | 2002-03-19 Akim Demaille <akim@epita.fr> |
3810 | ||
3811 | Test and fix the #line outputs. | |
3812 | ||
3813 | * tests/atlocal.at (GCC): New. | |
3814 | * tests/synclines.at (AT_TEST_SYNCLINE): New macro. | |
3815 | (Prologue synch line, ,%union synch line, Postprologue synch line) | |
3816 | (Action synch line, Epilogue synch line): New tests. | |
3817 | * src/reader.c (parse_union_decl): Define the muscle stype_line. | |
3818 | * data/bison.simple, data/bison.c++: Use it. | |
3819 | ||
3c31a486 AD |
3820 | 2002-03-19 Akim Demaille <akim@epita.fr> |
3821 | ||
3822 | * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts) | |
3823 | (Solved SR Conflicts, %expect not enough, %expect right) | |
3824 | (%expect too much): Move to... | |
3825 | * tests/conflicts.at: this new file. | |
3826 | ||
0d8bed56 AD |
3827 | 2002-03-19 Akim Demaille <akim@epita.fr> |
3828 | ||
3829 | * data/m4sugar/m4sugar.m4: Update from CVS Autoconf. | |
3830 | * data/bison.simple, data/bison.c++: Handle the `#define' part, so | |
3831 | that we can move to enums for instance. | |
3832 | * src/output.c (token_definitions_output): Output a list of | |
3833 | `token-name, token-number' instead of the #define. | |
3834 | (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'. | |
3835 | ||
9208d17f AD |
3836 | 2002-03-14 Akim Demaille <akim@epita.fr> |
3837 | ||
3838 | Use Gettext 0.11.1. | |
3839 | ||
af27eacb RA |
3840 | 2002-03-09 Robert Anisko <robert@lrde.epita.fr> |
3841 | ||
3842 | * data/bison.c++: Make the user able to add members to the generated | |
3843 | parser by subclassing. | |
3844 | ||
9101a310 RA |
3845 | 2002-03-05 Robert Anisko <robert@lrde.epita.fr> |
3846 | ||
3847 | * src/reader.c (read_additionnal_code): `c' should be an integer, not | |
3848 | a character. | |
3849 | Reported by Nicolas Tisserand and Nicolas Burrus. | |
3850 | ||
fff9bf0b RA |
3851 | 2002-03-04 Robert Anisko <robert@lrde.epita.fr> |
3852 | ||
3853 | * src/reader.c: Warn about lacking semi-colons, do not complain. | |
3854 | ||
64dba31e RA |
3855 | 2002-03-04 Robert Anisko <robert@lrde.epita.fr> |
3856 | ||
3857 | * data/bison.c++: Remove a debug line. | |
3858 | ||
374f5a14 RA |
3859 | 2002-03-04 Robert Anisko <robert@lrde.epita.fr> |
3860 | ||
3861 | * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge | |
3862 | location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and | |
3863 | provide a default implementation. | |
3864 | ||
bfcf1f3a AD |
3865 | 2002-03-04 Akim Demaille <akim@epita.fr> |
3866 | ||
3867 | * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'. | |
3868 | * tests/output.at (AT_CHECK_OUTPUT): Likewise. | |
3869 | * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto. | |
3870 | * tests/semantic.at (Parsing Guards): Similarly. | |
3871 | * src/reader.at (readgram): Complain if the last rule is not ended | |
3872 | with a semi-colon. | |
3873 | ||
65ccf9fc AD |
3874 | 2002-03-04 Akim Demaille <akim@epita.fr> |
3875 | ||
3876 | * src/warshall.h, src/warshall.c (bitmatrix_print): Move to... | |
3877 | * src/closure.c: here. | |
3878 | (set_firsts): Use bitsetv_reflexive_transitive_closure instead of | |
3879 | RTC. | |
3880 | * src/warshall.h, src/warshall.c: Remove. | |
3881 | * tests/sets.at (Broken Closure): Adjust. | |
3882 | ||
d0039cbc AD |
3883 | 2002-03-04 Akim Demaille <akim@epita.fr> |
3884 | ||
3885 | * src/output.c (output_skeleton): tempdir is const. | |
3886 | bytes_read is unused. | |
3887 | ||
345cea78 AD |
3888 | 2002-03-04 Akim Demaille <akim@epita.fr> |
3889 | ||
3890 | * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c, | |
3891 | * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c: | |
3892 | Update. | |
3893 | From Michael Hayes. | |
3894 | ||
564801f7 AD |
3895 | 2002-03-04 Akim Demaille <akim@epita.fr> |
3896 | ||
3897 | * src/closure.c (closure): `r' is unused. | |
3898 | ||
e5352bc7 AD |
3899 | 2002-03-04 Akim Demaille <akim@epita.fr> |
3900 | ||
3901 | * tests/sets.at (Broken Closure): Add the ending `;'. | |
3902 | * src/reader.at (readgram): Complain if a rule is not ended with a | |
3903 | semi-colon. | |
3904 | ||
914feea9 AD |
3905 | 2002-03-04 Akim Demaille <akim@epita.fr> |
3906 | ||
3907 | * src/conflicts.c (set_conflicts): Use bitset_disjoint_p. | |
3908 | (count_sr_conflicts): Use bitset_count. | |
3909 | * src/reduce.c (inaccessable_symbols): Ditto. | |
3910 | (bits_size): Remove. | |
3911 | * src/warshall.h, src/warshall.c: Convert to bitsetv. | |
3912 | ||
f0250de6 AD |
3913 | 2002-03-04 Akim Demaille <akim@epita.fr> |
3914 | ||
3915 | * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c, | |
3916 | * src/reduce.c: Remove the `bitset_zero's following the | |
3917 | `bitset_create's, as now it is performed by the latter. | |
3918 | ||
ef017502 AD |
3919 | 2002-03-04 Akim Demaille <akim@epita.fr> |
3920 | ||
3921 | * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h, | |
3922 | * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h, | |
3923 | * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the | |
3924 | latest sources from Michael. | |
3925 | ||
76514394 AD |
3926 | 2002-03-04 Akim Demaille <akim@epita.fr> |
3927 | ||
3928 | * src/output.c (output): Don't free the grammar. | |
3929 | * src/reader.c (grammar_free): New. | |
3930 | * src/main.c (main): Call it and don't free symtab here. | |
3931 | ||
55024580 AD |
3932 | 2002-03-04 Akim Demaille <akim@epita.fr> |
3933 | ||
3934 | * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer | |
3935 | before returning. | |
3936 | Reported by Benoit Perrot. | |
3937 | ||
f9abaa2c AD |
3938 | 2002-03-04 Akim Demaille <akim@epita.fr> |
3939 | ||
3940 | Use bitset operations when possible, not loops over bits. | |
3941 | ||
3942 | * src/conflicts.c (set_conflicts, count_sr_conflicts): Use | |
3943 | bitset_or. | |
3944 | * src/print.c (print_reductions): Use bitset_and, bitset_andn. | |
3945 | * src/reduce.c (useless_nonterminals): Formatting changes. | |
3946 | * src/warshall.c (TC): Use bitset_or. | |
3947 | ||
0e721e75 AD |
3948 | 2002-03-04 Akim Demaille <akim@epita.fr> |
3949 | ||
3950 | * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused. | |
3951 | * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET): | |
3952 | Ditto. | |
3953 | ||
0fb1ffb1 AD |
3954 | 2002-03-04 Akim Demaille <akim@epita.fr> |
3955 | ||
3956 | * src/lalr.c (F): Now a bitset*. | |
3957 | Adjust all dependencies. | |
3958 | ||
b86796bf AD |
3959 | 2002-03-04 Akim Demaille <akim@epita.fr> |
3960 | ||
3961 | * src/conflicts.c (shiftset, lookaheadset): Now bitset. | |
3962 | Adjust all dependencies. | |
3963 | ||
602bbf31 AD |
3964 | 2002-03-04 Akim Demaille <akim@epita.fr> |
3965 | ||
3966 | * src/L0.c, src/LR0.h (nstates): Be size_t. | |
3967 | Adjust comparisons (signed vs unsigned). | |
3968 | * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a | |
3969 | bitset*. | |
3970 | Adjust all dependencies. | |
3971 | ||
d8a0245c AD |
3972 | 2002-03-04 Akim Demaille <akim@epita.fr> |
3973 | ||
3974 | * src/closure.c (firsts): Now, also a bitset. | |
3975 | Adjust all dependencies. | |
3976 | (varsetsize): Remove, now unused. | |
3977 | * src/warshall.h, src/warshall.c: Now work on arrays of bitsets. | |
3978 | ||
34ba9743 AD |
3979 | 2002-03-04 Akim Demaille <akim@epita.fr> |
3980 | ||
3981 | * src/print.c: Convert to use bitset.h, not hand coded iterations | |
3982 | over ints. | |
3983 | ||
ed86e78c AD |
3984 | 2002-03-04 Akim Demaille <akim@epita.fr> |
3985 | ||
3986 | * src/reduce.c: Convert to use bitset.h, not hand coded BSet. | |
3987 | ||
dfdb1797 AD |
3988 | 2002-03-04 Akim Demaille <akim@epita.fr> |
3989 | ||
3990 | * src/closure.c (ruleset): Be a bitset. | |
3991 | (rulesetsize): Remove. | |
3992 | ||
7086e707 AD |
3993 | 2002-03-04 Akim Demaille <akim@epita.fr> |
3994 | ||
3995 | * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c, | |
3996 | * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, | |
3997 | * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New. | |
3998 | * src/closure.c (fderives): Be an array of bitsets. | |
3999 | ||
98254360 RA |
4000 | 2002-02-28 Robert Anisko <robert@lrde.epita.fr> |
4001 | ||
4002 | * data/bison.c++: Merge the two generated headers. Insert a copyright | |
4003 | notice in each output file. | |
4004 | ||
a75c057f AD |
4005 | 2002-02-28 Akim Demaille <akim@epita.fr> |
4006 | ||
4007 | * data/bison.c++: Copy the prologue of bison.simple to fetch | |
4008 | useful M4 definitions, such as b4_header_guard. | |
4009 | ||
06b00abc AD |
4010 | 2002-02-25 Akim Demaille <akim@epita.fr> |
4011 | ||
4012 | * src/getargs.c (version): Give the name of the authors, and use a | |
a75c057f AD |
4013 | translator friendly scheme for the bgr |
4014 | copyright notice. | |
06b00abc | 4015 | |
70e7d534 AD |
4016 | 2002-02-25 Akim Demaille <akim@epita.fr> |
4017 | ||
4018 | * src/output.c (header_output): Remove, now handled completely via | |
4019 | M4. | |
4020 | ||
abe017f6 AD |
4021 | 2002-02-25 Akim Demaille <akim@epita.fr> |
4022 | ||
4023 | * m4/m4.m4: New, from CVS Autoconf. | |
4024 | * configure.in: Invoke it. | |
4025 | * src/output.c (output_skeleton): Use its result instead of the | |
4026 | hard coded name. | |
4027 | ||
381fb12e AD |
4028 | 2002-02-25 Akim Demaille <akim@epita.fr> |
4029 | ||
4030 | * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from | |
4031 | Fileutils 4.1.5. | |
4032 | * configure.in: Invoke UTILS_FUNC_MKSTEMP. | |
4033 | * src/output.c (output_skeleton): Use mkstemp to create a real | |
4034 | temporary file. | |
4035 | Move the filling of `skeleton' and its muscle to... | |
4036 | (prepare): here. | |
4037 | (output): Move the definition of the prologue muscle to... | |
4038 | (prepare): here. | |
4039 | * src/system.h (DEFAULT_TMPDIR): New. | |
4040 | ||
6f38107f PE |
4041 | 2002-02-14 Paul Eggert <eggert@twinsun.com> |
4042 | ||
4043 | Remove the support for C++ namespace cleanliness; it was | |
4044 | causing more problems than it was curing, since it didn't work | |
4045 | properly on some nonstandard C++ compilers. This can wait | |
4046 | for a proper C++ parser. | |
4047 | ||
4048 | * NEWS: Document this. | |
4049 | * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention | |
4050 | of C++, as it's treated like C now. | |
4051 | * src/bison.simple (YYSTD): Remove. | |
4052 | (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL): | |
4053 | Treat C++ just like Standard C instead of trying to support | |
4054 | namespace cleanliness. | |
4055 | ||
80cce3da AD |
4056 | 2002-02-14 Akim Demaille <akim@epita.fr> |
4057 | ||
4058 | * tests/regression.at (else): Adjust to Andreas' change. | |
4059 | ||
842e8679 AD |
4060 | 2002-02-14 Akim Demaille <akim@epita.fr> |
4061 | ||
4062 | * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c. | |
4063 | ||
4bda3f10 AD |
4064 | 2002-02-13 Andreas Schwab <schwab@suse.de> |
4065 | ||
4066 | * src/output.c (output_rule_data): Don't output NULL, it might | |
4067 | not be defined yet. | |
4068 | ||
4162fa07 | 4069 | 2002-02-11 Robert Anisko <robert@lrde.epita.fr> |
b418ecd8 | 4070 | |
4162fa07 RA |
4071 | * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue. |
4072 | (Copyright notice): Update. | |
b418ecd8 | 4073 | |
bd16a5dc AD |
4074 | 2002-02-11 Akim Demaille <akim@epita.fr> |
4075 | ||
4076 | * tests/regression.at (%nonassoc and eof): Don't include | |
4077 | nonportable headers. | |
4078 | ||
8d69a1a3 RA |
4079 | 2002-02-08 Robert Anisko <robert@lrde.epita.fr> |
4080 | ||
4081 | * data/bison.c++: Correct error recovery. Make the user able to | |
4082 | initialize the starting location. | |
4083 | ||
9b2d0677 AD |
4084 | 2002-02-07 Akim Demaille <akim@epita.fr> |
4085 | ||
4086 | * tests/input.at: New. | |
4087 | ||
69e2658b RA |
4088 | 2002-02-07 Robert Anisko <robert@lrde.epita.fr> |
4089 | ||
4090 | * data/bison.c++: Replace some direct m4 expansions by constants. Be | |
9b2d0677 | 4091 | more consistent when naming methods and variables. Put preprocessor |
69e2658b RA |
4092 | directives around tables only needed for debugging. |
4093 | ||
4aacc3a7 RA |
4094 | 2002-02-07 Robert Anisko <robert@lrde.epita.fr> |
4095 | ||
4096 | * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in | |
4097 | C++ parsers. | |
4098 | (yy::b4_name::parse): Use print_. | |
4099 | ||
762a801e RA |
4100 | 2002-02-07 Robert Anisko <robert@lrde.epita.fr> |
4101 | ||
4102 | * data/bison.c++ (yy::b4_name::parse): Error recovery is back. | |
4103 | ||
4bb2bc3f RA |
4104 | 2002-02-07 Robert Anisko <robert@lrde.epita.fr> |
4105 | ||
4106 | * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in | |
4107 | C++ parsers. | |
4108 | (yy::b4_name::parse): Build verbose error messages, and use error_. | |
4109 | ||
6b45a3ca RA |
4110 | 2002-02-06 Robert Anisko <robert@lrde.epita.fr> |
4111 | ||
4112 | * data/bison.c++: Fix m4 quoting in comments. | |
4113 | ||
50997c6e RA |
4114 | 2002-02-06 Robert Anisko <robert@lrde.epita.fr> |
4115 | ||
4116 | * data/bison.c++: Adjust the parser code. Fix some muscles that were | |
4117 | not expanded by m4. | |
4118 | ||
3f3eed27 AD |
4119 | 2002-02-05 Akim Demaille <akim@epita.fr> |
4120 | ||
4121 | * data/bison.c++: Adjust to the M4 back end. | |
4122 | More is certainly needed. | |
4123 | ||
be2a1a68 AD |
4124 | 2002-02-05 Akim Demaille <akim@epita.fr> |
4125 | ||
4126 | Give a try to M4 as a back end. | |
4127 | ||
4128 | * lib/readpipe.c: New, from wdiff. | |
4129 | * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and | |
4130 | BISON_HAIRY. | |
4131 | * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS | |
4132 | specific values. Now it is m4 that performs the lookup. | |
4133 | * src/parse-skel.y: Remove. | |
4134 | * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New. | |
4135 | * src/output.c (actions_output, guards_output) | |
4136 | (token_definitions_output): No longer keeps track of the output | |
4137 | line number, hence remove the second argument. | |
4138 | (guards_output): Check against the guard member of a rule, not the | |
4139 | action member. | |
4140 | Adjust callers. | |
4141 | (output_skeleton): Don't look for the skeleton location, let m4 do | |
4142 | that. | |
4143 | Create `/tmp/muscles.m4'. This is temporary, a proper temporary | |
4144 | file will be used. | |
4145 | Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton. | |
4146 | (prepare): Given that for the time being changesyntax is not | |
4147 | usable in M4, rename the muscles using `-' to `_'. | |
4148 | Define `defines_flag', `output_parser_name' and `output_header_name'. | |
4149 | * src/output.h (actions_output, guards_output) | |
4150 | (token_definitions_output): Adjust prototypes. | |
4151 | * src/scan-skel.l: Instead of scanning the skeletons, it now | |
4152 | processes the output of m4: `__oline__' and `#output'. | |
4153 | * data/bison.simple: Adjust to be used by M4(sugar). | |
4154 | * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up | |
4155 | to date. | |
4156 | * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR' | |
4157 | instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'. | |
4158 | * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New, | |
4159 | shamelessly stolen from CVS Autoconf. | |
4160 | ||
beda758b AD |
4161 | 2002-02-05 Akim Demaille <akim@epita.fr> |
4162 | ||
4163 | * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version. | |
4164 | * configure.in: Check for the declarations of free and malloc. | |
4165 | * src/muscle_tab.c: Adjust. | |
4166 | ||
5ece6d43 AD |
4167 | 2002-02-05 Akim Demaille <akim@epita.fr> |
4168 | ||
4169 | * src/muscle_tab.c (muscle_init): Don't default to NULL muscle | |
4170 | which have no values. | |
4171 | ||
5bb18f9a AD |
4172 | 2002-02-05 Akim Demaille <akim@epita.fr> |
4173 | ||
4174 | * src/bison.simple, src/bison.hairy, src/bison.c++: Move to... | |
4175 | * data/: here. | |
4176 | ||
894dd62e PE |
4177 | 2002-01-29 Paul Eggert <eggert@twinsun.com> |
4178 | ||
4179 | * src/bison.simple (YYSIZE_T): Do not define merely because | |
4180 | YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined. | |
4181 | On some platforms, <alloca.h> does not declare YYSTD (size_t). | |
4182 | ||
82841af7 AD |
4183 | 2002-01-27 Akim Demaille <akim@epita.fr> |
4184 | ||
4185 | Fix `%nonassoc and eof'. | |
4186 | ||
4187 | * src/state.c (errs_dup): Aaaah! The failure was due to bytes | |
4188 | which were not properly copied! Replace | |
4189 | memcpy (res->errs, src->errs, src->nerrs); | |
4190 | with | |
4191 | memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0])); | |
4192 | !!! | |
4193 | * tests/regression.at (%nonassoc and eof): Adjust to newest | |
4194 | Autotest: `.' is not in the PATH. | |
4195 | ||
318b76e9 AD |
4196 | 2002-01-27 Akim Demaille <akim@epita.fr> |
4197 | ||
4198 | * tests/sets.at (AT_EXTRACT_SETS): New. | |
4199 | (Nullable): Use it. | |
4200 | (Firsts): New. | |
4201 | ||
30d2f3d5 AD |
4202 | 2002-01-26 Akim Demaille <akim@epita.fr> |
4203 | ||
4204 | * tests/actions.at, tests/calc.at, tests/headers.at, | |
4205 | * tests/torture.at: Adjust to the newest Autotest which no longer | |
4206 | forces `.' in the PATH. | |
4207 | ||
30f8c395 AD |
4208 | 2002-01-25 Akim Demaille <akim@epita.fr> |
4209 | ||
4210 | * tests/regression.at (%nonassoc and eof): New. | |
4211 | Suggested by Robert Anisko. | |
4212 | ||
29ae55f1 AD |
4213 | 2002-01-24 Akim Demaille <akim@epita.fr> |
4214 | ||
4215 | Bison dumps core when trying to complain about broken input files. | |
4216 | Reported by Cris van Pelt. | |
4217 | ||
4218 | * src/lex.c (parse_percent_token): Be sure to set token_buffer. | |
4219 | * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge | |
4220 | into... | |
4221 | (Invalid inputs): Strengthen: exercise parse_percent_token. | |
4222 | ||
2b548aa6 RA |
4223 | 2002-01-24 Robert Anisko <robert.anisko@epita.fr> |
4224 | ||
4225 | * src/Makefile.am: Add bison.c++. | |
4226 | * src/bison.c++: New skeleton. | |
4227 | ||
bb0146c2 AD |
4228 | 2002-01-21 Paolo Bonzini <bonzini@gnu.org> |
4229 | ||
4230 | * po/it.po: New. | |
4231 | ||
bec30531 AD |
4232 | 2002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net> |
4233 | ||
4234 | * src/files.c (skeleton_find) [MSDOS]: Fix cp definition. | |
4235 | ||
fc6edc45 MA |
4236 | 2002-01-20 Marc Autret <marc@gnu.org> |
4237 | ||
4238 | * src/files.c (compute_output_file_names): Fix | |
4239 | ||
5e5d5415 MA |
4240 | 2002-01-20 Marc Autret <marc@gnu.org> |
4241 | ||
4242 | * tests/output.at: New test. | |
4243 | * src/files.c (compute_base_names): Don't map extensions when | |
4244 | the YACC flag is set, use defaults. | |
4245 | Reported by Evgeny Stambulchik. | |
4246 | ||
44ea3fbd MA |
4247 | 2002-01-20 Marc Autret <marc@gnu.org> |
4248 | ||
bb0146c2 | 4249 | * src/system.h: Need to define __attribute__ away for non-GCC |
44ea3fbd MA |
4250 | compilers as well (i.e. the vendor C compiler). |
4251 | Suggested by Albert Chin-A-Young. | |
4252 | ||
338963d1 TVH |
4253 | 2002-01-11 Tim Van Holder <tim.van.holder@pandora.be> |
4254 | ||
4255 | * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the | |
4256 | canonical definition. | |
4257 | * src/system.h: Use the canonical definition for PARAMS (avoids | |
4258 | a conflict with the macro from lib/hash.h). | |
4259 | ||
c57b2479 AD |
4260 | 2002-01-11 Akim Demaille <akim@epita.fr> |
4261 | ||
4262 | * configure.in: Use AC_FUNC_STRNLEN. | |
d9e9746c | 4263 | Fixes the failures observed on AIX 4.3 by H.Merijn Brand. |
c57b2479 | 4264 | |
b85810ae AD |
4265 | 2002-01-09 Akim Demaille <akim@epita.fr> |
4266 | ||
4267 | * src/files.c, src/files.h (output_infix): New. | |
4268 | (tab_extension): Remove. | |
4269 | (compute_base_names): Compute the former, drop the latter. | |
4270 | * src/output.c (prepare): Insert the muscles `output-infix', and | |
4271 | `output-suffix'. | |
4272 | * src/parse-skel.y (string, string.1): New. | |
4273 | (section.header): Use it. | |
4274 | (section.yacc): Remove. | |
4275 | (prefix): Remove too. | |
4276 | * src/scan-skel.l: Adjust. | |
4277 | * src/bison.simple, src/bison.hairy: Adjust. | |
4278 | ||
cae60122 AD |
4279 | 2002-01-09 Akim Demaille <akim@epita.fr> |
4280 | ||
4281 | * configure.in (WERROR_CFLAGS): Compute it. | |
4282 | * src/Makefile.am (CFLAGS): Pass it. | |
4283 | * tests/atlocal.in (CFLAGS): Idem. | |
4284 | * src/files.c: Fix a few warnings. | |
4285 | (get_extension_index): Remove, unused. | |
4286 | ||
ae404801 AD |
4287 | 2002-01-08 Akim Demaille <akim@epita.fr> |
4288 | ||
4289 | * src/getargs.c (AS_FILE_NAME): New. | |
4290 | (getargs): Use it to convert DOSish file names. | |
4291 | * src/files.c (base_name): Rename as full_base_name to avoid | |
4292 | clashes with `base_name ()'. | |
4293 | (filename_split): New. | |
4294 | (compute_base_names): N-th rewrite, using filename_split. | |
4295 | ||
22312b71 AD |
4296 | 2002-01-08 Akim Demaille <akim@epita.fr> |
4297 | ||
4298 | * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c: | |
4299 | New, stolen from the Fileutils 4.1. | |
4300 | * lib/Makefile.am (libbison_a_SOURCES): Adjust. | |
4301 | * configure.in: Check for the presence of memrchr, and of its | |
4302 | prototype. | |
4303 | ||
a67cef01 TVH |
4304 | 2002-01-07 Tim Van Holder <tim.van.holder@pandora.be> |
4305 | ||
4306 | * lib/hash.h (__P): Added definition for this macro. | |
4307 | * src/Makefile.am: Add parse-skel.c and scan-skel.c to | |
4308 | BUILT_SOURCES, to ensure they are generated first. | |
4309 | * src/parse-skel.y: Use YYERROR_VERBOSE instead of | |
4310 | %error-verbose to allow bootstrapping with bison 1.30x. | |
4311 | ||
2b25d624 AD |
4312 | 2002-01-06 Akim Demaille <akim@epita.fr> |
4313 | ||
4314 | * src/reader.c (parse_braces): Don't fetch the next char, the | |
4315 | convention is to fetch on entry. | |
4316 | * tests/torture.at (GNU Cim Grammar): Reintroduce their weird | |
4317 | 'switch' without a following semicolon. | |
4318 | * tests/regression.at (braces parsing): New. | |
4319 | ||
3460813b AD |
4320 | 2002-01-06 Akim Demaille <akim@epita.fr> |
4321 | ||
4322 | Bison is dead wrong in its RR conflict reports. | |
4323 | ||
4324 | * tests/torture.at (GNU Cim Grammar): New. | |
4325 | * src/conflicts.c (count_rr_conflicts): Fix. | |
4326 | ||
73784c64 AD |
4327 | 2002-01-06 Akim Demaille <akim@epita.fr> |
4328 | ||
4329 | Creating package.m4 from configure.ac causes too many problems. | |
4330 | ||
4331 | * tests/Makefile.am (package.m4): Create it by hand, | |
4332 | AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf. | |
4333 | ||
25d81090 AD |
4334 | 2002-01-06 Akim Demaille <akim@epita.fr> |
4335 | ||
4336 | * src/Makefile.am (bison_SOURCES): Add parse-skel.h and | |
4337 | skeleton.h. | |
4338 | ||
a9b8959e PE |
4339 | 2002-01-04 Paul Eggert <eggert@twinsun.com> |
4340 | ||
4341 | * doc/bison.texinfo (Debugging): | |
4342 | Remove YYSTDERR; it's no longer defined or used. | |
4343 | Also, s/cstdio.h/cstdio/. | |
4344 | ||
25d81090 AD |
4345 | 2002-01-03 Akim Demaille <akim@epita.fr> |
4346 | ||
4347 | * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf. | |
4348 | ||
1109455c AD |
4349 | 2002-01-03 Akim Demaille <akim@epita.fr> |
4350 | ||
4351 | * src/parse-skel.y (process_skeleton): Don't bind the parser's | |
4352 | tracing code to --trace, wait for a better --trace option, with | |
4353 | args. | |
4354 | ||
7ea5e977 AD |
4355 | 2002-01-03 Akim Demaille <akim@epita.fr> |
4356 | ||
4357 | * src/bison.simple (YYSTDERR): Remove, replace `stderr'. | |
4358 | The ISO C++ standard is extremely clear about it: stderr is | |
4359 | considered a macro, not a regular symbol (see table 94 `Header | |
4360 | <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files). | |
4361 | Therefore std:: does not apply to it. It still does with fprintf. | |
4362 | Also, s/cstdio.h/cstdio/. | |
4363 | ||
fab5b110 AD |
4364 | 2002-01-03 Akim Demaille <akim@epita.fr> |
4365 | ||
4366 | * lib/quotearg.c: Use `#include "..."' instead of `#include <...>' | |
4367 | for non system headers. | |
4368 | ||
aed7fd9b AD |
4369 | 2002-01-02 Akim Demaille <akim@epita.fr> |
4370 | ||
4371 | Equip the skeleton chain with location tracking, runtime trace, | |
4372 | pure parser and scanner. | |
4373 | ||
4374 | * src/parse-skel.y: Request a pure parser, locations, and prefix | |
4375 | renaming. | |
4376 | (%union): Having several members with the same type does not help | |
4377 | type mismatches, simplify. | |
4378 | (YYPRINT, yyprint): New. | |
4379 | (yyerror): ``Rename'' (there is a #define yyerror skel_error) as... | |
4380 | (skel_error): this. | |
4381 | Handle locations. | |
4382 | * src/scan-skel.l: Adjust to these changes. | |
4383 | * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP) | |
4384 | (LOCATION_PRINT, skel_control_t): New. | |
4385 | ||
24fad99e AD |
4386 | 2001-12-30 Akim Demaille <akim@epita.fr> |
4387 | ||
4388 | * src/parse-skel.y: Get rid of the shift/reduce conflict: | |
4389 | replace `gb' with BLANKS. | |
4390 | * src/scan-skel.l: Adjust. | |
4391 | ||
a4b36db4 AD |
4392 | 2001-12-30 Akim Demaille <akim@epita.fr> |
4393 | ||
4394 | * src/system.h: We don't need nor want bcopy. | |
4395 | Throw away MS-DOS crap: we don't need getpid. | |
4396 | * configure.in: We don't need strndup. It was even causing | |
4397 | problems: because Flex includes the headers *before* us, | |
4398 | _GNU_SOURCE is not defined by config.h, and therefore strndup was | |
4399 | not visible. | |
4400 | * lib/xstrndup.c: New. | |
4401 | * src/scan-skel.l: Use it. | |
4402 | Be sure to initialize yylval.muscle member when scanning a MUSCLE. | |
4403 | * src/parse-skel.y: Use %directives instead of #defines. | |
4404 | ||
1239777d AD |
4405 | 2001-12-30 Akim Demaille <akim@epita.fr> |
4406 | ||
4407 | * src/skeleton.h: New. | |
4408 | * src/output.c (output_parser, output_master_parser): Remove, dead | |
4409 | code. | |
4410 | * src/output.h (get_lines_number, actions_output, guards_output) | |
4411 | (token_definitions_output): Prototype them. | |
4412 | * src/parse-skel.y: Add the license notice. | |
4413 | Include output.h and skeleton.h. | |
4414 | (process_skeleton): Returns void, and takes a single parameter. | |
4415 | * src/scan-skel.l: Add the license notice. | |
4416 | Include skeleton.h. | |
4417 | Don't use %option yylineno: it seems that then Flex imagines | |
4418 | REJECT has been used, and therefore it won't reallocate its | |
4419 | buffers (which makes no other sense to me than a bug). It results | |
4420 | in warnings for `unused: yy_flex_realloc'. | |
4421 | ||
9b3add5b RA |
4422 | 2001-12-30 Robert Anisko <robert.anisko@epita.fr> |
4423 | ||
4424 | * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING) | |
4425 | (MUSCLE_INSERT_PREFIX): ...to there. | |
4426 | * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING) | |
4427 | (MUSCLE_INSERT_PREFIX): Move from here... | |
4428 | ||
4429 | * src/bison.hairy: Add a section directive. Put braces around muscle | |
4430 | names. This parser skeleton is still broken, but Bison should not | |
4431 | choke on a bad muscle 'syntax'. | |
4432 | * src/bison.simple: Add a section directive. Put braces around muscle | |
4433 | names. | |
4434 | ||
4435 | * src/files.h (strsuffix, stringappend): Add declarations. | |
4436 | (tab_extension): Add declaration. | |
4437 | (short_base_name): Add declaration. | |
4438 | ||
4439 | * src/files.c (strsuffix, stringappend): No longer static. These | |
4440 | functions are used in the skeleton parser. | |
4441 | (tab_extension): New. | |
4442 | (compute_base_names): Use the computations done in this function | |
fab5b110 | 4443 | to guess if the generated parsers should have '.tab' in their |
9b3add5b RA |
4444 | names. |
4445 | (short_base_name): No longer static. | |
4446 | ||
4447 | * src/output.c (output_skeleton): New. | |
4448 | (output): Disable call to output_master_parser, and give a try to | |
4449 | a new skeleton handling system. | |
4450 | (guards_output, actions_output): No longer static. | |
4451 | (token_definitions_output, get_lines_number): No longer static. | |
4452 | ||
4453 | * configure.in: Use AM_PROG_LEX and AC_PROG_YACC. | |
4454 | ||
fab5b110 | 4455 | * src/Makefile.am (bison_SOURCES): Add scan-skel.l and |
9b3add5b RA |
4456 | parse-skel.y. |
4457 | ||
4458 | * src/parse-skel.y: New file. | |
4459 | * src/scan-skel.l: New file. | |
4460 | ||
b5b61c61 AD |
4461 | 2001-12-29 Akim Demaille <akim@epita.fr> |
4462 | ||
4463 | %name-prefix is broken. | |
4464 | ||
4465 | * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy". | |
4466 | Adjust all dependencies. | |
4467 | * tests/headers.at (export YYLTYPE): Strengthen this test: use | |
4468 | %name-prefix. | |
4469 | ||
4470 | Renaming yylval but not yylloc is not consistent. Now we do. | |
4471 | ||
4472 | * src/bison.simple: Prefix yylloc if used. | |
4473 | * doc/bison.texinfo (Decl Summary): Document that. | |
4474 | ||
8c9a50be AD |
4475 | 2001-12-29 Akim Demaille <akim@epita.fr> |
4476 | ||
4477 | * doc/bison.texinfo: Promote `%long-directive' over | |
4478 | `%long_directive'. | |
4479 | Remove all references to fixed-output-files, yacc is enough. | |
4480 | ||
d99361e6 AD |
4481 | 2001-12-29 Akim Demaille <akim@epita.fr> |
4482 | ||
4483 | * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the | |
4484 | user prologue. These are defaults. | |
4485 | * tests/actions.at (Mid-rule actions): Make sure the user can | |
4486 | define YYDEBUG and YYERROR_VERBOSE. | |
4487 | ||
b9cecb91 AD |
4488 | 2001-12-29 Akim Demaille <akim@epita.fr> |
4489 | ||
4490 | * src/output.c (header_output): Don't forget to export YYLTYPE and | |
4491 | yylloc. | |
4492 | * tests/headers.at (export YYLTYPE): New, make sure it does. | |
4493 | * tests/regression.at (%union and --defines, Invalid CPP headers): | |
4494 | Move to... | |
4495 | * tests/headers.at: here. | |
4496 | ||
aea13e97 AD |
4497 | 2001-12-29 Akim Demaille <akim@epita.fr> |
4498 | ||
4499 | * src/gram.h (rule_s): Member `assoc' is of type `associativity'. | |
4500 | ||
931394cb AD |
4501 | 2001-12-29 Akim Demaille <akim@epita.fr> |
4502 | ||
4503 | * tests/actions.at (Mid-rule actions): Output on a single line | |
4504 | instead of several. | |
4505 | ||
704a47c4 AD |
4506 | 2001-12-29 Akim Demaille <akim@epita.fr> |
4507 | ||
4508 | * doc/bison.texinfo: Formatting changes. | |
4509 | ||
091e20bb AD |
4510 | 2001-12-29 Akim Demaille <akim@epita.fr> |
4511 | ||
4512 | Don't store the token defs in a muscle, just be ready to output it | |
4513 | on command. Now possible via `symbols'. Fixes a memory leak. | |
4514 | ||
4515 | * src/output.c (token_definitions_output): New. | |
4516 | (output_parser, header_output): Use it. | |
4517 | * src/reader.c (symbols_save): Remove. | |
4518 | ||
cce71710 AD |
4519 | 2001-12-29 Akim Demaille <akim@epita.fr> |
4520 | ||
4521 | * src/bison.simple: Do not provide a default for YYSTYPE and | |
4522 | YYLTYPE before the user's prologue. Otherwise it's hardly... a | |
4523 | default. | |
4524 | ||
82c035a8 AD |
4525 | 2001-12-29 Akim Demaille <akim@epita.fr> |
4526 | ||
4527 | Mid-rule actions are simply... ignored! | |
4528 | ||
4529 | * src/reader.c (readgram): Be sure to attach mid-rule actions to | |
4530 | the empty-rule associated to the dummy symbol, not to the host | |
4531 | rule. | |
4532 | * tests/actions.at (Mid-rule actions): New. | |
4533 | ||
8419d367 AD |
4534 | 2001-12-29 Akim Demaille <akim@epita.fr> |
4535 | ||
4536 | Memory leak. | |
4537 | ||
4538 | * src/reader.c (reader): Free grammar. | |
4539 | ||
375d5806 AD |
4540 | 2001-12-29 Akim Demaille <akim@epita.fr> |
4541 | ||
4542 | Memory leak. | |
4543 | ||
4544 | * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here, | |
4545 | since it allocates it for each state, although only one is needed. | |
4546 | (allocate_storage): Do it here. | |
4547 | ||
f51cb8ff AD |
4548 | 2001-12-29 Akim Demaille <akim@epita.fr> |
4549 | ||
4550 | * src/options.h, src/options.c (create_long_option_table): Rename | |
4551 | as... | |
4552 | (long_option_table_new): this, with a clearer prototype. | |
4553 | (percent_table): Remove, unused, | |
4554 | * src/getargs.c (getargs): Adjust. | |
4555 | ||
29e88316 AD |
4556 | 2001-12-29 Akim Demaille <akim@epita.fr> |
4557 | ||
4558 | * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c | |
4559 | * src/print.c, src/print_graph.c, src/state.h: Rename state_table | |
4560 | as states. | |
4561 | ||
b9f71f19 AD |
4562 | 2001-12-29 Akim Demaille <akim@epita.fr> |
4563 | ||
4564 | * src/lalr.c (build_relations): Rename `states' as `states1'. | |
4565 | Sorry, I don't understand exactly what it is, no better name... | |
4566 | ||
1a2b5d37 AD |
4567 | 2001-12-29 Akim Demaille <akim@epita.fr> |
4568 | ||
4569 | * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c | |
4570 | * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c | |
4571 | * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table | |
4572 | as rules. | |
4573 | ||
1cca533e AD |
4574 | 2001-12-29 Akim Demaille <akim@epita.fr> |
4575 | ||
4576 | * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long | |
4577 | ago. | |
4578 | ||
c03ae966 AD |
4579 | 2001-12-29 Akim Demaille <akim@epita.fr> |
4580 | ||
4581 | * src/reader.c, src/reader.h (user_toknums): Remove. | |
4582 | Adjust all users to use symbols[i]->user_token_number. | |
4583 | ||
5a670b1e AD |
4584 | 2001-12-29 Akim Demaille <akim@epita.fr> |
4585 | ||
4586 | * src/gram.c, src/gram.h (sprec, sassoc): Remove. | |
4587 | Adjust all users to use symbols[i]->prec or ->assoc. | |
4588 | ||
ad949da9 AD |
4589 | 2001-12-29 Akim Demaille <akim@epita.fr> |
4590 | ||
4591 | * src/reader.c, src/reader.h (tags): Remove. | |
4592 | Adjust all users to use symbols[i]->tag. | |
4593 | ||
0e78e603 AD |
4594 | 2001-12-29 Akim Demaille <akim@epita.fr> |
4595 | ||
4596 | * src/gram.h, src/gram.c (symbols): New, similar to state_table | |
4597 | and rule_table. | |
4598 | * src/reader.c (packsymbols): Fill this table. | |
4599 | Drop sprec. | |
4600 | * src/conflicts.c (resolve_sr_conflict): Adjust. | |
4601 | * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a | |
4602 | single table. | |
4603 | Use symbols[i]->tag instead of tags[i]. | |
4604 | ||
213e640e AD |
4605 | 2001-12-29 Akim Demaille <akim@epita.fr> |
4606 | ||
4607 | * tests/calc.at (_AT_DATA_CALC_Y): Also use %union. | |
4608 | In addition, put a comment in there, to replace... | |
4609 | * tests/regression.at (%union and C comments): Remove. | |
4610 | ||
e7b8bef1 AD |
4611 | 2001-12-29 Akim Demaille <akim@epita.fr> |
4612 | ||
4613 | * tests/regression.at (Web2c Actions): Blindly move the actual | |
4614 | output as expected output. The contents *seem* right to me, but I | |
4615 | can't pretend reading perfectly parser tables... Nonetheless, all | |
4616 | the other tests pass correctly, the table look OK, even though the | |
4617 | presence of `$axiom' is to be noted: AFAICS it is useless (but | |
4618 | harmless). | |
4619 | ||
b68e7744 AD |
4620 | 2001-12-29 Akim Demaille <akim@epita.fr> |
4621 | ||
4622 | * src/reader.c (readgram): Don't add the rule 0 if there were no | |
4623 | rules read. In other words, add it _after_ having performed | |
4624 | grammar sanity checks. | |
4625 | Fixes the `tests/regression.at (Invalid input: 1)' Failure. | |
4626 | ||
78d5bae9 AD |
4627 | 2001-12-29 Akim Demaille <akim@epita.fr> |
4628 | ||
4629 | * tests/regression.at (Web2c Report): Catch up: the rule 0 is now | |
4630 | visible, and some states have now a different number. | |
4631 | ||
ff442794 AD |
4632 | 2001-12-29 Akim Demaille <akim@epita.fr> |
4633 | ||
4634 | * src/reader.c (readgram): Bind the initial rule's lineno to that | |
4635 | of the first rule. | |
4636 | * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts): | |
4637 | (Solved SR Conflicts): Adjust rule 0's line number. | |
4638 | ||
610ab194 AD |
4639 | 2001-12-29 Akim Demaille <akim@epita.fr> |
4640 | ||
4641 | Fix the `GAWK Grammar' failure. | |
4642 | ||
4643 | * src/LR0.c (final_state): Initialize to -1 so that we do compute | |
4644 | the reductions of the first state which was mistakenly confused | |
4645 | with the final state because precisely final_state was initialized | |
4646 | to 0. | |
4647 | * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads, | |
4648 | now noticed by Bison. | |
4649 | * tests/regression.at (Rule Line Numbers): Adjust: state 0 does | |
4650 | have a reduction on $default. | |
4651 | ||
29d29c8f AD |
4652 | 2001-12-29 Akim Demaille <akim@epita.fr> |
4653 | ||
4654 | * src/gram.c (ritem_print): Be sure to subtract 1 when displaying | |
4655 | rule line numbers. | |
4656 | * src/closure.c (print_closure): Likewise. | |
4657 | * src/derives.c (print_derives): Likewise. | |
4658 | * tests/sets.at (Nullable): Adjust: the rule numbers are correct | |
4659 | now. | |
4660 | ||
7c6b64d0 AD |
4661 | 2001-12-29 Akim Demaille <akim@epita.fr> |
4662 | ||
4663 | * src/lalr.c (lookaheads_print): New. | |
4664 | (lalr): Call it when --trace-flag. | |
4665 | * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads | |
4666 | are dumped. | |
4667 | ||
3d4daee3 AD |
4668 | 2001-12-29 Akim Demaille <akim@epita.fr> |
4669 | ||
4670 | * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0', | |
4671 | when walking through ritem, even via rule->rhs. | |
4672 | * src/reduce.c (dump_grammar, useful_production, reduce_output) | |
4673 | (useful_production, useless_nonterminals): Likewise. | |
4674 | (reduce_grammar_tables): Likewise, plus update nritems. | |
4675 | * src/nullable.c (set_nullable): Likewise. | |
4676 | * src/lalr.c (build_relations): Likewise. | |
4677 | * tests/sets.at (Nullable): Adjust. | |
4678 | Fortunately, now, the $axiom is no longer nullable. | |
4679 | ||
9e7f6bbd AD |
4680 | 2001-12-29 Akim Demaille <akim@epita.fr> |
4681 | ||
4682 | * src/LR0.c (generate_states): Use nritems, not nitems, nor using | |
4683 | the 0-sentinel. | |
4684 | * src/gram.c (ritem_longest_rhs): Likewise. | |
4685 | * src/reduce.c (nonterminals_reduce): Likewise. | |
4686 | * src/print_graph.c (print_graph): Likewise. | |
4687 | * src/output.c (output_rule_data): Likewise. | |
4688 | * src/nullable.c (set_nullable): Likewise. | |
4689 | ||
255ef638 AD |
4690 | 2001-12-29 Akim Demaille <akim@epita.fr> |
4691 | ||
4692 | * src/output.c: Comment changes. | |
4693 | ||
0d8a7363 AD |
4694 | 2001-12-27 Paul Eggert <eggert@twinsun.com> |
4695 | ||
4696 | * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special | |
4697 | cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and | |
4698 | Sparc, as they were causing more porting problems than the | |
4699 | (minor) performance improvement was worth. | |
4700 | ||
4701 | Also, catch up with 1.31's YYSTD. | |
4702 | ||
3db472b9 AD |
4703 | 2001-12-27 Akim Demaille <akim@epita.fr> |
4704 | ||
4705 | * src/output.c (output_gram): Rely on nritems, not the | |
4706 | 0-sentinel. See below. | |
4707 | Use -1 as separator, not 0. | |
4708 | * src/bison.simple (yyparse): Subtract 1 to the rule numbers. | |
4709 | Rely on -1 as separator in yyrhs, instead of 0. | |
4710 | * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue | |
4711 | twice `Now at end of input', therefore there are two lines less to | |
4712 | expect. | |
4713 | ||
b365aa05 AD |
4714 | 2001-12-27 Akim Demaille <akim@epita.fr> |
4715 | ||
4716 | * tests/regression.at (Unresolved SR Conflicts): | |
4717 | (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes | |
4718 | below. | |
4719 | ||
30171f79 AD |
4720 | 2001-12-27 Akim Demaille <akim@epita.fr> |
4721 | ||
4722 | * src/LR0.c (new_state): Recognize the final state by the fact it | |
4723 | is reached by eoftoken. | |
4724 | (insert_start_shifting_state, insert_eof_shifting_state) | |
4725 | (insert_accepting_state, augment_automaton): Remove, since now | |
4726 | these states are automatically computed from the initial state. | |
4727 | (generate_states): Adjust. | |
4728 | * src/print.c: When reporting a rule number to the user, substract | |
4729 | 1, so that the axiom rule is rule 0, and the first user rule is 1. | |
4730 | * src/reduce.c: Likewise. | |
4731 | * src/print_graph.c (print_core): For the time being, just as for | |
4732 | the report, depend upon --trace-flags to dump the full set of | |
4733 | items. | |
4734 | * src/reader.c (readgram): Once the grammar read, insert the rule | |
4735 | 0: `$axiom: START-SYMBOL $'. | |
4736 | * tests/set.at: Adjust: rule 0 is now displayed, and since the | |
4737 | number of the states has changed (the final state is no longer | |
4738 | necessarily the last), catch up. | |
4739 | ||
75142d45 AD |
4740 | 2001-12-27 Akim Demaille <akim@epita.fr> |
4741 | ||
4742 | Try to make the use of the eoftoken valid. Given that its value | |
4743 | is 0 which was also used as a sentinel in ritem, (i) make sure >= 0 | |
4744 | is used instead of > 0 where appropriate, (ii), depend upon nritems | |
4745 | instead of the 0-sentinel. | |
4746 | ||
4747 | * src/gram.h, src/gram.c (nritems): New. | |
4748 | Expected to be duplication of nitems, but for the time being... | |
4749 | * src/reader.c (packgram): Assert nritems and nitems are equal. | |
4750 | * src/LR0.c (allocate_itemsets, new_itemsets): Adjust. | |
4751 | * src/closure.c (print_closure, print_fderives): Likewise. | |
4752 | * src/gram.c (ritem_print): Likewise. | |
4753 | * src/print.c (print_core, print_grammar): Likewise. | |
4754 | * src/print_graph.c: Likewise. | |
4755 | ||
b7c49edf AD |
4756 | 2001-12-27 Akim Demaille <akim@epita.fr> |
4757 | ||
4758 | * src/main.c (main): If there are complains after grammar | |
4759 | reductions, then output the report anyway if requested, then die. | |
4760 | * src/symtab.c (bucket_new): Initialize `value' to -1, not 0. | |
4761 | * src/reader.c (eoftoken): New. | |
4762 | (parse_token_decl): If the token being defined has value `0', it | |
4763 | is the eoftoken. | |
4764 | (packsymbols): No longer hack `tags' to insert `$' by hand. | |
4765 | Be sure to preserve the value of the eoftoken. | |
4766 | (reader): Make sure eoftoken is defined. | |
4767 | Initialize nsyms to 0: now eoftoken is created just like the others. | |
4768 | * src/print.c (print_grammar): Don't special case the eof token. | |
4769 | * src/regression.at: Adjust: `$' has value 0, not -1, which was a | |
4770 | lie anyway, albeit pleasant. | |
4771 | * tests/calc.at: Exercise error messages with eoftoken. | |
4772 | Change the grammar so that empty input is invalid. | |
4773 | Adjust expectations. | |
4774 | When yyungeting, be sure to use a valid yylloc: use last_yylloc. | |
4775 | ||
ec2da99f AD |
4776 | 2001-12-27 Akim Demaille <akim@epita.fr> |
4777 | ||
4778 | * configure.in: Check the protos of strchr ans strspn. | |
4779 | Replace strchr if needed. | |
4780 | * src/system.h: Provide the protos of strchr, strspn and memchr if | |
4781 | missing. | |
4782 | * lib/strchr.c: New. | |
4783 | * src/reader.c (symbols_save): Use strchr. | |
4784 | ||
8adfa272 AD |
4785 | 2001-12-27 Akim Demaille <akim@epita.fr> |
4786 | ||
4787 | * src/print.c, src/print_graph.c (escape): New. | |
4788 | Use it to quote the TAGS outputs. | |
4789 | * src/print_graph.c (print_state): Now errors are in red, and | |
4790 | reductions in green. | |
4791 | Prefer high to wide: output the state number on a line of its own. | |
4792 | ||
80dac38c AD |
4793 | 2001-12-27 Akim Demaille <akim@epita.fr> |
4794 | ||
4795 | * src/state.h, src/state.c (reductions_new): New. | |
4796 | * src/LR0.c (set_state_table): Let all the states have a | |
4797 | `reductions', even if reduced to 0. | |
4798 | (save_reductions): Adjust. | |
4799 | * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust. | |
4800 | * src/print.c (print_reductions, print_actions): Adjust. | |
4801 | * src/output.c (action_row): Adjust. | |
4802 | ||
2cec70b9 AD |
4803 | 2001-12-27 Akim Demaille <akim@epita.fr> |
4804 | ||
4805 | * src/state.h, src/state.c (errs_new, errs_dup): New. | |
4806 | * src/LR0.c (set_state_table): Let all the states have an errs, | |
4807 | even if reduced to 0. | |
4808 | * src/print.c (print_errs, print_reductions): Adjust. | |
4809 | * src/output.c (output_actions, action_row): Adjust. | |
4810 | * src/conflicts.c (resolve_sr_conflict): Adjust. | |
4811 | ||
13ca549a AD |
4812 | 2001-12-27 Akim Demaille <akim@epita.fr> |
4813 | ||
4814 | * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL. | |
4815 | ||
5092aba5 AD |
4816 | 2001-12-27 Akim Demaille <akim@epita.fr> |
4817 | ||
4818 | * src/conflicts.c, src/conflicts.h (print_reductions): Move to... | |
4819 | * src/print.c: here. | |
4820 | (lookaheadset, shiftset): New, used as additional storage by | |
4821 | print_reductions. | |
4822 | (print_results): Adjust. | |
4823 | (print_shifts, print_gotos, print_errs): New, extracted from... | |
4824 | (print_actions): here. | |
4825 | * src/print_graph.c (print_actions): Remove dead code. | |
4826 | ||
11e2beca AD |
4827 | 2001-12-27 Akim Demaille <akim@epita.fr> |
4828 | ||
4829 | * src/reader.c (copy_dollar, copy_at): Better checking of `n' in | |
4830 | `$n' and `@n'. | |
4831 | ||
dac3c910 AD |
4832 | 2001-12-27 Akim Demaille <akim@epita.fr> |
4833 | ||
4834 | * src/lalr.c (add_lookback_edge): Use state_t instead of ints. | |
4835 | (build_relations): Adjust. | |
4836 | ||
d0b0fefa AD |
4837 | 2001-12-27 Akim Demaille <akim@epita.fr> |
4838 | ||
4839 | * src/lalr.c (set_goto_map): Remove a wrong but benign loop | |
4840 | duplication. | |
4841 | ||
adc8c848 AD |
4842 | 2001-12-27 Akim Demaille <akim@epita.fr> |
4843 | ||
4844 | * src/reader.c (packgram): Catch nitems overflows. | |
4845 | ||
14d293ac AD |
4846 | 2001-12-27 Akim Demaille <akim@epita.fr> |
4847 | ||
4848 | * src/files.c, src/files.h (guard_obstack): Remove. | |
4849 | * src/output.c (output): Adjust. | |
4850 | * src/reader.c (parse_braces): New, factoring... | |
4851 | (copy_action, copy_guard): these two which are renamed as... | |
4852 | (parse_action, parse_guard): these. | |
4853 | As a voluntary consequence, using braces around guards is now | |
4854 | mandatory. | |
4855 | ||
f499b062 AD |
4856 | 2001-12-27 Akim Demaille <akim@epita.fr> |
4857 | ||
4858 | * src/gram.h (rule_t): `guard' and `guard_line' are new members. | |
4859 | * src/reader.c (symbol_list): `guard' and `guard_line' are new | |
4860 | members. | |
4861 | (symbol_list_new): Adjust. | |
4862 | (copy_action): action_line is the first line, not the last. | |
4863 | (copy_guard): Just as for actions, store the `action' only, not | |
4864 | the switch/case/break flesh. | |
4865 | Don't parse the user action that might follow the guard, let... | |
4866 | (readgram): do it, i.e., now, there can be an action after a | |
4867 | guard. | |
4868 | In other words the guard is just explicitly optional. | |
4869 | (packgram): Adjust. | |
4870 | * src/output.c (guards_output): New. | |
4871 | (output_parser): Call it when needed. | |
4872 | (output): Also free the guard and attrs obstacks. | |
4873 | * src/files.c, src/files.h (obstack_save): Remove. | |
4874 | (output_files): Remove. | |
4875 | As a result, if one needs the former `.act' file, using an | |
4876 | appropriate skeleton which requires actions and guards is now | |
4877 | required. | |
4878 | * src/main.c (main): Adjust. | |
4879 | * tests/semantic.at: New. | |
4880 | * tests/regression.at: Use `input.y' as input file name. | |
4881 | Avoid 8+3 problems by requiring input.c when the test needs the | |
4882 | parser. | |
4883 | ||
d945f5cd AD |
4884 | 2001-12-27 Akim Demaille <akim@epita.fr> |
4885 | ||
4886 | * src/reader.c (symbol_list_new): Be sure to initialize all the | |
4887 | fields. | |
4888 | ||
d200e455 AD |
4889 | 2001-12-27 Akim Demaille <akim@epita.fr> |
4890 | ||
4891 | All the hacks using a final pseudo state are now useless. | |
4892 | ||
4893 | * src/LR0.c (set_state_table): state_table holds exactly nstates. | |
4894 | * src/lalr.c (nLA): New. | |
4895 | (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it | |
4896 | instead of lookaheadsp from the pseudo state (nstate + 1). | |
4897 | ||
f9507c28 AD |
4898 | 2001-12-27 Akim Demaille <akim@epita.fr> |
4899 | ||
4900 | * src/output.c (action_row, token_actions): Use a state_t instead | |
4901 | of a integer, and nlookaheads instead of the following state's | |
4902 | lookaheadsp. | |
4903 | ||
065fbd27 AD |
4904 | 2001-12-27 Akim Demaille <akim@epita.fr> |
4905 | ||
4906 | * src/conflicts.c (log_resolution, flush_shift) | |
4907 | (resolve_sr_conflict, set_conflicts, solve_conflicts) | |
4908 | (count_sr_conflicts, count_rr_conflicts, conflicts_output) | |
4909 | (conflicts_print, print_reductions): Use a state_t instead of an | |
4910 | integer when referring to a state. | |
4911 | As much as possible, depend upon nlookaheads, instead of the | |
4912 | `lookaheadsp' member of the following state (since lookaheads of | |
4913 | successive states are successive, the difference between state n + 1 | |
4914 | and n served as the number of lookaheads for state n). | |
4915 | * src/lalr.c (add_lookback_edge): Likewise. | |
4916 | * src/print.c (print_core, print_actions, print_state) | |
4917 | (print_results): Likewise. | |
4918 | * src/print_graph.c (print_core, print_actions, print_state) | |
4919 | (print_graph): Likewise. | |
4920 | * src/conflicts.h: Adjust. | |
4921 | ||
1b177bd7 AD |
4922 | 2001-12-27 Akim Demaille <akim@epita.fr> |
4923 | ||
4924 | * src/bison.hairy: Formatting/comment changes. | |
4925 | ANSIfy. | |
4926 | Remove `register' indications. | |
4927 | Add plenty of `static'. | |
4928 | ||
7742ddeb AD |
4929 | 2001-12-27 Akim Demaille <akim@epita.fr> |
4930 | ||
4931 | * src/output.c (prepare): Drop the muscle `ntbase' which | |
4932 | duplicates ntokens. | |
4933 | * src/bison.simple: Formatting/comment changes. | |
4934 | Use YYNTOKENS only, which is documented, but not YYNTBASE, which | |
4935 | is an undocumented synonym. | |
4936 | ||
1fa14068 AD |
4937 | 2001-12-22 Akim Demaille <akim@epita.fr> |
4938 | ||
4939 | * src/output.c (output_table_data): Change the prototype to use | |
4940 | `int' for array ranges: some invocations do pass an int, not a | |
4941 | short. | |
4942 | Reported by Wayne Green. | |
4943 | ||
b9752825 AD |
4944 | 2001-12-22 Akim Demaille <akim@epita.fr> |
4945 | ||
4946 | Some actions of web2c.y are improperly triggered. | |
4947 | Reported by Mike Castle. | |
4948 | ||
4949 | * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/. | |
4950 | * tests/regression.at (Web2c): Rename as... | |
4951 | (Web2c Report): this. | |
4952 | (Web2c Actions): New. | |
4953 | ||
776209d6 AD |
4954 | 2001-12-22 Akim Demaille <akim@epita.fr> |
4955 | ||
4956 | Reductions in web2c.y are improperly reported. | |
4957 | Reported by Mike Castle. | |
4958 | ||
4959 | * src/conflicts.c (print_reductions): Fix. | |
4960 | * tests/regression.at (Web2c): New. | |
4961 | ||
275fc3ad AD |
4962 | 2001-12-18 Akim Demaille <akim@epita.fr> |
4963 | ||
4964 | Some host fail on `assert (!"foo")', which expands to | |
4965 | ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__)) | |
4966 | Reported by Nelson Beebee. | |
4967 | ||
4968 | * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with | |
4969 | `#define it_succeeded 0' and `assert (it_succeeded)'. | |
4970 | ||
897668ee MA |
4971 | 2001-12-17 Marc Autret <autret_m@epita.fr> |
4972 | ||
4973 | * src/bison.simple: Don't hard code the skeleton line and filename. | |
4974 | * src/output.c (output_parser): Rename 'line' as 'output_line'. | |
4975 | New line counter 'skeleton_line' (skeleton-line muscle). | |
4976 | ||
ab3399e0 PE |
4977 | 2001-12-17 Paul Eggert <eggert@twinsun.com> |
4978 | ||
4979 | * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that | |
4980 | YYDEBUG must be defined to a nonzero value. | |
4981 | ||
4982 | * src/bison.simple (yytname): Do not assume that the user defines | |
4983 | YYDEBUG to a properly parenthesized expression. | |
4984 | ||
3877f72b AD |
4985 | 2001-12-17 Akim Demaille <akim@epita.fr> |
4986 | ||
4987 | * src/state.h (state_t): Rename lookaheads as lookaheadsp. | |
4988 | nlookaheads is a new member. | |
4989 | Adjust all users. | |
4990 | * src/lalr.h (nlookaheads): Remove this orphan declaration. | |
4991 | * src/lalr.c (initialize_lookaheads): Set nlookaheads for each | |
4992 | state. | |
776209d6 | 4993 | |
331dbc1b AD |
4994 | 2001-12-17 Akim Demaille <akim@epita.fr> |
4995 | ||
4996 | * src/files.h, src/files.c (open_files, close_files): Remove. | |
4997 | * src/main.c (main): Don't open/close files, nor invoke lex_free, | |
4998 | let... | |
4999 | * src/reader.c (reader): Do it. | |
776209d6 | 5000 | |
be750e4c AD |
5001 | 2001-12-17 Akim Demaille <akim@epita.fr> |
5002 | ||
5003 | * src/conflicts.c (print_reductions): Formatting changes. | |
776209d6 | 5004 | |
709ae8c6 AD |
5005 | 2001-12-17 Akim Demaille <akim@epita.fr> |
5006 | ||
5007 | * src/conflicts.c (flush_shift): Also adjust lookaheadset. | |
5008 | (flush_reduce): New. | |
5009 | (resolve_sr_conflict): Adjust. | |
776209d6 | 5010 | |
f87685c3 AD |
5011 | 2001-12-17 Akim Demaille <akim@epita.fr> |
5012 | ||
5013 | * src/output.c (output_obstack): Be static and rename as... | |
5014 | (format_obstack): this, to avoid any confusion with files.c's | |
5015 | output_obstack. | |
5016 | * src/reader.h (muscle_obstack): Move to... | |
5017 | * src/output.h: here, since it's defined in output.c. | |
5018 | ||
837491d8 AD |
5019 | 2001-12-17 Akim Demaille <akim@epita.fr> |
5020 | ||
5021 | * src/output.c (action_row, save_column, default_goto) | |
5022 | (sort_actions, matching_state, pack_vector): Better variable | |
5023 | locality. | |
5024 | ||
796d61fb AD |
5025 | 2001-12-17 Akim Demaille <akim@epita.fr> |
5026 | ||
5027 | * src/output.c: Various formatting changes. | |
776209d6 | 5028 | |
64d15509 AD |
5029 | 2001-12-17 Akim Demaille <akim@epita.fr> |
5030 | ||
5031 | * src/files.c (output_files): Free the output_obstack. | |
5032 | * src/main.c (main): Call print and print_graph conditionally. | |
5033 | * src/print.c (print): Work unconditionally. | |
5034 | * src/print_graph.c (print_graph): Work unconditionally. | |
5035 | * src/conflicts.c (log_resolution): Output only if verbose_flag. | |
5036 | ||
fbc8ecb7 MA |
5037 | 2001-12-16 Marc Autret <autret_m@epita.fr> |
5038 | ||
5039 | * src/output.c (actions_output): Fix. When we use %no-lines, | |
5040 | there is one less line per action. | |
5041 | ||
f0440388 MA |
5042 | 2001-12-16 Marc Autret <autret_m@epita.fr> |
5043 | ||
5044 | * src/bison.simple: Remove a useless #line directive. | |
5045 | s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'. | |
5046 | * src/output.c (get_lines_number): New. | |
776209d6 | 5047 | (output_parser): Adjust, now takes care about the lines of a |
f0440388 MA |
5048 | output muscles. |
5049 | Fix line numbering. | |
5050 | (actions_output): Computes the number of lines taken by actions. | |
5051 | (output_master_parser): Insert new skeleton which is the name of | |
5052 | the output parser file name. | |
5053 | ||
a79986b8 MA |
5054 | 2001-12-15 Marc Autret <autret_m@epita.fr> |
5055 | ||
5056 | * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility. | |
5057 | ||
4ec8e00f MA |
5058 | 2001-12-15 Marc Autret <autret_m@epita.fr> |
5059 | ||
5060 | * src/output.c (output_gram): Keep track of the hairy one. | |
5061 | ||
1a4648ff AD |
5062 | 2001-12-15 Akim Demaille <akim@epita.fr> |
5063 | ||
5064 | Make `make distcheck' work. | |
5065 | ||
5066 | * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses | |
5067 | system.h which uses libgettext.h. | |
5068 | ||
9c2c67e6 AD |
5069 | 2001-12-15 Akim Demaille <akim@epita.fr> |
5070 | ||
5071 | * src/nullable.c (set_nullable): Useless rules must be skipped, | |
5072 | otherwise, since we range over their symbols, we might look at a | |
5073 | nonterminal which no longer ``exists'', i.e., it is not counted in | |
5074 | `nvars', hence we overflow our arrays. | |
5075 | ||
93ede233 AD |
5076 | 2001-12-15 Akim Demaille <akim@epita.fr> |
5077 | ||
5078 | The header can also be produced directly, without any obstack! | |
5079 | Yahoo! | |
5080 | ||
5081 | * src/files.c, src/files.h (defines_obstack): Remove. | |
5082 | (compute_header_macro): Global. | |
5083 | (defines_obstack_save): Remove. | |
5084 | * src/reader.c (parse_union_decl): No longer output to | |
5085 | defines_obstack: its content can be found in the `stype' muscle | |
5086 | anyway. | |
5087 | (output_token_translations): Merge into... | |
5088 | (symbols_output): this. | |
5089 | Rename as... | |
5090 | (symbols_save): this. | |
5091 | (reader): Adjust. | |
5092 | * src/output.c (header_output): New. | |
5093 | (output): Call it. | |
5094 | ||
2666f928 AD |
5095 | 2001-12-15 Akim Demaille <akim@epita.fr> |
5096 | ||
5097 | * src/reader.c (parse_union_decl): Instead of handling two obstack | |
5098 | simultaneously, use one to define the `stype' muscle, and use the | |
5099 | value of the latter to fill defines_obstack. | |
5100 | (copy_comment): Remove. | |
5101 | (copy_comment2): Work for a single obstack. | |
5102 | Rename as... | |
5103 | (copy_comment): this. | |
5104 | ||
428046f8 AD |
5105 | 2001-12-15 Akim Demaille <akim@epita.fr> |
5106 | ||
5107 | * src/lex.c, src/lex.h (xgetc): No longer static. | |
5108 | * src/reader.c (parse_union_decl): Revamp. | |
5109 | ||
ea52d706 AD |
5110 | 2001-12-15 Akim Demaille <akim@epita.fr> |
5111 | ||
5112 | Still making progress in separating Bison into (i) input, (ii) | |
5113 | process, (iii) output: now we can directly output the parser file | |
5114 | without using table_obstack at all. | |
5115 | ||
5116 | * src/files.c, src/files.h (table_obstack): Bye bye. | |
5117 | (parser_file_name): New. | |
5118 | * src/files.c (compute_output_file_names): Compute it. | |
5119 | * src/output.c (actions_output, output_parser) | |
5120 | (output_master_parser): To a file instead of an obstack. | |
5121 | ||
3f96f4dc AD |
5122 | 2001-12-15 Akim Demaille <akim@epita.fr> |
5123 | ||
5124 | Attach actions to rules, instead of pre-outputting them to | |
5125 | actions_obstack. | |
5126 | ||
5127 | * src/gram.h (rule_t): action and action_line are new members. | |
5128 | * src/reader.c (symbol_list): Likewise. | |
5129 | (copy_action): Save the actions within the rule. | |
5130 | (packgram): Save them in rule_table. | |
5131 | * src/output.c (actions_output): New. | |
5132 | (output_parser): Use it on `%%actions'. | |
5133 | (output_rule_data): Don't free rule_table. | |
5134 | (output): Do it. | |
5135 | (prepare): Don't save the `action' muscle. | |
5136 | * src/bison.simple: s/%%action/%%actions/. | |
5137 | ||
51576fb3 AD |
5138 | 2001-12-15 Akim Demaille <akim@epita.fr> |
5139 | ||
5140 | * src/reader.c (copy_action): When --yacc, don't append a `;' | |
5141 | to the user action: let it fail if lacking. | |
dee049eb | 5142 | Suggested by Arnold Robbins and Tom Tromey. |
51576fb3 | 5143 | |
2648a72d AD |
5144 | 2001-12-14 Akim Demaille <akim@epita.fr> |
5145 | ||
5146 | * src/lex.c (literalchar): Simply return the char you decoded, non | |
5147 | longer mess around with obstacks and int pointers. | |
5148 | Adjust all callers. | |
5149 | ||
92790e5b AD |
5150 | 2001-12-14 Akim Demaille <akim@epita.fr> |
5151 | ||
5152 | * src/lex.c (literalchar): Don't escape the special characters, | |
5153 | just decode them, and keep them as char (before, eol was output as | |
5154 | the 2 char string `\n' etc.). | |
5155 | * src/output.c (output_rule_data): Use quotearg to output the | |
5156 | token strings. | |
5157 | ||
927c1557 PE |
5158 | 2001-12-13 Paul Eggert <eggert@twinsun.com> |
5159 | ||
5160 | * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE): | |
5161 | Do not infringe on the global user namespace when using C++. | |
5162 | (YYFPRINTF, YYSTDERR): New macros, needed for the above. | |
5163 | All uses of `fprintf' and `stderr' changed. | |
5164 | ||
5165 | * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR. | |
5166 | ||
ed8e1f68 AD |
5167 | 2001-12-13 Akim Demaille <akim@epita.fr> |
5168 | ||
5169 | The computation of nullable is broken: it doesn't handle empty | |
5170 | RHS's properly. | |
5171 | ||
5172 | * tests/torture.at (GNU AWK Grammar): New. | |
5173 | * tests/sets.at (Nullable): New. | |
5174 | * src/nullable.c (set_nullable): Instead of blindly looping over | |
5175 | `ritems', loop over the rules, and then over their rhs's. | |
5176 | ||
5177 | Work around Autotest bugs. | |
5178 | ||
5179 | * src/warshall.c (bitmatrix_print): Don't use `+--+' as table | |
5180 | frame, because Autotest understand lines starting with a `+' as | |
5181 | traces from the shell. Then, they are not processed properly. | |
5182 | Admittedly an Autotest bug, but we don't have time to wait for | |
5183 | Autotest to catch up. | |
5184 | * tests/regression.at (Broken Closure): Adjust to the new table | |
5185 | frames. | |
5186 | Move to... | |
5187 | * tests/sets.at: here. | |
5188 | ||
cb581495 AD |
5189 | 2001-12-13 Akim Demaille <akim@epita.fr> |
5190 | ||
5191 | * src/closure.c (closure): Use nrules instead of playing tricks | |
5192 | with BITS_PER_WORD. | |
5193 | ||
2e729273 AD |
5194 | 2001-12-13 Akim Demaille <akim@epita.fr> |
5195 | ||
5196 | * src/print.c (print_actions): Output the handling of `$' as the | |
5197 | traces do: shifting the token EOF. Before EOF was treated as a | |
5198 | nonterminal. | |
5199 | * tests/regression.at: Adjust some tests. | |
5200 | * src/print_graph.c (print_core): Complete the set of items via | |
5201 | closure. The next-to-final and final states are still unsatisfying, | |
5202 | but that's to be addressed elsewhere. | |
5203 | No longer output the rule numbers, but do output the state number. | |
5204 | A single loop for the shifts + gotos is enough, but picked a | |
5205 | distinct color for each. | |
5206 | (print_graph): Initialize and finalize closure. | |
5207 | ||
107f7dfb AD |
5208 | 2001-12-13 Akim Demaille <akim@epita.fr> |
5209 | ||
5210 | * src/reader.c (readgram): Remove dead code, an strip useless | |
5211 | braces. | |
5212 | (get_type): Remove, unused. | |
5213 | ||
9b53a24f AD |
5214 | 2001-12-12 Akim Demaille <akim@epita.fr> |
5215 | ||
5216 | * src/complain.h, src/complain.c: Remove error_one_per_line, rely | |
5217 | on that of lib/error.c. | |
5218 | ||
dbfb6dcd AD |
5219 | 2001-12-12 Akim Demaille <akim@epita.fr> |
5220 | ||
5221 | Some hosts don't like `/' in includes. | |
5222 | ||
5223 | * src/system.h: Include libgettext.h without qualifying the path. | |
5224 | * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove | |
5225 | $(top_srcdir). | |
5226 | ||
c25fb648 MA |
5227 | 2001-12-11 Marc Autret <autret_m@epita.fr> |
5228 | ||
5229 | * src/output.c (output_parser): Remove useless muscle. | |
5230 | ||
710ddc4f MA |
5231 | 2001-12-11 Marc Autret <autret_m@epita.fr> |
5232 | ||
5233 | * src/bison.simple: Remove #line just before %%epilogue. It | |
5234 | is now handled in ... | |
5235 | * src/reader.c (read_additionnal_code): Add the output of a | |
5236 | #line for the epilogue. | |
5237 | ||
e83d80b8 MA |
5238 | 2001-12-10 Marc Autret <autret_m@epita.fr> |
5239 | ||
927c1557 | 5240 | * src/reader.c (copy_definition): Re-use CPP-outed code which |
e83d80b8 MA |
5241 | replace precedent remove. |
5242 | * src/bison.simple: Remove #line before %%prologue because | |
5243 | %%input-line is wrong at this time. | |
5244 | ||
971d5158 MA |
5245 | 2001-12-10 Marc Autret <autret_m@epita.fr> |
5246 | ||
5247 | * src/reader.c (symbols_output): Clean up. | |
927c1557 | 5248 | * src/output.c (output_gram, output): Clean up. |
971d5158 | 5249 | |
5edafffd AD |
5250 | 2001-12-10 Akim Demaille <akim@epita.fr> |
5251 | ||
5252 | * src/lalr.c (initialize_lookaheads): New. Extracted from... | |
5253 | * src/LR0.c (set_state_table): here. | |
5254 | * src/lalr.c (lalr): Call it. | |
5255 | ||
0279f8e9 AD |
5256 | 2001-12-10 Akim Demaille <akim@epita.fr> |
5257 | ||
5258 | * src/state.h (shifts): Remove the `number' member: shifts are | |
5259 | attached to state, hence no longer need to be labelled with a | |
5260 | state number. | |
5261 | ||
190c4f5f AD |
5262 | 2001-12-10 Akim Demaille <akim@epita.fr> |
5263 | ||
5264 | Now that states have a complete set of members, the linked list of | |
5265 | shifts is useless: just fill directly the state's shifts member. | |
5266 | ||
5267 | * src/state.h (shifts): Remove the `next' member. | |
5268 | * src/LR0.c (first_state, last_state): Remove. | |
5269 | Adjust the callers. | |
5270 | (augment_automaton): Don't look for the shifts that must be added | |
5271 | a shift on EOF: it is those of the state we looked for! But now, | |
5272 | since shifts are attached, it is no longer needed to looking | |
5273 | merely by its id: its number. | |
5274 | ||
2a73b93d AD |
5275 | 2001-12-10 Akim Demaille <akim@epita.fr> |
5276 | ||
5277 | * src/LR0.c (augment_automaton): Better variable locality. | |
5278 | Remove an impossible branch: if there is a state corresponding to | |
5279 | the start symbol being shifted, then there is shift for the start | |
5280 | symbol from the initial state. | |
5281 | ||
74392f6a AD |
5282 | 2001-12-10 Akim Demaille <akim@epita.fr> |
5283 | ||
5284 | * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state' | |
5285 | only when appropriate: when insert_start_shifting_state' is not | |
5286 | invoked. | |
5287 | * tests/regression.at (Rule Line Numbers): Adjust. | |
5288 | ||
37c82725 AD |
5289 | 2001-12-10 Akim Demaille <akim@epita.fr> |
5290 | ||
5291 | * src/LR0.c (augment_automaton): Now that all states have shifts, | |
5292 | merge the two cases addition shifts to the initial state. | |
5293 | ||
6a164e0c AD |
5294 | 2001-12-10 Akim Demaille <akim@epita.fr> |
5295 | ||
5296 | * src/lalr.c (set_state_table): Move to... | |
5297 | * src/LR0.c: here. | |
5298 | * src/lalr.c (lalr): Don't call it... | |
5299 | * src/LR0.c (generate_states): do it. | |
5300 | * src/LR0.h (first_state): Remove, only the table is used. | |
5301 | ||
7215de24 AD |
5302 | 2001-12-10 Akim Demaille <akim@epita.fr> |
5303 | ||
5304 | * src/LR0.h (first_shift, first_reduction): Remove. | |
5305 | * src/lalr.c: Don't use first_shift: find shifts through the | |
5306 | states. | |
5307 | ||
80e25d4d AD |
5308 | 2001-12-10 Akim Demaille <akim@epita.fr> |
5309 | ||
5310 | * src/LR0.c: Attach shifts to states as soon as they are | |
5311 | computed. | |
5312 | * src/lalr.c (set_state_table): Instead of assigning shifts to | |
5313 | state, just assert that the mapping was properly done. | |
5314 | ||
0ab3728b AD |
5315 | 2001-12-10 Akim Demaille <akim@epita.fr> |
5316 | ||
5317 | * src/LR0.c (insert_start_shift): Rename as... | |
5318 | (insert_start_shifting_state): this. | |
5319 | (insert_eof_shifting_state, insert_accepting_state): New. | |
5320 | (augment_automaton): Adjust. | |
5321 | Better locality of the variables. | |
5322 | When looking if the start_symbol is shifted from the initial | |
5323 | state, using `while (... symbol != start_symbol ...)' sounds | |
5324 | better than `while (... symbol < start_symbol ...)': If fail | |
5325 | to see how the order between symbols could be relevant! | |
5326 | ||
78af9bbc AD |
5327 | 2001-12-10 Akim Demaille <akim@epita.fr> |
5328 | ||
5329 | * src/getargs.h: Don't declare `spec_name_prefix' and | |
5330 | `spec_file_prefix', declared by src/files.h. | |
5331 | * src/files.c, src/files.h: Default for spec_name_prefix is "yy". | |
5332 | * src/muscle_tab.c (muscle_init): Default prefix to NULL. | |
5333 | * src/output.c (prepare): Adjust. | |
5334 | * src/reader.c (symbols_output): Likewise. | |
5335 | * src/vmsgetargs.c: Vaguely adjust, but who cares? | |
5336 | ||
bdef2a41 AD |
5337 | 2001-12-10 Akim Demaille <akim@epita.fr> |
5338 | ||
5339 | * src/muscle_tab.c (muscle_init): NULL is a better default than | |
5340 | `"0"'. | |
5341 | ||
3735969c AD |
5342 | 2001-12-10 Akim Demaille <akim@epita.fr> |
5343 | ||
5344 | * src/reader.c (reader): Calling symbols_output once is enough. | |
5345 | ||
49701457 AD |
5346 | 2001-12-10 Akim Demaille <akim@epita.fr> |
5347 | ||
5348 | Now that states have a complete set of members, the linked list of | |
5349 | reductions is useless: just fill directly the state's reductions | |
5350 | member. | |
5351 | ||
5352 | * src/state.h (struct reductions): Remove member `number' and | |
5353 | `next'. | |
5354 | * src/LR0.c (first_reduction, last_reduction): Remove. | |
5355 | (save_reductions): Don't link the new reductions, store them in | |
5356 | this_state. | |
5357 | * src/lalr.c (set_state_table): No need to attach reductions to | |
5358 | states, it's already done. | |
5359 | * src/output.c (output_actions): No longer free the shifts, then | |
5360 | the reductions, then the states: free all the states and their | |
5361 | members. | |
5362 | ||
0edad749 AD |
5363 | 2001-12-10 Akim Demaille <akim@epita.fr> |
5364 | ||
5365 | * src/options.c (OPTN, DRTV, BOTH): New. | |
5366 | (option_table): Use them. | |
5367 | ||
0edad749 AD |
5368 | * src/muscle_tab.c: Don't include xalloc.h and string.h: that's |
5369 | the job of system.h. | |
5370 | * src/options.c: Don't include stdio.h and xalloc.h for the same | |
5371 | reasons. | |
5372 | ||
5449dd0f AD |
5373 | 2001-12-10 Akim Demaille <akim@epita.fr> |
5374 | ||
5375 | * src/output.c (output, prepare): Make sure the values of the | |
5376 | muscles `action' and `prologue' are 0-terminated. | |
5377 | ||
a870c567 AD |
5378 | 2001-12-10 Akim Demaille <akim@epita.fr> |
5379 | ||
5380 | Clean up GCC warnings. | |
5381 | ||
5382 | * src/reader.c (copy_action): `buf' is not used. | |
5383 | (parse_skel_decl): Be static. | |
5384 | * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'. | |
5385 | * src/options.h (create_long_option_table): Have a real prototype. | |
5386 | * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete) | |
5387 | (hash_delete_at): Return const void *. | |
5388 | Adjust casts to preserve the const. | |
5389 | ||
80df8768 AD |
5390 | 2001-12-10 Akim Demaille <akim@epita.fr> |
5391 | ||
5392 | * configure.in: Require 2.52g. | |
5393 | M4 is not needed, but AUTOM4TE is. | |
5394 | * m4/m4.m4: Remove. | |
5395 | * tests/Makefile.am: Adjust. | |
5396 | ||
f693ad14 AD |
5397 | 2001-12-10 Akim Demaille <akim@epita.fr> |
5398 | ||
5399 | One structure for states is enough, even though theoretically | |
5400 | there are LR(0) states and LALR(1) states. | |
5401 | ||
5402 | * src/lalr.h (state_t): Remove. | |
5403 | (state_table): Be state_t **, not state_t *. | |
5404 | * src/state.h (core, CORE_ALLOC): Rename as... | |
5405 | (state_t, STATE_ALLOC): this. | |
5406 | Add the LALR(1) members: shifts, reductions, errs. | |
5407 | * src/LR0.c (state_table): Rename as... | |
5408 | (state_hash): this, to avoid name clashes with the global | |
5409 | `state_table'. | |
5410 | * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c | |
5411 | * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust. | |
5412 | ||
74ffbcb6 AD |
5413 | 2001-12-10 Akim Demaille <akim@epita.fr> |
5414 | ||
5415 | Bison dumps core on bash.y. | |
5416 | Reported by Pascal Bart. | |
5417 | ||
5418 | * src/warshall.c (bitmatrix_print): New. | |
5419 | (TC): Use it. | |
5420 | When performing a transitive closure R(i, j) && R(j, k) => R(i, k), | |
5421 | j must be the outer loop. | |
5422 | * tests/regression.at (Broken Closure): New. | |
5423 | ||
07708e19 AD |
5424 | 2001-12-05 Akim Demaille <akim@epita.fr> |
5425 | ||
5426 | * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and | |
5427 | its argument. | |
5428 |