]> git.saurik.com Git - bison.git/blame_incremental - ChangeLog
* src/files.h, src/files.c (open_files, close_files): Remove.
[bison.git] / ChangeLog
... / ...
CommitLineData
12001-12-17 Akim Demaille <akim@epita.fr>
2
3 * src/files.h, src/files.c (open_files, close_files): Remove.
4 * src/main.c (main): Don't open/close files, nor invoke lex_free,
5 let...
6 * src/reader.c (reader): Do it.
7
8
92001-12-17 Akim Demaille <akim@epita.fr>
10
11 * src/conflicts.c (print_reductions): Formatting changes.
12
13
142001-12-17 Akim Demaille <akim@epita.fr>
15
16 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
17 (flush_reduce): New.
18 (resolve_sr_conflict): Adjust.
19
20
212001-12-17 Akim Demaille <akim@epita.fr>
22
23 * src/output.c (output_obstack): Be static and rename as...
24 (format_obstack): this, to avoid any confusion with files.c's
25 output_obstack.
26 * src/reader.h (muscle_obstack): Move to...
27 * src/output.h: here, since it's defined in output.c.
28
29
302001-12-17 Akim Demaille <akim@epita.fr>
31
32 * src/output.c (action_row, save_column, default_goto)
33 (sort_actions, matching_state, pack_vector): Better variable
34 locality.
35
36
372001-12-17 Akim Demaille <akim@epita.fr>
38
39 * src/output.c: Various formatting changes.
40
41
422001-12-17 Akim Demaille <akim@epita.fr>
43
44 * src/files.c (output_files): Free the output_obstack.
45 * src/main.c (main): Call print and print_graph conditionally.
46 * src/print.c (print): Work unconditionally.
47 * src/print_graph.c (print_graph): Work unconditionally.
48 * src/conflicts.c (log_resolution): Output only if verbose_flag.
49
502001-12-16 Marc Autret <autret_m@epita.fr>
51
52 * src/output.c (actions_output): Fix. When we use %no-lines,
53 there is one less line per action.
54
552001-12-16 Marc Autret <autret_m@epita.fr>
56
57 * src/bison.simple: Remove a useless #line directive.
58 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
59 * src/output.c (get_lines_number): New.
60 (output_parser): Adjust, now takes care about the lines of a
61 output muscles.
62 Fix line numbering.
63 (actions_output): Computes the number of lines taken by actions.
64 (output_master_parser): Insert new skeleton which is the name of
65 the output parser file name.
66
672001-12-15 Marc Autret <autret_m@epita.fr>
68
69 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
70
712001-12-15 Marc Autret <autret_m@epita.fr>
72
73 * src/output.c (output_gram): Keep track of the hairy one.
74
752001-12-15 Akim Demaille <akim@epita.fr>
76
77 Make `make distcheck' work.
78
79 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
80 system.h which uses libgettext.h.
81
822001-12-15 Akim Demaille <akim@epita.fr>
83
84 * src/nullable.c (set_nullable): Useless rules must be skipped,
85 otherwise, since we range over their symbols, we might look at a
86 nonterminal which no longer ``exists'', i.e., it is not counted in
87 `nvars', hence we overflow our arrays.
88
892001-12-15 Akim Demaille <akim@epita.fr>
90
91 The header can also be produced directly, without any obstack!
92 Yahoo!
93
94 * src/files.c, src/files.h (defines_obstack): Remove.
95 (compute_header_macro): Global.
96 (defines_obstack_save): Remove.
97 * src/reader.c (parse_union_decl): No longer output to
98 defines_obstack: its content can be found in the `stype' muscle
99 anyway.
100 (output_token_translations): Merge into...
101 (symbols_output): this.
102 Rename as...
103 (symbols_save): this.
104 (reader): Adjust.
105 * src/output.c (header_output): New.
106 (output): Call it.
107
1082001-12-15 Akim Demaille <akim@epita.fr>
109
110 * src/reader.c (parse_union_decl): Instead of handling two obstack
111 simultaneously, use one to define the `stype' muscle, and use the
112 value of the latter to fill defines_obstack.
113 (copy_comment): Remove.
114 (copy_comment2): Work for a single obstack.
115 Rename as...
116 (copy_comment): this.
117
1182001-12-15 Akim Demaille <akim@epita.fr>
119
120 * src/lex.c, src/lex.h (xgetc): No longer static.
121 * src/reader.c (parse_union_decl): Revamp.
122
1232001-12-15 Akim Demaille <akim@epita.fr>
124
125 Still making progress in separating Bison into (i) input, (ii)
126 process, (iii) output: now we can directly output the parser file
127 without using table_obstack at all.
128
129 * src/files.c, src/files.h (table_obstack): Bye bye.
130 (parser_file_name): New.
131 * src/files.c (compute_output_file_names): Compute it.
132 * src/output.c (actions_output, output_parser)
133 (output_master_parser): To a file instead of an obstack.
134
1352001-12-15 Akim Demaille <akim@epita.fr>
136
137 Attach actions to rules, instead of pre-outputting them to
138 actions_obstack.
139
140 * src/gram.h (rule_t): action and action_line are new members.
141 * src/reader.c (symbol_list): Likewise.
142 (copy_action): Save the actions within the rule.
143 (packgram): Save them in rule_table.
144 * src/output.c (actions_output): New.
145 (output_parser): Use it on `%%actions'.
146 (output_rule_data): Don't free rule_table.
147 (output): Do it.
148 (prepare): Don't save the `action' muscle.
149 * src/bison.simple: s/%%action/%%actions/.
150
1512001-12-15 Akim Demaille <akim@epita.fr>
152
153 * src/reader.c (copy_action): When --yacc, don't append a `;'
154 to the user action: let it fail if lacking.
155 Suggested by Aharon Robbins and Tom Tromey.
156
1572001-12-14 Akim Demaille <akim@epita.fr>
158
159 * src/lex.c (literalchar): Simply return the char you decoded, non
160 longer mess around with obstacks and int pointers.
161 Adjust all callers.
162
1632001-12-14 Akim Demaille <akim@epita.fr>
164
165 * src/lex.c (literalchar): Don't escape the special characters,
166 just decode them, and keep them as char (before, eol was output as
167 the 2 char string `\n' etc.).
168 * src/output.c (output_rule_data): Use quotearg to output the
169 token strings.
170
1712001-12-13 Paul Eggert <eggert@twinsun.com>
172
173 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
174 Do not infringe on the global user namespace when using C++.
175 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
176 All uses of `fprintf' and `stderr' changed.
177
178 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
179
1802001-12-13 Akim Demaille <akim@epita.fr>
181
182 The computation of nullable is broken: it doesn't handle empty
183 RHS's properly.
184
185 * tests/torture.at (GNU AWK Grammar): New.
186 * tests/sets.at (Nullable): New.
187 * src/nullable.c (set_nullable): Instead of blindly looping over
188 `ritems', loop over the rules, and then over their rhs's.
189
190 Work around Autotest bugs.
191
192 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
193 frame, because Autotest understand lines starting with a `+' as
194 traces from the shell. Then, they are not processed properly.
195 Admittedly an Autotest bug, but we don't have time to wait for
196 Autotest to catch up.
197 * tests/regression.at (Broken Closure): Adjust to the new table
198 frames.
199 Move to...
200 * tests/sets.at: here.
201
2022001-12-13 Akim Demaille <akim@epita.fr>
203
204 * src/closure.c (closure): Use nrules instead of playing tricks
205 with BITS_PER_WORD.
206
2072001-12-13 Akim Demaille <akim@epita.fr>
208
209 * src/print.c (print_actions): Output the handling of `$' as the
210 traces do: shifting the token EOF. Before EOF was treated as a
211 nonterminal.
212 * tests/regression.at: Adjust some tests.
213 * src/print_graph.c (print_core): Complete the set of items via
214 closure. The next-to-final and final states are still unsatisfying,
215 but that's to be addressed elsewhere.
216 No longer output the rule numbers, but do output the state number.
217 A single loop for the shifts + gotos is enough, but picked a
218 distinct color for each.
219 (print_graph): Initialize and finalize closure.
220
2212001-12-13 Akim Demaille <akim@epita.fr>
222
223 * src/reader.c (readgram): Remove dead code, an strip useless
224 braces.
225 (get_type): Remove, unused.
226
2272001-12-12 Akim Demaille <akim@epita.fr>
228
229 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
230 on that of lib/error.c.
231
2322001-12-12 Akim Demaille <akim@epita.fr>
233
234 Some hosts don't like `/' in includes.
235
236 * src/system.h: Include libgettext.h without qualifying the path.
237 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
238 $(top_srcdir).
239
2402001-12-11 Marc Autret <autret_m@epita.fr>
241
242 * src/output.c (output_parser): Remove useless muscle.
243
2442001-12-11 Marc Autret <autret_m@epita.fr>
245
246 * src/bison.simple: Remove #line just before %%epilogue. It
247 is now handled in ...
248 * src/reader.c (read_additionnal_code): Add the output of a
249 #line for the epilogue.
250
2512001-12-10 Marc Autret <autret_m@epita.fr>
252
253 * src/reader.c (copy_definition): Re-use CPP-outed code which
254 replace precedent remove.
255 * src/bison.simple: Remove #line before %%prologue because
256 %%input-line is wrong at this time.
257
2582001-12-10 Marc Autret <autret_m@epita.fr>
259
260 * src/reader.c (symbols_output): Clean up.
261 * src/output.c (output_gram, output): Clean up.
262
2632001-12-10 Akim Demaille <akim@epita.fr>
264
265 * src/lalr.c (initialize_lookaheads): New. Extracted from...
266 * src/LR0.c (set_state_table): here.
267 * src/lalr.c (lalr): Call it.
268
2692001-12-10 Akim Demaille <akim@epita.fr>
270
271 * src/state.h (shifts): Remove the `number' member: shifts are
272 attached to state, hence no longer need to be labelled with a
273 state number.
274
2752001-12-10 Akim Demaille <akim@epita.fr>
276
277 Now that states have a complete set of members, the linked list of
278 shifts is useless: just fill directly the state's shifts member.
279
280 * src/state.h (shifts): Remove the `next' member.
281 * src/LR0.c (first_state, last_state): Remove.
282 Adjust the callers.
283 (augment_automaton): Don't look for the shifts that must be added
284 a shift on EOF: it is those of the state we looked for! But now,
285 since shifts are attached, it is no longer needed to looking
286 merely by its id: its number.
287
2882001-12-10 Akim Demaille <akim@epita.fr>
289
290 * src/LR0.c (augment_automaton): Better variable locality.
291 Remove an impossible branch: if there is a state corresponding to
292 the start symbol being shifted, then there is shift for the start
293 symbol from the initial state.
294
2952001-12-10 Akim Demaille <akim@epita.fr>
296
297 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
298 only when appropriate: when insert_start_shifting_state' is not
299 invoked.
300 * tests/regression.at (Rule Line Numbers): Adjust.
301
3022001-12-10 Akim Demaille <akim@epita.fr>
303
304 * src/LR0.c (augment_automaton): Now that all states have shifts,
305 merge the two cases addition shifts to the initial state.
306
3072001-12-10 Akim Demaille <akim@epita.fr>
308
309 * src/lalr.c (set_state_table): Move to...
310 * src/LR0.c: here.
311 * src/lalr.c (lalr): Don't call it...
312 * src/LR0.c (generate_states): do it.
313 * src/LR0.h (first_state): Remove, only the table is used.
314
3152001-12-10 Akim Demaille <akim@epita.fr>
316
317 * src/LR0.h (first_shift, first_reduction): Remove.
318 * src/lalr.c: Don't use first_shift: find shifts through the
319 states.
320
3212001-12-10 Akim Demaille <akim@epita.fr>
322
323 * src/LR0.c: Attach shifts to states as soon as they are
324 computed.
325 * src/lalr.c (set_state_table): Instead of assigning shifts to
326 state, just assert that the mapping was properly done.
327
3282001-12-10 Akim Demaille <akim@epita.fr>
329
330 * src/LR0.c (insert_start_shift): Rename as...
331 (insert_start_shifting_state): this.
332 (insert_eof_shifting_state, insert_accepting_state): New.
333 (augment_automaton): Adjust.
334 Better locality of the variables.
335 When looking if the start_symbol is shifted from the initial
336 state, using `while (... symbol != start_symbol ...)' sounds
337 better than `while (... symbol < start_symbol ...)': If fail
338 to see how the order between symbols could be relevant!
339
3402001-12-10 Akim Demaille <akim@epita.fr>
341
342 * src/getargs.h: Don't declare `spec_name_prefix' and
343 `spec_file_prefix', declared by src/files.h.
344 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
345 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
346 * src/output.c (prepare): Adjust.
347 * src/reader.c (symbols_output): Likewise.
348 * src/vmsgetargs.c: Vaguely adjust, but who cares?
349
3502001-12-10 Akim Demaille <akim@epita.fr>
351
352 * src/muscle_tab.c (muscle_init): NULL is a better default than
353 `"0"'.
354
3552001-12-10 Akim Demaille <akim@epita.fr>
356
357 * src/reader.c (reader): Calling symbols_output once is enough.
358
3592001-12-10 Akim Demaille <akim@epita.fr>
360
361 Now that states have a complete set of members, the linked list of
362 reductions is useless: just fill directly the state's reductions
363 member.
364
365 * src/state.h (struct reductions): Remove member `number' and
366 `next'.
367 * src/LR0.c (first_reduction, last_reduction): Remove.
368 (save_reductions): Don't link the new reductions, store them in
369 this_state.
370 * src/lalr.c (set_state_table): No need to attach reductions to
371 states, it's already done.
372 * src/output.c (output_actions): No longer free the shifts, then
373 the reductions, then the states: free all the states and their
374 members.
375
3762001-12-10 Akim Demaille <akim@epita.fr>
377
378 * src/options.c (OPTN, DRTV, BOTH): New.
379 (option_table): Use them.
380
381 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
382 the job of system.h.
383 * src/options.c: Don't include stdio.h and xalloc.h for the same
384 reasons.
385
3862001-12-10 Akim Demaille <akim@epita.fr>
387
388 * src/output.c (output, prepare): Make sure the values of the
389 muscles `action' and `prologue' are 0-terminated.
390
3912001-12-10 Akim Demaille <akim@epita.fr>
392
393 Clean up GCC warnings.
394
395 * src/reader.c (copy_action): `buf' is not used.
396 (parse_skel_decl): Be static.
397 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
398 * src/options.h (create_long_option_table): Have a real prototype.
399 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
400 (hash_delete_at): Return const void *.
401 Adjust casts to preserve the const.
402
4032001-12-10 Akim Demaille <akim@epita.fr>
404
405 * configure.in: Require 2.52g.
406 M4 is not needed, but AUTOM4TE is.
407 * m4/m4.m4: Remove.
408 * tests/Makefile.am: Adjust.
409
4102001-12-10 Akim Demaille <akim@epita.fr>
411
412 One structure for states is enough, even though theoretically
413 there are LR(0) states and LALR(1) states.
414
415 * src/lalr.h (state_t): Remove.
416 (state_table): Be state_t **, not state_t *.
417 * src/state.h (core, CORE_ALLOC): Rename as...
418 (state_t, STATE_ALLOC): this.
419 Add the LALR(1) members: shifts, reductions, errs.
420 * src/LR0.c (state_table): Rename as...
421 (state_hash): this, to avoid name clashes with the global
422 `state_table'.
423 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
424 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
425
4262001-12-10 Akim Demaille <akim@epita.fr>
427
428 Bison dumps core on bash.y.
429 Reported by Pascal Bart.
430
431 * src/warshall.c (bitmatrix_print): New.
432 (TC): Use it.
433 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
434 j must be the outer loop.
435 * tests/regression.at (Broken Closure): New.
436
4372001-12-05 Akim Demaille <akim@epita.fr>
438
439 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
440 its argument.
441