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