Line 0
Link Here
|
|
|
1 |
--- tools/zoggy/pa_zog.ml.orig Wed Aug 4 20:39:32 2004 |
2 |
+++ tools/zoggy/pa_zog.ml Thu Apr 20 02:41:38 2006 |
3 |
@@ -49,7 +49,7 @@ |
4 |
let parse_string loc = |
5 |
function |
6 |
"false" -> |
7 |
- let loc = |
8 |
+ let _loc = |
9 |
( |
10 |
{ Lexing.dummy_pos with Lexing.pos_cnum = fst loc } , |
11 |
{ Lexing.dummy_pos with Lexing.pos_cnum = snd loc } |
12 |
@@ -57,7 +57,7 @@ |
13 |
in |
14 |
<:expr< False >> |
15 |
| "true" -> |
16 |
- let loc = |
17 |
+ let _loc = |
18 |
( |
19 |
{ Lexing.dummy_pos with Lexing.pos_cnum = fst loc } , |
20 |
{ Lexing.dummy_pos with Lexing.pos_cnum = snd loc } |
21 |
@@ -108,7 +108,7 @@ |
22 |
parse_prop_value p |
23 |
with |
24 |
Not_found -> |
25 |
- let loc = |
26 |
+ let _loc = |
27 |
( |
28 |
{ Lexing.dummy_pos with Lexing.pos_cnum = fst loc } , |
29 |
{ Lexing.dummy_pos with Lexing.pos_cnum = snd loc } |
30 |
@@ -242,7 +242,7 @@ |
31 |
(_, n, _, _) -> n |
32 |
|
33 |
let ast_of_creation_options_code loc ele f = |
34 |
- let loc = |
35 |
+ let _loc = |
36 |
( |
37 |
{ Lexing.dummy_pos with Lexing.pos_cnum = fst loc } , |
38 |
{ Lexing.dummy_pos with Lexing.pos_cnum = snd loc } |
39 |
@@ -286,7 +286,7 @@ |
40 |
match prop.prop_kind with |
41 |
Expand | Fill | Padding -> |
42 |
if must_gen prop then |
43 |
- let loc = |
44 |
+ let _loc = |
45 |
( |
46 |
{ Lexing.dummy_pos with Lexing.pos_cnum = fst loc } , |
47 |
{ Lexing.dummy_pos with Lexing.pos_cnum = snd loc } |
48 |
@@ -306,7 +306,7 @@ |
49 |
No_pack -> f |
50 |
| Insert_page -> |
51 |
let g = |
52 |
- let loc = |
53 |
+ let _loc = |
54 |
( |
55 |
{ Lexing.dummy_pos with Lexing.pos_cnum = fst parent.name_loc } , |
56 |
{ Lexing.dummy_pos with Lexing.pos_cnum = snd parent.name_loc } |
57 |
@@ -315,7 +315,7 @@ |
58 |
<:expr< $lid:parent.name$ >> |
59 |
in |
60 |
let loc1 = loc in |
61 |
- let loc = |
62 |
+ let _loc = |
63 |
( |
64 |
{ Lexing.dummy_pos with Lexing.pos_cnum = fst loc } , |
65 |
{ Lexing.dummy_pos with Lexing.pos_cnum = snd loc } |
66 |
@@ -332,7 +332,7 @@ |
67 |
>> |
68 |
| _ -> |
69 |
let g = |
70 |
- let loc = |
71 |
+ let _loc = |
72 |
( |
73 |
{ Lexing.dummy_pos with Lexing.pos_cnum = fst parent.name_loc } , |
74 |
{ Lexing.dummy_pos with Lexing.pos_cnum = snd parent.name_loc } |
75 |
@@ -341,7 +341,7 @@ |
76 |
<:expr< $lid:parent.name$ >> |
77 |
in |
78 |
let loc1 = loc in |
79 |
- let loc = |
80 |
+ let _loc = |
81 |
( |
82 |
{ Lexing.dummy_pos with Lexing.pos_cnum = fst loc } , |
83 |
{ Lexing.dummy_pos with Lexing.pos_cnum = snd loc } |
84 |
@@ -358,7 +358,7 @@ |
85 |
| Insert_page | No_pack -> f |
86 |
with |
87 |
Failure s -> |
88 |
- let loc = |
89 |
+ let _loc = |
90 |
( |
91 |
{ Lexing.dummy_pos with Lexing.pos_cnum = fst loc } , |
92 |
{ Lexing.dummy_pos with Lexing.pos_cnum = snd loc } |
93 |
@@ -375,7 +375,7 @@ |
94 |
| Insert_page -> |
95 |
|
96 |
let g = |
97 |
- let loc = |
98 |
+ let _loc = |
99 |
( |
100 |
{ Lexing.dummy_pos with Lexing.pos_cnum = fst parent.name_loc } , |
101 |
{ Lexing.dummy_pos with Lexing.pos_cnum = snd parent.name_loc } |
102 |
@@ -384,7 +384,7 @@ |
103 |
<:expr< $lid:parent.name$>> |
104 |
in |
105 |
let n = |
106 |
- let loc = |
107 |
+ let _loc = |
108 |
( |
109 |
{ Lexing.dummy_pos with Lexing.pos_cnum = fst ele.name_loc } , |
110 |
{ Lexing.dummy_pos with Lexing.pos_cnum = snd ele.name_loc } |
111 |
@@ -393,7 +393,7 @@ |
112 |
<:expr< $lid:ele.name$ >> |
113 |
in |
114 |
let loc1 = loc in |
115 |
- let loc = |
116 |
+ let _loc = |
117 |
( |
118 |
{ Lexing.dummy_pos with Lexing.pos_cnum = fst loc } , |
119 |
{ Lexing.dummy_pos with Lexing.pos_cnum = snd loc } |
120 |
@@ -412,7 +412,7 @@ |
121 |
| _ -> |
122 |
|
123 |
let g = |
124 |
- let loc = |
125 |
+ let _loc = |
126 |
( |
127 |
{ Lexing.dummy_pos with Lexing.pos_cnum = fst parent.name_loc } , |
128 |
{ Lexing.dummy_pos with Lexing.pos_cnum = snd parent.name_loc } |
129 |
@@ -421,7 +421,7 @@ |
130 |
<:expr< $lid:parent.name$ >> |
131 |
in |
132 |
let loc1 = loc in |
133 |
- let loc = |
134 |
+ let _loc = |
135 |
( |
136 |
{ Lexing.dummy_pos with Lexing.pos_cnum = fst loc } , |
137 |
{ Lexing.dummy_pos with Lexing.pos_cnum = snd loc } |
138 |
@@ -438,7 +438,7 @@ |
139 |
| Insert_page | No_pack -> g |
140 |
in |
141 |
let n = |
142 |
- let loc = |
143 |
+ let _loc = |
144 |
( |
145 |
{ Lexing.dummy_pos with Lexing.pos_cnum = fst ele.name_loc } , |
146 |
{ Lexing.dummy_pos with Lexing.pos_cnum = snd ele.name_loc } |
147 |
@@ -449,7 +449,7 @@ |
148 |
<:class_expr< let _ = $r$ $n$ # coerce in $ce$ >> |
149 |
with |
150 |
Failure s -> |
151 |
- let loc = |
152 |
+ let _loc = |
153 |
( |
154 |
{ Lexing.dummy_pos with Lexing.pos_cnum = fst loc } , |
155 |
{ Lexing.dummy_pos with Lexing.pos_cnum = snd loc } |
156 |
@@ -485,7 +485,7 @@ |
157 |
remove_blanks (Zog_types.get_prop_value ele.props Accel_modifier) |
158 |
with |
159 |
"" -> |
160 |
- let loc = |
161 |
+ let _loc = |
162 |
( |
163 |
{ Lexing.dummy_pos with Lexing.pos_cnum = fst loc } , |
164 |
{ Lexing.dummy_pos with Lexing.pos_cnum = snd loc } |
165 |
@@ -499,7 +499,7 @@ |
166 |
remove_blanks (Zog_types.get_prop_value ele.props Accel_flags) |
167 |
with |
168 |
"" -> |
169 |
- let loc = |
170 |
+ let _loc = |
171 |
( |
172 |
{ Lexing.dummy_pos with Lexing.pos_cnum = fst loc } , |
173 |
{ Lexing.dummy_pos with Lexing.pos_cnum = snd loc } |
174 |
@@ -509,7 +509,7 @@ |
175 |
| s -> parse_string loc s |
176 |
in |
177 |
let loc1 = loc in |
178 |
- let loc = |
179 |
+ let _loc = |
180 |
( |
181 |
{ Lexing.dummy_pos with Lexing.pos_cnum = fst loc } , |
182 |
{ Lexing.dummy_pos with Lexing.pos_cnum = snd loc } |
183 |
@@ -529,7 +529,7 @@ |
184 |
List.fold_right (ast_of_post_menu_item_creation_code loc accel_name) |
185 |
ele.children ce |
186 |
in |
187 |
- let loc = |
188 |
+ let _loc = |
189 |
( |
190 |
{ Lexing.dummy_pos with Lexing.pos_cnum = fst loc } , |
191 |
{ Lexing.dummy_pos with Lexing.pos_cnum = snd loc } |
192 |
@@ -553,7 +553,7 @@ |
193 |
match win with |
194 |
None -> ce |
195 |
| Some w -> |
196 |
- let loc = |
197 |
+ let _loc = |
198 |
( |
199 |
{ Lexing.dummy_pos with Lexing.pos_cnum = fst loc } , |
200 |
{ Lexing.dummy_pos with Lexing.pos_cnum = snd loc } |
201 |
@@ -564,7 +564,7 @@ |
202 |
>> |
203 |
) |
204 |
in |
205 |
- let loc = |
206 |
+ let _loc = |
207 |
( |
208 |
{ Lexing.dummy_pos with Lexing.pos_cnum = fst loc } , |
209 |
{ Lexing.dummy_pos with Lexing.pos_cnum = snd loc } |
210 |
@@ -597,7 +597,7 @@ |
211 |
let f = |
212 |
match ele.classe, previous_opt with |
213 |
Radio_menu_item, Some e when e.classe = Radio_menu_item -> |
214 |
- let loc = |
215 |
+ let _loc = |
216 |
( |
217 |
{ Lexing.dummy_pos with Lexing.pos_cnum = fst loc } , |
218 |
{ Lexing.dummy_pos with Lexing.pos_cnum = snd loc } |
219 |
@@ -620,7 +620,7 @@ |
220 |
(* BEGIN CDK *) |
221 |
gen_anonynous_name ele; |
222 |
if ele.name = "_" then |
223 |
- let loc = |
224 |
+ let _loc = |
225 |
( |
226 |
{ Lexing.dummy_pos with Lexing.pos_cnum = fst loc } , |
227 |
{ Lexing.dummy_pos with Lexing.pos_cnum = snd loc } |
228 |
@@ -630,14 +630,14 @@ |
229 |
else |
230 |
(* END CDK *) |
231 |
let n = |
232 |
- let loc = |
233 |
+ let _loc = |
234 |
( |
235 |
{ Lexing.dummy_pos with Lexing.pos_cnum = fst ele.name_loc } , |
236 |
{ Lexing.dummy_pos with Lexing.pos_cnum = snd ele.name_loc } |
237 |
) |
238 |
in <:patt< $lid:ele.name$ >> |
239 |
in |
240 |
- let loc = |
241 |
+ let _loc = |
242 |
( |
243 |
{ Lexing.dummy_pos with Lexing.pos_cnum = fst loc } , |
244 |
{ Lexing.dummy_pos with Lexing.pos_cnum = snd loc } |
245 |
@@ -649,7 +649,7 @@ |
246 |
let cil = |
247 |
if ele.classe = Menubar then |
248 |
let accel_name = accel_group_name ele in |
249 |
- let loc = |
250 |
+ let _loc = |
251 |
( |
252 |
{ Lexing.dummy_pos with Lexing.pos_cnum = fst loc } , |
253 |
{ Lexing.dummy_pos with Lexing.pos_cnum = snd loc } |
254 |
@@ -662,7 +662,7 @@ |
255 |
gen_anonynous_name ele; |
256 |
let cil = if ele.name.[0] <> '_' then |
257 |
let n = |
258 |
- let loc = |
259 |
+ let _loc = |
260 |
( |
261 |
{ Lexing.dummy_pos with Lexing.pos_cnum = fst ele.name_loc } , |
262 |
{ Lexing.dummy_pos with Lexing.pos_cnum = snd ele.name_loc } |
263 |
@@ -670,7 +670,7 @@ |
264 |
in |
265 |
<:expr< $lid:ele.name$ >> |
266 |
in |
267 |
- let loc = |
268 |
+ let _loc = |
269 |
( |
270 |
{ Lexing.dummy_pos with Lexing.pos_cnum = fst loc } , |
271 |
{ Lexing.dummy_pos with Lexing.pos_cnum = snd loc } |
272 |
@@ -685,7 +685,7 @@ |
273 |
let cil = |
274 |
if ele.classe = Menubar then |
275 |
let accel_name = accel_group_name ele in |
276 |
- let loc = |
277 |
+ let _loc = |
278 |
( |
279 |
{ Lexing.dummy_pos with Lexing.pos_cnum = fst loc } , |
280 |
{ Lexing.dummy_pos with Lexing.pos_cnum = snd loc } |
281 |
@@ -697,7 +697,7 @@ |
282 |
(* BEGIN CDK *) |
283 |
gen_anonynous_name ele; |
284 |
let n = |
285 |
- let loc = |
286 |
+ let _loc = |
287 |
( |
288 |
{ Lexing.dummy_pos with Lexing.pos_cnum = fst ele.name_loc } , |
289 |
{ Lexing.dummy_pos with Lexing.pos_cnum = snd ele.name_loc } |
290 |
@@ -706,7 +706,7 @@ |
291 |
<:expr< $lid:ele.name$ >> |
292 |
in |
293 |
let cil = if ele.name.[0] <> '_' then |
294 |
- let loc = |
295 |
+ let _loc = |
296 |
( |
297 |
{ Lexing.dummy_pos with Lexing.pos_cnum = fst loc } , |
298 |
{ Lexing.dummy_pos with Lexing.pos_cnum = snd loc } |
299 |
@@ -730,14 +730,14 @@ |
300 |
Window -> cil |
301 |
| _ -> |
302 |
let n = |
303 |
- let loc = |
304 |
+ let _loc = |
305 |
( |
306 |
{ Lexing.dummy_pos with Lexing.pos_cnum = fst e.name_loc } , |
307 |
{ Lexing.dummy_pos with Lexing.pos_cnum = snd e.name_loc } |
308 |
) |
309 |
in <:expr< $lid:e.name$ >> |
310 |
in |
311 |
- let loc = |
312 |
+ let _loc = |
313 |
( |
314 |
{ Lexing.dummy_pos with Lexing.pos_cnum = fst loc } , |
315 |
{ Lexing.dummy_pos with Lexing.pos_cnum = snd loc } |
316 |
@@ -746,7 +746,7 @@ |
317 |
let ci = <:class_str_item< method coerce = $n$ # coerce >> in |
318 |
cil @ [ci] |
319 |
in |
320 |
- let loc = |
321 |
+ let _loc = |
322 |
( |
323 |
{ Lexing.dummy_pos with Lexing.pos_cnum = fst loc } , |
324 |
{ Lexing.dummy_pos with Lexing.pos_cnum = snd loc } |
325 |
@@ -765,7 +765,7 @@ |
326 |
in |
327 |
ast_of_ele_creations ?win: win_opt loc None None ele ce |
328 |
in |
329 |
- let loc = |
330 |
+ let _loc = |
331 |
( |
332 |
{ Lexing.dummy_pos with Lexing.pos_cnum = fst loc } , |
333 |
{ Lexing.dummy_pos with Lexing.pos_cnum = snd loc } |
334 |
@@ -798,9 +798,9 @@ |
335 |
try |
336 |
let entity = {en_name = name; en_params = pl; en_ele = w} in |
337 |
( |
338 |
- let loc = ((fst loc).Lexing.pos_cnum, (snd loc).Lexing.pos_cnum) in |
339 |
+ let loc = ((fst _loc).Lexing.pos_cnum, (snd _loc).Lexing.pos_cnum) in |
340 |
ast_of_entity loc entity |
341 |
- ), loc |
342 |
+ ), _loc |
343 |
with Field_error m -> |
344 |
field_error m; |
345 |
exit 1 |
346 |
@@ -824,7 +824,7 @@ |
347 |
prop_value_loc = ((fst vloc).Lexing.pos_cnum, (snd vloc).Lexing.pos_cnum)}) |
348 |
proplist |
349 |
in |
350 |
- let nloc = ((fst loc).Lexing.pos_cnum, (snd loc).Lexing.pos_cnum) in |
351 |
+ let nloc = ((fst _loc).Lexing.pos_cnum, (snd _loc).Lexing.pos_cnum) in |
352 |
{ name = name; name_loc = nloc; |
353 |
classe = Zog_misc.class_of_class_name tag; |
354 |
props = proplist; |
355 |
@@ -833,16 +833,16 @@ |
356 |
} ] ] |
357 |
; |
358 |
tag_end: |
359 |
- [ [ "</"; tag = LIDENT; ">" -> tag, loc ] ] |
360 |
+ [ [ "</"; tag = LIDENT; ">" -> tag, _loc ] ] |
361 |
; |
362 |
property: |
363 |
[ [ x = LIDENT; "="; (v, vloc) = string -> x, v, vloc ] ] |
364 |
; |
365 |
string: |
366 |
- [ [ v = STRING -> v, loc ] ] |
367 |
+ [ [ v = STRING -> v, _loc ] ] |
368 |
; |
369 |
ident: |
370 |
- [ [ v = LIDENT -> v, loc ] ] |
371 |
+ [ [ v = LIDENT -> v, _loc ] ] |
372 |
; |
373 |
END |
374 |
|