]> git.saurik.com Git - bison.git/blame - ChangeLog
* src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
[bison.git] / ChangeLog
CommitLineData
927c1557
PE
12001-12-13 Paul Eggert <eggert@twinsun.com>
2
3 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
4 Do not infringe on the global user namespace when using C++.
5 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
6 All uses of `fprintf' and `stderr' changed.
7
8 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
9
ed8e1f68
AD
102001-12-13 Akim Demaille <akim@epita.fr>
11
12 The computation of nullable is broken: it doesn't handle empty
13 RHS's properly.
14
15 * tests/torture.at (GNU AWK Grammar): New.
16 * tests/sets.at (Nullable): New.
17 * src/nullable.c (set_nullable): Instead of blindly looping over
18 `ritems', loop over the rules, and then over their rhs's.
19
20 Work around Autotest bugs.
21
22 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
23 frame, because Autotest understand lines starting with a `+' as
24 traces from the shell. Then, they are not processed properly.
25 Admittedly an Autotest bug, but we don't have time to wait for
26 Autotest to catch up.
27 * tests/regression.at (Broken Closure): Adjust to the new table
28 frames.
29 Move to...
30 * tests/sets.at: here.
31
cb581495
AD
322001-12-13 Akim Demaille <akim@epita.fr>
33
34 * src/closure.c (closure): Use nrules instead of playing tricks
35 with BITS_PER_WORD.
36
2e729273
AD
372001-12-13 Akim Demaille <akim@epita.fr>
38
39 * src/print.c (print_actions): Output the handling of `$' as the
40 traces do: shifting the token EOF. Before EOF was treated as a
41 nonterminal.
42 * tests/regression.at: Adjust some tests.
43 * src/print_graph.c (print_core): Complete the set of items via
44 closure. The next-to-final and final states are still unsatisfying,
45 but that's to be addressed elsewhere.
46 No longer output the rule numbers, but do output the state number.
47 A single loop for the shifts + gotos is enough, but picked a
48 distinct color for each.
49 (print_graph): Initialize and finalize closure.
50
107f7dfb
AD
512001-12-13 Akim Demaille <akim@epita.fr>
52
53 * src/reader.c (readgram): Remove dead code, an strip useless
54 braces.
55 (get_type): Remove, unused.
56
9b53a24f
AD
572001-12-12 Akim Demaille <akim@epita.fr>
58
59 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
60 on that of lib/error.c.
61
dbfb6dcd
AD
622001-12-12 Akim Demaille <akim@epita.fr>
63
64 Some hosts don't like `/' in includes.
65
66 * src/system.h: Include libgettext.h without qualifying the path.
67 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
68 $(top_srcdir).
69
c25fb648
MA
702001-12-11 Marc Autret <autret_m@epita.fr>
71
72 * src/output.c (output_parser): Remove useless muscle.
73
710ddc4f
MA
742001-12-11 Marc Autret <autret_m@epita.fr>
75
76 * src/bison.simple: Remove #line just before %%epilogue. It
77 is now handled in ...
78 * src/reader.c (read_additionnal_code): Add the output of a
79 #line for the epilogue.
80
e83d80b8
MA
812001-12-10 Marc Autret <autret_m@epita.fr>
82
927c1557 83 * src/reader.c (copy_definition): Re-use CPP-outed code which
e83d80b8
MA
84 replace precedent remove.
85 * src/bison.simple: Remove #line before %%prologue because
86 %%input-line is wrong at this time.
87
971d5158
MA
882001-12-10 Marc Autret <autret_m@epita.fr>
89
90 * src/reader.c (symbols_output): Clean up.
927c1557 91 * src/output.c (output_gram, output): Clean up.
971d5158 92
5edafffd
AD
932001-12-10 Akim Demaille <akim@epita.fr>
94
95 * src/lalr.c (initialize_lookaheads): New. Extracted from...
96 * src/LR0.c (set_state_table): here.
97 * src/lalr.c (lalr): Call it.
98
0279f8e9
AD
992001-12-10 Akim Demaille <akim@epita.fr>
100
101 * src/state.h (shifts): Remove the `number' member: shifts are
102 attached to state, hence no longer need to be labelled with a
103 state number.
104
190c4f5f
AD
1052001-12-10 Akim Demaille <akim@epita.fr>
106
107 Now that states have a complete set of members, the linked list of
108 shifts is useless: just fill directly the state's shifts member.
109
110 * src/state.h (shifts): Remove the `next' member.
111 * src/LR0.c (first_state, last_state): Remove.
112 Adjust the callers.
113 (augment_automaton): Don't look for the shifts that must be added
114 a shift on EOF: it is those of the state we looked for! But now,
115 since shifts are attached, it is no longer needed to looking
116 merely by its id: its number.
117
2a73b93d
AD
1182001-12-10 Akim Demaille <akim@epita.fr>
119
120 * src/LR0.c (augment_automaton): Better variable locality.
121 Remove an impossible branch: if there is a state corresponding to
122 the start symbol being shifted, then there is shift for the start
123 symbol from the initial state.
124
74392f6a
AD
1252001-12-10 Akim Demaille <akim@epita.fr>
126
127 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
128 only when appropriate: when insert_start_shifting_state' is not
129 invoked.
130 * tests/regression.at (Rule Line Numbers): Adjust.
131
37c82725
AD
1322001-12-10 Akim Demaille <akim@epita.fr>
133
134 * src/LR0.c (augment_automaton): Now that all states have shifts,
135 merge the two cases addition shifts to the initial state.
136
6a164e0c
AD
1372001-12-10 Akim Demaille <akim@epita.fr>
138
139 * src/lalr.c (set_state_table): Move to...
140 * src/LR0.c: here.
141 * src/lalr.c (lalr): Don't call it...
142 * src/LR0.c (generate_states): do it.
143 * src/LR0.h (first_state): Remove, only the table is used.
144
7215de24
AD
1452001-12-10 Akim Demaille <akim@epita.fr>
146
147 * src/LR0.h (first_shift, first_reduction): Remove.
148 * src/lalr.c: Don't use first_shift: find shifts through the
149 states.
150
80e25d4d
AD
1512001-12-10 Akim Demaille <akim@epita.fr>
152
153 * src/LR0.c: Attach shifts to states as soon as they are
154 computed.
155 * src/lalr.c (set_state_table): Instead of assigning shifts to
156 state, just assert that the mapping was properly done.
157
0ab3728b
AD
1582001-12-10 Akim Demaille <akim@epita.fr>
159
160 * src/LR0.c (insert_start_shift): Rename as...
161 (insert_start_shifting_state): this.
162 (insert_eof_shifting_state, insert_accepting_state): New.
163 (augment_automaton): Adjust.
164 Better locality of the variables.
165 When looking if the start_symbol is shifted from the initial
166 state, using `while (... symbol != start_symbol ...)' sounds
167 better than `while (... symbol < start_symbol ...)': If fail
168 to see how the order between symbols could be relevant!
169
78af9bbc
AD
1702001-12-10 Akim Demaille <akim@epita.fr>
171
172 * src/getargs.h: Don't declare `spec_name_prefix' and
173 `spec_file_prefix', declared by src/files.h.
174 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
175 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
176 * src/output.c (prepare): Adjust.
177 * src/reader.c (symbols_output): Likewise.
178 * src/vmsgetargs.c: Vaguely adjust, but who cares?
179
bdef2a41
AD
1802001-12-10 Akim Demaille <akim@epita.fr>
181
182 * src/muscle_tab.c (muscle_init): NULL is a better default than
183 `"0"'.
184
3735969c
AD
1852001-12-10 Akim Demaille <akim@epita.fr>
186
187 * src/reader.c (reader): Calling symbols_output once is enough.
188
49701457
AD
1892001-12-10 Akim Demaille <akim@epita.fr>
190
191 Now that states have a complete set of members, the linked list of
192 reductions is useless: just fill directly the state's reductions
193 member.
194
195 * src/state.h (struct reductions): Remove member `number' and
196 `next'.
197 * src/LR0.c (first_reduction, last_reduction): Remove.
198 (save_reductions): Don't link the new reductions, store them in
199 this_state.
200 * src/lalr.c (set_state_table): No need to attach reductions to
201 states, it's already done.
202 * src/output.c (output_actions): No longer free the shifts, then
203 the reductions, then the states: free all the states and their
204 members.
205
0edad749
AD
2062001-12-10 Akim Demaille <akim@epita.fr>
207
208 * src/options.c (OPTN, DRTV, BOTH): New.
209 (option_table): Use them.
210
0edad749
AD
211 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
212 the job of system.h.
213 * src/options.c: Don't include stdio.h and xalloc.h for the same
214 reasons.
215
5449dd0f
AD
2162001-12-10 Akim Demaille <akim@epita.fr>
217
218 * src/output.c (output, prepare): Make sure the values of the
219 muscles `action' and `prologue' are 0-terminated.
220
a870c567
AD
2212001-12-10 Akim Demaille <akim@epita.fr>
222
223 Clean up GCC warnings.
224
225 * src/reader.c (copy_action): `buf' is not used.
226 (parse_skel_decl): Be static.
227 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
228 * src/options.h (create_long_option_table): Have a real prototype.
229 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
230 (hash_delete_at): Return const void *.
231 Adjust casts to preserve the const.
232
80df8768
AD
2332001-12-10 Akim Demaille <akim@epita.fr>
234
235 * configure.in: Require 2.52g.
236 M4 is not needed, but AUTOM4TE is.
237 * m4/m4.m4: Remove.
238 * tests/Makefile.am: Adjust.
239
f693ad14
AD
2402001-12-10 Akim Demaille <akim@epita.fr>
241
242 One structure for states is enough, even though theoretically
243 there are LR(0) states and LALR(1) states.
244
245 * src/lalr.h (state_t): Remove.
246 (state_table): Be state_t **, not state_t *.
247 * src/state.h (core, CORE_ALLOC): Rename as...
248 (state_t, STATE_ALLOC): this.
249 Add the LALR(1) members: shifts, reductions, errs.
250 * src/LR0.c (state_table): Rename as...
251 (state_hash): this, to avoid name clashes with the global
252 `state_table'.
253 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
254 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
255
74ffbcb6
AD
2562001-12-10 Akim Demaille <akim@epita.fr>
257
258 Bison dumps core on bash.y.
259 Reported by Pascal Bart.
260
261 * src/warshall.c (bitmatrix_print): New.
262 (TC): Use it.
263 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
264 j must be the outer loop.
265 * tests/regression.at (Broken Closure): New.
266
07708e19
AD
2672001-12-05 Akim Demaille <akim@epita.fr>
268
269 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
270 its argument.
271