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