]> git.saurik.com Git - bison.git/blame - ChangeLog
* src/parse-gram.y (directives, directive, gram)
[bison.git] / ChangeLog
CommitLineData
2c569025
AD
12002-06-14 Akim Demaille <akim@epita.fr>
2
3 * src/parse-gram.y (directives, directive, gram)
4 (grammar_directives, precedence_directives, precedence_directive):
5 Rename as...
6 (declarations, declaration, grammar, grammar_declaration)
7 (precedence_declaration, precedence_declarator): these.
8 (symbol_declaration): New.
9
10
592e8d4d
AD
112002-06-14 Akim Demaille <akim@epita.fr>
12
13 * src/files.c (action_obstack): Remove, unused.
14 (output_obstack): Remove it, and all its dependencies, as it is no
15 longer needed.
16 * src/reader.c (epilogue_set): Build the epilogue in the
17 muscle_obstack.
18 * src/output.h, src/output.c (muscle_obstack): Move to...
19 * src/muscle_tab.h, src/muscle_tab.h: here.
20 (muscle_init): Initialize muscle_obstack.
21 (muscle_free): New.
22 * src/main.c (main): Call it.
23
24
0c15323d
AD
252002-06-14 Akim Demaille <akim@epita.fr>
26
27 * src/location.h: New, extracted from...
28 * src/reader.h: here.
29 * src/Makefile.am (noinst_HEADERS): Merge into
30 (bison_SOURCES): this.
31 Add location.h.
32 * src/parse-gram.y: Use location_t instead of Bison's.
33 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
34 Use location_t instead of ints.
35
36
e96c9728
AD
372002-06-14 Akim Demaille <akim@epita.fr>
38
39 * data/bison.simple, data/bison.c++: Be sure to restore the
40 current #line when returning to the skeleton contents after having
41 exposed the input file's #line.
42
75d1fe16
AD
432002-06-12 Akim Demaille <akim@epita.fr>
44
45 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
46 eager.
47 * tests/actions.at (Exotic Dollars): New.
48
6c35d22c
AD
492002-06-12 Akim Demaille <akim@epita.fr>
50
51 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
52 ['"/] too eagerly.
53 * tests/input.at (Torturing the Scanner): New.
54
1d6412ad
AD
552002-06-11 Akim Demaille <akim@epita.fr>
56
57 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
58 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
59 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
60 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
61 * src/reader.c (reader): Use it.
62
4cdb01db
AD
632002-06-11 Akim Demaille <akim@epita.fr>
64
65 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
66 Adjust all callers.
67 (scanner_last_string_free): New.
68
44995b2e
AD
692002-06-11 Akim Demaille <akim@epita.fr>
70
71 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
72 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
73 (last_string, YY_OBS_FREE): New.
74 Use them when returning an ID.
75
e9955c83
AD
762002-06-11 Akim Demaille <akim@epita.fr>
77
78 Have Bison grammars parsed by a Bison grammar.
79
80 * src/reader.c, src/reader.h (prologue_augment): New.
81 * src/reader.c (copy_definition): Remove.
82
83 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
84 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
85 (grammar_current_rule_prec_set, grammar_current_rule_check)
86 (grammar_current_rule_symbol_append)
87 (grammar_current_rule_action_append): Export.
88 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
89 (symbol_list_action_append): Remove.
90 Hook the routines from reader.
91 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
92 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
93
94 * src/reader.c (read_declarations): Remove, unused.
95
96 * src/parse-gram.y: Handle the epilogue.
97 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
98 (grammar_start_symbol_set): this.
99 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
100 * src/reader.c (readgram): Remove, unused.
101 (reader): Adjust to insert eoftoken and axiom where appropriate.
102
103 * src/reader.c (copy_dollar): Replace with...
104 * src/scan-gram.h (handle_dollar): this.
105 * src/parse-gram.y: Remove `%thong'.
106
107 * src/reader.c (copy_at): Replace with...
108 * src/scan-gram.h (handle_at): this.
109
110 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
111 New.
112
113 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
114 time being.
115
116 * src/reader.h, src/reader.c (grammar_rule_end): New.
117
118 * src/parse.y (current_type, current_class): New.
119 Implement `%nterm', `%token' support.
120 Merge `%term' into `%token'.
121 (string_as_id): New.
122 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
123 type name.
124
125 * src/parse-gram.y: Be sure to handle properly the beginning of
126 rules.
127
128 * src/parse-gram.y: Handle %type.
129 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
130
131 * src/parse-gram.y: More directives support.
132 * src/options.c: No longer handle source directives.
133
134 * src/parse-gram.y: Fix %output.
135
136 * src/parse-gram.y: Handle %union.
137 Use the prologue locations.
138 * src/reader.c (parse_union_decl): Remove.
139
140 * src/reader.h, src/reader.c (epilogue_set): New.
141 * src/parse-gram.y: Use it.
142
143 * data/bison.simple, data/bison.c++: b4_stype is now either not
144 defined, then default to int, or to the contents of %union,
145 without `union' itself.
146 Adjust.
147 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
148
149 * src/output.c (actions_output): Don't output braces, as they are
150 already handled by the scanner.
151
152 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
153 characters to themselves.
154
155 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
156 that the epilogue has a proper #line.
157
158 * src/parse-gram.y: Handle precedence/associativity.
159
160 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
161 a terminal.
162 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
163 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
164 at all to define terminals that cannot be emitted.
165
166 * src/scan-gram.l: Escape M4 characters.
167
168 * src/scan-gram.l: Working properly with escapes in user
169 strings/characters.
170
171 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
172 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
173 grammar.
174 Use more modest sizes, as for the time being the parser does not
175 release memory, and therefore the process swallows a huge amount
176 of memory.
177
178 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
179 stricter %token grammar.
180
181 * src/symtab.h (associativity): Add `undef_assoc'.
182 (symbol_precedence_set): Do nothing when passed an undef_assoc.
183 * src/symtab.c (symbol_check_alias_consistence): Adjust.
184
185 * tests/regression.at (Invalid %directive): Remove, as it is now
186 meaningless.
187 (Invalid inputs): Adjust to the new error messages.
188 (Token definitions): The new grammar doesn't allow too many
189 eccentricities.
190
191 * src/lex.h, src/lex.c: Remove.
192 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
193 (copy_character, copy_string2, copy_string, copy_identifier)
194 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
195 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
196 (parse_action): Remove.
197 * po/POTFILES.in: Adjust.
198
2e047461
AD
1992002-06-11 Akim Demaille <akim@epita.fr>
200
201 * src/reader.c (parse_action): Don't store directly into the
202 rule's action member: return the action as a string.
203 Don't require `rule_length' as an argument: compute it.
204 (grammar_current_rule_symbol_append)
205 (grammar_current_rule_action_append): New, eved out from
206 (readgram): here.
207 Remove `action_flag', `rulelength', unused now.
208
9af3fbce
AD
2092002-06-11 Akim Demaille <akim@epita.fr>
210
211 * src/reader.c (grammar_current_rule_prec_set).
212 (grammar_current_rule_check): New, eved out from...
213 (readgram): here.
214 Remove `xaction', `first_rhs': useless.
215 * tests/input.at (Type clashes): New.
216 * tests/existing.at (GNU Cim Grammar): Adjust.
217
1485e106
AD
2182002-06-11 Akim Demaille <akim@epita.fr>
219
220 * src/reader.c (grammar_midrule_action): New, Eved out from
221 (readgram): here.
222
da4160c3
AD
2232002-06-11 Akim Demaille <akim@epita.fr>
224
225 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
226 New.
227 (readgram): Use them as replacement of inlined code, crule and
228 crule1.
229
f6d0f937
AD
2302002-06-11 Akim Demaille <akim@epita.fr>
231
232 * src/reader.c (grammar_end, grammar_symbol_append): New.
233 (readgram): Use them.
234 Make the use of `p' as local as possible.
235
69078d4b
AD
2362002-06-10 Akim Demaille <akim@epita.fr>
237
238 GCJ's parser requires the tokens to be defined before the prologue.
239
240 * data/bison.simple: Output the token definition before the user's
241 prologue.
242 * tests/regression.at (Braces parsing, Duplicate string)
243 (Mixing %token styles): Check the output from bison.
244 (Early token definitions): New.
245
5e424082
AD
2462002-06-10 Akim Demaille <akim@epita.fr>
247
248 * src/symtab.c (symbol_user_token_number_set): Don't complain when
249 assigning twice the same user number to a token, so that we can
250 use it in...
251 * src/lex.c (lex): here.
252 Also use `symbol_class_set' instead of hand written code.
253 * src/reader.c (parse_assoc_decl): Likewise.
254
44536b35
AD
2552002-06-10 Akim Demaille <akim@epita.fr>
256
257 * src/symtab.c, src/symtab.c (symbol_class_set)
258 (symbol_user_token_number_set): New.
259 * src/reader.c (parse_token_decl): Use them.
260 Use a switch instead of ifs.
261 Use a single argument.
262
8b9f2372
AD
2632002-06-10 Akim Demaille <akim@epita.fr>
264
265 Remove `%thong' support as it is undocumented, unused, duplicates
266 `%token's job, and creates useless e-mail traffic with people who
267 want to know what it is, why it is undocumented, unused, and
268 duplicates `%token's job.
269
270 * src/reader.c (parse_thong_decl): Remove.
271 * src/options.c (option_table): Remove "thong".
272 * src/lex.h (tok_thong): Remove.
273
3ae2b51f
AD
2742002-06-10 Akim Demaille <akim@epita.fr>
275
276 * src/symtab.c, src/symtab.c (symbol_type_set)
277 (symbol_precedence_set): New.
278 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
279 (value_components_used): Remove, unused.
280
2f1afb73
AD
2812002-06-09 Akim Demaille <akim@epita.fr>
282
283 Move symbols handling code out of the reader.
284
285 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
286 (axiom): Move to...
287 * src/symtab.h, src/symtab.c: here.
288
289 * src/gram.c (start_symbol): Remove: use startsymbol->number.
290 * src/reader.c (startval): Rename as...
291 * src/symtab.h, src/symtab.c (startsymbol): this.
292 * src/reader.c: Adjust.
293
294 * src/reader.c (symbol_check_defined, symbol_make_alias)
295 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
296 (token_translations_init)
297 Move to...
298 * src/symtab.c: here.
299 * src/reader.c (packsymbols): Move to...
300 * src/symtab.h, src/symtab.c (symbols_pack): here.
301 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
302 argument.
303
e9bca3ad
AD
3042002-06-03 Akim Demaille <akim@epita.fr>
305
306 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
307 then statements.
308
86eff183
AD
3092002-06-03 Akim Demaille <akim@epita.fr>
310
311 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
312 structs with non literals.
313 * src/scan-skel.l: never-interactive.
314 * src/conflicts.c (enum conflict_resolution_e): No trailing
315 comma.
316 * src/getargs.c (usage): Split long literal strings.
317 Reported by Hans Aberg.
318
717be197
AD
3192002-05-28 Akim Demaille <akim@epita.fr>
320
321 * data/bison.c++: Use C++ ostreams.
322 (cdebug_): New member.
323
670ddffd
AD
3242002-05-28 Akim Demaille <akim@epita.fr>
325
326 * src/output.c (output_skeleton): Be sure to allocate enough room
327 for `/' _and_ for `\0' in full_skeleton.
328
769b430f
AD
3292002-05-28 Akim Demaille <akim@epita.fr>
330
331 * data/bison.c++: Catch up with bison.simple:
332 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
333 and Paul Eggert <eggert@twinsun.com>: `error' handing.
334 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
335 and popping traces.
336
7067cb36
PH
3372002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
338
339 * src/output.c (output_skeleton): Put an explicit path in front of
340 the skeleton file name, rather than relying on the -I directory,
341 to partially alleviate effects of having a skeleton file lying around
342 in the current directory.
769b430f 343
4a713ec2
PH
3442002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
345
769b430f 346 * src/conflicts.c (log_resolution): Correct typo:
4a713ec2
PH
347 obstack_printf should be obstack_fgrow1.
348
b408954b
AD
3492002-05-26 Akim Demaille <akim@epita.fr>
350
351 * src/state.h (state_t): `solved_conflicts' is a new member.
352 * src/LR0.c (new_state): Set it to 0.
353 * src/conflicts.h, src/conflicts.c (print_conflicts)
354 (free_conflicts, solve_conflicts): Rename as...
355 (conflicts_print, conflicts_free, conflicts_solve): these.
356 Adjust callers.
357 * src/conflicts.c (enum conflict_resolution_e)
358 (solved_conflicts_obstack): New, used by...
359 (log_resolution): this.
360 Adjust to attach the conflict resolution to each state.
361 Complete the description with the precedence/associativity
362 information.
363 (resolve_sr_conflict): Adjust.
364 * src/print.c (print_state): Output its solved_conflicts.
365 * tests/conflicts.at (Unresolved SR Conflicts)
366 (Solved SR Conflicts): Exercise --report=all.
367
a49aecd5
AD
3682002-05-26 Akim Demaille <akim@epita.fr>
369
370 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
371 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
372 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
373 (token_number_t, item_number_as_token_number)
374 (token_number_as_item_number, muscle_insert_token_number_table):
375 Rename as...
376 (symbol_number_t, item_number_as_symbol_number)
377 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
378 these, since it is more appropriate.
379
5504898e
AD
3802002-05-26 Akim Demaille <akim@epita.fr>
381
382 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
383 `Error:' lines.
384 * data/bison.simple (yystos) [YYDEBUG]: New.
385 (yyparse) [YYDEBUG]: Display the symbols which are popped during
386 error recovery.
387 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
388
ec3bc396
AD
3892002-05-25 Akim Demaille <akim@epita.fr>
390
391 * doc/bison.texinfo (Debugging): Split into...
392 (Tracing): this new section, its former contents, and...
393 (Understanding): this new section.
394 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
395 by...
396 (report_flag): this.
397 Adjust all dependencies.
398 (report_args, report_types, report_argmatch): New.
399 (usage, getargs): Report/support -r, --report.
400 * src/options.h
401 (struct option_table_struct): Rename as..,
402 (struct option_table_s): this.
403 Rename the `set_flag' member to `flag' to match with getopt_long's
404 struct.
405 * src/options.c (option_table): Split verbose into an entry for
406 %verbose, and another for --verbose.
407 Support --report/-r, so remove -r from the obsolete --raw.
408 * src/print.c: Attach full item sets and lookaheads reports to
409 report_flag instead of trace_flag.
410 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
411
78df8250
PE
4122002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
413 and Paul Eggert <eggert@twinsun.com>
769b430f 414
78df8250
PE
415 * data/bison.simple (yyparse): Correct error handling to conform to
416 POSIX and yacc. Specifically, after syntax error is discovered,
417 do not reduce further before shifting the error token.
418 Clean up the code a bit by removing the labels yyerrdefault,
419 yyerrhandle, yyerrpop.
420 * NEWS: Document the above.
421
c0c9ea05
PH
4222002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
423
424 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
425 type; it isn't always big enough, since it doesn't necessarily
426 include non-terminals.
769b430f 427 (yytranslate): Expand definition of yy_token_number_type, so that
c0c9ea05
PH
428 the latter can be removed.
429 (yy_token_number_type): Remove, only one use.
430 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
431 don't use TokenNumberType as element type.
769b430f 432
c0c9ea05
PH
433 * tests/regression.at: Modify expected output to agree with change
434 to yyr1 and yytranslate.
769b430f 435
6390a83f
FK
4362002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
437
438 * src/reader.c (parse_action): Use copy_character instead of
439 obstack_1grow.
440
db7c8e9a
AD
4412002-05-13 Akim Demaille <akim@epita.fr>
442
443 * tests/regression.at (Token definitions): Prototype yylex and
444 yyerror.
445
fcc61800
PH
4462002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
447
158c687b 448 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
fcc61800
PH
449 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
450 32-bit arithmetic.
451 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
452
5683e9b2
AD
4532002-05-07 Akim Demaille <akim@epita.fr>
454
455 * tests/synclines.at: Be sure to prototype yylex and yyerror to
456 avoid GCC warnings.
457
0c2d3f4c
AD
4582002-05-07 Akim Demaille <akim@epita.fr>
459
460 Kill GCC warnings.
461
462 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
463 over the RHS of each rule.
464 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
465 * src/state.h (state_t): Member `nitems' is unsigned short.
466 * src/LR0.c (get_state): Adjust.
467 * src/reader.c (packgram): Likewise.
468 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
469 `Type'.
470 (muscle_insert_int_table): Remove, unused.
471 (prepare_rules): Remove `max'.
472
1565b720
AD
4732002-05-06 Akim Demaille <akim@epita.fr>
474
475 * src/closure.c (print_firsts): Display of the symbol tags.
476 (bitmatrix_print): Move to...
477 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
478 here.
479 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
480
cfaee611
AD
4812002-05-06 Akim Demaille <akim@epita.fr>
482
483 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
484 hash_do_for_each.
485
458be8e0
AD
4862002-05-06 Akim Demaille <akim@epita.fr>
487
488 * src/LR0.c (new_state, get_state): Instead of using the global
489 `kernel_size' and `kernel_base', have two new arguments:
490 `core_size' and `core'.
491 Adjust callers.
492
a900a624
AD
4932002-05-06 Akim Demaille <akim@epita.fr>
494
495 * src/reader.c (packgram): No longer end `ritem' with a 0
496 sentinel: it is not used.
497
d4e7d3a1
AD
4982002-05-05 Akim Demaille <akim@epita.fr>
499
500 New experimental feature: display the lookaheads in the report and
501 graph.
502
503 * src/print (print_core): When --trace-flag, display the rules
504 lookaheads.
505 * src/print_graph.c (print_core): Likewise.
506 Swap the arguments.
507 Adjust caller.
508
39ceb25b
AD
5092002-05-05 Akim Demaille <akim@epita.fr>
510
511 * tests/torture.at (Many lookaheads): New test.
512
5372019f
AD
5132002-05-05 Akim Demaille <akim@epita.fr>
514
515 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
516 (GENERATE_MUSCLE_INSERT_TABLE): this.
517 (output_int_table, output_unsigned_int_table, output_short_table)
518 (output_token_number_table, output_item_number_table): Replace with...
519 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
520 (muscle_insert_short_table, muscle_insert_token_number_table)
521 (muscle_insert_item_number_table): these.
522 Adjust all callers.
523 (prepare_tokens): Don't free `translations', since...
524 * src/reader.h, src/reader.c (grammar_free): do it.
525 Move to...
526 * src/gram.h, src/gram.c (grammar_free): here.
527 * data/bison.simple, data/bison.c++: b4_token_number_max is now
528 b4_translate_max.
529
5df5f6d5
AD
5302002-05-05 Akim Demaille <akim@epita.fr>
531
532 * src/output.c (output_unsigned_int_table): New.
533 (prepare_rules): `i' is unsigned.
534 `prhs', `rline', `r2' are unsigned int.
535 Rename muscle `rhs_number_max' as `rhs_max'.
536 Output muscles `prhs_max', `rline_max', and `r2_max'.
537 Free rline and r1.
538 * data/bison.simple, data/bison.c++: Adjust to use these muscles
539 to compute types instead of constant types.
540 * tests/regression.at (Web2c Actions): Adjust.
541
b87f8b21
AD
5422002-05-04 Akim Demaille <akim@epita.fr>
543
544 * src/symtab.h (SALIAS, SUNDEF): Rename as...
545 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
546 Adjust dependencies.
547 * src/output.c (token_definitions_output): Be sure not to output a
548 `#define 'a'' when fed with `%token 'a' "a"'.
549 * tests/regression.at (Token definitions): New.
550
8bb936e4
PE
5512002-05-03 Paul Eggert <eggert@twinsun.com>
552
553 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
554 for K&R C.
555
5562002-05-03 gettextize <bug-gnu-gettext@gnu.org>
557
558 * Makefile.am (SUBDIRS): Remove intl.
559 (EXTRA_DIST): Add config/config.rpath.
560
53c71a12
AD
5612002-05-03 Akim Demaille <akim@epita.fr>
562
563 * data/bison.simple (m4_if): Don't output empty enums.
564 And actually, output valid enum definitions :(.
565
289dd0cf
AD
5662002-05-03 Akim Demaille <akim@epita.fr>
567
568 * configure.bat: Remove, completely obsolete.
569 * Makefile.am (EXTRA_DIST): Adjust.
570 Don't distribute config.rpath...
571 * config/Makefile.am (EXTRA_DIST): Do it.
572
db85e524
AD
5732002-05-03 Akim Demaille <akim@epita.fr>
574
575 * configure.in (GETTEXT_VERSION): New.
576 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
577
83ccf991
AD
5782002-05-03 Akim Demaille <akim@epita.fr>
579
580 * data/bison.simple (b4_token_enum): New.
581 (b4_token_defines): Use it to output tokens both as #define and
582 enums.
583 Suggested by Paul Eggert.
584 * src/output.c (token_definitions_output): Don't output spurious
585 white spaces.
586
1f418995
AD
5872002-05-03 Akim Demaille <akim@epita.fr>
588
589 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
590
45119f04
RA
5912002-05-02 Robert Anisko <robert@lrde.epita.fr>
592
593 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
594 Update the stack class, give a try to deque as the default container.
595
b2d52318
AD
5962002-05-02 Akim Demaille <akim@epita.fr>
597
598 * data/bison.simple (yyparse): Do not implement @$ = @1.
599 (YYLLOC_DEFAULT): Adjust to do it.
600 * doc/bison.texinfo (Location Default Action): Fix.
601
3a8b4109
AD
6022002-05-02 Akim Demaille <akim@epita.fr>
603
604 * src/reader.c (parse_braces): Merge into...
605 (parse_action): this.
606
84614e13
AD
6072002-05-02 Akim Demaille <akim@epita.fr>
608
609 * configure.in (ALL_LINGUAS): Remove.
610 * po/LINGUAS, hr.po: New.
611
fdbcd8e2
AD
6122002-05-02 Akim Demaille <akim@epita.fr>
613
614 Remove the so called hairy (semantic) parsers.
615
616 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
617 * src/gram.h, src/gram.c (semantic_parser): Remove.
618 (rule_t): Remove the guard and guard_line members.
619 * src/lex.h (token_t): remove tok_guard.
620 * src/options.c (option_table): Remove %guard and %semantic_parser
621 support.
622 * src/output.c, src/output.h (guards_output): Remove.
623 (prepare): Adjust.
624 (token_definitions_output): Don't output the `T'
625 tokens (???).
626 (output_skeleton): Don't output the guards.
627 * src/files.c, src/files.c (attrsfile): Remove.
628 * src/reader.c (symbol_list): Remove the guard and guard_line
629 members.
630 Adjust dependencies.
631 (parse_guard): Remove.
632 * data/bison.hairy: Remove.
633 * doc/bison.texinfo (Environment Variables): Remove occurrences of
634 BISON_HAIRY.
635
82b6cb3f
AD
6362002-05-02 Akim Demaille <akim@epita.fr>
637
638 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
639 (parse_guard): Rename the formal argument `stack_offset' as
640 `rule_length', which is more readable.
641 Adjust callers.
642 (copy_at, copy_dollar): Instead of outputting the hard coded
643 values of $$, $n and so forth, output invocation to b4_lhs_value,
644 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
900c877b
AD
645 Note: this patch partially drops `semantic-parser' support: it
646 always does `rule_length - n', where semantic parsers ought to
647 always use `-n'.
82b6cb3f
AD
648 * data/bison.simple, data/bison.c++ (b4_lhs_value)
649 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
650
6cbfbcc5
AD
6512002-05-02 Akim Demaille <akim@epita.fr>
652
653 * configure.in (AC_INIT): Bump to 1.49b.
654 (AM_INIT_AUTOMAKE): Short invocation.
655
b8548114
AD
6562002-05-02 Akim Demaille <akim@epita.fr>
657
658 Version 1.49a.
659
c20cd1fa
AD
6602002-05-01 Akim Demaille <akim@epita.fr>
661
662 * src/skeleton.h: Remove.
663
8a9566d4
AD
6642002-05-01 Akim Demaille <akim@epita.fr>
665
666 * src/skeleton.h: Fix the #endif.
667 Reported by Magnus Fromreide.
668
8c6d399a
PE
6692002-04-26 Paul Eggert <eggert@twinsun.com>
670
671 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
672 Define if we define YYSTYPE and YYLTYPE, respectively.
b756bb75 673 (YYCOPY): Fix [] quoting problem in the non-GCC case.
8a9566d4 674
2b7ed18a
RA
6752002-04-25 Robert Anisko <robert@lrde.epita.fr>
676
677 * src/scan-skel.l: Postprocess quadrigraphs.
678
679 * src/reader.c (copy_character): New function, used to output
680 single characters while replacing `[' and `]' with quadrigraphs, to
681 avoid troubles with M4 quotes.
682 (copy_comment): Output characters with copy_character.
683 (read_additionnal_code): Likewise.
684 (copy_string2): Likewise.
685 (copy_definition): Likewise.
686
687 * tests/calc.at: Exercise M4 quoting.
688
34a89c50
AD
6892002-04-25 Akim Demaille <akim@epita.fr>
690
691 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
692 between `!' and the command.
693 Reported by Paul Eggert.
694
0dd1580a
RA
6952002-04-24 Robert Anisko <robert@lrde.epita.fr>
696
697 * tests/calc.at: Exercise prologue splitting.
698
699 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
700 `b4_post_prologue' instead of `b4_prologue'.
701
702 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
703 muscles.
704 (output): Free pre_prologue_obstack and post_prologue_obstack.
705 * src/files.h, src/files.c (attrs_obstack): Remove.
706 (pre_prologue_obstack, post_prologue_obstack): New.
707 * src/reader.c (copy_definition): Add a parameter to specify the
708 obstack to fill, instead of using attrs_obstack unconditionally.
709 (read_declarations): Pass pre_prologue_obstack to copy_definition if
710 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
711
83c1796f
PE
7122002-04-23 Paul Eggert <eggert@twinsun.com>
713
714 * data/bison.simple: Remove unnecessary commentary and white
715 space differences from 1_29-branch.
716 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
717
718 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
719 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
720 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
721 constructors or destructors.
722
723 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
724
1207eeac
AD
7252002-04-23 Akim Demaille <akim@epita.fr>
726
727 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
728 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
729 location with columns.
730 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
731 All reported by Paul Eggert.
732
78ab8f67
AD
7332002-04-22 Akim Demaille <akim@epita.fr>
734
735 * src/reduce.c (dump_grammar): Move to...
736 * src/gram.h, src/gram.c (grammar_dump): here.
737 Be sure to separate long item numbers.
738 Don't read the members of a rule's prec if its nil.
739
133c20e2
AD
7402002-04-22 Akim Demaille <akim@epita.fr>
741
742 * src/output.c (table_size, table_grow): New.
743 (MAXTABLE): Remove, replace uses with table_size.
744 (pack_vector): Instead of dying when the table is too big, grow it.
745
9515e8a7
AD
7462002-04-22 Akim Demaille <akim@epita.fr>
747
748 * data/bison.simple (yyr1): Its type is that of a token number.
749 * data/bison.c++ (r1_): Likewise.
750 * tests/regression.at (Web2c Actions): Adjust.
751
23c5a174
AD
7522002-04-22 Akim Demaille <akim@epita.fr>
753
754 * src/reader.c (token_translations_init): 256 is now the default
755 value for the error token, i.e., it will be assigned another
756 number if the user assigned 256 to one of her tokens.
757 (reader): Don't force 256 to error.
758 * doc/bison.texinfo (Symbols): Adjust.
759 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
760 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
761 etc. instead of 10, 20, 30 (which was used to `jump' over error
762 (256) and undefined (2)).
763
5fbb0954
AD
7642002-04-22 Akim Demaille <akim@epita.fr>
765
766 Propagate more token_number_t.
767
768 * src/gram.h (token_number_as_item_number)
769 (item_number_as_token_number): New.
770 * src/output.c (GENERATE_OUTPUT_TABLE): New.
771 Use it to create output_item_number_table and
772 output_token_number_table.
773 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
774 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
775 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
776 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
777
4f940944
AD
7782002-04-22 Akim Demaille <akim@epita.fr>
779
780 * src/output.h, src/output.c (get_lines_number): Remove.
781
3ded9a63
AD
7822002-04-19 Akim Demaille <akim@epita.fr>
783
784 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
785 as Lex/Flex'.
786 (Debugging): More details about enabling the debugging features.
787 (Table of Symbols): Describe $$, $n, @$, and @n.
788 Suggested by Tim Josling.
789
e0c471a9
AD
7902002-04-19 Akim Demaille <akim@epita.fr>
791
792 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
793
fecc10cd
AD
7942002-04-10 Akim Demaille <akim@epita.fr>
795
796 * src/system.h: Rely on HAVE_LIMITS_H.
797 Suggested by Paul Eggert.
798
51dec47b
AD
7992002-04-09 Akim Demaille <akim@epita.fr>
800
801 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
802 full stderr, and strip it according to the bison options, instead
803 of composing the error message from different bits.
804 This makes it easier to check for several error messages.
805 Adjust all the invocations.
806 Add an invocation exercising the error token.
807 Add an invocation demonstrating a stupid error message.
808 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
809 Adjust the tests.
810 Error message are for stderr, not stdout.
811
007a50a4
AD
8122002-04-09 Akim Demaille <akim@epita.fr>
813
814 * src/gram.h, src/gram.c (error_token_number): Remove, use
815 errtoken->number.
816 * src/reader.c (reader): Don't specify the user token number (2)
817 for $undefined, as it uselessly prevents using it.
818 * src/gram.h (token_number_t): Move to...
819 * src/symtab.h: here.
820 (state_t.number): Is a token_number_t.
821 * src/print.c, src/reader.c: Use undeftoken->number instead of
822 hard coded 2.
823 (Even though this 2 is not the same as above: the number of the
824 undeftoken remains being 2, it is its user token number which
825 might not be 2).
826 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
827 `user_token_number_max'.
828 Output `undef_token_number'.
829 * data/bison.simple, data/bison.c++: Use them.
830 Be sure to map invalid yylex return values to
831 `undef_token_number'. This saves us from gratuitous SEGV.
832
833 * tests/conflicts.at (Solved SR Conflicts)
834 (Unresolved SR Conflicts): Adjust.
835 * tests/regression.at (Web2c Actions): Adjust.
836
06446ccf
AD
8372002-04-08 Akim Demaille <akim@epita.fr>
838
839 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
840 Adding #line.
841 Remove the duplicate `typedefs'.
842 (RhsNumberType): Fix the declaration and various other typos.
843 Use __ofile__.
844 * data/bison.simple: Use __ofile__.
845 * src/scan-skel.l: Handle __ofile__.
846
62a3e4f0
AD
8472002-04-08 Akim Demaille <akim@epita.fr>
848
849 * src/gram.h (item_number_t): New, the type of item numbers in
850 RITEM. Note that it must be able to code symbol numbers as
851 positive number, and the negation of rule numbers as negative
852 numbers.
853 Adjust all dependencies (pretty many).
854 * src/reduce.c (rule): Remove this `short *' pointer: use
855 item_number_t.
856 * src/system.h (MINSHORT, MAXSHORT): Remove.
857 Include `limits.h'.
858 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
859 (shortcpy): Remove.
860 (MAXTABLE): Move to...
861 * src/output.c (MAXTABLE): here.
862 (prepare_rules): Use output_int_table to output rhs.
863 * data/bison.simple, data/bison.c++: Adjust.
864 * tests/torture.at (Big triangle): Move the limit from 254 to
865 500.
866 * tests/regression.at (Web2c Actions): Ajust.
867
868 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
869 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
870 passes, but produces negative #line number, once fixed, GCC is
871 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
872 C), it passes.
873 * src/state.h (state_h): Code input lines on ints, not shorts.
874
bb88b0fc
AD
8752002-04-08 Akim Demaille <akim@epita.fr>
876
877 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
878 and then the grammar.
879
9a636f47
AD
8802002-04-08 Akim Demaille <akim@epita.fr>
881
882 * src/system.h: No longer using strndup.
883
680e8701
AD
8842002-04-07 Akim Demaille <akim@epita.fr>
885
886 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
887 * src/output.c (output_table_data): Return the longest number.
888 (prepare_tokens): Output `token_number_max').
889 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
890 New.
891 Use them to define yy_token_number_type/TokenNumberType.
892 Use this type for yytranslate.
893 * tests/torture.at (Big triangle): Push the limit from 124 to
894 253.
895 * tests/regression.at (Web2c Actions): Adjust.
896
817e9f41
AD
8972002-04-07 Akim Demaille <akim@epita.fr>
898
899 * tests/torture.at (Big triangle): New.
900 (GNU AWK Grammar, GNU Cim Grammar): Move to...
901 * tests/existing.at: here.
902
5123689b
AD
9032002-04-07 Akim Demaille <akim@epita.fr>
904
905 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
906 nritems.
907 Adjust dependencies.
908
f3849179
AD
9092002-04-07 Akim Demaille <akim@epita.fr>
910
911 * src/reader.c: Normalize increments to prefix form.
912
bd02036a
AD
9132002-04-07 Akim Demaille <akim@epita.fr>
914
915 * src/reader.c, symtab.c: Remove debugging code.
916
db8837cb
AD
9172002-04-07 Akim Demaille <akim@epita.fr>
918
919 Rename all the `bucket's as `symbol_t'.
920
921 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
922 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
923 * src/symtab.c, src/symtab.h (bucket): Rename as...
924 (symbol_t): this.
925 (symbol_list_new, bucket_check_defined, bucket_make_alias)
926 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
927 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
928 (buckets_new, buckets_free, buckets_do): Rename as...
929 (symbol_list_new, symbol_check_defined, symbol_make_alias)
930 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
931 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
932 (symbols_new, symbols_free, symbols_do): these.
933
72a23c97
AD
9342002-04-07 Akim Demaille <akim@epita.fr>
935
936 Use lib/hash for the symbol table.
937
938 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
939 EOF.
940 * src/lex.c (lex): Set the `number' member of new terminals.
941 * src/reader.c (bucket_check_defined, bucket_make_alias)
942 (bucket_check_alias_consistence, bucket_translation): New.
943 (reader, grammar_free, readgram, token_translations_init)
944 (packsymbols): Adjust.
945 (reader): Number the predefined tokens.
946 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
947 for predefined tokens.
948 * src/symtab.h (bucket): Remove all the hash table related
949 members.
950 * src/symtab.c (symtab): Replace by...
951 (bucket_table): this.
952 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
953 (buckets_new, buckets_do): New.
954
280a38c3
AD
9552002-04-07 Akim Demaille <akim@epita.fr>
956
957 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
958 (start_symbol, max_user_token_number, semantic_parser)
959 (error_token_number): Initialize.
960 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
961 Initialize.
962 (reader): Don't.
963 (errtoken, eoftoken, undeftoken, axiom): Extern.
964
03b31c0c
AD
9652002-04-07 Akim Demaille <akim@epita.fr>
966
967 * src/gram.h (rule_s): prec and precsym are now pointers
968 to the bucket giving the priority/associativity.
969 Member `associativity' removed: useless.
970 * src/reduce.c, src/conflicts.c: Adjust.
971
8b3df748
AD
9722002-04-07 Akim Demaille <akim@epita.fr>
973
974 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
975 Properly escape the symbols' TAG when outputting them.
976
e601aa1d
AD
9772002-04-07 Akim Demaille <akim@epita.fr>
978
979 * src/lalr.h (LA): Is a bitsetv, not bitset*.
980
b0299a2e
AD
9812002-04-07 Akim Demaille <akim@epita.fr>
982
983 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
984 (LArule): this, which is an array to rule_t*.
985 * src/print.c, src/conflicts.c: Adjust.
986
d7e1f00c
AD
9872002-04-07 Akim Demaille <akim@epita.fr>
988
989 * src/gram.h (rule_t): Rename `number' as `user_number'.
990 `number' is a new member.
991 Adjust dependencies.
992 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
993
cc9305dd
AD
9942002-04-07 Akim Demaille <akim@epita.fr>
995
996 As a result of the previous patch, it is no longer needed
997 to reorder ritem itself.
998
999 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
1000
b0940840
AD
10012002-04-07 Akim Demaille <akim@epita.fr>
1002
1003 Be sure never to walk through RITEMS, but use only data related to
1004 the rules themselves. RITEMS should be banished.
1005
1006 * src/output.c (output_token_translations): Rename as...
1007 (prepare_tokens): this.
1008 In addition to `translate', prepare the muscles `tname' and
1009 `toknum', which were handled by...
1010 (output_rule_data): this.
1011 Remove, and move the remainder of its outputs into...
1012 (prepare_rules): this new routines, which also merges content from
1013 (output_gram): this.
1014 (prepare_rules): Be sure never to walk through RITEMS.
1015 (output_stos): Rename as...
1016 (prepare_stos): this.
1017 (output): Always invoke prepare_states, after all, just don't use it
1018 in the output if you don't need it.
1019
643a5994
AD
10202002-04-07 Akim Demaille <akim@epita.fr>
1021
1022 * src/LR0.c (new_state): Display `nstates' as the name of the
1023 newly created state.
1024 Adjust to initialize first_state and last_state if needed.
1025 Be sure to distinguish the initial from the final state.
1026 (new_states): Create the itemset of the initial state, and use
1027 new_state.
1028 * src/closure.c (closure): Now that the initial state has its
1029 items properly set, there is no need for a special case when
1030 creating `ruleset'.
1031
1032 As a result, now the rule 0, reducing to $axiom, is visible in the
1033 outputs. Adjust the test suite.
1034
1035 * tests/conflicts.at (Solved SR Conflicts)
1036 (Unresolved SR Conflicts): Adjust.
1037 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
1038 * tests/conflicts.at (S/R in initial): New.
1039
b4c4ccc2
AD
10402002-04-07 Akim Demaille <akim@epita.fr>
1041
1042 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
1043 the RHS of the rules.
1044 * src/output.c (output_gram): Likewise.
1045
bba97eb2
AD
10462002-04-07 Akim Demaille <akim@epita.fr>
1047
1048 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
1049 bucket.
1050 Adjust all dependencies.
1051 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
1052 `number' of the buckets too.
1053 * src/gram.h: Include `symtab.h'.
1054 (associativity): Move to...
1055 * src/symtab.h: here.
1056 No longer include `gram.h'.
1057
c3b407f4
AD
10582002-04-07 Akim Demaille <akim@epita.fr>
1059
1060 * src/gram.h, src/gram.c (rules_rhs_length): New.
1061 (ritem_longest_rhs): Use it.
1062 * src/gram.h (rule_t): `number' is a new member.
1063 * src/reader.c (packgram): Set it.
1064 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
1065 the end of `rules', and count them out of `nrules'.
1066 (reduce_output, dump_grammar): Adjust.
1067 * src/print.c (print_grammar): It is no longer needed to check for
1068 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
1069 * tests/reduce.at (Reduced Automaton): New test.
1070
11652ab3
AD
10712002-04-07 Akim Demaille <akim@epita.fr>
1072
1073 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
1074 lacking `+ 1' to nrules, Bison reported as useless a token if it
1075 was used solely to set the precedence of the last rule...
1076
26b23c1a
AD
10772002-04-07 Akim Demaille <akim@epita.fr>
1078
1079 * data/bison.c++, data/bison.simple: Don't output the current file
1080 name in #line, to avoid useless diffs between two identical
1081 outputs under different names.
1082
18bcecb0
AD
10832002-04-07 Akim Demaille <akim@epita.fr>
1084
1085 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
1086 Normalize loops to using `< nrules + 1', not `<= nrules'.
1087
fa770c86
AD
10882002-04-07 Akim Demaille <akim@epita.fr>
1089
1090 * TODO: Update.
1091
d9b739c3
AD
10922002-04-07 Akim Demaille <akim@epita.fr>
1093
1094 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
1095 bucket.value as bucket.number.
1096
99013900
AD
10972002-04-07 Akim Demaille <akim@epita.fr>
1098
1099 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
1100 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
1101 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
1102 RHS, instead of being an index in RITEMS.
1103
e966383b
PE
11042002-04-04 Paul Eggert <eggert@twinsun.com>
1105
1106 * doc/bison.texinfo: Update copyright date.
1107 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
1108 (Symbols): Warn about running Bison in one character set,
1109 but compiling and/or running in an incompatible one.
1110 Warn about character code 256, too.
1111
11122002-04-03 Paul Eggert <eggert@twinsun.com>
1113
1114 * src/bison.data (YYSTACK_ALLOC): Depend on whether
1115 YYERROR_VERBOSE is nonzero, not whether it is defined.
1116
1117 Merge changes from bison-1_29-branch.
c307773e 1118
8d6c48b9
PE
11192002-03-20 Paul Eggert <eggert@twinsun.com>
1120
1121 Merge fixes from Debian bison_1.34-1.diff.
1122
1123 * configure.in (AC_PREREQ): 2.53.
1124
e53c6322
AD
11252002-03-20 Akim Demaille <akim@epita.fr>
1126
1127 * src/conflicts.c (log_resolution): Argument `resolution' is const.
1128
9ffbeca7
PE
11292002-03-19 Paul Eggert <eggert@twinsun.com>
1130
21db0b2a
PE
1131 * src/bison.simple (YYCOPY): New macro.
1132 (YYSTACK_RELOCATE): Use it.
1133 Remove Type arg; no longer needed. All callers changed.
1134 (yymemcpy): Remove; no longer needed.
1135
9ffbeca7
PE
1136 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
1137 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
1138
642cb8f8
AD
11392002-03-19 Akim Demaille <akim@epita.fr>
1140
1141 Test and fix the #line outputs.
1142
1143 * tests/atlocal.at (GCC): New.
1144 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
1145 (Prologue synch line, ,%union synch line, Postprologue synch line)
1146 (Action synch line, Epilogue synch line): New tests.
1147 * src/reader.c (parse_union_decl): Define the muscle stype_line.
1148 * data/bison.simple, data/bison.c++: Use it.
1149
3c31a486
AD
11502002-03-19 Akim Demaille <akim@epita.fr>
1151
1152 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
1153 (Solved SR Conflicts, %expect not enough, %expect right)
1154 (%expect too much): Move to...
1155 * tests/conflicts.at: this new file.
1156
0d8bed56
AD
11572002-03-19 Akim Demaille <akim@epita.fr>
1158
1159 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
1160 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
1161 that we can move to enums for instance.
1162 * src/output.c (token_definitions_output): Output a list of
1163 `token-name, token-number' instead of the #define.
1164 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
1165
9208d17f
AD
11662002-03-14 Akim Demaille <akim@epita.fr>
1167
1168 Use Gettext 0.11.1.
1169
af27eacb
RA
11702002-03-09 Robert Anisko <robert@lrde.epita.fr>
1171
1172 * data/bison.c++: Make the user able to add members to the generated
1173 parser by subclassing.
1174
9101a310
RA
11752002-03-05 Robert Anisko <robert@lrde.epita.fr>
1176
1177 * src/reader.c (read_additionnal_code): `c' should be an integer, not
1178 a character.
1179 Reported by Nicolas Tisserand and Nicolas Burrus.
1180
fff9bf0b
RA
11812002-03-04 Robert Anisko <robert@lrde.epita.fr>
1182
1183 * src/reader.c: Warn about lacking semi-colons, do not complain.
1184
64dba31e
RA
11852002-03-04 Robert Anisko <robert@lrde.epita.fr>
1186
1187 * data/bison.c++: Remove a debug line.
1188
374f5a14
RA
11892002-03-04 Robert Anisko <robert@lrde.epita.fr>
1190
1191 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
1192 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
1193 provide a default implementation.
1194
bfcf1f3a
AD
11952002-03-04 Akim Demaille <akim@epita.fr>
1196
1197 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
1198 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
1199 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
1200 * tests/semantic.at (Parsing Guards): Similarly.
1201 * src/reader.at (readgram): Complain if the last rule is not ended
1202 with a semi-colon.
1203
65ccf9fc
AD
12042002-03-04 Akim Demaille <akim@epita.fr>
1205
1206 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
1207 * src/closure.c: here.
1208 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
1209 RTC.
1210 * src/warshall.h, src/warshall.c: Remove.
1211 * tests/sets.at (Broken Closure): Adjust.
1212
d0039cbc
AD
12132002-03-04 Akim Demaille <akim@epita.fr>
1214
1215 * src/output.c (output_skeleton): tempdir is const.
1216 bytes_read is unused.
1217
345cea78
AD
12182002-03-04 Akim Demaille <akim@epita.fr>
1219
1220 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
1221 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
1222 Update.
1223 From Michael Hayes.
1224
564801f7
AD
12252002-03-04 Akim Demaille <akim@epita.fr>
1226
1227 * src/closure.c (closure): `r' is unused.
1228
e5352bc7
AD
12292002-03-04 Akim Demaille <akim@epita.fr>
1230
1231 * tests/sets.at (Broken Closure): Add the ending `;'.
1232 * src/reader.at (readgram): Complain if a rule is not ended with a
1233 semi-colon.
1234
914feea9
AD
12352002-03-04 Akim Demaille <akim@epita.fr>
1236
1237 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
1238 (count_sr_conflicts): Use bitset_count.
1239 * src/reduce.c (inaccessable_symbols): Ditto.
1240 (bits_size): Remove.
1241 * src/warshall.h, src/warshall.c: Convert to bitsetv.
1242
f0250de6
AD
12432002-03-04 Akim Demaille <akim@epita.fr>
1244
1245 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
1246 * src/reduce.c: Remove the `bitset_zero's following the
1247 `bitset_create's, as now it is performed by the latter.
1248
ef017502
AD
12492002-03-04 Akim Demaille <akim@epita.fr>
1250
1251 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
1252 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
1253 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
1254 latest sources from Michael.
1255
76514394
AD
12562002-03-04 Akim Demaille <akim@epita.fr>
1257
1258 * src/output.c (output): Don't free the grammar.
1259 * src/reader.c (grammar_free): New.
1260 * src/main.c (main): Call it and don't free symtab here.
1261
55024580
AD
12622002-03-04 Akim Demaille <akim@epita.fr>
1263
1264 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
1265 before returning.
1266 Reported by Benoit Perrot.
1267
f9abaa2c
AD
12682002-03-04 Akim Demaille <akim@epita.fr>
1269
1270 Use bitset operations when possible, not loops over bits.
1271
1272 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
1273 bitset_or.
1274 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
1275 * src/reduce.c (useless_nonterminals): Formatting changes.
1276 * src/warshall.c (TC): Use bitset_or.
1277
0e721e75
AD
12782002-03-04 Akim Demaille <akim@epita.fr>
1279
1280 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
1281 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
1282 Ditto.
1283
0fb1ffb1
AD
12842002-03-04 Akim Demaille <akim@epita.fr>
1285
1286 * src/lalr.c (F): Now a bitset*.
1287 Adjust all dependencies.
1288
b86796bf
AD
12892002-03-04 Akim Demaille <akim@epita.fr>
1290
1291 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
1292 Adjust all dependencies.
1293
602bbf31
AD
12942002-03-04 Akim Demaille <akim@epita.fr>
1295
1296 * src/L0.c, src/LR0.h (nstates): Be size_t.
1297 Adjust comparisons (signed vs unsigned).
1298 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
1299 bitset*.
1300 Adjust all dependencies.
1301
d8a0245c
AD
13022002-03-04 Akim Demaille <akim@epita.fr>
1303
1304 * src/closure.c (firsts): Now, also a bitset.
1305 Adjust all dependencies.
1306 (varsetsize): Remove, now unused.
1307 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
1308
34ba9743
AD
13092002-03-04 Akim Demaille <akim@epita.fr>
1310
1311 * src/print.c: Convert to use bitset.h, not hand coded iterations
1312 over ints.
1313
ed86e78c
AD
13142002-03-04 Akim Demaille <akim@epita.fr>
1315
1316 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
1317
dfdb1797
AD
13182002-03-04 Akim Demaille <akim@epita.fr>
1319
1320 * src/closure.c (ruleset): Be a bitset.
1321 (rulesetsize): Remove.
1322
7086e707
AD
13232002-03-04 Akim Demaille <akim@epita.fr>
1324
1325 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
1326 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
1327 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
1328 * src/closure.c (fderives): Be an array of bitsets.
1329
98254360
RA
13302002-02-28 Robert Anisko <robert@lrde.epita.fr>
1331
1332 * data/bison.c++: Merge the two generated headers. Insert a copyright
1333 notice in each output file.
1334
a75c057f
AD
13352002-02-28 Akim Demaille <akim@epita.fr>
1336
1337 * data/bison.c++: Copy the prologue of bison.simple to fetch
1338 useful M4 definitions, such as b4_header_guard.
1339
06b00abc
AD
13402002-02-25 Akim Demaille <akim@epita.fr>
1341
1342 * src/getargs.c (version): Give the name of the authors, and use a
a75c057f
AD
1343 translator friendly scheme for the bgr
1344 copyright notice.
06b00abc 1345
70e7d534
AD
13462002-02-25 Akim Demaille <akim@epita.fr>
1347
1348 * src/output.c (header_output): Remove, now handled completely via
1349 M4.
1350
abe017f6
AD
13512002-02-25 Akim Demaille <akim@epita.fr>
1352
1353 * m4/m4.m4: New, from CVS Autoconf.
1354 * configure.in: Invoke it.
1355 * src/output.c (output_skeleton): Use its result instead of the
1356 hard coded name.
1357
381fb12e
AD
13582002-02-25 Akim Demaille <akim@epita.fr>
1359
1360 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
1361 Fileutils 4.1.5.
1362 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
1363 * src/output.c (output_skeleton): Use mkstemp to create a real
1364 temporary file.
1365 Move the filling of `skeleton' and its muscle to...
1366 (prepare): here.
1367 (output): Move the definition of the prologue muscle to...
1368 (prepare): here.
1369 * src/system.h (DEFAULT_TMPDIR): New.
1370
6f38107f
PE
13712002-02-14 Paul Eggert <eggert@twinsun.com>
1372
1373 Remove the support for C++ namespace cleanliness; it was
1374 causing more problems than it was curing, since it didn't work
1375 properly on some nonstandard C++ compilers. This can wait
1376 for a proper C++ parser.
1377
1378 * NEWS: Document this.
1379 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
1380 of C++, as it's treated like C now.
1381 * src/bison.simple (YYSTD): Remove.
1382 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
1383 Treat C++ just like Standard C instead of trying to support
1384 namespace cleanliness.
1385
80cce3da
AD
13862002-02-14 Akim Demaille <akim@epita.fr>
1387
1388 * tests/regression.at (else): Adjust to Andreas' change.
1389
842e8679
AD
13902002-02-14 Akim Demaille <akim@epita.fr>
1391
1392 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
1393
4bda3f10
AD
13942002-02-13 Andreas Schwab <schwab@suse.de>
1395
1396 * src/output.c (output_rule_data): Don't output NULL, it might
1397 not be defined yet.
1398
4162fa07 13992002-02-11 Robert Anisko <robert@lrde.epita.fr>
b418ecd8 1400
4162fa07
RA
1401 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
1402 (Copyright notice): Update.
b418ecd8 1403
bd16a5dc
AD
14042002-02-11 Akim Demaille <akim@epita.fr>
1405
1406 * tests/regression.at (%nonassoc and eof): Don't include
1407 nonportable headers.
1408
8d69a1a3
RA
14092002-02-08 Robert Anisko <robert@lrde.epita.fr>
1410
1411 * data/bison.c++: Correct error recovery. Make the user able to
1412 initialize the starting location.
1413
9b2d0677
AD
14142002-02-07 Akim Demaille <akim@epita.fr>
1415
1416 * tests/input.at: New.
1417
69e2658b
RA
14182002-02-07 Robert Anisko <robert@lrde.epita.fr>
1419
1420 * data/bison.c++: Replace some direct m4 expansions by constants. Be
9b2d0677 1421 more consistent when naming methods and variables. Put preprocessor
69e2658b
RA
1422 directives around tables only needed for debugging.
1423
4aacc3a7
RA
14242002-02-07 Robert Anisko <robert@lrde.epita.fr>
1425
1426 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
1427 C++ parsers.
1428 (yy::b4_name::parse): Use print_.
1429
762a801e
RA
14302002-02-07 Robert Anisko <robert@lrde.epita.fr>
1431
1432 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
1433
4bb2bc3f
RA
14342002-02-07 Robert Anisko <robert@lrde.epita.fr>
1435
1436 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
1437 C++ parsers.
1438 (yy::b4_name::parse): Build verbose error messages, and use error_.
1439
6b45a3ca
RA
14402002-02-06 Robert Anisko <robert@lrde.epita.fr>
1441
1442 * data/bison.c++: Fix m4 quoting in comments.
1443
50997c6e
RA
14442002-02-06 Robert Anisko <robert@lrde.epita.fr>
1445
1446 * data/bison.c++: Adjust the parser code. Fix some muscles that were
1447 not expanded by m4.
1448
3f3eed27
AD
14492002-02-05 Akim Demaille <akim@epita.fr>
1450
1451 * data/bison.c++: Adjust to the M4 back end.
1452 More is certainly needed.
1453
be2a1a68
AD
14542002-02-05 Akim Demaille <akim@epita.fr>
1455
1456 Give a try to M4 as a back end.
1457
1458 * lib/readpipe.c: New, from wdiff.
1459 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
1460 BISON_HAIRY.
1461 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
1462 specific values. Now it is m4 that performs the lookup.
1463 * src/parse-skel.y: Remove.
1464 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
1465 * src/output.c (actions_output, guards_output)
1466 (token_definitions_output): No longer keeps track of the output
1467 line number, hence remove the second argument.
1468 (guards_output): Check against the guard member of a rule, not the
1469 action member.
1470 Adjust callers.
1471 (output_skeleton): Don't look for the skeleton location, let m4 do
1472 that.
1473 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
1474 file will be used.
1475 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
1476 (prepare): Given that for the time being changesyntax is not
1477 usable in M4, rename the muscles using `-' to `_'.
1478 Define `defines_flag', `output_parser_name' and `output_header_name'.
1479 * src/output.h (actions_output, guards_output)
1480 (token_definitions_output): Adjust prototypes.
1481 * src/scan-skel.l: Instead of scanning the skeletons, it now
1482 processes the output of m4: `__oline__' and `#output'.
1483 * data/bison.simple: Adjust to be used by M4(sugar).
1484 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
1485 to date.
1486 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
1487 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
1488 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
1489 shamelessly stolen from CVS Autoconf.
1490
beda758b
AD
14912002-02-05 Akim Demaille <akim@epita.fr>
1492
1493 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
1494 * configure.in: Check for the declarations of free and malloc.
1495 * src/muscle_tab.c: Adjust.
1496
5ece6d43
AD
14972002-02-05 Akim Demaille <akim@epita.fr>
1498
1499 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
1500 which have no values.
1501
5bb18f9a
AD
15022002-02-05 Akim Demaille <akim@epita.fr>
1503
1504 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
1505 * data/: here.
1506
894dd62e
PE
15072002-01-29 Paul Eggert <eggert@twinsun.com>
1508
1509 * src/bison.simple (YYSIZE_T): Do not define merely because
1510 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
1511 On some platforms, <alloca.h> does not declare YYSTD (size_t).
1512
82841af7
AD
15132002-01-27 Akim Demaille <akim@epita.fr>
1514
1515 Fix `%nonassoc and eof'.
1516
1517 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
1518 which were not properly copied! Replace
1519 memcpy (res->errs, src->errs, src->nerrs);
1520 with
1521 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
1522 !!!
1523 * tests/regression.at (%nonassoc and eof): Adjust to newest
1524 Autotest: `.' is not in the PATH.
1525
318b76e9
AD
15262002-01-27 Akim Demaille <akim@epita.fr>
1527
1528 * tests/sets.at (AT_EXTRACT_SETS): New.
1529 (Nullable): Use it.
1530 (Firsts): New.
1531
30d2f3d5
AD
15322002-01-26 Akim Demaille <akim@epita.fr>
1533
1534 * tests/actions.at, tests/calc.at, tests/headers.at,
1535 * tests/torture.at: Adjust to the newest Autotest which no longer
1536 forces `.' in the PATH.
1537
30f8c395
AD
15382002-01-25 Akim Demaille <akim@epita.fr>
1539
1540 * tests/regression.at (%nonassoc and eof): New.
1541 Suggested by Robert Anisko.
1542
29ae55f1
AD
15432002-01-24 Akim Demaille <akim@epita.fr>
1544
1545 Bison dumps core when trying to complain about broken input files.
1546 Reported by Cris van Pelt.
1547
1548 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
1549 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
1550 into...
1551 (Invalid inputs): Strengthen: exercise parse_percent_token.
1552
2b548aa6
RA
15532002-01-24 Robert Anisko <robert.anisko@epita.fr>
1554
1555 * src/Makefile.am: Add bison.c++.
1556 * src/bison.c++: New skeleton.
1557
bb0146c2
AD
15582002-01-21 Paolo Bonzini <bonzini@gnu.org>
1559
1560 * po/it.po: New.
1561
bec30531
AD
15622002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
1563
1564 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
1565
fc6edc45
MA
15662002-01-20 Marc Autret <marc@gnu.org>
1567
1568 * src/files.c (compute_output_file_names): Fix
1569
5e5d5415
MA
15702002-01-20 Marc Autret <marc@gnu.org>
1571
1572 * tests/output.at: New test.
1573 * src/files.c (compute_base_names): Don't map extensions when
1574 the YACC flag is set, use defaults.
1575 Reported by Evgeny Stambulchik.
1576
44ea3fbd
MA
15772002-01-20 Marc Autret <marc@gnu.org>
1578
bb0146c2 1579 * src/system.h: Need to define __attribute__ away for non-GCC
44ea3fbd
MA
1580 compilers as well (i.e. the vendor C compiler).
1581 Suggested by Albert Chin-A-Young.
1582
338963d1
TVH
15832002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
1584
1585 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
1586 canonical definition.
1587 * src/system.h: Use the canonical definition for PARAMS (avoids
1588 a conflict with the macro from lib/hash.h).
1589
c57b2479
AD
15902002-01-11 Akim Demaille <akim@epita.fr>
1591
1592 * configure.in: Use AC_FUNC_STRNLEN.
d9e9746c 1593 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
c57b2479 1594
b85810ae
AD
15952002-01-09 Akim Demaille <akim@epita.fr>
1596
1597 * src/files.c, src/files.h (output_infix): New.
1598 (tab_extension): Remove.
1599 (compute_base_names): Compute the former, drop the latter.
1600 * src/output.c (prepare): Insert the muscles `output-infix', and
1601 `output-suffix'.
1602 * src/parse-skel.y (string, string.1): New.
1603 (section.header): Use it.
1604 (section.yacc): Remove.
1605 (prefix): Remove too.
1606 * src/scan-skel.l: Adjust.
1607 * src/bison.simple, src/bison.hairy: Adjust.
1608
cae60122
AD
16092002-01-09 Akim Demaille <akim@epita.fr>
1610
1611 * configure.in (WERROR_CFLAGS): Compute it.
1612 * src/Makefile.am (CFLAGS): Pass it.
1613 * tests/atlocal.in (CFLAGS): Idem.
1614 * src/files.c: Fix a few warnings.
1615 (get_extension_index): Remove, unused.
1616
ae404801
AD
16172002-01-08 Akim Demaille <akim@epita.fr>
1618
1619 * src/getargs.c (AS_FILE_NAME): New.
1620 (getargs): Use it to convert DOSish file names.
1621 * src/files.c (base_name): Rename as full_base_name to avoid
1622 clashes with `base_name ()'.
1623 (filename_split): New.
1624 (compute_base_names): N-th rewrite, using filename_split.
1625
22312b71
AD
16262002-01-08 Akim Demaille <akim@epita.fr>
1627
1628 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
1629 New, stolen from the Fileutils 4.1.
1630 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
1631 * configure.in: Check for the presence of memrchr, and of its
1632 prototype.
1633
a67cef01
TVH
16342002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
1635
1636 * lib/hash.h (__P): Added definition for this macro.
1637 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
1638 BUILT_SOURCES, to ensure they are generated first.
1639 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
1640 %error-verbose to allow bootstrapping with bison 1.30x.
1641
2b25d624
AD
16422002-01-06 Akim Demaille <akim@epita.fr>
1643
1644 * src/reader.c (parse_braces): Don't fetch the next char, the
1645 convention is to fetch on entry.
1646 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
1647 'switch' without a following semicolon.
1648 * tests/regression.at (braces parsing): New.
1649
3460813b
AD
16502002-01-06 Akim Demaille <akim@epita.fr>
1651
1652 Bison is dead wrong in its RR conflict reports.
1653
1654 * tests/torture.at (GNU Cim Grammar): New.
1655 * src/conflicts.c (count_rr_conflicts): Fix.
1656
73784c64
AD
16572002-01-06 Akim Demaille <akim@epita.fr>
1658
1659 Creating package.m4 from configure.ac causes too many problems.
1660
1661 * tests/Makefile.am (package.m4): Create it by hand,
1662 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
1663
25d81090
AD
16642002-01-06 Akim Demaille <akim@epita.fr>
1665
1666 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
1667 skeleton.h.
1668
a9b8959e
PE
16692002-01-04 Paul Eggert <eggert@twinsun.com>
1670
1671 * doc/bison.texinfo (Debugging):
1672 Remove YYSTDERR; it's no longer defined or used.
1673 Also, s/cstdio.h/cstdio/.
1674
25d81090
AD
16752002-01-03 Akim Demaille <akim@epita.fr>
1676
1677 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
1678
1109455c
AD
16792002-01-03 Akim Demaille <akim@epita.fr>
1680
1681 * src/parse-skel.y (process_skeleton): Don't bind the parser's
1682 tracing code to --trace, wait for a better --trace option, with
1683 args.
1684
7ea5e977
AD
16852002-01-03 Akim Demaille <akim@epita.fr>
1686
1687 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
1688 The ISO C++ standard is extremely clear about it: stderr is
1689 considered a macro, not a regular symbol (see table 94 `Header
1690 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
1691 Therefore std:: does not apply to it. It still does with fprintf.
1692 Also, s/cstdio.h/cstdio/.
1693
fab5b110
AD
16942002-01-03 Akim Demaille <akim@epita.fr>
1695
1696 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
1697 for non system headers.
1698
aed7fd9b
AD
16992002-01-02 Akim Demaille <akim@epita.fr>
1700
1701 Equip the skeleton chain with location tracking, runtime trace,
1702 pure parser and scanner.
1703
1704 * src/parse-skel.y: Request a pure parser, locations, and prefix
1705 renaming.
1706 (%union): Having several members with the same type does not help
1707 type mismatches, simplify.
1708 (YYPRINT, yyprint): New.
1709 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
1710 (skel_error): this.
1711 Handle locations.
1712 * src/scan-skel.l: Adjust to these changes.
1713 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
1714 (LOCATION_PRINT, skel_control_t): New.
1715
24fad99e
AD
17162001-12-30 Akim Demaille <akim@epita.fr>
1717
1718 * src/parse-skel.y: Get rid of the shift/reduce conflict:
1719 replace `gb' with BLANKS.
1720 * src/scan-skel.l: Adjust.
1721
a4b36db4
AD
17222001-12-30 Akim Demaille <akim@epita.fr>
1723
1724 * src/system.h: We don't need nor want bcopy.
1725 Throw away MS-DOS crap: we don't need getpid.
1726 * configure.in: We don't need strndup. It was even causing
1727 problems: because Flex includes the headers *before* us,
1728 _GNU_SOURCE is not defined by config.h, and therefore strndup was
1729 not visible.
1730 * lib/xstrndup.c: New.
1731 * src/scan-skel.l: Use it.
1732 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
1733 * src/parse-skel.y: Use %directives instead of #defines.
1734
1239777d
AD
17352001-12-30 Akim Demaille <akim@epita.fr>
1736
1737 * src/skeleton.h: New.
1738 * src/output.c (output_parser, output_master_parser): Remove, dead
1739 code.
1740 * src/output.h (get_lines_number, actions_output, guards_output)
1741 (token_definitions_output): Prototype them.
1742 * src/parse-skel.y: Add the license notice.
1743 Include output.h and skeleton.h.
1744 (process_skeleton): Returns void, and takes a single parameter.
1745 * src/scan-skel.l: Add the license notice.
1746 Include skeleton.h.
1747 Don't use %option yylineno: it seems that then Flex imagines
1748 REJECT has been used, and therefore it won't reallocate its
1749 buffers (which makes no other sense to me than a bug). It results
1750 in warnings for `unused: yy_flex_realloc'.
1751
9b3add5b
RA
17522001-12-30 Robert Anisko <robert.anisko@epita.fr>
1753
1754 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
1755 (MUSCLE_INSERT_PREFIX): ...to there.
1756 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
1757 (MUSCLE_INSERT_PREFIX): Move from here...
1758
1759 * src/bison.hairy: Add a section directive. Put braces around muscle
1760 names. This parser skeleton is still broken, but Bison should not
1761 choke on a bad muscle 'syntax'.
1762 * src/bison.simple: Add a section directive. Put braces around muscle
1763 names.
1764
1765 * src/files.h (strsuffix, stringappend): Add declarations.
1766 (tab_extension): Add declaration.
1767 (short_base_name): Add declaration.
1768
1769 * src/files.c (strsuffix, stringappend): No longer static. These
1770 functions are used in the skeleton parser.
1771 (tab_extension): New.
1772 (compute_base_names): Use the computations done in this function
fab5b110 1773 to guess if the generated parsers should have '.tab' in their
9b3add5b
RA
1774 names.
1775 (short_base_name): No longer static.
1776
1777 * src/output.c (output_skeleton): New.
1778 (output): Disable call to output_master_parser, and give a try to
1779 a new skeleton handling system.
1780 (guards_output, actions_output): No longer static.
1781 (token_definitions_output, get_lines_number): No longer static.
1782
1783 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
1784
fab5b110 1785 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
9b3add5b
RA
1786 parse-skel.y.
1787
1788 * src/parse-skel.y: New file.
1789 * src/scan-skel.l: New file.
1790
b5b61c61
AD
17912001-12-29 Akim Demaille <akim@epita.fr>
1792
1793 %name-prefix is broken.
1794
1795 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
1796 Adjust all dependencies.
1797 * tests/headers.at (export YYLTYPE): Strengthen this test: use
1798 %name-prefix.
1799
1800 Renaming yylval but not yylloc is not consistent. Now we do.
1801
1802 * src/bison.simple: Prefix yylloc if used.
1803 * doc/bison.texinfo (Decl Summary): Document that.
1804
8c9a50be
AD
18052001-12-29 Akim Demaille <akim@epita.fr>
1806
1807 * doc/bison.texinfo: Promote `%long-directive' over
1808 `%long_directive'.
1809 Remove all references to fixed-output-files, yacc is enough.
1810
d99361e6
AD
18112001-12-29 Akim Demaille <akim@epita.fr>
1812
1813 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
1814 user prologue. These are defaults.
1815 * tests/actions.at (Mid-rule actions): Make sure the user can
1816 define YYDEBUG and YYERROR_VERBOSE.
1817
b9cecb91
AD
18182001-12-29 Akim Demaille <akim@epita.fr>
1819
1820 * src/output.c (header_output): Don't forget to export YYLTYPE and
1821 yylloc.
1822 * tests/headers.at (export YYLTYPE): New, make sure it does.
1823 * tests/regression.at (%union and --defines, Invalid CPP headers):
1824 Move to...
1825 * tests/headers.at: here.
1826
aea13e97
AD
18272001-12-29 Akim Demaille <akim@epita.fr>
1828
1829 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
1830
931394cb
AD
18312001-12-29 Akim Demaille <akim@epita.fr>
1832
1833 * tests/actions.at (Mid-rule actions): Output on a single line
1834 instead of several.
1835
704a47c4
AD
18362001-12-29 Akim Demaille <akim@epita.fr>
1837
1838 * doc/bison.texinfo: Formatting changes.
1839
091e20bb
AD
18402001-12-29 Akim Demaille <akim@epita.fr>
1841
1842 Don't store the token defs in a muscle, just be ready to output it
1843 on command. Now possible via `symbols'. Fixes a memory leak.
1844
1845 * src/output.c (token_definitions_output): New.
1846 (output_parser, header_output): Use it.
1847 * src/reader.c (symbols_save): Remove.
1848
cce71710
AD
18492001-12-29 Akim Demaille <akim@epita.fr>
1850
1851 * src/bison.simple: Do not provide a default for YYSTYPE and
1852 YYLTYPE before the user's prologue. Otherwise it's hardly... a
1853 default.
1854
82c035a8
AD
18552001-12-29 Akim Demaille <akim@epita.fr>
1856
1857 Mid-rule actions are simply... ignored!
1858
1859 * src/reader.c (readgram): Be sure to attach mid-rule actions to
1860 the empty-rule associated to the dummy symbol, not to the host
1861 rule.
1862 * tests/actions.at (Mid-rule actions): New.
1863
8419d367
AD
18642001-12-29 Akim Demaille <akim@epita.fr>
1865
1866 Memory leak.
1867
1868 * src/reader.c (reader): Free grammar.
1869
375d5806
AD
18702001-12-29 Akim Demaille <akim@epita.fr>
1871
1872 Memory leak.
1873
1874 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
1875 since it allocates it for each state, although only one is needed.
1876 (allocate_storage): Do it here.
1877
f51cb8ff
AD
18782001-12-29 Akim Demaille <akim@epita.fr>
1879
1880 * src/options.h, src/options.c (create_long_option_table): Rename
1881 as...
1882 (long_option_table_new): this, with a clearer prototype.
1883 (percent_table): Remove, unused,
1884 * src/getargs.c (getargs): Adjust.
1885
29e88316
AD
18862001-12-29 Akim Demaille <akim@epita.fr>
1887
1888 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
1889 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
1890 as states.
1891
b9f71f19
AD
18922001-12-29 Akim Demaille <akim@epita.fr>
1893
1894 * src/lalr.c (build_relations): Rename `states' as `states1'.
1895 Sorry, I don't understand exactly what it is, no better name...
1896
1a2b5d37
AD
18972001-12-29 Akim Demaille <akim@epita.fr>
1898
1899 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
1900 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
1901 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
1902 as rules.
1903
1cca533e
AD
19042001-12-29 Akim Demaille <akim@epita.fr>
1905
1906 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
1907 ago.
1908
c03ae966
AD
19092001-12-29 Akim Demaille <akim@epita.fr>
1910
1911 * src/reader.c, src/reader.h (user_toknums): Remove.
1912 Adjust all users to use symbols[i]->user_token_number.
1913
5a670b1e
AD
19142001-12-29 Akim Demaille <akim@epita.fr>
1915
1916 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
1917 Adjust all users to use symbols[i]->prec or ->assoc.
1918
ad949da9
AD
19192001-12-29 Akim Demaille <akim@epita.fr>
1920
1921 * src/reader.c, src/reader.h (tags): Remove.
1922 Adjust all users to use symbols[i]->tag.
1923
0e78e603
AD
19242001-12-29 Akim Demaille <akim@epita.fr>
1925
1926 * src/gram.h, src/gram.c (symbols): New, similar to state_table
1927 and rule_table.
1928 * src/reader.c (packsymbols): Fill this table.
1929 Drop sprec.
1930 * src/conflicts.c (resolve_sr_conflict): Adjust.
1931 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
1932 single table.
1933 Use symbols[i]->tag instead of tags[i].
1934
213e640e
AD
19352001-12-29 Akim Demaille <akim@epita.fr>
1936
1937 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
1938 In addition, put a comment in there, to replace...
1939 * tests/regression.at (%union and C comments): Remove.
1940
e7b8bef1
AD
19412001-12-29 Akim Demaille <akim@epita.fr>
1942
1943 * tests/regression.at (Web2c Actions): Blindly move the actual
1944 output as expected output. The contents *seem* right to me, but I
1945 can't pretend reading perfectly parser tables... Nonetheless, all
1946 the other tests pass correctly, the table look OK, even though the
1947 presence of `$axiom' is to be noted: AFAICS it is useless (but
1948 harmless).
1949
b68e7744
AD
19502001-12-29 Akim Demaille <akim@epita.fr>
1951
1952 * src/reader.c (readgram): Don't add the rule 0 if there were no
1953 rules read. In other words, add it _after_ having performed
1954 grammar sanity checks.
1955 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
1956
78d5bae9
AD
19572001-12-29 Akim Demaille <akim@epita.fr>
1958
1959 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
1960 visible, and some states have now a different number.
1961
ff442794
AD
19622001-12-29 Akim Demaille <akim@epita.fr>
1963
1964 * src/reader.c (readgram): Bind the initial rule's lineno to that
1965 of the first rule.
1966 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
1967 (Solved SR Conflicts): Adjust rule 0's line number.
1968
610ab194
AD
19692001-12-29 Akim Demaille <akim@epita.fr>
1970
1971 Fix the `GAWK Grammar' failure.
1972
1973 * src/LR0.c (final_state): Initialize to -1 so that we do compute
1974 the reductions of the first state which was mistakenly confused
1975 with the final state because precisely final_state was initialized
1976 to 0.
1977 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
1978 now noticed by Bison.
1979 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
1980 have a reduction on $default.
1981
29d29c8f
AD
19822001-12-29 Akim Demaille <akim@epita.fr>
1983
1984 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
1985 rule line numbers.
1986 * src/closure.c (print_closure): Likewise.
1987 * src/derives.c (print_derives): Likewise.
1988 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
1989 now.
1990
7c6b64d0
AD
19912001-12-29 Akim Demaille <akim@epita.fr>
1992
1993 * src/lalr.c (lookaheads_print): New.
1994 (lalr): Call it when --trace-flag.
1995 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
1996 are dumped.
1997
3d4daee3
AD
19982001-12-29 Akim Demaille <akim@epita.fr>
1999
2000 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
2001 when walking through ritem, even via rule->rhs.
2002 * src/reduce.c (dump_grammar, useful_production, reduce_output)
2003 (useful_production, useless_nonterminals): Likewise.
2004 (reduce_grammar_tables): Likewise, plus update nritems.
2005 * src/nullable.c (set_nullable): Likewise.
2006 * src/lalr.c (build_relations): Likewise.
2007 * tests/sets.at (Nullable): Adjust.
2008 Fortunately, now, the $axiom is no longer nullable.
2009
9e7f6bbd
AD
20102001-12-29 Akim Demaille <akim@epita.fr>
2011
2012 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
2013 the 0-sentinel.
2014 * src/gram.c (ritem_longest_rhs): Likewise.
2015 * src/reduce.c (nonterminals_reduce): Likewise.
2016 * src/print_graph.c (print_graph): Likewise.
2017 * src/output.c (output_rule_data): Likewise.
2018 * src/nullable.c (set_nullable): Likewise.
2019
255ef638
AD
20202001-12-29 Akim Demaille <akim@epita.fr>
2021
2022 * src/output.c: Comment changes.
2023
0d8a7363
AD
20242001-12-27 Paul Eggert <eggert@twinsun.com>
2025
2026 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
2027 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
2028 Sparc, as they were causing more porting problems than the
2029 (minor) performance improvement was worth.
2030
2031 Also, catch up with 1.31's YYSTD.
2032
3db472b9
AD
20332001-12-27 Akim Demaille <akim@epita.fr>
2034
2035 * src/output.c (output_gram): Rely on nritems, not the
2036 0-sentinel. See below.
2037 Use -1 as separator, not 0.
2038 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
2039 Rely on -1 as separator in yyrhs, instead of 0.
2040 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
2041 twice `Now at end of input', therefore there are two lines less to
2042 expect.
2043
b365aa05
AD
20442001-12-27 Akim Demaille <akim@epita.fr>
2045
2046 * tests/regression.at (Unresolved SR Conflicts):
2047 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
2048 below.
2049
30171f79
AD
20502001-12-27 Akim Demaille <akim@epita.fr>
2051
2052 * src/LR0.c (new_state): Recognize the final state by the fact it
2053 is reached by eoftoken.
2054 (insert_start_shifting_state, insert_eof_shifting_state)
2055 (insert_accepting_state, augment_automaton): Remove, since now
2056 these states are automatically computed from the initial state.
2057 (generate_states): Adjust.
2058 * src/print.c: When reporting a rule number to the user, substract
2059 1, so that the axiom rule is rule 0, and the first user rule is 1.
2060 * src/reduce.c: Likewise.
2061 * src/print_graph.c (print_core): For the time being, just as for
2062 the report, depend upon --trace-flags to dump the full set of
2063 items.
2064 * src/reader.c (readgram): Once the grammar read, insert the rule
2065 0: `$axiom: START-SYMBOL $'.
2066 * tests/set.at: Adjust: rule 0 is now displayed, and since the
2067 number of the states has changed (the final state is no longer
2068 necessarily the last), catch up.
2069
75142d45
AD
20702001-12-27 Akim Demaille <akim@epita.fr>
2071
2072 Try to make the use of the eoftoken valid. Given that its value
2073 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
2074 is used instead of > 0 where appropriate, (ii), depend upon nritems
2075 instead of the 0-sentinel.
2076
2077 * src/gram.h, src/gram.c (nritems): New.
2078 Expected to be duplication of nitems, but for the time being...
2079 * src/reader.c (packgram): Assert nritems and nitems are equal.
2080 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
2081 * src/closure.c (print_closure, print_fderives): Likewise.
2082 * src/gram.c (ritem_print): Likewise.
2083 * src/print.c (print_core, print_grammar): Likewise.
2084 * src/print_graph.c: Likewise.
2085
b7c49edf
AD
20862001-12-27 Akim Demaille <akim@epita.fr>
2087
2088 * src/main.c (main): If there are complains after grammar
2089 reductions, then output the report anyway if requested, then die.
2090 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
2091 * src/reader.c (eoftoken): New.
2092 (parse_token_decl): If the token being defined has value `0', it
2093 is the eoftoken.
2094 (packsymbols): No longer hack `tags' to insert `$' by hand.
2095 Be sure to preserve the value of the eoftoken.
2096 (reader): Make sure eoftoken is defined.
2097 Initialize nsyms to 0: now eoftoken is created just like the others.
2098 * src/print.c (print_grammar): Don't special case the eof token.
2099 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
2100 lie anyway, albeit pleasant.
2101 * tests/calc.at: Exercise error messages with eoftoken.
2102 Change the grammar so that empty input is invalid.
2103 Adjust expectations.
2104 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
2105
ec2da99f
AD
21062001-12-27 Akim Demaille <akim@epita.fr>
2107
2108 * configure.in: Check the protos of strchr ans strspn.
2109 Replace strchr if needed.
2110 * src/system.h: Provide the protos of strchr, strspn and memchr if
2111 missing.
2112 * lib/strchr.c: New.
2113 * src/reader.c (symbols_save): Use strchr.
2114
8adfa272
AD
21152001-12-27 Akim Demaille <akim@epita.fr>
2116
2117 * src/print.c, src/print_graph.c (escape): New.
2118 Use it to quote the TAGS outputs.
2119 * src/print_graph.c (print_state): Now errors are in red, and
2120 reductions in green.
2121 Prefer high to wide: output the state number on a line of its own.
2122
80dac38c
AD
21232001-12-27 Akim Demaille <akim@epita.fr>
2124
2125 * src/state.h, src/state.c (reductions_new): New.
2126 * src/LR0.c (set_state_table): Let all the states have a
2127 `reductions', even if reduced to 0.
2128 (save_reductions): Adjust.
2129 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
2130 * src/print.c (print_reductions, print_actions): Adjust.
2131 * src/output.c (action_row): Adjust.
2132
2cec70b9
AD
21332001-12-27 Akim Demaille <akim@epita.fr>
2134
2135 * src/state.h, src/state.c (errs_new, errs_dup): New.
2136 * src/LR0.c (set_state_table): Let all the states have an errs,
2137 even if reduced to 0.
2138 * src/print.c (print_errs, print_reductions): Adjust.
2139 * src/output.c (output_actions, action_row): Adjust.
2140 * src/conflicts.c (resolve_sr_conflict): Adjust.
2141
13ca549a
AD
21422001-12-27 Akim Demaille <akim@epita.fr>
2143
2144 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
2145
5092aba5
AD
21462001-12-27 Akim Demaille <akim@epita.fr>
2147
2148 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
2149 * src/print.c: here.
2150 (lookaheadset, shiftset): New, used as additional storage by
2151 print_reductions.
2152 (print_results): Adjust.
2153 (print_shifts, print_gotos, print_errs): New, extracted from...
2154 (print_actions): here.
2155 * src/print_graph.c (print_actions): Remove dead code.
2156
11e2beca
AD
21572001-12-27 Akim Demaille <akim@epita.fr>
2158
2159 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
2160 `$n' and `@n'.
2161
dac3c910
AD
21622001-12-27 Akim Demaille <akim@epita.fr>
2163
2164 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
2165 (build_relations): Adjust.
2166
d0b0fefa
AD
21672001-12-27 Akim Demaille <akim@epita.fr>
2168
2169 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
2170 duplication.
2171
adc8c848
AD
21722001-12-27 Akim Demaille <akim@epita.fr>
2173
2174 * src/reader.c (packgram): Catch nitems overflows.
2175
14d293ac
AD
21762001-12-27 Akim Demaille <akim@epita.fr>
2177
2178 * src/files.c, src/files.h (guard_obstack): Remove.
2179 * src/output.c (output): Adjust.
2180 * src/reader.c (parse_braces): New, factoring...
2181 (copy_action, copy_guard): these two which are renamed as...
2182 (parse_action, parse_guard): these.
2183 As a voluntary consequence, using braces around guards is now
2184 mandatory.
2185
f499b062
AD
21862001-12-27 Akim Demaille <akim@epita.fr>
2187
2188 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
2189 * src/reader.c (symbol_list): `guard' and `guard_line' are new
2190 members.
2191 (symbol_list_new): Adjust.
2192 (copy_action): action_line is the first line, not the last.
2193 (copy_guard): Just as for actions, store the `action' only, not
2194 the switch/case/break flesh.
2195 Don't parse the user action that might follow the guard, let...
2196 (readgram): do it, i.e., now, there can be an action after a
2197 guard.
2198 In other words the guard is just explicitly optional.
2199 (packgram): Adjust.
2200 * src/output.c (guards_output): New.
2201 (output_parser): Call it when needed.
2202 (output): Also free the guard and attrs obstacks.
2203 * src/files.c, src/files.h (obstack_save): Remove.
2204 (output_files): Remove.
2205 As a result, if one needs the former `.act' file, using an
2206 appropriate skeleton which requires actions and guards is now
2207 required.
2208 * src/main.c (main): Adjust.
2209 * tests/semantic.at: New.
2210 * tests/regression.at: Use `input.y' as input file name.
2211 Avoid 8+3 problems by requiring input.c when the test needs the
2212 parser.
2213
d945f5cd
AD
22142001-12-27 Akim Demaille <akim@epita.fr>
2215
2216 * src/reader.c (symbol_list_new): Be sure to initialize all the
2217 fields.
2218
d200e455
AD
22192001-12-27 Akim Demaille <akim@epita.fr>
2220
2221 All the hacks using a final pseudo state are now useless.
2222
2223 * src/LR0.c (set_state_table): state_table holds exactly nstates.
2224 * src/lalr.c (nLA): New.
2225 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
2226 instead of lookaheadsp from the pseudo state (nstate + 1).
2227
f9507c28
AD
22282001-12-27 Akim Demaille <akim@epita.fr>
2229
2230 * src/output.c (action_row, token_actions): Use a state_t instead
2231 of a integer, and nlookaheads instead of the following state's
2232 lookaheadsp.
2233
065fbd27
AD
22342001-12-27 Akim Demaille <akim@epita.fr>
2235
2236 * src/conflicts.c (log_resolution, flush_shift)
2237 (resolve_sr_conflict, set_conflicts, solve_conflicts)
2238 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
2239 (conflicts_print, print_reductions): Use a state_t instead of an
2240 integer when referring to a state.
2241 As much as possible, depend upon nlookaheads, instead of the
2242 `lookaheadsp' member of the following state (since lookaheads of
2243 successive states are successive, the difference between state n + 1
2244 and n served as the number of lookaheads for state n).
2245 * src/lalr.c (add_lookback_edge): Likewise.
2246 * src/print.c (print_core, print_actions, print_state)
2247 (print_results): Likewise.
2248 * src/print_graph.c (print_core, print_actions, print_state)
2249 (print_graph): Likewise.
2250 * src/conflicts.h: Adjust.
2251
1b177bd7
AD
22522001-12-27 Akim Demaille <akim@epita.fr>
2253
2254 * src/bison.hairy: Formatting/comment changes.
2255 ANSIfy.
2256 Remove `register' indications.
2257 Add plenty of `static'.
2258
7742ddeb
AD
22592001-12-27 Akim Demaille <akim@epita.fr>
2260
2261 * src/output.c (prepare): Drop the muscle `ntbase' which
2262 duplicates ntokens.
2263 * src/bison.simple: Formatting/comment changes.
2264 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
2265 is an undocumented synonym.
2266
1fa14068
AD
22672001-12-22 Akim Demaille <akim@epita.fr>
2268
2269 * src/output.c (output_table_data): Change the prototype to use
2270 `int' for array ranges: some invocations do pass an int, not a
2271 short.
2272 Reported by Wayne Green.
2273
b9752825
AD
22742001-12-22 Akim Demaille <akim@epita.fr>
2275
2276 Some actions of web2c.y are improperly triggered.
2277 Reported by Mike Castle.
2278
2279 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
2280 * tests/regression.at (Web2c): Rename as...
2281 (Web2c Report): this.
2282 (Web2c Actions): New.
2283
776209d6
AD
22842001-12-22 Akim Demaille <akim@epita.fr>
2285
2286 Reductions in web2c.y are improperly reported.
2287 Reported by Mike Castle.
2288
2289 * src/conflicts.c (print_reductions): Fix.
2290 * tests/regression.at (Web2c): New.
2291
275fc3ad
AD
22922001-12-18 Akim Demaille <akim@epita.fr>
2293
2294 Some host fail on `assert (!"foo")', which expands to
2295 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
2296 Reported by Nelson Beebee.
2297
2298 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
2299 `#define it_succeeded 0' and `assert (it_succeeded)'.
2300
897668ee
MA
23012001-12-17 Marc Autret <autret_m@epita.fr>
2302
2303 * src/bison.simple: Don't hard code the skeleton line and filename.
2304 * src/output.c (output_parser): Rename 'line' as 'output_line'.
2305 New line counter 'skeleton_line' (skeleton-line muscle).
2306
ab3399e0
PE
23072001-12-17 Paul Eggert <eggert@twinsun.com>
2308
2309 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
2310 YYDEBUG must be defined to a nonzero value.
2311
2312 * src/bison.simple (yytname): Do not assume that the user defines
2313 YYDEBUG to a properly parenthesized expression.
2314
3877f72b
AD
23152001-12-17 Akim Demaille <akim@epita.fr>
2316
2317 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
2318 nlookaheads is a new member.
2319 Adjust all users.
2320 * src/lalr.h (nlookaheads): Remove this orphan declaration.
2321 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
2322 state.
776209d6 2323
331dbc1b
AD
23242001-12-17 Akim Demaille <akim@epita.fr>
2325
2326 * src/files.h, src/files.c (open_files, close_files): Remove.
2327 * src/main.c (main): Don't open/close files, nor invoke lex_free,
2328 let...
2329 * src/reader.c (reader): Do it.
776209d6 2330
be750e4c
AD
23312001-12-17 Akim Demaille <akim@epita.fr>
2332
2333 * src/conflicts.c (print_reductions): Formatting changes.
776209d6 2334
709ae8c6
AD
23352001-12-17 Akim Demaille <akim@epita.fr>
2336
2337 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
2338 (flush_reduce): New.
2339 (resolve_sr_conflict): Adjust.
776209d6 2340
f87685c3
AD
23412001-12-17 Akim Demaille <akim@epita.fr>
2342
2343 * src/output.c (output_obstack): Be static and rename as...
2344 (format_obstack): this, to avoid any confusion with files.c's
2345 output_obstack.
2346 * src/reader.h (muscle_obstack): Move to...
2347 * src/output.h: here, since it's defined in output.c.
2348
837491d8
AD
23492001-12-17 Akim Demaille <akim@epita.fr>
2350
2351 * src/output.c (action_row, save_column, default_goto)
2352 (sort_actions, matching_state, pack_vector): Better variable
2353 locality.
2354
796d61fb
AD
23552001-12-17 Akim Demaille <akim@epita.fr>
2356
2357 * src/output.c: Various formatting changes.
776209d6 2358
64d15509
AD
23592001-12-17 Akim Demaille <akim@epita.fr>
2360
2361 * src/files.c (output_files): Free the output_obstack.
2362 * src/main.c (main): Call print and print_graph conditionally.
2363 * src/print.c (print): Work unconditionally.
2364 * src/print_graph.c (print_graph): Work unconditionally.
2365 * src/conflicts.c (log_resolution): Output only if verbose_flag.
2366
fbc8ecb7
MA
23672001-12-16 Marc Autret <autret_m@epita.fr>
2368
2369 * src/output.c (actions_output): Fix. When we use %no-lines,
2370 there is one less line per action.
2371
f0440388
MA
23722001-12-16 Marc Autret <autret_m@epita.fr>
2373
2374 * src/bison.simple: Remove a useless #line directive.
2375 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
2376 * src/output.c (get_lines_number): New.
776209d6 2377 (output_parser): Adjust, now takes care about the lines of a
f0440388
MA
2378 output muscles.
2379 Fix line numbering.
2380 (actions_output): Computes the number of lines taken by actions.
2381 (output_master_parser): Insert new skeleton which is the name of
2382 the output parser file name.
2383
a79986b8
MA
23842001-12-15 Marc Autret <autret_m@epita.fr>
2385
2386 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
2387
4ec8e00f
MA
23882001-12-15 Marc Autret <autret_m@epita.fr>
2389
2390 * src/output.c (output_gram): Keep track of the hairy one.
2391
1a4648ff
AD
23922001-12-15 Akim Demaille <akim@epita.fr>
2393
2394 Make `make distcheck' work.
2395
2396 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
2397 system.h which uses libgettext.h.
2398
9c2c67e6
AD
23992001-12-15 Akim Demaille <akim@epita.fr>
2400
2401 * src/nullable.c (set_nullable): Useless rules must be skipped,
2402 otherwise, since we range over their symbols, we might look at a
2403 nonterminal which no longer ``exists'', i.e., it is not counted in
2404 `nvars', hence we overflow our arrays.
2405
93ede233
AD
24062001-12-15 Akim Demaille <akim@epita.fr>
2407
2408 The header can also be produced directly, without any obstack!
2409 Yahoo!
2410
2411 * src/files.c, src/files.h (defines_obstack): Remove.
2412 (compute_header_macro): Global.
2413 (defines_obstack_save): Remove.
2414 * src/reader.c (parse_union_decl): No longer output to
2415 defines_obstack: its content can be found in the `stype' muscle
2416 anyway.
2417 (output_token_translations): Merge into...
2418 (symbols_output): this.
2419 Rename as...
2420 (symbols_save): this.
2421 (reader): Adjust.
2422 * src/output.c (header_output): New.
2423 (output): Call it.
2424
2666f928
AD
24252001-12-15 Akim Demaille <akim@epita.fr>
2426
2427 * src/reader.c (parse_union_decl): Instead of handling two obstack
2428 simultaneously, use one to define the `stype' muscle, and use the
2429 value of the latter to fill defines_obstack.
2430 (copy_comment): Remove.
2431 (copy_comment2): Work for a single obstack.
2432 Rename as...
2433 (copy_comment): this.
2434
428046f8
AD
24352001-12-15 Akim Demaille <akim@epita.fr>
2436
2437 * src/lex.c, src/lex.h (xgetc): No longer static.
2438 * src/reader.c (parse_union_decl): Revamp.
2439
ea52d706
AD
24402001-12-15 Akim Demaille <akim@epita.fr>
2441
2442 Still making progress in separating Bison into (i) input, (ii)
2443 process, (iii) output: now we can directly output the parser file
2444 without using table_obstack at all.
2445
2446 * src/files.c, src/files.h (table_obstack): Bye bye.
2447 (parser_file_name): New.
2448 * src/files.c (compute_output_file_names): Compute it.
2449 * src/output.c (actions_output, output_parser)
2450 (output_master_parser): To a file instead of an obstack.
2451
3f96f4dc
AD
24522001-12-15 Akim Demaille <akim@epita.fr>
2453
2454 Attach actions to rules, instead of pre-outputting them to
2455 actions_obstack.
2456
2457 * src/gram.h (rule_t): action and action_line are new members.
2458 * src/reader.c (symbol_list): Likewise.
2459 (copy_action): Save the actions within the rule.
2460 (packgram): Save them in rule_table.
2461 * src/output.c (actions_output): New.
2462 (output_parser): Use it on `%%actions'.
2463 (output_rule_data): Don't free rule_table.
2464 (output): Do it.
2465 (prepare): Don't save the `action' muscle.
2466 * src/bison.simple: s/%%action/%%actions/.
2467
51576fb3
AD
24682001-12-15 Akim Demaille <akim@epita.fr>
2469
2470 * src/reader.c (copy_action): When --yacc, don't append a `;'
2471 to the user action: let it fail if lacking.
dee049eb 2472 Suggested by Arnold Robbins and Tom Tromey.
51576fb3 2473
2648a72d
AD
24742001-12-14 Akim Demaille <akim@epita.fr>
2475
2476 * src/lex.c (literalchar): Simply return the char you decoded, non
2477 longer mess around with obstacks and int pointers.
2478 Adjust all callers.
2479
92790e5b
AD
24802001-12-14 Akim Demaille <akim@epita.fr>
2481
2482 * src/lex.c (literalchar): Don't escape the special characters,
2483 just decode them, and keep them as char (before, eol was output as
2484 the 2 char string `\n' etc.).
2485 * src/output.c (output_rule_data): Use quotearg to output the
2486 token strings.
2487
927c1557
PE
24882001-12-13 Paul Eggert <eggert@twinsun.com>
2489
2490 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
2491 Do not infringe on the global user namespace when using C++.
2492 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
2493 All uses of `fprintf' and `stderr' changed.
2494
2495 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
2496
ed8e1f68
AD
24972001-12-13 Akim Demaille <akim@epita.fr>
2498
2499 The computation of nullable is broken: it doesn't handle empty
2500 RHS's properly.
2501
2502 * tests/torture.at (GNU AWK Grammar): New.
2503 * tests/sets.at (Nullable): New.
2504 * src/nullable.c (set_nullable): Instead of blindly looping over
2505 `ritems', loop over the rules, and then over their rhs's.
2506
2507 Work around Autotest bugs.
2508
2509 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
2510 frame, because Autotest understand lines starting with a `+' as
2511 traces from the shell. Then, they are not processed properly.
2512 Admittedly an Autotest bug, but we don't have time to wait for
2513 Autotest to catch up.
2514 * tests/regression.at (Broken Closure): Adjust to the new table
2515 frames.
2516 Move to...
2517 * tests/sets.at: here.
2518
cb581495
AD
25192001-12-13 Akim Demaille <akim@epita.fr>
2520
2521 * src/closure.c (closure): Use nrules instead of playing tricks
2522 with BITS_PER_WORD.
2523
2e729273
AD
25242001-12-13 Akim Demaille <akim@epita.fr>
2525
2526 * src/print.c (print_actions): Output the handling of `$' as the
2527 traces do: shifting the token EOF. Before EOF was treated as a
2528 nonterminal.
2529 * tests/regression.at: Adjust some tests.
2530 * src/print_graph.c (print_core): Complete the set of items via
2531 closure. The next-to-final and final states are still unsatisfying,
2532 but that's to be addressed elsewhere.
2533 No longer output the rule numbers, but do output the state number.
2534 A single loop for the shifts + gotos is enough, but picked a
2535 distinct color for each.
2536 (print_graph): Initialize and finalize closure.
2537
107f7dfb
AD
25382001-12-13 Akim Demaille <akim@epita.fr>
2539
2540 * src/reader.c (readgram): Remove dead code, an strip useless
2541 braces.
2542 (get_type): Remove, unused.
2543
9b53a24f
AD
25442001-12-12 Akim Demaille <akim@epita.fr>
2545
2546 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
2547 on that of lib/error.c.
2548
dbfb6dcd
AD
25492001-12-12 Akim Demaille <akim@epita.fr>
2550
2551 Some hosts don't like `/' in includes.
2552
2553 * src/system.h: Include libgettext.h without qualifying the path.
2554 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
2555 $(top_srcdir).
2556
c25fb648
MA
25572001-12-11 Marc Autret <autret_m@epita.fr>
2558
2559 * src/output.c (output_parser): Remove useless muscle.
2560
710ddc4f
MA
25612001-12-11 Marc Autret <autret_m@epita.fr>
2562
2563 * src/bison.simple: Remove #line just before %%epilogue. It
2564 is now handled in ...
2565 * src/reader.c (read_additionnal_code): Add the output of a
2566 #line for the epilogue.
2567
e83d80b8
MA
25682001-12-10 Marc Autret <autret_m@epita.fr>
2569
927c1557 2570 * src/reader.c (copy_definition): Re-use CPP-outed code which
e83d80b8
MA
2571 replace precedent remove.
2572 * src/bison.simple: Remove #line before %%prologue because
2573 %%input-line is wrong at this time.
2574
971d5158
MA
25752001-12-10 Marc Autret <autret_m@epita.fr>
2576
2577 * src/reader.c (symbols_output): Clean up.
927c1557 2578 * src/output.c (output_gram, output): Clean up.
971d5158 2579
5edafffd
AD
25802001-12-10 Akim Demaille <akim@epita.fr>
2581
2582 * src/lalr.c (initialize_lookaheads): New. Extracted from...
2583 * src/LR0.c (set_state_table): here.
2584 * src/lalr.c (lalr): Call it.
2585
0279f8e9
AD
25862001-12-10 Akim Demaille <akim@epita.fr>
2587
2588 * src/state.h (shifts): Remove the `number' member: shifts are
2589 attached to state, hence no longer need to be labelled with a
2590 state number.
2591
190c4f5f
AD
25922001-12-10 Akim Demaille <akim@epita.fr>
2593
2594 Now that states have a complete set of members, the linked list of
2595 shifts is useless: just fill directly the state's shifts member.
2596
2597 * src/state.h (shifts): Remove the `next' member.
2598 * src/LR0.c (first_state, last_state): Remove.
2599 Adjust the callers.
2600 (augment_automaton): Don't look for the shifts that must be added
2601 a shift on EOF: it is those of the state we looked for! But now,
2602 since shifts are attached, it is no longer needed to looking
2603 merely by its id: its number.
2604
2a73b93d
AD
26052001-12-10 Akim Demaille <akim@epita.fr>
2606
2607 * src/LR0.c (augment_automaton): Better variable locality.
2608 Remove an impossible branch: if there is a state corresponding to
2609 the start symbol being shifted, then there is shift for the start
2610 symbol from the initial state.
2611
74392f6a
AD
26122001-12-10 Akim Demaille <akim@epita.fr>
2613
2614 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
2615 only when appropriate: when insert_start_shifting_state' is not
2616 invoked.
2617 * tests/regression.at (Rule Line Numbers): Adjust.
2618
37c82725
AD
26192001-12-10 Akim Demaille <akim@epita.fr>
2620
2621 * src/LR0.c (augment_automaton): Now that all states have shifts,
2622 merge the two cases addition shifts to the initial state.
2623
6a164e0c
AD
26242001-12-10 Akim Demaille <akim@epita.fr>
2625
2626 * src/lalr.c (set_state_table): Move to...
2627 * src/LR0.c: here.
2628 * src/lalr.c (lalr): Don't call it...
2629 * src/LR0.c (generate_states): do it.
2630 * src/LR0.h (first_state): Remove, only the table is used.
2631
7215de24
AD
26322001-12-10 Akim Demaille <akim@epita.fr>
2633
2634 * src/LR0.h (first_shift, first_reduction): Remove.
2635 * src/lalr.c: Don't use first_shift: find shifts through the
2636 states.
2637
80e25d4d
AD
26382001-12-10 Akim Demaille <akim@epita.fr>
2639
2640 * src/LR0.c: Attach shifts to states as soon as they are
2641 computed.
2642 * src/lalr.c (set_state_table): Instead of assigning shifts to
2643 state, just assert that the mapping was properly done.
2644
0ab3728b
AD
26452001-12-10 Akim Demaille <akim@epita.fr>
2646
2647 * src/LR0.c (insert_start_shift): Rename as...
2648 (insert_start_shifting_state): this.
2649 (insert_eof_shifting_state, insert_accepting_state): New.
2650 (augment_automaton): Adjust.
2651 Better locality of the variables.
2652 When looking if the start_symbol is shifted from the initial
2653 state, using `while (... symbol != start_symbol ...)' sounds
2654 better than `while (... symbol < start_symbol ...)': If fail
2655 to see how the order between symbols could be relevant!
2656
78af9bbc
AD
26572001-12-10 Akim Demaille <akim@epita.fr>
2658
2659 * src/getargs.h: Don't declare `spec_name_prefix' and
2660 `spec_file_prefix', declared by src/files.h.
2661 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
2662 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
2663 * src/output.c (prepare): Adjust.
2664 * src/reader.c (symbols_output): Likewise.
2665 * src/vmsgetargs.c: Vaguely adjust, but who cares?
2666
bdef2a41
AD
26672001-12-10 Akim Demaille <akim@epita.fr>
2668
2669 * src/muscle_tab.c (muscle_init): NULL is a better default than
2670 `"0"'.
2671
3735969c
AD
26722001-12-10 Akim Demaille <akim@epita.fr>
2673
2674 * src/reader.c (reader): Calling symbols_output once is enough.
2675
49701457
AD
26762001-12-10 Akim Demaille <akim@epita.fr>
2677
2678 Now that states have a complete set of members, the linked list of
2679 reductions is useless: just fill directly the state's reductions
2680 member.
2681
2682 * src/state.h (struct reductions): Remove member `number' and
2683 `next'.
2684 * src/LR0.c (first_reduction, last_reduction): Remove.
2685 (save_reductions): Don't link the new reductions, store them in
2686 this_state.
2687 * src/lalr.c (set_state_table): No need to attach reductions to
2688 states, it's already done.
2689 * src/output.c (output_actions): No longer free the shifts, then
2690 the reductions, then the states: free all the states and their
2691 members.
2692
0edad749
AD
26932001-12-10 Akim Demaille <akim@epita.fr>
2694
2695 * src/options.c (OPTN, DRTV, BOTH): New.
2696 (option_table): Use them.
2697
0edad749
AD
2698 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
2699 the job of system.h.
2700 * src/options.c: Don't include stdio.h and xalloc.h for the same
2701 reasons.
2702
5449dd0f
AD
27032001-12-10 Akim Demaille <akim@epita.fr>
2704
2705 * src/output.c (output, prepare): Make sure the values of the
2706 muscles `action' and `prologue' are 0-terminated.
2707
a870c567
AD
27082001-12-10 Akim Demaille <akim@epita.fr>
2709
2710 Clean up GCC warnings.
2711
2712 * src/reader.c (copy_action): `buf' is not used.
2713 (parse_skel_decl): Be static.
2714 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
2715 * src/options.h (create_long_option_table): Have a real prototype.
2716 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
2717 (hash_delete_at): Return const void *.
2718 Adjust casts to preserve the const.
2719
80df8768
AD
27202001-12-10 Akim Demaille <akim@epita.fr>
2721
2722 * configure.in: Require 2.52g.
2723 M4 is not needed, but AUTOM4TE is.
2724 * m4/m4.m4: Remove.
2725 * tests/Makefile.am: Adjust.
2726
f693ad14
AD
27272001-12-10 Akim Demaille <akim@epita.fr>
2728
2729 One structure for states is enough, even though theoretically
2730 there are LR(0) states and LALR(1) states.
2731
2732 * src/lalr.h (state_t): Remove.
2733 (state_table): Be state_t **, not state_t *.
2734 * src/state.h (core, CORE_ALLOC): Rename as...
2735 (state_t, STATE_ALLOC): this.
2736 Add the LALR(1) members: shifts, reductions, errs.
2737 * src/LR0.c (state_table): Rename as...
2738 (state_hash): this, to avoid name clashes with the global
2739 `state_table'.
2740 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
2741 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
2742
74ffbcb6
AD
27432001-12-10 Akim Demaille <akim@epita.fr>
2744
2745 Bison dumps core on bash.y.
2746 Reported by Pascal Bart.
2747
2748 * src/warshall.c (bitmatrix_print): New.
2749 (TC): Use it.
2750 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
2751 j must be the outer loop.
2752 * tests/regression.at (Broken Closure): New.
2753
07708e19
AD
27542001-12-05 Akim Demaille <akim@epita.fr>
2755
2756 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
2757 its argument.
2758