]> git.saurik.com Git - bison.git/blame_incremental - ChangeLog
* src/output.c (action_row, token_actions): Use a state_t instead
[bison.git] / ChangeLog
... / ...
CommitLineData
12001-12-27 Akim Demaille <akim@epita.fr>
2
3 * src/output.c (action_row, token_actions): Use a state_t instead
4 of a integer, and nlookaheads instead of the following state's
5 lookaheadsp.
6
7
82001-12-27 Akim Demaille <akim@epita.fr>
9
10 * src/conflicts.c (log_resolution, flush_shift)
11 (resolve_sr_conflict, set_conflicts, solve_conflicts)
12 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
13 (conflicts_print, print_reductions): Use a state_t instead of an
14 integer when referring to a state.
15 As much as possible, depend upon nlookaheads, instead of the
16 `lookaheadsp' member of the following state (since lookaheads of
17 successive states are successive, the difference between state n + 1
18 and n served as the number of lookaheads for state n).
19 * src/lalr.c (add_lookback_edge): Likewise.
20 * src/print.c (print_core, print_actions, print_state)
21 (print_results): Likewise.
22 * src/print_graph.c (print_core, print_actions, print_state)
23 (print_graph): Likewise.
24 * src/conflicts.h: Adjust.
25
262001-12-27 Akim Demaille <akim@epita.fr>
27
28 * src/bison.hairy: Formatting/comment changes.
29 ANSIfy.
30 Remove `register' indications.
31 Add plenty of `static'.
32
332001-12-27 Akim Demaille <akim@epita.fr>
34
35 * src/output.c (prepare): Drop the muscle `ntbase' which
36 duplicates ntokens.
37 * src/bison.simple: Formatting/comment changes.
38 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
39 is an undocumented synonym.
40
41
422001-12-22 Akim Demaille <akim@epita.fr>
43
44 * src/output.c (output_table_data): Change the prototype to use
45 `int' for array ranges: some invocations do pass an int, not a
46 short.
47 Reported by Wayne Green.
48
492001-12-22 Akim Demaille <akim@epita.fr>
50
51 Some actions of web2c.y are improperly triggered.
52 Reported by Mike Castle.
53
54 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
55 * tests/regression.at (Web2c): Rename as...
56 (Web2c Report): this.
57 (Web2c Actions): New.
58
592001-12-22 Akim Demaille <akim@epita.fr>
60
61 Reductions in web2c.y are improperly reported.
62 Reported by Mike Castle.
63
64 * src/conflicts.c (print_reductions): Fix.
65 * tests/regression.at (Web2c): New.
66
672001-12-18 Akim Demaille <akim@epita.fr>
68
69 Some host fail on `assert (!"foo")', which expands to
70 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
71 Reported by Nelson Beebee.
72
73 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
74 `#define it_succeeded 0' and `assert (it_succeeded)'.
75
762001-12-17 Marc Autret <autret_m@epita.fr>
77
78 * src/bison.simple: Don't hard code the skeleton line and filename.
79 * src/output.c (output_parser): Rename 'line' as 'output_line'.
80 New line counter 'skeleton_line' (skeleton-line muscle).
81
822001-12-17 Paul Eggert <eggert@twinsun.com>
83
84 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
85 YYDEBUG must be defined to a nonzero value.
86
87 * src/bison.simple (yytname): Do not assume that the user defines
88 YYDEBUG to a properly parenthesized expression.
89
902001-12-17 Akim Demaille <akim@epita.fr>
91
92 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
93 nlookaheads is a new member.
94 Adjust all users.
95 * src/lalr.h (nlookaheads): Remove this orphan declaration.
96 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
97 state.
98
992001-12-17 Akim Demaille <akim@epita.fr>
100
101 * src/files.h, src/files.c (open_files, close_files): Remove.
102 * src/main.c (main): Don't open/close files, nor invoke lex_free,
103 let...
104 * src/reader.c (reader): Do it.
105
1062001-12-17 Akim Demaille <akim@epita.fr>
107
108 * src/conflicts.c (print_reductions): Formatting changes.
109
1102001-12-17 Akim Demaille <akim@epita.fr>
111
112 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
113 (flush_reduce): New.
114 (resolve_sr_conflict): Adjust.
115
1162001-12-17 Akim Demaille <akim@epita.fr>
117
118 * src/output.c (output_obstack): Be static and rename as...
119 (format_obstack): this, to avoid any confusion with files.c's
120 output_obstack.
121 * src/reader.h (muscle_obstack): Move to...
122 * src/output.h: here, since it's defined in output.c.
123
1242001-12-17 Akim Demaille <akim@epita.fr>
125
126 * src/output.c (action_row, save_column, default_goto)
127 (sort_actions, matching_state, pack_vector): Better variable
128 locality.
129
1302001-12-17 Akim Demaille <akim@epita.fr>
131
132 * src/output.c: Various formatting changes.
133
1342001-12-17 Akim Demaille <akim@epita.fr>
135
136 * src/files.c (output_files): Free the output_obstack.
137 * src/main.c (main): Call print and print_graph conditionally.
138 * src/print.c (print): Work unconditionally.
139 * src/print_graph.c (print_graph): Work unconditionally.
140 * src/conflicts.c (log_resolution): Output only if verbose_flag.
141
1422001-12-16 Marc Autret <autret_m@epita.fr>
143
144 * src/output.c (actions_output): Fix. When we use %no-lines,
145 there is one less line per action.
146
1472001-12-16 Marc Autret <autret_m@epita.fr>
148
149 * src/bison.simple: Remove a useless #line directive.
150 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
151 * src/output.c (get_lines_number): New.
152 (output_parser): Adjust, now takes care about the lines of a
153 output muscles.
154 Fix line numbering.
155 (actions_output): Computes the number of lines taken by actions.
156 (output_master_parser): Insert new skeleton which is the name of
157 the output parser file name.
158
1592001-12-15 Marc Autret <autret_m@epita.fr>
160
161 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
162
1632001-12-15 Marc Autret <autret_m@epita.fr>
164
165 * src/output.c (output_gram): Keep track of the hairy one.
166
1672001-12-15 Akim Demaille <akim@epita.fr>
168
169 Make `make distcheck' work.
170
171 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
172 system.h which uses libgettext.h.
173
1742001-12-15 Akim Demaille <akim@epita.fr>
175
176 * src/nullable.c (set_nullable): Useless rules must be skipped,
177 otherwise, since we range over their symbols, we might look at a
178 nonterminal which no longer ``exists'', i.e., it is not counted in
179 `nvars', hence we overflow our arrays.
180
1812001-12-15 Akim Demaille <akim@epita.fr>
182
183 The header can also be produced directly, without any obstack!
184 Yahoo!
185
186 * src/files.c, src/files.h (defines_obstack): Remove.
187 (compute_header_macro): Global.
188 (defines_obstack_save): Remove.
189 * src/reader.c (parse_union_decl): No longer output to
190 defines_obstack: its content can be found in the `stype' muscle
191 anyway.
192 (output_token_translations): Merge into...
193 (symbols_output): this.
194 Rename as...
195 (symbols_save): this.
196 (reader): Adjust.
197 * src/output.c (header_output): New.
198 (output): Call it.
199
2002001-12-15 Akim Demaille <akim@epita.fr>
201
202 * src/reader.c (parse_union_decl): Instead of handling two obstack
203 simultaneously, use one to define the `stype' muscle, and use the
204 value of the latter to fill defines_obstack.
205 (copy_comment): Remove.
206 (copy_comment2): Work for a single obstack.
207 Rename as...
208 (copy_comment): this.
209
2102001-12-15 Akim Demaille <akim@epita.fr>
211
212 * src/lex.c, src/lex.h (xgetc): No longer static.
213 * src/reader.c (parse_union_decl): Revamp.
214
2152001-12-15 Akim Demaille <akim@epita.fr>
216
217 Still making progress in separating Bison into (i) input, (ii)
218 process, (iii) output: now we can directly output the parser file
219 without using table_obstack at all.
220
221 * src/files.c, src/files.h (table_obstack): Bye bye.
222 (parser_file_name): New.
223 * src/files.c (compute_output_file_names): Compute it.
224 * src/output.c (actions_output, output_parser)
225 (output_master_parser): To a file instead of an obstack.
226
2272001-12-15 Akim Demaille <akim@epita.fr>
228
229 Attach actions to rules, instead of pre-outputting them to
230 actions_obstack.
231
232 * src/gram.h (rule_t): action and action_line are new members.
233 * src/reader.c (symbol_list): Likewise.
234 (copy_action): Save the actions within the rule.
235 (packgram): Save them in rule_table.
236 * src/output.c (actions_output): New.
237 (output_parser): Use it on `%%actions'.
238 (output_rule_data): Don't free rule_table.
239 (output): Do it.
240 (prepare): Don't save the `action' muscle.
241 * src/bison.simple: s/%%action/%%actions/.
242
2432001-12-15 Akim Demaille <akim@epita.fr>
244
245 * src/reader.c (copy_action): When --yacc, don't append a `;'
246 to the user action: let it fail if lacking.
247 Suggested by Arnold Robbins and Tom Tromey.
248
2492001-12-14 Akim Demaille <akim@epita.fr>
250
251 * src/lex.c (literalchar): Simply return the char you decoded, non
252 longer mess around with obstacks and int pointers.
253 Adjust all callers.
254
2552001-12-14 Akim Demaille <akim@epita.fr>
256
257 * src/lex.c (literalchar): Don't escape the special characters,
258 just decode them, and keep them as char (before, eol was output as
259 the 2 char string `\n' etc.).
260 * src/output.c (output_rule_data): Use quotearg to output the
261 token strings.
262
2632001-12-13 Paul Eggert <eggert@twinsun.com>
264
265 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
266 Do not infringe on the global user namespace when using C++.
267 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
268 All uses of `fprintf' and `stderr' changed.
269
270 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
271
2722001-12-13 Akim Demaille <akim@epita.fr>
273
274 The computation of nullable is broken: it doesn't handle empty
275 RHS's properly.
276
277 * tests/torture.at (GNU AWK Grammar): New.
278 * tests/sets.at (Nullable): New.
279 * src/nullable.c (set_nullable): Instead of blindly looping over
280 `ritems', loop over the rules, and then over their rhs's.
281
282 Work around Autotest bugs.
283
284 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
285 frame, because Autotest understand lines starting with a `+' as
286 traces from the shell. Then, they are not processed properly.
287 Admittedly an Autotest bug, but we don't have time to wait for
288 Autotest to catch up.
289 * tests/regression.at (Broken Closure): Adjust to the new table
290 frames.
291 Move to...
292 * tests/sets.at: here.
293
2942001-12-13 Akim Demaille <akim@epita.fr>
295
296 * src/closure.c (closure): Use nrules instead of playing tricks
297 with BITS_PER_WORD.
298
2992001-12-13 Akim Demaille <akim@epita.fr>
300
301 * src/print.c (print_actions): Output the handling of `$' as the
302 traces do: shifting the token EOF. Before EOF was treated as a
303 nonterminal.
304 * tests/regression.at: Adjust some tests.
305 * src/print_graph.c (print_core): Complete the set of items via
306 closure. The next-to-final and final states are still unsatisfying,
307 but that's to be addressed elsewhere.
308 No longer output the rule numbers, but do output the state number.
309 A single loop for the shifts + gotos is enough, but picked a
310 distinct color for each.
311 (print_graph): Initialize and finalize closure.
312
3132001-12-13 Akim Demaille <akim@epita.fr>
314
315 * src/reader.c (readgram): Remove dead code, an strip useless
316 braces.
317 (get_type): Remove, unused.
318
3192001-12-12 Akim Demaille <akim@epita.fr>
320
321 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
322 on that of lib/error.c.
323
3242001-12-12 Akim Demaille <akim@epita.fr>
325
326 Some hosts don't like `/' in includes.
327
328 * src/system.h: Include libgettext.h without qualifying the path.
329 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
330 $(top_srcdir).
331
3322001-12-11 Marc Autret <autret_m@epita.fr>
333
334 * src/output.c (output_parser): Remove useless muscle.
335
3362001-12-11 Marc Autret <autret_m@epita.fr>
337
338 * src/bison.simple: Remove #line just before %%epilogue. It
339 is now handled in ...
340 * src/reader.c (read_additionnal_code): Add the output of a
341 #line for the epilogue.
342
3432001-12-10 Marc Autret <autret_m@epita.fr>
344
345 * src/reader.c (copy_definition): Re-use CPP-outed code which
346 replace precedent remove.
347 * src/bison.simple: Remove #line before %%prologue because
348 %%input-line is wrong at this time.
349
3502001-12-10 Marc Autret <autret_m@epita.fr>
351
352 * src/reader.c (symbols_output): Clean up.
353 * src/output.c (output_gram, output): Clean up.
354
3552001-12-10 Akim Demaille <akim@epita.fr>
356
357 * src/lalr.c (initialize_lookaheads): New. Extracted from...
358 * src/LR0.c (set_state_table): here.
359 * src/lalr.c (lalr): Call it.
360
3612001-12-10 Akim Demaille <akim@epita.fr>
362
363 * src/state.h (shifts): Remove the `number' member: shifts are
364 attached to state, hence no longer need to be labelled with a
365 state number.
366
3672001-12-10 Akim Demaille <akim@epita.fr>
368
369 Now that states have a complete set of members, the linked list of
370 shifts is useless: just fill directly the state's shifts member.
371
372 * src/state.h (shifts): Remove the `next' member.
373 * src/LR0.c (first_state, last_state): Remove.
374 Adjust the callers.
375 (augment_automaton): Don't look for the shifts that must be added
376 a shift on EOF: it is those of the state we looked for! But now,
377 since shifts are attached, it is no longer needed to looking
378 merely by its id: its number.
379
3802001-12-10 Akim Demaille <akim@epita.fr>
381
382 * src/LR0.c (augment_automaton): Better variable locality.
383 Remove an impossible branch: if there is a state corresponding to
384 the start symbol being shifted, then there is shift for the start
385 symbol from the initial state.
386
3872001-12-10 Akim Demaille <akim@epita.fr>
388
389 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
390 only when appropriate: when insert_start_shifting_state' is not
391 invoked.
392 * tests/regression.at (Rule Line Numbers): Adjust.
393
3942001-12-10 Akim Demaille <akim@epita.fr>
395
396 * src/LR0.c (augment_automaton): Now that all states have shifts,
397 merge the two cases addition shifts to the initial state.
398
3992001-12-10 Akim Demaille <akim@epita.fr>
400
401 * src/lalr.c (set_state_table): Move to...
402 * src/LR0.c: here.
403 * src/lalr.c (lalr): Don't call it...
404 * src/LR0.c (generate_states): do it.
405 * src/LR0.h (first_state): Remove, only the table is used.
406
4072001-12-10 Akim Demaille <akim@epita.fr>
408
409 * src/LR0.h (first_shift, first_reduction): Remove.
410 * src/lalr.c: Don't use first_shift: find shifts through the
411 states.
412
4132001-12-10 Akim Demaille <akim@epita.fr>
414
415 * src/LR0.c: Attach shifts to states as soon as they are
416 computed.
417 * src/lalr.c (set_state_table): Instead of assigning shifts to
418 state, just assert that the mapping was properly done.
419
4202001-12-10 Akim Demaille <akim@epita.fr>
421
422 * src/LR0.c (insert_start_shift): Rename as...
423 (insert_start_shifting_state): this.
424 (insert_eof_shifting_state, insert_accepting_state): New.
425 (augment_automaton): Adjust.
426 Better locality of the variables.
427 When looking if the start_symbol is shifted from the initial
428 state, using `while (... symbol != start_symbol ...)' sounds
429 better than `while (... symbol < start_symbol ...)': If fail
430 to see how the order between symbols could be relevant!
431
4322001-12-10 Akim Demaille <akim@epita.fr>
433
434 * src/getargs.h: Don't declare `spec_name_prefix' and
435 `spec_file_prefix', declared by src/files.h.
436 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
437 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
438 * src/output.c (prepare): Adjust.
439 * src/reader.c (symbols_output): Likewise.
440 * src/vmsgetargs.c: Vaguely adjust, but who cares?
441
4422001-12-10 Akim Demaille <akim@epita.fr>
443
444 * src/muscle_tab.c (muscle_init): NULL is a better default than
445 `"0"'.
446
4472001-12-10 Akim Demaille <akim@epita.fr>
448
449 * src/reader.c (reader): Calling symbols_output once is enough.
450
4512001-12-10 Akim Demaille <akim@epita.fr>
452
453 Now that states have a complete set of members, the linked list of
454 reductions is useless: just fill directly the state's reductions
455 member.
456
457 * src/state.h (struct reductions): Remove member `number' and
458 `next'.
459 * src/LR0.c (first_reduction, last_reduction): Remove.
460 (save_reductions): Don't link the new reductions, store them in
461 this_state.
462 * src/lalr.c (set_state_table): No need to attach reductions to
463 states, it's already done.
464 * src/output.c (output_actions): No longer free the shifts, then
465 the reductions, then the states: free all the states and their
466 members.
467
4682001-12-10 Akim Demaille <akim@epita.fr>
469
470 * src/options.c (OPTN, DRTV, BOTH): New.
471 (option_table): Use them.
472
473 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
474 the job of system.h.
475 * src/options.c: Don't include stdio.h and xalloc.h for the same
476 reasons.
477
4782001-12-10 Akim Demaille <akim@epita.fr>
479
480 * src/output.c (output, prepare): Make sure the values of the
481 muscles `action' and `prologue' are 0-terminated.
482
4832001-12-10 Akim Demaille <akim@epita.fr>
484
485 Clean up GCC warnings.
486
487 * src/reader.c (copy_action): `buf' is not used.
488 (parse_skel_decl): Be static.
489 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
490 * src/options.h (create_long_option_table): Have a real prototype.
491 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
492 (hash_delete_at): Return const void *.
493 Adjust casts to preserve the const.
494
4952001-12-10 Akim Demaille <akim@epita.fr>
496
497 * configure.in: Require 2.52g.
498 M4 is not needed, but AUTOM4TE is.
499 * m4/m4.m4: Remove.
500 * tests/Makefile.am: Adjust.
501
5022001-12-10 Akim Demaille <akim@epita.fr>
503
504 One structure for states is enough, even though theoretically
505 there are LR(0) states and LALR(1) states.
506
507 * src/lalr.h (state_t): Remove.
508 (state_table): Be state_t **, not state_t *.
509 * src/state.h (core, CORE_ALLOC): Rename as...
510 (state_t, STATE_ALLOC): this.
511 Add the LALR(1) members: shifts, reductions, errs.
512 * src/LR0.c (state_table): Rename as...
513 (state_hash): this, to avoid name clashes with the global
514 `state_table'.
515 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
516 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
517
5182001-12-10 Akim Demaille <akim@epita.fr>
519
520 Bison dumps core on bash.y.
521 Reported by Pascal Bart.
522
523 * src/warshall.c (bitmatrix_print): New.
524 (TC): Use it.
525 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
526 j must be the outer loop.
527 * tests/regression.at (Broken Closure): New.
528
5292001-12-05 Akim Demaille <akim@epita.fr>
530
531 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
532 its argument.
533