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