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