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