]> git.saurik.com Git - bison.git/blame - ChangeLog
* src/state.h (state_t): Rename lookaheads as lookaheadsp.
[bison.git] / ChangeLog
CommitLineData
3877f72b
AD
12001-12-17 Akim Demaille <akim@epita.fr>
2
3 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
4 nlookaheads is a new member.
5 Adjust all users.
6 * src/lalr.h (nlookaheads): Remove this orphan declaration.
7 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
8 state.
9
10
331dbc1b
AD
112001-12-17 Akim Demaille <akim@epita.fr>
12
13 * src/files.h, src/files.c (open_files, close_files): Remove.
14 * src/main.c (main): Don't open/close files, nor invoke lex_free,
15 let...
16 * src/reader.c (reader): Do it.
17
18
be750e4c
AD
192001-12-17 Akim Demaille <akim@epita.fr>
20
21 * src/conflicts.c (print_reductions): Formatting changes.
22
23
709ae8c6
AD
242001-12-17 Akim Demaille <akim@epita.fr>
25
26 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
27 (flush_reduce): New.
28 (resolve_sr_conflict): Adjust.
29
30
f87685c3
AD
312001-12-17 Akim Demaille <akim@epita.fr>
32
33 * src/output.c (output_obstack): Be static and rename as...
34 (format_obstack): this, to avoid any confusion with files.c's
35 output_obstack.
36 * src/reader.h (muscle_obstack): Move to...
37 * src/output.h: here, since it's defined in output.c.
38
39
837491d8
AD
402001-12-17 Akim Demaille <akim@epita.fr>
41
42 * src/output.c (action_row, save_column, default_goto)
43 (sort_actions, matching_state, pack_vector): Better variable
44 locality.
45
46
796d61fb
AD
472001-12-17 Akim Demaille <akim@epita.fr>
48
49 * src/output.c: Various formatting changes.
50
51
64d15509
AD
522001-12-17 Akim Demaille <akim@epita.fr>
53
54 * src/files.c (output_files): Free the output_obstack.
55 * src/main.c (main): Call print and print_graph conditionally.
56 * src/print.c (print): Work unconditionally.
57 * src/print_graph.c (print_graph): Work unconditionally.
58 * src/conflicts.c (log_resolution): Output only if verbose_flag.
59
fbc8ecb7
MA
602001-12-16 Marc Autret <autret_m@epita.fr>
61
62 * src/output.c (actions_output): Fix. When we use %no-lines,
63 there is one less line per action.
64
f0440388
MA
652001-12-16 Marc Autret <autret_m@epita.fr>
66
67 * src/bison.simple: Remove a useless #line directive.
68 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
69 * src/output.c (get_lines_number): New.
70 (output_parser): Adjust, now takes care about the lines of a
71 output muscles.
72 Fix line numbering.
73 (actions_output): Computes the number of lines taken by actions.
74 (output_master_parser): Insert new skeleton which is the name of
75 the output parser file name.
76
a79986b8
MA
772001-12-15 Marc Autret <autret_m@epita.fr>
78
79 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
80
4ec8e00f
MA
812001-12-15 Marc Autret <autret_m@epita.fr>
82
83 * src/output.c (output_gram): Keep track of the hairy one.
84
1a4648ff
AD
852001-12-15 Akim Demaille <akim@epita.fr>
86
87 Make `make distcheck' work.
88
89 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
90 system.h which uses libgettext.h.
91
9c2c67e6
AD
922001-12-15 Akim Demaille <akim@epita.fr>
93
94 * src/nullable.c (set_nullable): Useless rules must be skipped,
95 otherwise, since we range over their symbols, we might look at a
96 nonterminal which no longer ``exists'', i.e., it is not counted in
97 `nvars', hence we overflow our arrays.
98
93ede233
AD
992001-12-15 Akim Demaille <akim@epita.fr>
100
101 The header can also be produced directly, without any obstack!
102 Yahoo!
103
104 * src/files.c, src/files.h (defines_obstack): Remove.
105 (compute_header_macro): Global.
106 (defines_obstack_save): Remove.
107 * src/reader.c (parse_union_decl): No longer output to
108 defines_obstack: its content can be found in the `stype' muscle
109 anyway.
110 (output_token_translations): Merge into...
111 (symbols_output): this.
112 Rename as...
113 (symbols_save): this.
114 (reader): Adjust.
115 * src/output.c (header_output): New.
116 (output): Call it.
117
2666f928
AD
1182001-12-15 Akim Demaille <akim@epita.fr>
119
120 * src/reader.c (parse_union_decl): Instead of handling two obstack
121 simultaneously, use one to define the `stype' muscle, and use the
122 value of the latter to fill defines_obstack.
123 (copy_comment): Remove.
124 (copy_comment2): Work for a single obstack.
125 Rename as...
126 (copy_comment): this.
127
428046f8
AD
1282001-12-15 Akim Demaille <akim@epita.fr>
129
130 * src/lex.c, src/lex.h (xgetc): No longer static.
131 * src/reader.c (parse_union_decl): Revamp.
132
ea52d706
AD
1332001-12-15 Akim Demaille <akim@epita.fr>
134
135 Still making progress in separating Bison into (i) input, (ii)
136 process, (iii) output: now we can directly output the parser file
137 without using table_obstack at all.
138
139 * src/files.c, src/files.h (table_obstack): Bye bye.
140 (parser_file_name): New.
141 * src/files.c (compute_output_file_names): Compute it.
142 * src/output.c (actions_output, output_parser)
143 (output_master_parser): To a file instead of an obstack.
144
3f96f4dc
AD
1452001-12-15 Akim Demaille <akim@epita.fr>
146
147 Attach actions to rules, instead of pre-outputting them to
148 actions_obstack.
149
150 * src/gram.h (rule_t): action and action_line are new members.
151 * src/reader.c (symbol_list): Likewise.
152 (copy_action): Save the actions within the rule.
153 (packgram): Save them in rule_table.
154 * src/output.c (actions_output): New.
155 (output_parser): Use it on `%%actions'.
156 (output_rule_data): Don't free rule_table.
157 (output): Do it.
158 (prepare): Don't save the `action' muscle.
159 * src/bison.simple: s/%%action/%%actions/.
160
51576fb3
AD
1612001-12-15 Akim Demaille <akim@epita.fr>
162
163 * src/reader.c (copy_action): When --yacc, don't append a `;'
164 to the user action: let it fail if lacking.
165 Suggested by Aharon Robbins and Tom Tromey.
166
2648a72d
AD
1672001-12-14 Akim Demaille <akim@epita.fr>
168
169 * src/lex.c (literalchar): Simply return the char you decoded, non
170 longer mess around with obstacks and int pointers.
171 Adjust all callers.
172
92790e5b
AD
1732001-12-14 Akim Demaille <akim@epita.fr>
174
175 * src/lex.c (literalchar): Don't escape the special characters,
176 just decode them, and keep them as char (before, eol was output as
177 the 2 char string `\n' etc.).
178 * src/output.c (output_rule_data): Use quotearg to output the
179 token strings.
180
927c1557
PE
1812001-12-13 Paul Eggert <eggert@twinsun.com>
182
183 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
184 Do not infringe on the global user namespace when using C++.
185 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
186 All uses of `fprintf' and `stderr' changed.
187
188 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
189
ed8e1f68
AD
1902001-12-13 Akim Demaille <akim@epita.fr>
191
192 The computation of nullable is broken: it doesn't handle empty
193 RHS's properly.
194
195 * tests/torture.at (GNU AWK Grammar): New.
196 * tests/sets.at (Nullable): New.
197 * src/nullable.c (set_nullable): Instead of blindly looping over
198 `ritems', loop over the rules, and then over their rhs's.
199
200 Work around Autotest bugs.
201
202 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
203 frame, because Autotest understand lines starting with a `+' as
204 traces from the shell. Then, they are not processed properly.
205 Admittedly an Autotest bug, but we don't have time to wait for
206 Autotest to catch up.
207 * tests/regression.at (Broken Closure): Adjust to the new table
208 frames.
209 Move to...
210 * tests/sets.at: here.
211
cb581495
AD
2122001-12-13 Akim Demaille <akim@epita.fr>
213
214 * src/closure.c (closure): Use nrules instead of playing tricks
215 with BITS_PER_WORD.
216
2e729273
AD
2172001-12-13 Akim Demaille <akim@epita.fr>
218
219 * src/print.c (print_actions): Output the handling of `$' as the
220 traces do: shifting the token EOF. Before EOF was treated as a
221 nonterminal.
222 * tests/regression.at: Adjust some tests.
223 * src/print_graph.c (print_core): Complete the set of items via
224 closure. The next-to-final and final states are still unsatisfying,
225 but that's to be addressed elsewhere.
226 No longer output the rule numbers, but do output the state number.
227 A single loop for the shifts + gotos is enough, but picked a
228 distinct color for each.
229 (print_graph): Initialize and finalize closure.
230
107f7dfb
AD
2312001-12-13 Akim Demaille <akim@epita.fr>
232
233 * src/reader.c (readgram): Remove dead code, an strip useless
234 braces.
235 (get_type): Remove, unused.
236
9b53a24f
AD
2372001-12-12 Akim Demaille <akim@epita.fr>
238
239 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
240 on that of lib/error.c.
241
dbfb6dcd
AD
2422001-12-12 Akim Demaille <akim@epita.fr>
243
244 Some hosts don't like `/' in includes.
245
246 * src/system.h: Include libgettext.h without qualifying the path.
247 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
248 $(top_srcdir).
249
c25fb648
MA
2502001-12-11 Marc Autret <autret_m@epita.fr>
251
252 * src/output.c (output_parser): Remove useless muscle.
253
710ddc4f
MA
2542001-12-11 Marc Autret <autret_m@epita.fr>
255
256 * src/bison.simple: Remove #line just before %%epilogue. It
257 is now handled in ...
258 * src/reader.c (read_additionnal_code): Add the output of a
259 #line for the epilogue.
260
e83d80b8
MA
2612001-12-10 Marc Autret <autret_m@epita.fr>
262
927c1557 263 * src/reader.c (copy_definition): Re-use CPP-outed code which
e83d80b8
MA
264 replace precedent remove.
265 * src/bison.simple: Remove #line before %%prologue because
266 %%input-line is wrong at this time.
267
971d5158
MA
2682001-12-10 Marc Autret <autret_m@epita.fr>
269
270 * src/reader.c (symbols_output): Clean up.
927c1557 271 * src/output.c (output_gram, output): Clean up.
971d5158 272
5edafffd
AD
2732001-12-10 Akim Demaille <akim@epita.fr>
274
275 * src/lalr.c (initialize_lookaheads): New. Extracted from...
276 * src/LR0.c (set_state_table): here.
277 * src/lalr.c (lalr): Call it.
278
0279f8e9
AD
2792001-12-10 Akim Demaille <akim@epita.fr>
280
281 * src/state.h (shifts): Remove the `number' member: shifts are
282 attached to state, hence no longer need to be labelled with a
283 state number.
284
190c4f5f
AD
2852001-12-10 Akim Demaille <akim@epita.fr>
286
287 Now that states have a complete set of members, the linked list of
288 shifts is useless: just fill directly the state's shifts member.
289
290 * src/state.h (shifts): Remove the `next' member.
291 * src/LR0.c (first_state, last_state): Remove.
292 Adjust the callers.
293 (augment_automaton): Don't look for the shifts that must be added
294 a shift on EOF: it is those of the state we looked for! But now,
295 since shifts are attached, it is no longer needed to looking
296 merely by its id: its number.
297
2a73b93d
AD
2982001-12-10 Akim Demaille <akim@epita.fr>
299
300 * src/LR0.c (augment_automaton): Better variable locality.
301 Remove an impossible branch: if there is a state corresponding to
302 the start symbol being shifted, then there is shift for the start
303 symbol from the initial state.
304
74392f6a
AD
3052001-12-10 Akim Demaille <akim@epita.fr>
306
307 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
308 only when appropriate: when insert_start_shifting_state' is not
309 invoked.
310 * tests/regression.at (Rule Line Numbers): Adjust.
311
37c82725
AD
3122001-12-10 Akim Demaille <akim@epita.fr>
313
314 * src/LR0.c (augment_automaton): Now that all states have shifts,
315 merge the two cases addition shifts to the initial state.
316
6a164e0c
AD
3172001-12-10 Akim Demaille <akim@epita.fr>
318
319 * src/lalr.c (set_state_table): Move to...
320 * src/LR0.c: here.
321 * src/lalr.c (lalr): Don't call it...
322 * src/LR0.c (generate_states): do it.
323 * src/LR0.h (first_state): Remove, only the table is used.
324
7215de24
AD
3252001-12-10 Akim Demaille <akim@epita.fr>
326
327 * src/LR0.h (first_shift, first_reduction): Remove.
328 * src/lalr.c: Don't use first_shift: find shifts through the
329 states.
330
80e25d4d
AD
3312001-12-10 Akim Demaille <akim@epita.fr>
332
333 * src/LR0.c: Attach shifts to states as soon as they are
334 computed.
335 * src/lalr.c (set_state_table): Instead of assigning shifts to
336 state, just assert that the mapping was properly done.
337
0ab3728b
AD
3382001-12-10 Akim Demaille <akim@epita.fr>
339
340 * src/LR0.c (insert_start_shift): Rename as...
341 (insert_start_shifting_state): this.
342 (insert_eof_shifting_state, insert_accepting_state): New.
343 (augment_automaton): Adjust.
344 Better locality of the variables.
345 When looking if the start_symbol is shifted from the initial
346 state, using `while (... symbol != start_symbol ...)' sounds
347 better than `while (... symbol < start_symbol ...)': If fail
348 to see how the order between symbols could be relevant!
349
78af9bbc
AD
3502001-12-10 Akim Demaille <akim@epita.fr>
351
352 * src/getargs.h: Don't declare `spec_name_prefix' and
353 `spec_file_prefix', declared by src/files.h.
354 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
355 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
356 * src/output.c (prepare): Adjust.
357 * src/reader.c (symbols_output): Likewise.
358 * src/vmsgetargs.c: Vaguely adjust, but who cares?
359
bdef2a41
AD
3602001-12-10 Akim Demaille <akim@epita.fr>
361
362 * src/muscle_tab.c (muscle_init): NULL is a better default than
363 `"0"'.
364
3735969c
AD
3652001-12-10 Akim Demaille <akim@epita.fr>
366
367 * src/reader.c (reader): Calling symbols_output once is enough.
368
49701457
AD
3692001-12-10 Akim Demaille <akim@epita.fr>
370
371 Now that states have a complete set of members, the linked list of
372 reductions is useless: just fill directly the state's reductions
373 member.
374
375 * src/state.h (struct reductions): Remove member `number' and
376 `next'.
377 * src/LR0.c (first_reduction, last_reduction): Remove.
378 (save_reductions): Don't link the new reductions, store them in
379 this_state.
380 * src/lalr.c (set_state_table): No need to attach reductions to
381 states, it's already done.
382 * src/output.c (output_actions): No longer free the shifts, then
383 the reductions, then the states: free all the states and their
384 members.
385
0edad749
AD
3862001-12-10 Akim Demaille <akim@epita.fr>
387
388 * src/options.c (OPTN, DRTV, BOTH): New.
389 (option_table): Use them.
390
0edad749
AD
391 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
392 the job of system.h.
393 * src/options.c: Don't include stdio.h and xalloc.h for the same
394 reasons.
395
5449dd0f
AD
3962001-12-10 Akim Demaille <akim@epita.fr>
397
398 * src/output.c (output, prepare): Make sure the values of the
399 muscles `action' and `prologue' are 0-terminated.
400
a870c567
AD
4012001-12-10 Akim Demaille <akim@epita.fr>
402
403 Clean up GCC warnings.
404
405 * src/reader.c (copy_action): `buf' is not used.
406 (parse_skel_decl): Be static.
407 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
408 * src/options.h (create_long_option_table): Have a real prototype.
409 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
410 (hash_delete_at): Return const void *.
411 Adjust casts to preserve the const.
412
80df8768
AD
4132001-12-10 Akim Demaille <akim@epita.fr>
414
415 * configure.in: Require 2.52g.
416 M4 is not needed, but AUTOM4TE is.
417 * m4/m4.m4: Remove.
418 * tests/Makefile.am: Adjust.
419
f693ad14
AD
4202001-12-10 Akim Demaille <akim@epita.fr>
421
422 One structure for states is enough, even though theoretically
423 there are LR(0) states and LALR(1) states.
424
425 * src/lalr.h (state_t): Remove.
426 (state_table): Be state_t **, not state_t *.
427 * src/state.h (core, CORE_ALLOC): Rename as...
428 (state_t, STATE_ALLOC): this.
429 Add the LALR(1) members: shifts, reductions, errs.
430 * src/LR0.c (state_table): Rename as...
431 (state_hash): this, to avoid name clashes with the global
432 `state_table'.
433 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
434 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
435
74ffbcb6
AD
4362001-12-10 Akim Demaille <akim@epita.fr>
437
438 Bison dumps core on bash.y.
439 Reported by Pascal Bart.
440
441 * src/warshall.c (bitmatrix_print): New.
442 (TC): Use it.
443 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
444 j must be the outer loop.
445 * tests/regression.at (Broken Closure): New.
446
07708e19
AD
4472001-12-05 Akim Demaille <akim@epita.fr>
448
449 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
450 its argument.
451