]> git.saurik.com Git - bison.git/blame - ChangeLog
Regen.
[bison.git] / ChangeLog
CommitLineData
fbc8ecb7
MA
12001-12-16 Marc Autret <autret_m@epita.fr>
2
3 * src/output.c (actions_output): Fix. When we use %no-lines,
4 there is one less line per action.
5
f0440388
MA
62001-12-16 Marc Autret <autret_m@epita.fr>
7
8 * src/bison.simple: Remove a useless #line directive.
9 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
10 * src/output.c (get_lines_number): New.
11 (output_parser): Adjust, now takes care about the lines of a
12 output muscles.
13 Fix line numbering.
14 (actions_output): Computes the number of lines taken by actions.
15 (output_master_parser): Insert new skeleton which is the name of
16 the output parser file name.
17
a79986b8
MA
182001-12-15 Marc Autret <autret_m@epita.fr>
19
20 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
21
4ec8e00f
MA
222001-12-15 Marc Autret <autret_m@epita.fr>
23
24 * src/output.c (output_gram): Keep track of the hairy one.
25
1a4648ff
AD
262001-12-15 Akim Demaille <akim@epita.fr>
27
28 Make `make distcheck' work.
29
30 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
31 system.h which uses libgettext.h.
32
9c2c67e6
AD
332001-12-15 Akim Demaille <akim@epita.fr>
34
35 * src/nullable.c (set_nullable): Useless rules must be skipped,
36 otherwise, since we range over their symbols, we might look at a
37 nonterminal which no longer ``exists'', i.e., it is not counted in
38 `nvars', hence we overflow our arrays.
39
93ede233
AD
402001-12-15 Akim Demaille <akim@epita.fr>
41
42 The header can also be produced directly, without any obstack!
43 Yahoo!
44
45 * src/files.c, src/files.h (defines_obstack): Remove.
46 (compute_header_macro): Global.
47 (defines_obstack_save): Remove.
48 * src/reader.c (parse_union_decl): No longer output to
49 defines_obstack: its content can be found in the `stype' muscle
50 anyway.
51 (output_token_translations): Merge into...
52 (symbols_output): this.
53 Rename as...
54 (symbols_save): this.
55 (reader): Adjust.
56 * src/output.c (header_output): New.
57 (output): Call it.
58
2666f928
AD
592001-12-15 Akim Demaille <akim@epita.fr>
60
61 * src/reader.c (parse_union_decl): Instead of handling two obstack
62 simultaneously, use one to define the `stype' muscle, and use the
63 value of the latter to fill defines_obstack.
64 (copy_comment): Remove.
65 (copy_comment2): Work for a single obstack.
66 Rename as...
67 (copy_comment): this.
68
428046f8
AD
692001-12-15 Akim Demaille <akim@epita.fr>
70
71 * src/lex.c, src/lex.h (xgetc): No longer static.
72 * src/reader.c (parse_union_decl): Revamp.
73
ea52d706
AD
742001-12-15 Akim Demaille <akim@epita.fr>
75
76 Still making progress in separating Bison into (i) input, (ii)
77 process, (iii) output: now we can directly output the parser file
78 without using table_obstack at all.
79
80 * src/files.c, src/files.h (table_obstack): Bye bye.
81 (parser_file_name): New.
82 * src/files.c (compute_output_file_names): Compute it.
83 * src/output.c (actions_output, output_parser)
84 (output_master_parser): To a file instead of an obstack.
85
3f96f4dc
AD
862001-12-15 Akim Demaille <akim@epita.fr>
87
88 Attach actions to rules, instead of pre-outputting them to
89 actions_obstack.
90
91 * src/gram.h (rule_t): action and action_line are new members.
92 * src/reader.c (symbol_list): Likewise.
93 (copy_action): Save the actions within the rule.
94 (packgram): Save them in rule_table.
95 * src/output.c (actions_output): New.
96 (output_parser): Use it on `%%actions'.
97 (output_rule_data): Don't free rule_table.
98 (output): Do it.
99 (prepare): Don't save the `action' muscle.
100 * src/bison.simple: s/%%action/%%actions/.
101
51576fb3
AD
1022001-12-15 Akim Demaille <akim@epita.fr>
103
104 * src/reader.c (copy_action): When --yacc, don't append a `;'
105 to the user action: let it fail if lacking.
106 Suggested by Aharon Robbins and Tom Tromey.
107
2648a72d
AD
1082001-12-14 Akim Demaille <akim@epita.fr>
109
110 * src/lex.c (literalchar): Simply return the char you decoded, non
111 longer mess around with obstacks and int pointers.
112 Adjust all callers.
113
92790e5b
AD
1142001-12-14 Akim Demaille <akim@epita.fr>
115
116 * src/lex.c (literalchar): Don't escape the special characters,
117 just decode them, and keep them as char (before, eol was output as
118 the 2 char string `\n' etc.).
119 * src/output.c (output_rule_data): Use quotearg to output the
120 token strings.
121
927c1557
PE
1222001-12-13 Paul Eggert <eggert@twinsun.com>
123
124 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
125 Do not infringe on the global user namespace when using C++.
126 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
127 All uses of `fprintf' and `stderr' changed.
128
129 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
130
ed8e1f68
AD
1312001-12-13 Akim Demaille <akim@epita.fr>
132
133 The computation of nullable is broken: it doesn't handle empty
134 RHS's properly.
135
136 * tests/torture.at (GNU AWK Grammar): New.
137 * tests/sets.at (Nullable): New.
138 * src/nullable.c (set_nullable): Instead of blindly looping over
139 `ritems', loop over the rules, and then over their rhs's.
140
141 Work around Autotest bugs.
142
143 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
144 frame, because Autotest understand lines starting with a `+' as
145 traces from the shell. Then, they are not processed properly.
146 Admittedly an Autotest bug, but we don't have time to wait for
147 Autotest to catch up.
148 * tests/regression.at (Broken Closure): Adjust to the new table
149 frames.
150 Move to...
151 * tests/sets.at: here.
152
cb581495
AD
1532001-12-13 Akim Demaille <akim@epita.fr>
154
155 * src/closure.c (closure): Use nrules instead of playing tricks
156 with BITS_PER_WORD.
157
2e729273
AD
1582001-12-13 Akim Demaille <akim@epita.fr>
159
160 * src/print.c (print_actions): Output the handling of `$' as the
161 traces do: shifting the token EOF. Before EOF was treated as a
162 nonterminal.
163 * tests/regression.at: Adjust some tests.
164 * src/print_graph.c (print_core): Complete the set of items via
165 closure. The next-to-final and final states are still unsatisfying,
166 but that's to be addressed elsewhere.
167 No longer output the rule numbers, but do output the state number.
168 A single loop for the shifts + gotos is enough, but picked a
169 distinct color for each.
170 (print_graph): Initialize and finalize closure.
171
107f7dfb
AD
1722001-12-13 Akim Demaille <akim@epita.fr>
173
174 * src/reader.c (readgram): Remove dead code, an strip useless
175 braces.
176 (get_type): Remove, unused.
177
9b53a24f
AD
1782001-12-12 Akim Demaille <akim@epita.fr>
179
180 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
181 on that of lib/error.c.
182
dbfb6dcd
AD
1832001-12-12 Akim Demaille <akim@epita.fr>
184
185 Some hosts don't like `/' in includes.
186
187 * src/system.h: Include libgettext.h without qualifying the path.
188 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
189 $(top_srcdir).
190
c25fb648
MA
1912001-12-11 Marc Autret <autret_m@epita.fr>
192
193 * src/output.c (output_parser): Remove useless muscle.
194
710ddc4f
MA
1952001-12-11 Marc Autret <autret_m@epita.fr>
196
197 * src/bison.simple: Remove #line just before %%epilogue. It
198 is now handled in ...
199 * src/reader.c (read_additionnal_code): Add the output of a
200 #line for the epilogue.
201
e83d80b8
MA
2022001-12-10 Marc Autret <autret_m@epita.fr>
203
927c1557 204 * src/reader.c (copy_definition): Re-use CPP-outed code which
e83d80b8
MA
205 replace precedent remove.
206 * src/bison.simple: Remove #line before %%prologue because
207 %%input-line is wrong at this time.
208
971d5158
MA
2092001-12-10 Marc Autret <autret_m@epita.fr>
210
211 * src/reader.c (symbols_output): Clean up.
927c1557 212 * src/output.c (output_gram, output): Clean up.
971d5158 213
5edafffd
AD
2142001-12-10 Akim Demaille <akim@epita.fr>
215
216 * src/lalr.c (initialize_lookaheads): New. Extracted from...
217 * src/LR0.c (set_state_table): here.
218 * src/lalr.c (lalr): Call it.
219
0279f8e9
AD
2202001-12-10 Akim Demaille <akim@epita.fr>
221
222 * src/state.h (shifts): Remove the `number' member: shifts are
223 attached to state, hence no longer need to be labelled with a
224 state number.
225
190c4f5f
AD
2262001-12-10 Akim Demaille <akim@epita.fr>
227
228 Now that states have a complete set of members, the linked list of
229 shifts is useless: just fill directly the state's shifts member.
230
231 * src/state.h (shifts): Remove the `next' member.
232 * src/LR0.c (first_state, last_state): Remove.
233 Adjust the callers.
234 (augment_automaton): Don't look for the shifts that must be added
235 a shift on EOF: it is those of the state we looked for! But now,
236 since shifts are attached, it is no longer needed to looking
237 merely by its id: its number.
238
2a73b93d
AD
2392001-12-10 Akim Demaille <akim@epita.fr>
240
241 * src/LR0.c (augment_automaton): Better variable locality.
242 Remove an impossible branch: if there is a state corresponding to
243 the start symbol being shifted, then there is shift for the start
244 symbol from the initial state.
245
74392f6a
AD
2462001-12-10 Akim Demaille <akim@epita.fr>
247
248 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
249 only when appropriate: when insert_start_shifting_state' is not
250 invoked.
251 * tests/regression.at (Rule Line Numbers): Adjust.
252
37c82725
AD
2532001-12-10 Akim Demaille <akim@epita.fr>
254
255 * src/LR0.c (augment_automaton): Now that all states have shifts,
256 merge the two cases addition shifts to the initial state.
257
6a164e0c
AD
2582001-12-10 Akim Demaille <akim@epita.fr>
259
260 * src/lalr.c (set_state_table): Move to...
261 * src/LR0.c: here.
262 * src/lalr.c (lalr): Don't call it...
263 * src/LR0.c (generate_states): do it.
264 * src/LR0.h (first_state): Remove, only the table is used.
265
7215de24
AD
2662001-12-10 Akim Demaille <akim@epita.fr>
267
268 * src/LR0.h (first_shift, first_reduction): Remove.
269 * src/lalr.c: Don't use first_shift: find shifts through the
270 states.
271
80e25d4d
AD
2722001-12-10 Akim Demaille <akim@epita.fr>
273
274 * src/LR0.c: Attach shifts to states as soon as they are
275 computed.
276 * src/lalr.c (set_state_table): Instead of assigning shifts to
277 state, just assert that the mapping was properly done.
278
0ab3728b
AD
2792001-12-10 Akim Demaille <akim@epita.fr>
280
281 * src/LR0.c (insert_start_shift): Rename as...
282 (insert_start_shifting_state): this.
283 (insert_eof_shifting_state, insert_accepting_state): New.
284 (augment_automaton): Adjust.
285 Better locality of the variables.
286 When looking if the start_symbol is shifted from the initial
287 state, using `while (... symbol != start_symbol ...)' sounds
288 better than `while (... symbol < start_symbol ...)': If fail
289 to see how the order between symbols could be relevant!
290
78af9bbc
AD
2912001-12-10 Akim Demaille <akim@epita.fr>
292
293 * src/getargs.h: Don't declare `spec_name_prefix' and
294 `spec_file_prefix', declared by src/files.h.
295 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
296 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
297 * src/output.c (prepare): Adjust.
298 * src/reader.c (symbols_output): Likewise.
299 * src/vmsgetargs.c: Vaguely adjust, but who cares?
300
bdef2a41
AD
3012001-12-10 Akim Demaille <akim@epita.fr>
302
303 * src/muscle_tab.c (muscle_init): NULL is a better default than
304 `"0"'.
305
3735969c
AD
3062001-12-10 Akim Demaille <akim@epita.fr>
307
308 * src/reader.c (reader): Calling symbols_output once is enough.
309
49701457
AD
3102001-12-10 Akim Demaille <akim@epita.fr>
311
312 Now that states have a complete set of members, the linked list of
313 reductions is useless: just fill directly the state's reductions
314 member.
315
316 * src/state.h (struct reductions): Remove member `number' and
317 `next'.
318 * src/LR0.c (first_reduction, last_reduction): Remove.
319 (save_reductions): Don't link the new reductions, store them in
320 this_state.
321 * src/lalr.c (set_state_table): No need to attach reductions to
322 states, it's already done.
323 * src/output.c (output_actions): No longer free the shifts, then
324 the reductions, then the states: free all the states and their
325 members.
326
0edad749
AD
3272001-12-10 Akim Demaille <akim@epita.fr>
328
329 * src/options.c (OPTN, DRTV, BOTH): New.
330 (option_table): Use them.
331
0edad749
AD
332 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
333 the job of system.h.
334 * src/options.c: Don't include stdio.h and xalloc.h for the same
335 reasons.
336
5449dd0f
AD
3372001-12-10 Akim Demaille <akim@epita.fr>
338
339 * src/output.c (output, prepare): Make sure the values of the
340 muscles `action' and `prologue' are 0-terminated.
341
a870c567
AD
3422001-12-10 Akim Demaille <akim@epita.fr>
343
344 Clean up GCC warnings.
345
346 * src/reader.c (copy_action): `buf' is not used.
347 (parse_skel_decl): Be static.
348 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
349 * src/options.h (create_long_option_table): Have a real prototype.
350 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
351 (hash_delete_at): Return const void *.
352 Adjust casts to preserve the const.
353
80df8768
AD
3542001-12-10 Akim Demaille <akim@epita.fr>
355
356 * configure.in: Require 2.52g.
357 M4 is not needed, but AUTOM4TE is.
358 * m4/m4.m4: Remove.
359 * tests/Makefile.am: Adjust.
360
f693ad14
AD
3612001-12-10 Akim Demaille <akim@epita.fr>
362
363 One structure for states is enough, even though theoretically
364 there are LR(0) states and LALR(1) states.
365
366 * src/lalr.h (state_t): Remove.
367 (state_table): Be state_t **, not state_t *.
368 * src/state.h (core, CORE_ALLOC): Rename as...
369 (state_t, STATE_ALLOC): this.
370 Add the LALR(1) members: shifts, reductions, errs.
371 * src/LR0.c (state_table): Rename as...
372 (state_hash): this, to avoid name clashes with the global
373 `state_table'.
374 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
375 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
376
74ffbcb6
AD
3772001-12-10 Akim Demaille <akim@epita.fr>
378
379 Bison dumps core on bash.y.
380 Reported by Pascal Bart.
381
382 * src/warshall.c (bitmatrix_print): New.
383 (TC): Use it.
384 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
385 j must be the outer loop.
386 * tests/regression.at (Broken Closure): New.
387
07708e19
AD
3882001-12-05 Akim Demaille <akim@epita.fr>
389
390 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
391 its argument.
392