Subversion Repositories tendra.SVN

Rev

Rev 5 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 5 Rev 6
Line -... Line 1...
-
 
1
/*
-
 
2
 * Copyright (c) 2002-2005 The TenDRA Project <http://www.tendra.org/>.
-
 
3
 * All rights reserved.
-
 
4
 *
-
 
5
 * Redistribution and use in source and binary forms, with or without
-
 
6
 * modification, are permitted provided that the following conditions are met:
-
 
7
 *
-
 
8
 * 1. Redistributions of source code must retain the above copyright notice,
-
 
9
 *    this list of conditions and the following disclaimer.
-
 
10
 * 2. Redistributions in binary form must reproduce the above copyright notice,
-
 
11
 *    this list of conditions and the following disclaimer in the documentation
-
 
12
 *    and/or other materials provided with the distribution.
-
 
13
 * 3. Neither the name of The TenDRA Project nor the names of its contributors
-
 
14
 *    may be used to endorse or promote products derived from this software
-
 
15
 *    without specific, prior written permission.
-
 
16
 *
-
 
17
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS
-
 
18
 * IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
-
 
19
 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-
 
20
 * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR
-
 
21
 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-
 
22
 * EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-
 
23
 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
-
 
24
 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-
 
25
 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
-
 
26
 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
-
 
27
 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
 
28
 *
-
 
29
 * $Id$
-
 
30
 */
1
/*
31
/*
2
    		 Crown Copyright (c) 1997
32
    		 Crown Copyright (c) 1997
3
 
33
 
4
    This TenDRA(r) Computer Program is subject to Copyright
34
    This TenDRA(r) Computer Program is subject to Copyright
5
    owned by the United Kingdom Secretary of State for Defence
35
    owned by the United Kingdom Secretary of State for Defence
Line 81... Line 111...
81
#include "basicread.h"
111
#include "basicread.h"
82
#include "regexps.h"
112
#include "regexps.h"
83
 
113
 
84
regpeep regexps[48];		/* [0:31] fix pt - [32:47] floating pt */
114
regpeep regexps[48];		/* [0:31] fix pt - [32:47] floating pt */
85
 
115
 
86
bool sim_exp PROTO_S ((exp a, exp b));
116
bool sim_exp(exp a, exp b);
87
 
117
 
88
bool eq_sze
118
bool eq_sze
89
    PROTO_N ( (as, bs) )
-
 
90
    PROTO_T ( shape as X shape bs )
119
(shape as, shape bs)
91
{
120
{
92
  if (is_floating(name(as))) return(name(as)==name(bs));
121
  if (is_floating(name(as))) return(name(as) ==name(bs));
93
  if (is_floating(name(bs))) return 0;
122
  if (is_floating(name(bs))) return 0;
94
  return (shape_size(as) == shape_size(bs) && shape_align(as)==shape_align(bs));
123
  return(shape_size(as) == shape_size(bs) && shape_align(as) ==shape_align(bs));
95
}
124
}
96
 
125
 
97
bool sim_explist
126
bool sim_explist
98
    PROTO_N ( (al, bl) )
-
 
99
    PROTO_T ( exp al X exp bl )
127
(exp al, exp bl)
100
{
128
{
101
  if (al == nilexp && bl == nilexp)
129
  if (al == nilexp && bl == nilexp)
102
    return (1);
130
    return(1);
103
  if (al == nilexp || bl == nilexp)
131
  if (al == nilexp || bl == nilexp)
104
    return (0);
132
    return(0);
105
  if (!sim_exp (al, bl))
133
  if (!sim_exp(al, bl))
106
    return (0);
134
    return(0);
107
  if (last (al) && last (bl))
135
  if (last(al) && last(bl))
108
    return (1);
136
    return(1);
109
  if (last (al) || last (bl))
137
  if (last(al) || last(bl))
110
    return (0);
138
    return(0);
111
  return (sim_explist (bro (al), bro (bl)));
139
  return(sim_explist(bro(al), bro(bl)));
112
}
140
}
113
 
141
 
114
bool sim_exp
142
bool sim_exp
115
    PROTO_N ( (a,b) )
-
 
116
    PROTO_T ( exp a X exp b )
143
(exp a, exp b)
117
{	/* basically eq_exp except equal shapes
144
{	/* basically eq_exp except equal shapes
118
				   requirement  is weakened to equal sizes
145
				   requirement  is weakened to equal sizes
119
				   and alignments */
146
				   and alignments */
120
  if (name (a) == name (b)) {
147
  if (name(a) == name(b)) {
121
    if (name (a) == name_tag)
148
    if (name(a) == name_tag)
122
      return (son (a) == son (b) && no (a) == no (b) &&
149
      return(son(a) == son(b) && no(a) == no(b) &&
123
	  eq_sze (sh (a), sh (b)));
150
	  eq_sze(sh(a), sh(b)));
124
    if (name(a)==maxlike_tag || name(a)==minlike_tag || name(a)==abslike_tag) {
151
    if (name(a) ==maxlike_tag || name(a) ==minlike_tag || name(a) ==abslike_tag) {
125
    	return (props(son(a))==props(son(b)) &&
152
    	return(props(son(a)) ==props(son(b)) &&
126
		shape_size(sh(a))==shape_size(sh(b)) &&
153
		shape_size(sh(a)) ==shape_size(sh(b)) &&
127
    			sim_explist(son(son(a)),son(son(b)) ) );
154
    			sim_explist(son(son(a)),son(son(b))));
128
    }
155
    }
129
    if (!is_a (name (a)) || !eq_sze (sh (a), sh (b)))
156
    if (!is_a(name(a)) || !eq_sze(sh(a), sh(b)))
130
      return (0);
157
      return(0);
131
    if (name(a) == float_tag) return eq_exp(son(a), son(b));
158
    if (name(a) == float_tag) return eq_exp(son(a), son(b));
132
    return (no (a) == no (b) &&
159
    return(no(a) == no(b) &&
133
	sim_explist (son (a), son (b)));
160
	sim_explist(son(a), son(b)));
134
  };
161
  };
135
  return (0);
162
  return(0);
136
}
163
}
137
 
164
 
138
void clear_all
165
void clear_all
139
    PROTO_Z ()
166
(void)
140
{	/* forget all register - exp associations */
167
{	/* forget all register - exp associations */
141
  int   i;
168
  int   i;
142
  for (i = 0; i < 48; i++) {
169
  for (i = 0; i < 48; i++) {
143
    regexps[i].keptexp = nilexp;
170
    regexps[i].keptexp = nilexp;
144
    setregalt (regexps[i].inans, 0);
171
    setregalt(regexps[i].inans, 0);
145
  }
172
  }
146
}
173
}
147
 
174
 
148
 
175
 
149
void clear_reg
176
void clear_reg
150
    PROTO_N ( (i) )
-
 
151
    PROTO_T ( int i )
177
(int i)
152
{	/* forget reg i - exp association */
178
{	/* forget reg i - exp association */
153
  i = abs (i);
179
  i = abs(i);
154
  if (i >= 0 && i < 48) {
180
  if (i >= 0 && i < 48) {
155
    regexps[i].keptexp = nilexp;
181
    regexps[i].keptexp = nilexp;
156
    setregalt (regexps[i].inans, 0);
182
    setregalt(regexps[i].inans, 0);
157
  }
183
  }
158
}
184
}
159
 
185
 
160
 
186
 
161
ans iskept
187
ans iskept
162
    PROTO_N ( (e) )
-
 
163
    PROTO_T ( exp e )
188
(exp e)
164
{		/* find if e has already been evaluated
189
{		/* find if e has already been evaluated
165
				   into a register */
190
				   into a register */
166
  int   i;
191
  int   i;
167
  ans nilans;
192
  ans nilans;
168
  ans aa;
193
  ans aa;
169
  setregalt (nilans, 0);
194
  setregalt(nilans, 0);
170
  aa = nilans;
195
  aa = nilans;
171
  for (i = 0; i < 48; i++) {
196
  for (i = 0; i < 48; i++) {
172
    exp ke = regexps[i].keptexp;
197
    exp ke = regexps[i].keptexp;
173
    bool isc = regexps[i].iscont;
198
    bool isc = regexps[i].iscont;
174
    if (ke != nilexp) {		/* there is an accociation with reg i */
199
    if (ke != nilexp) {		/* there is an accociation with reg i */
175
      if (
200
      if (
176
	  ((!isc && sim_exp (ke, e)) ||
201
	 ((!isc && sim_exp(ke, e)) ||
177
	    (name (e) == cont_tag && isc  &&
202
	   (name(e) == cont_tag && isc  &&
178
	      eq_sze (sh (ke), sh (e))
203
	      eq_sze(sh(ke), sh(e))
179
	      && sim_exp (ke, son (e))  && al1(sh(son(e))) == al1(sh(ke)) )
204
	      && sim_exp(ke, son(e)) && al1(sh(son(e))) == al1(sh(ke)))
180
	  )
205
	 )
181
	) {
206
	) {
182
	aa = (regexps[i].inans);
207
	aa = (regexps[i].inans);
183
	switch (aa.discrim) {
208
	switch (aa.discrim) {
184
	  case notinreg:
209
	  case notinreg:
185
	    {
210
	    {
Line 194... Line 219...
194
	  default:
219
	  default:
195
	    return aa;
220
	    return aa;
196
	}
221
	}
197
      }
222
      }
198
      else
223
      else
199
	if (name (ke) == cont_tag && !isc) {
224
	if (name(ke) == cont_tag && !isc) {
200
	  ans aq;
225
	  ans aq;
201
	  aq = regexps[i].inans;
226
	  aq = regexps[i].inans;
202
	  if (aq.discrim == notinreg) {
227
	  if (aq.discrim == notinreg) {
203
	    instore is;
228
	    instore is;
204
	    is = insalt (aq);
229
	    is = insalt(aq);
205
	    if (!is.adval && is.b.offset == 0 && is.b.base > 0 && is.b.base < 31
230
	    if (!is.adval && is.b.offset == 0 && is.b.base > 0 && is.b.base < 31
206
		&& sim_exp (son (ke), e)) {
231
		&& sim_exp(son(ke), e)) {
207
				/* the contents of req expression is here
232
				/* the contents of req expression is here
208
				   as a reg-offset */
233
				   as a reg-offset */
209
	      is.adval = 1;
234
	      is.adval = 1;
210
	      setinsalt (aq, is);
235
	      setinsalt(aq, is);
211
	      return aq;
236
	      return aq;
212
	    }
237
	    }
213
	  }
238
	  }
214
	}
239
	}
215
	else
240
	else
216
	  if (name (ke) == reff_tag && !isc) {
241
	  if (name(ke) == reff_tag && !isc) {
217
	    ans aq;
242
	    ans aq;
218
	    aq = regexps[i].inans;
243
	    aq = regexps[i].inans;
219
	    if (aq.discrim == notinreg) {
244
	    if (aq.discrim == notinreg) {
220
	      instore is;
245
	      instore is;
221
	      is = insalt (aq);
246
	      is = insalt(aq);
222
	      if (is.adval && is.b.offset == (no (ke) / 8)
247
	      if (is.adval && is.b.offset == (no(ke) / 8)
223
		  && is.b.base > 0 && is.b.base < 31
248
		  && is.b.base > 0 && is.b.base < 31
224
		  && sim_exp (son (ke), e)) {
249
		  && sim_exp(son(ke), e)) {
225
				/* a ref select of req expression is here
250
				/* a ref select of req expression is here
226
				   as a reg-offset */
251
				   as a reg-offset */
227
		is.adval = 1;
252
		is.adval = 1;
228
		is.b.offset = 0;
253
		is.b.offset = 0;
229
		setinsalt (aq, is);
254
		setinsalt(aq, is);
230
		return aq;
255
		return aq;
231
	      }
256
	      }
232
	    }
257
	    }
233
	  }
258
	  }
234
    }
259
    }
235
  }
260
  }
236
  return aa;
261
  return aa;
237
}
262
}
238
 
263
 
239
void keepexp
264
void keepexp
240
    PROTO_N ( (e, loc) )
-
 
241
    PROTO_T ( exp e X ans loc )
265
(exp e, ans loc)
242
{	/* set up exp - address association */
266
{	/* set up exp - address association */
243
  int   pos;
267
  int   pos;
244
  switch (loc.discrim) {
268
  switch (loc.discrim) {
245
    case insomereg:
269
    case insomereg:
246
    case insomefreg: {
270
    case insomefreg: {
247
	failer ("Keep ? reg");
271
	failer("Keep ? reg");
248
      }
272
      }
249
    case inreg:
273
    case inreg:
250
      {
274
      {
251
	pos = regalt (loc);
275
	pos = regalt(loc);
252
	break;
276
	break;
253
      }
277
      }
254
    case infreg:
278
    case infreg:
255
      {
279
      {
256
	pos = fregalt (loc).fr + 32;
280
	pos = fregalt(loc).fr + 32;
257
	break;
281
	break;
258
      }
282
      }
259
    case notinreg:
283
    case notinreg:
260
      {
284
      {
261
	pos = insalt (loc).b.base;
285
	pos = insalt(loc).b.base;
262
	if (pos < 0 || pos > 30)
286
	if (pos < 0 || pos > 30)
263
	  return;
287
	  return;
264
      }
288
      }
265
 
289
 
266
  };
290
  };
Line 269... Line 293...
269
  regexps[pos].inans = loc;
293
  regexps[pos].inans = loc;
270
  regexps[pos].iscont = 0;
294
  regexps[pos].iscont = 0;
271
}
295
}
272
 
296
 
273
void keepcont
297
void keepcont
274
    PROTO_N ( (e, reg) )
-
 
275
    PROTO_T ( exp e X int reg )
298
(exp e, int reg)
276
{/* set up cont(e)-reg association */
299
{/* set up cont(e)-reg association */
277
  freg fr;
300
  freg fr;
278
  int   z = abs (reg);
301
  int   z = abs(reg);
279
  if (z==2|| z==32) return;
302
  if (z==2|| z==32) return;
280
  if (z > 31) {
303
  if (z > 31) {
281
    fr.dble = (reg < 0);
304
    fr.dble = (reg < 0);
282
    fr.fr = z - 32;
305
    fr.fr = z - 32;
283
    setfregalt (regexps[z].inans, fr);
306
    setfregalt(regexps[z].inans, fr);
284
  }
307
  }
285
  else {
308
  else {
286
    instore is;
309
    instore is;
287
    is.b.base = reg;
310
    is.b.base = reg;
288
    is.b.offset = 0;
311
    is.b.offset = 0;
289
    is.adval = 1;
312
    is.adval = 1;
290
    setinsalt (regexps[z].inans, is);
313
    setinsalt(regexps[z].inans, is);
291
  }
314
  }
292
 
315
 
293
  regexps[z].keptexp = e;
316
  regexps[z].keptexp = e;
294
 
317
 
295
  regexps[z].iscont = 1;
318
  regexps[z].iscont = 1;
296
 
319
 
297
}
320
}
298
 
321
 
299
void keepreg
322
void keepreg
300
    PROTO_N ( (e, reg) )
-
 
301
    PROTO_T ( exp e X int reg )
323
(exp e, int reg)
302
{	/* set up e-reg association */
324
{	/* set up e-reg association */
303
  freg fr;
325
  freg fr;
304
  int   z = abs (reg);
326
  int   z = abs(reg);
305
  if (z==2 || z==32) return;
327
  if (z==2 || z==32) return;
306
  if (z > 31) {
328
  if (z > 31) {
307
    fr.dble = (reg < 0);
329
    fr.dble = (reg < 0);
308
    fr.fr = z - 32;
330
    fr.fr = z - 32;
309
    setfregalt (regexps[z].inans, fr);
331
    setfregalt(regexps[z].inans, fr);
310
  }
332
  }
311
  else {
333
  else {
312
    instore is;
334
    instore is;
313
    is.b.base = reg;
335
    is.b.base = reg;
314
    is.b.offset = 0;
336
    is.b.offset = 0;
315
    is.adval = 1;
337
    is.adval = 1;
316
    setinsalt (regexps[z].inans, is);
338
    setinsalt(regexps[z].inans, is);
317
  }
339
  }
318
 
340
 
319
  regexps[z].keptexp = e;
341
  regexps[z].keptexp = e;
320
  regexps[z].iscont = 0;
342
  regexps[z].iscont = 0;
321
}
343
}
322
 
344
 
323
static bool couldeffect PROTO_S ((exp e, exp z, int count));
345
static bool couldeffect(exp e, exp z, int count);
324
 
346
 
325
static bool couldbe
347
static bool couldbe
326
    PROTO_N ( (e, lhs, count) )
-
 
327
    PROTO_T ( exp e X exp lhs X int count )
348
(exp e, exp lhs, int count)
328
{ /* could e be lhs? */
349
{ /* could e be lhs? */
329
  int   ne = name (e);
350
  int   ne = name(e);
330
  exp s = son (e);
351
  exp s = son(e);
331
 
352
 
332
  if (ne == name_tag) {
353
  if (ne == name_tag) {
333
    if (lhs != 0 && s == son (lhs)) {
354
    if (lhs != 0 && s == son(lhs)) {
334
	return 1;
355
	return 1;
335
    }
356
    }
336
    if (isvar (s)) {
357
    if (isvar(s)) {
337
      return (lhs == 0 && (isvis (s) || isglob(s)));
358
      return(lhs == 0 && (isvis(s) || isglob(s)));
338
    }
359
    }
339
    if (name (s) == proc_tag)
360
    if (name(s) == proc_tag)
340
      return (lhs == 0);
361
      return(lhs == 0);
341
    if (son (s) == nilexp)
362
    if (son(s) == nilexp)
342
      return 1;
363
      return 1;
343
    if (count > 5) return 1; /* pathological */
364
    if (count > 5) return 1; /* pathological */
344
    return couldbe (son (s), lhs, count+1);
365
    return couldbe(son(s), lhs, count+1);
345
  }
366
  }
346
  if (ne == cont_tag) {
367
  if (ne == cont_tag) {
347
    if (lhs != 0 && name (s) == name_tag && son (s) != nilexp) {
368
    if (lhs != 0 && name(s) == name_tag && son(s)!= nilexp) {
348
      return (son (s) == son (lhs) || isvis (son (lhs)) || isvis (son (s)));
369
      return(son(s) == son(lhs) || isvis(son(lhs)) || isvis(son(s)));
349
    }
370
    }
350
    return 1;
371
    return 1;
351
  }
372
  }
352
  if (ne == reff_tag || ne == field_tag) {
373
  if (ne == reff_tag || ne == field_tag) {
353
    return couldbe (s, lhs, count);
374
    return couldbe(s, lhs, count);
354
  }
375
  }
355
  if (ne == addptr_tag || ne == subptr_tag) {
376
  if (ne == addptr_tag || ne == subptr_tag) {
356
    return (couldbe (s, lhs, count) || couldeffect (bro (s), lhs, count));
377
    return(couldbe(s, lhs, count) || couldeffect(bro(s), lhs, count));
357
  }
378
  }
358
 
379
 
359
  return 1;
380
  return 1;
360
 
381
 
361
}
382
}
362
 
383
 
363
static bool couldeffect
384
static bool couldeffect
364
    PROTO_N ( (e, z, count) )
-
 
365
    PROTO_T ( exp e X exp z X int count )
385
(exp e, exp z, int count)
366
{
386
{
367
				/* could alteration to z effect e? */
387
				/* could alteration to z effect e? */
368
  int   ne = name (e);
388
  int   ne = name(e);
369
  if (ne == cont_tag) {
389
  if (ne == cont_tag) {
370
    return couldbe (son (e), z, count);
390
    return couldbe(son(e), z, count);
371
  }
391
  }
372
  if (ne == name_tag) {
392
  if (ne == name_tag) {
373
    if (isvar (son (e)))
393
    if (isvar(son(e)))
374
      return (z == 0 && isvis (son (e)));
394
      return(z == 0 && isvis(son(e)));
375
    if (name (son (e)) == proc_tag)
395
    if (name(son(e)) == proc_tag)
376
      return 0;
396
      return 0;
377
    if (son (son (e)) == nilexp)
397
    if (son(son(e)) == nilexp)
378
      return 1 /* could it happen? */ ;
398
      return 1 /* could it happen? */ ;
379
    if (count > 5) return 1; /* pathological */
399
    if (count > 5) return 1; /* pathological */
380
    return couldeffect (son (son (e)), z, count+1);
400
    return couldeffect(son(son(e)), z, count+1);
381
 
401
 
382
  }
402
  }
383
  if (ne < plus_tag || ne == contvol_tag)
403
  if (ne < plus_tag || ne == contvol_tag)
384
    return 1;
404
    return 1;
385
 
405
 
386
  e = son (e);
406
  e = son(e);
387
 
407
 
388
  while (e != nilexp) {
408
  while (e != nilexp) {
389
    if (couldeffect (e, z, count))
409
    if (couldeffect(e, z, count))
390
      return 1;
410
      return 1;
391
    if (last (e))
411
    if (last(e))
392
      return 0;
412
      return 0;
393
    e = bro (e);
413
    e = bro(e);
394
  }
414
  }
395
  return 0;
415
  return 0;
396
}
416
}
397
 
417
 
398
bool dependson
418
bool dependson
399
    PROTO_N ( (e, isc, z) )
-
 
400
    PROTO_T ( exp e X bool isc X exp z )
419
(exp e, bool isc, exp z)
401
{/* does e depend on z */
420
{/* does e depend on z */
402
  if (e == nilexp) {
421
  if (e == nilexp) {
403
    return 0;
422
    return 0;
404
  }
423
  }
405
  for (;;) {
424
  for (;;) {
406
    if (name (z) == reff_tag || name (z) == addptr_tag ||
425
    if (name(z) == reff_tag || name(z) == addptr_tag ||
407
	name (z) == subptr_tag) {
426
	name(z) == subptr_tag) {
408
      z = son (z);
427
      z = son(z);
409
    }
428
    }
410
 
429
 
411
   if (name (z) != name_tag) {
430
   if (name(z)!= name_tag) {
412
    if (name (z) != cont_tag)
431
    if (name(z)!= cont_tag)
413
      return 1;
432
      return 1;
414
    z = 0;
433
    z = 0;
415
    break;
434
    break;
416
   }
435
   }
417
 
436
 
418
    if (isvar (son (z)))
437
    if (isvar(son(z)))
419
      break;
438
      break;
420
    if (name (son (z)) == proc_tag) {
439
    if (name(son(z)) == proc_tag) {
421
      z = 0;
440
      z = 0;
422
      break;
441
      break;
423
    }
442
    }
424
    if (son (son (z)) == nilexp)
443
    if (son(son(z)) == nilexp)
425
      return 1;			/* can it happen? */
444
      return 1;			/* can it happen? */
426
    z = son (son (z));
445
    z = son(son(z));
427
  }
446
  }
428
 
447
 
429
  /* z is now unambiguous variable name or 0 meaning some contents */
448
  /* z is now unambiguous variable name or 0 meaning some contents */
430
 
449
 
431
  return ((isc) ? couldbe (e, z, 0) : couldeffect (e, z, 0));
450
  return((isc)? couldbe(e, z, 0): couldeffect(e, z, 0));
432
}
451
}
433
 
452
 
434
 
453
 
435
 
454
 
436
 
455
 
437
 
456
 
438
void clear_dep_reg
457
void clear_dep_reg
439
    PROTO_N ( (lhs) )
-
 
440
    PROTO_T ( exp lhs )
458
(exp lhs)
441
{	/* remove association of any register
459
{	/* remove association of any register
442
				   which depends on lhs */
460
				   which depends on lhs */
443
  int   i;
461
  int   i;
444
  for (i = 0; i < 48; i++) {
462
  for (i = 0; i < 48; i++) {
445
    if (dependson (regexps[i].keptexp, regexps[i].iscont, lhs)) {
463
    if (dependson(regexps[i].keptexp, regexps[i].iscont, lhs)) {
446
      regexps[i].keptexp = nilexp;
464
      regexps[i].keptexp = nilexp;
447
      setregalt (regexps[i].inans, 0);
465
      setregalt(regexps[i].inans, 0);
448
    }
466
    }
449
  }
467
  }
450
}
468
}