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