1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
|
/***** spin: flow.c *****/
/* Copyright (c) 1989-2003 by Lucent Technologies, Bell Laboratories. */
/* All Rights Reserved. This software is for educational purposes only. */
/* No guarantee whatsoever is expressed or implied by the distribution of */
/* this code. Permission is given to distribute this code provided that */
/* this introductory message is not removed and no monies are exchanged. */
/* Software written by Gerard J. Holzmann. For tool documentation see: */
/* http://spinroot.com/ */
/* Send all bug-reports and/or questions to: bugs@spinroot.com */
#include "spin.h"
#include "y.tab.h"
extern Symbol *Fname;
extern int nr_errs, lineno, verbose;
extern short has_unless, has_badelse;
Element *Al_El = ZE;
Label *labtab = (Label *) 0;
int Unique=0, Elcnt=0, DstepStart = -1;
static Lbreak *breakstack = (Lbreak *) 0;
static Lextok *innermost;
static SeqList *cur_s = (SeqList *) 0;
static int break_id=0;
static Element *if_seq(Lextok *);
static Element *new_el(Lextok *);
static Element *unless_seq(Lextok *);
static void add_el(Element *, Sequence *);
static void attach_escape(Sequence *, Sequence *);
static void mov_lab(Symbol *, Element *, Element *);
static void walk_atomic(Element *, Element *, int);
void
open_seq(int top)
{ SeqList *t;
Sequence *s = (Sequence *) emalloc(sizeof(Sequence));
t = seqlist(s, cur_s);
cur_s = t;
if (top) Elcnt = 1;
}
void
rem_Seq(void)
{
DstepStart = Unique;
}
void
unrem_Seq(void)
{
DstepStart = -1;
}
static int
Rjumpslocal(Element *q, Element *stop)
{ Element *lb, *f;
SeqList *h;
/* allow no jumps out of a d_step sequence */
for (f = q; f && f != stop; f = f->nxt)
{ if (f && f->n && f->n->ntyp == GOTO)
{ lb = get_lab(f->n, 0);
if (!lb || lb->Seqno < DstepStart)
{ lineno = f->n->ln;
Fname = f->n->fn;
return 0;
} }
for (h = f->sub; h; h = h->nxt)
{ if (!Rjumpslocal(h->this->frst, h->this->last))
return 0;
} }
return 1;
}
void
cross_dsteps(Lextok *a, Lextok *b)
{
if (a && b
&& a->indstep != b->indstep)
{ lineno = a->ln;
Fname = a->fn;
fatal("jump into d_step sequence", (char *) 0);
}
}
int
is_skip(Lextok *n)
{
return (n->ntyp == PRINT
|| n->ntyp == PRINTM
|| (n->ntyp == 'c'
&& n->lft
&& n->lft->ntyp == CONST
&& n->lft->val == 1));
}
void
check_sequence(Sequence *s)
{ Element *e, *le = ZE;
Lextok *n;
int cnt = 0;
for (e = s->frst; e; le = e, e = e->nxt)
{ n = e->n;
if (is_skip(n) && !has_lab(e, 0))
{ cnt++;
if (cnt > 1
&& n->ntyp != PRINT
&& n->ntyp != PRINTM)
{ if (verbose&32)
printf("spin: line %d %s, redundant skip\n",
n->ln, n->fn->name);
if (e != s->frst
&& e != s->last
&& e != s->extent)
{ e->status |= DONE; /* not unreachable */
le->nxt = e->nxt; /* remove it */
e = le;
}
}
} else
cnt = 0;
}
}
void
prune_opts(Lextok *n)
{ SeqList *l;
extern Symbol *context;
extern char *claimproc;
if (!n
|| (context && claimproc && strcmp(context->name, claimproc) == 0))
return;
for (l = n->sl; l; l = l->nxt) /* find sequences of unlabeled skips */
check_sequence(l->this);
}
Sequence *
close_seq(int nottop)
{ Sequence *s = cur_s->this;
Symbol *z;
if (nottop > 0 && (z = has_lab(s->frst, 0)))
{ printf("error: (%s:%d) label %s placed incorrectly\n",
(s->frst->n)?s->frst->n->fn->name:"-",
(s->frst->n)?s->frst->n->ln:0,
z->name);
switch (nottop) {
case 1:
printf("=====> stmnt unless Label: stmnt\n");
printf("sorry, cannot jump to the guard of an\n");
printf("escape (it is not a unique state)\n");
break;
case 2:
printf("=====> instead of ");
printf("\"Label: stmnt unless stmnt\"\n");
printf("=====> always use ");
printf("\"Label: { stmnt unless stmnt }\"\n");
break;
case 3:
printf("=====> instead of ");
printf("\"atomic { Label: statement ... }\"\n");
printf("=====> always use ");
printf("\"Label: atomic { statement ... }\"\n");
break;
case 4:
printf("=====> instead of ");
printf("\"d_step { Label: statement ... }\"\n");
printf("=====> always use ");
printf("\"Label: d_step { statement ... }\"\n");
break;
case 5:
printf("=====> instead of ");
printf("\"{ Label: statement ... }\"\n");
printf("=====> always use ");
printf("\"Label: { statement ... }\"\n");
break;
case 6:
printf("=====>instead of\n");
printf(" do (or if)\n");
printf(" :: ...\n");
printf(" :: Label: statement\n");
printf(" od (of fi)\n");
printf("=====>always use\n");
printf("Label: do (or if)\n");
printf(" :: ...\n");
printf(" :: statement\n");
printf(" od (or fi)\n");
break;
case 7:
printf("cannot happen - labels\n");
break;
}
alldone(1);
}
if (nottop == 4
&& !Rjumpslocal(s->frst, s->last))
fatal("non_local jump in d_step sequence", (char *) 0);
cur_s = cur_s->nxt;
s->maxel = Elcnt;
s->extent = s->last;
if (!s->last)
fatal("sequence must have at least one statement", (char *) 0);
return s;
}
Lextok *
do_unless(Lextok *No, Lextok *Es)
{ SeqList *Sl;
Lextok *Re = nn(ZN, UNLESS, ZN, ZN);
Re->ln = No->ln;
Re->fn = No->fn;
has_unless++;
if (Es->ntyp == NON_ATOMIC)
Sl = Es->sl;
else
{ open_seq(0); add_seq(Es);
Sl = seqlist(close_seq(1), 0);
}
if (No->ntyp == NON_ATOMIC)
{ No->sl->nxt = Sl;
Sl = No->sl;
} else if (No->ntyp == ':'
&& (No->lft->ntyp == NON_ATOMIC
|| No->lft->ntyp == ATOMIC
|| No->lft->ntyp == D_STEP))
{
int tok = No->lft->ntyp;
No->lft->sl->nxt = Sl;
Re->sl = No->lft->sl;
open_seq(0); add_seq(Re);
Re = nn(ZN, tok, ZN, ZN);
Re->sl = seqlist(close_seq(7), 0);
Re->ln = No->ln;
Re->fn = No->fn;
Re = nn(No, ':', Re, ZN); /* lift label */
Re->ln = No->ln;
Re->fn = No->fn;
return Re;
} else
{ open_seq(0); add_seq(No);
Sl = seqlist(close_seq(2), Sl);
}
Re->sl = Sl;
return Re;
}
SeqList *
seqlist(Sequence *s, SeqList *r)
{ SeqList *t = (SeqList *) emalloc(sizeof(SeqList));
t->this = s;
t->nxt = r;
return t;
}
static Element *
new_el(Lextok *n)
{ Element *m;
if (n)
{ if (n->ntyp == IF || n->ntyp == DO)
return if_seq(n);
if (n->ntyp == UNLESS)
return unless_seq(n);
}
m = (Element *) emalloc(sizeof(Element));
m->n = n;
m->seqno = Elcnt++;
m->Seqno = Unique++;
m->Nxt = Al_El; Al_El = m;
return m;
}
static int
has_chanref(Lextok *n)
{
if (!n) return 0;
switch (n->ntyp) {
case 's': case 'r':
#if 0
case 'R': case LEN:
#endif
case FULL: case NFULL:
case EMPTY: case NEMPTY:
return 1;
default:
break;
}
if (has_chanref(n->lft))
return 1;
return has_chanref(n->rgt);
}
void
loose_ends(void) /* properly tie-up ends of sub-sequences */
{ Element *e, *f;
for (e = Al_El; e; e = e->Nxt)
{ if (!e->n
|| !e->nxt)
continue;
switch (e->n->ntyp) {
case ATOMIC:
case NON_ATOMIC:
case D_STEP:
f = e->nxt;
while (f && f->n->ntyp == '.')
f = f->nxt;
if (0) printf("link %d, {%d .. %d} -> %d (ntyp=%d) was %d\n",
e->seqno,
e->n->sl->this->frst->seqno,
e->n->sl->this->last->seqno,
f?f->seqno:-1, f?f->n->ntyp:-1,
e->n->sl->this->last->nxt?e->n->sl->this->last->nxt->seqno:-1);
if (!e->n->sl->this->last->nxt)
e->n->sl->this->last->nxt = f;
else
{ if (e->n->sl->this->last->nxt->n->ntyp != GOTO)
{ if (!f || e->n->sl->this->last->nxt->seqno != f->seqno)
non_fatal("unexpected: loose ends", (char *)0);
} else
e->n->sl->this->last = e->n->sl->this->last->nxt;
/*
* fix_dest can push a goto into the nxt position
* in that case the goto wins and f is not needed
* but the last fields needs adjusting
*/
}
break;
} }
}
static Element *
if_seq(Lextok *n)
{ int tok = n->ntyp;
SeqList *s = n->sl;
Element *e = new_el(ZN);
Element *t = new_el(nn(ZN,'.',ZN,ZN)); /* target */
SeqList *z, *prev_z = (SeqList *) 0;
SeqList *move_else = (SeqList *) 0; /* to end of optionlist */
int ref_chans = 0;
for (z = s; z; z = z->nxt)
{ if (!z->this->frst)
continue;
if (z->this->frst->n->ntyp == ELSE)
{ if (move_else)
fatal("duplicate `else'", (char *) 0);
if (z->nxt) /* is not already at the end */
{ move_else = z;
if (prev_z)
prev_z->nxt = z->nxt;
else
s = n->sl = z->nxt;
continue;
}
} else
ref_chans |= has_chanref(z->this->frst->n);
prev_z = z;
}
if (move_else)
{ move_else->nxt = (SeqList *) 0;
/* if there is no prev, then else was at the end */
if (!prev_z) fatal("cannot happen - if_seq", (char *) 0);
prev_z->nxt = move_else;
prev_z = move_else;
}
if (prev_z
&& ref_chans
&& prev_z->this->frst->n->ntyp == ELSE)
{ prev_z->this->frst->n->val = 1;
has_badelse++;
non_fatal("dubious use of 'else' combined with i/o,",
(char *)0);
nr_errs--;
}
e->n = nn(n, tok, ZN, ZN);
e->n->sl = s; /* preserve as info only */
e->sub = s;
for (z = s; z; prev_z = z, z = z->nxt)
add_el(t, z->this); /* append target */
if (tok == DO)
{ add_el(t, cur_s->this); /* target upfront */
t = new_el(nn(n, BREAK, ZN, ZN)); /* break target */
set_lab(break_dest(), t); /* new exit */
breakstack = breakstack->nxt; /* pop stack */
}
add_el(e, cur_s->this);
add_el(t, cur_s->this);
return e; /* destination node for label */
}
static void
escape_el(Element *f, Sequence *e)
{ SeqList *z;
for (z = f->esc; z; z = z->nxt)
if (z->this == e)
return; /* already there */
/* cover the lower-level escapes of this state */
for (z = f->esc; z; z = z->nxt)
attach_escape(z->this, e);
/* now attach escape to the state itself */
f->esc = seqlist(e, f->esc); /* in lifo order... */
#ifdef DEBUG
printf("attach %d (", e->frst->Seqno);
comment(stdout, e->frst->n, 0);
printf(") to %d (", f->Seqno);
comment(stdout, f->n, 0);
printf(")\n");
#endif
switch (f->n->ntyp) {
case UNLESS:
attach_escape(f->sub->this, e);
break;
case IF:
case DO:
for (z = f->sub; z; z = z->nxt)
attach_escape(z->this, e);
break;
case D_STEP:
/* attach only to the guard stmnt */
escape_el(f->n->sl->this->frst, e);
break;
case ATOMIC:
case NON_ATOMIC:
/* attach to all stmnts */
attach_escape(f->n->sl->this, e);
break;
}
}
static void
attach_escape(Sequence *n, Sequence *e)
{ Element *f;
for (f = n->frst; f; f = f->nxt)
{ escape_el(f, e);
if (f == n->extent)
break;
}
}
static Element *
unless_seq(Lextok *n)
{ SeqList *s = n->sl;
Element *e = new_el(ZN);
Element *t = new_el(nn(ZN,'.',ZN,ZN)); /* target */
SeqList *z;
e->n = nn(n, UNLESS, ZN, ZN);
e->n->sl = s; /* info only */
e->sub = s;
/* need 2 sequences: normal execution and escape */
if (!s || !s->nxt || s->nxt->nxt)
fatal("unexpected unless structure", (char *)0);
/* append the target state to both */
for (z = s; z; z = z->nxt)
add_el(t, z->this);
/* attach escapes to all states in normal sequence */
attach_escape(s->this, s->nxt->this);
add_el(e, cur_s->this);
add_el(t, cur_s->this);
#ifdef DEBUG
printf("unless element (%d,%d):\n", e->Seqno, t->Seqno);
for (z = s; z; z = z->nxt)
{ Element *x; printf("\t%d,%d,%d :: ",
z->this->frst->Seqno,
z->this->extent->Seqno,
z->this->last->Seqno);
for (x = z->this->frst; x; x = x->nxt)
printf("(%d)", x->Seqno);
printf("\n");
}
#endif
return e;
}
Element *
mk_skip(void)
{ Lextok *t = nn(ZN, CONST, ZN, ZN);
t->val = 1;
return new_el(nn(ZN, 'c', t, ZN));
}
static void
add_el(Element *e, Sequence *s)
{
if (e->n->ntyp == GOTO)
{ Symbol *z = has_lab(e, (1|2|4));
if (z)
{ Element *y; /* insert a skip */
y = mk_skip();
mov_lab(z, e, y); /* inherit label */
add_el(y, s);
} }
#ifdef DEBUG
printf("add_el %d after %d -- ",
e->Seqno, (s->last)?s->last->Seqno:-1);
comment(stdout, e->n, 0);
printf("\n");
#endif
if (!s->frst)
s->frst = e;
else
s->last->nxt = e;
s->last = e;
}
static Element *
colons(Lextok *n)
{
if (!n)
return ZE;
if (n->ntyp == ':')
{ Element *e = colons(n->lft);
set_lab(n->sym, e);
return e;
}
innermost = n;
return new_el(n);
}
void
add_seq(Lextok *n)
{ Element *e;
if (!n) return;
innermost = n;
e = colons(n);
if (innermost->ntyp != IF
&& innermost->ntyp != DO
&& innermost->ntyp != UNLESS)
add_el(e, cur_s->this);
}
void
set_lab(Symbol *s, Element *e)
{ Label *l; extern Symbol *context;
if (!s) return;
for (l = labtab; l; l = l->nxt)
if (l->s == s && l->c == context)
{ non_fatal("label %s redeclared", s->name);
break;
}
l = (Label *) emalloc(sizeof(Label));
l->s = s;
l->c = context;
l->e = e;
l->nxt = labtab;
labtab = l;
}
Element *
get_lab(Lextok *n, int md)
{ Label *l;
Symbol *s = n->sym;
for (l = labtab; l; l = l->nxt)
if (s == l->s)
return (l->e);
lineno = n->ln;
Fname = n->fn;
if (md) fatal("undefined label %s", s->name);
return ZE;
}
Symbol *
has_lab(Element *e, int special)
{ Label *l;
for (l = labtab; l; l = l->nxt)
{ if (e != l->e)
continue;
if (special == 0
|| ((special&1) && !strncmp(l->s->name, "accept", 6))
|| ((special&2) && !strncmp(l->s->name, "end", 3))
|| ((special&4) && !strncmp(l->s->name, "progress", 8)))
return (l->s);
}
return ZS;
}
static void
mov_lab(Symbol *z, Element *e, Element *y)
{ Label *l;
for (l = labtab; l; l = l->nxt)
if (e == l->e)
{ l->e = y;
return;
}
if (e->n)
{ lineno = e->n->ln;
Fname = e->n->fn;
}
fatal("cannot happen - mov_lab %s", z->name);
}
void
fix_dest(Symbol *c, Symbol *a) /* c:label name, a:proctype name */
{ Label *l; extern Symbol *context;
#if 0
printf("ref to label '%s' in proctype '%s', search:\n",
c->name, a->name);
for (l = labtab; l; l = l->nxt)
printf(" %s in %s\n", l->s->name, l->c->name);
#endif
for (l = labtab; l; l = l->nxt)
{ if (strcmp(c->name, l->s->name) == 0
&& strcmp(a->name, l->c->name) == 0) /* ? */
break;
}
if (!l)
{ printf("spin: label '%s' (proctype %s)\n", c->name, a->name);
non_fatal("unknown label '%s'", c->name);
if (context == a)
printf("spin: cannot remote ref a label inside the same proctype\n");
return;
}
if (!l->e || !l->e->n)
fatal("fix_dest error (%s)", c->name);
if (l->e->n->ntyp == GOTO)
{ Element *y = (Element *) emalloc(sizeof(Element));
int keep_ln = l->e->n->ln;
Symbol *keep_fn = l->e->n->fn;
/* insert skip - or target is optimized away */
y->n = l->e->n; /* copy of the goto */
y->seqno = find_maxel(a); /* unique seqno within proc */
y->nxt = l->e->nxt;
y->Seqno = Unique++; y->Nxt = Al_El; Al_El = y;
/* turn the original element+seqno into a skip */
l->e->n = nn(ZN, 'c', nn(ZN, CONST, ZN, ZN), ZN);
l->e->n->ln = l->e->n->lft->ln = keep_ln;
l->e->n->fn = l->e->n->lft->fn = keep_fn;
l->e->n->lft->val = 1;
l->e->nxt = y; /* append the goto */
}
l->e->status |= CHECK2; /* treat as if global */
if (l->e->status & (ATOM | L_ATOM | D_ATOM))
{ non_fatal("cannot reference label inside atomic or d_step (%s)",
c->name);
}
}
int
find_lab(Symbol *s, Symbol *c, int markit)
{ Label *l;
for (l = labtab; l; l = l->nxt)
{ if (strcmp(s->name, l->s->name) == 0
&& strcmp(c->name, l->c->name) == 0)
{ l->visible |= markit;
return (l->e->seqno);
} }
return 0;
}
void
pushbreak(void)
{ Lbreak *r = (Lbreak *) emalloc(sizeof(Lbreak));
Symbol *l;
char buf[64];
sprintf(buf, ":b%d", break_id++);
l = lookup(buf);
r->l = l;
r->nxt = breakstack;
breakstack = r;
}
Symbol *
break_dest(void)
{
if (!breakstack)
fatal("misplaced break statement", (char *)0);
return breakstack->l;
}
void
make_atomic(Sequence *s, int added)
{ Element *f;
walk_atomic(s->frst, s->last, added);
f = s->last;
switch (f->n->ntyp) { /* is last step basic stmnt or sequence ? */
case NON_ATOMIC:
case ATOMIC:
/* redo and search for the last step of that sequence */
make_atomic(f->n->sl->this, added);
break;
case UNLESS:
/* escapes are folded into main sequence */
make_atomic(f->sub->this, added);
break;
default:
f->status &= ~ATOM;
f->status |= L_ATOM;
break;
}
}
static void
walk_atomic(Element *a, Element *b, int added)
{ Element *f; Symbol *ofn; int oln;
SeqList *h;
ofn = Fname;
oln = lineno;
for (f = a; ; f = f->nxt)
{ f->status |= (ATOM|added);
switch (f->n->ntyp) {
case ATOMIC:
if (verbose&32)
printf("spin: warning, line %3d %s, atomic inside %s (ignored)\n",
f->n->ln, f->n->fn->name, (added)?"d_step":"atomic");
goto mknonat;
case D_STEP:
if (!(verbose&32))
{ if (added) goto mknonat;
break;
}
printf("spin: warning, line %3d %s, d_step inside ",
f->n->ln, f->n->fn->name);
if (added)
{ printf("d_step (ignored)\n");
goto mknonat;
}
printf("atomic\n");
break;
case NON_ATOMIC:
mknonat: f->n->ntyp = NON_ATOMIC; /* can jump here */
h = f->n->sl;
walk_atomic(h->this->frst, h->this->last, added);
break;
case UNLESS:
if (added)
{ printf("spin: error, line %3d %s, unless in d_step (ignored)\n",
f->n->ln, f->n->fn->name);
}
}
for (h = f->sub; h; h = h->nxt)
walk_atomic(h->this->frst, h->this->last, added);
if (f == b)
break;
}
Fname = ofn;
lineno = oln;
}
void
dumplabels(void)
{ Label *l;
for (l = labtab; l; l = l->nxt)
if (l->c != 0 && l->s->name[0] != ':')
printf("label %s %d <%s>\n",
l->s->name, l->e->seqno, l->c->name);
}
|