Warning: Undefined variable $n in /usr/local/www/websvn.planix.org/include/diff_util.php on line 243

Warning: Undefined variable $n in /usr/local/www/websvn.planix.org/include/diff_util.php on line 247

Warning: Undefined variable $m in /usr/local/www/websvn.planix.org/include/diff_util.php on line 251
WebSVN – tendra.SVN – Diff – /branches/tendra5/src/utilities/sid/parser.c – Rev 5 and 6

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 1... Line 1...
1
/*
1
/*
2
 * Automatically generated from the files:
2
 * Automatically generated from the files:
3
 *	/u/g/release/Source/src/utilities/sid/parser.sid
3
 *	parser.sid
4
 * and
4
 * and
5
 *	/u/g/release/Source/src/utilities/sid/parser.act
5
 *	parser.act
6
 * by:
6
 * by:
7
 *	sid
7
 *	./sid
8
 */
8
 */
9
 
9
 
10
/* BEGINNING OF HEADER */
10
/* BEGINNING OF HEADER */
11
 
11
 
12
 
12
 
Line 100... Line 100...
100
static BoolT		sid_propagating_error = FALSE;
100
static BoolT		sid_propagating_error = FALSE;
101
static BoolT		sid_finished_terminals = FALSE;
101
static BoolT		sid_finished_terminals = FALSE;
102
 
102
 
103
/* BEGINNING OF FUNCTION DECLARATIONS */
103
/* BEGINNING OF FUNCTION DECLARATIONS */
104
 
104
 
105
static void ZR234 PROTO_S ((void));
105
static void ZR235(void);
106
static void ZR229 PROTO_S ((void));
106
static void ZR230(void);
107
static void ZR137 PROTO_S ((void));
107
static void ZR137(void);
108
static void ZR231 PROTO_S ((void));
108
static void ZR232(void);
109
static void ZR171 PROTO_S ((void));
109
static void ZR171(void);
110
static void ZR238 PROTO_S ((void));
110
static void ZR239(void);
111
static void ZR146 PROTO_S ((void));
111
static void ZR146(void);
112
static void ZR163 PROTO_S ((void));
112
static void ZR163(void);
113
static void ZR147 PROTO_S ((void));
113
static void ZR147(void);
114
static void ZR280 PROTO_S ((NStringT *));
114
static void ZR175(void);
115
static void ZR175 PROTO_S ((void));
115
static void ZR221(void);
116
static void ZR220 PROTO_S ((void));
116
static void ZR281(NStringT *);
117
static void ZR282 PROTO_S ((void));
117
static void ZR149(void);
118
static void ZR149 PROTO_S ((void));
118
static void ZR283(void);
119
static void ZR283 PROTO_S ((NStringT *));
119
static void ZR183(void);
120
static void ZR183 PROTO_S ((void));
120
static void ZR192(void);
121
static void ZR192 PROTO_S ((void));
121
static void ZR284(NStringT *);
122
static void ZR284 PROTO_S ((NStringT *));
122
static void ZR285(NStringT *);
123
static void ZR165 PROTO_S ((void));
123
static void ZR165(void);
124
static void ZR161 PROTO_S ((void));
124
static void ZR161(void);
125
extern void sid_parse_grammar PROTO_S ((void));
125
extern void sid_parse_grammar(void);
126
static void ZR140 PROTO_S ((void));
126
static void ZR140(void);
127
static void ZR142 PROTO_S ((void));
127
static void ZR142(void);
128
static void ZR177 PROTO_S ((void));
128
static void ZR177(void);
129
static void ZR199 PROTO_S ((void));
129
static void ZR199(void);
130
static void ZR218 PROTO_S ((void));
130
static void ZR219(void);
131
static void ZR153 PROTO_S ((void));
131
static void ZR153(void);
132
static void ZR196 PROTO_S ((void));
132
static void ZR196(void);
133
static void ZR185 PROTO_S ((void));
133
static void ZR185(void);
134
static void ZR252 PROTO_S ((void));
134
static void ZR253(void);
135
static void ZR186 PROTO_S ((void));
135
static void ZR186(void);
136
static void ZR128 PROTO_S ((void));
136
static void ZR128(void);
137
static void ZR258 PROTO_S ((void));
137
static void ZR259(void);
138
static void ZR126 PROTO_S ((void));
138
static void ZR126(void);
139
static void ZR207 PROTO_S ((void));
139
static void ZR208(void);
140
static void ZR216 PROTO_S ((void));
140
static void ZR217(void);
141
static void ZR155 PROTO_S ((void));
141
static void ZR155(void);
142
static void ZR187 PROTO_S ((void));
142
static void ZR187(void);
143
static void ZR227 PROTO_S ((void));
143
static void ZR228(void);
144
static void ZR260 PROTO_S ((void));
144
static void ZR261(void);
145
static void ZR168 PROTO_S ((void));
145
static void ZR168(void);
146
static void ZR245 PROTO_S ((void));
146
static void ZR246(void);
147
static void ZR247 PROTO_S ((void));
147
static void ZR248(void);
148
static void ZR248 PROTO_S ((void));
148
static void ZR249(void);
149
static void ZR250 PROTO_S ((void));
149
static void ZR180(void);
150
static void ZR180 PROTO_S ((void));
150
static void ZR251(void);
151
static void ZR251 PROTO_S ((void));
151
static void ZR252(void);
152
 
152
 
153
/* BEGINNING OF STATIC VARIABLES */
153
/* BEGINNING OF STATIC VARIABLES */
154
 
154
 
155
static BoolT ZI0;
155
static BoolT ZI0;
156
 
156
 
157
/* BEGINNING OF FUNCTION DEFINITIONS */
157
/* BEGINNING OF FUNCTION DEFINITIONS */
158
 
158
 
159
static void
159
static void
160
ZR234 PROTO_Z ()
160
ZR235(void)
161
{
161
{
162
    if ((CURRENT_TERMINAL) == 26) {
162
    if ((CURRENT_TERMINAL) == 26) {
163
	return;
163
	return;
164
    }
164
    }
165
  ZL2_234:;
165
  ZL2_235:;
166
    {
166
    {
167
	ZR231 ();
167
	ZR232 ();
168
	{
168
	{
169
	    switch (CURRENT_TERMINAL) {
169
	    switch (CURRENT_TERMINAL) {
170
	      case 15:
170
	      case 15:
171
		{
171
		{
172
		    ADVANCE_LEXER;
172
		    ADVANCE_LEXER;
173
		    goto ZL2_234;
173
		    goto ZL2_235;
174
		}
174
		}
175
		/*UNREACHED*/
175
		/*UNREACHED*/
176
	      case 26:
176
	      case 26:
177
		RESTORE_LEXER;
177
		RESTORE_LEXER;
178
		goto ZL1;
178
		goto ZL1;
Line 186... Line 186...
186
    SAVE_LEXER (26);
186
    SAVE_LEXER (26);
187
    return;
187
    return;
188
}
188
}
189
 
189
 
190
static void
190
static void
191
ZR229 PROTO_Z ()
191
ZR230(void)
192
{
192
{
193
    if ((CURRENT_TERMINAL) == 26) {
193
    if ((CURRENT_TERMINAL) == 26) {
194
	return;
194
	return;
195
    }
195
    }
196
    {
196
    {
Line 198... Line 198...
198
 
198
 
199
    if (sid_current_entry) {
199
    if (sid_current_entry) {
200
	sid_current_alt = alt_create ();
200
	sid_current_alt = alt_create ();
201
    }
201
    }
202
	}
202
	}
203
	ZR227 ();
203
	ZR228 ();
204
	if ((CURRENT_TERMINAL) == 26) {
204
	if ((CURRENT_TERMINAL) == 26) {
205
	    RESTORE_LEXER;
205
	    RESTORE_LEXER;
206
	    goto ZL1;
206
	    goto ZL1;
207
	}
207
	}
208
	{
208
	{
Line 229... Line 229...
229
    SAVE_LEXER (26);
229
    SAVE_LEXER (26);
230
    return;
230
    return;
231
}
231
}
232
 
232
 
233
static void
233
static void
234
ZR137 PROTO_Z ()
234
ZR137(void)
235
{
235
{
236
    if ((CURRENT_TERMINAL) == 26) {
236
    if ((CURRENT_TERMINAL) == 26) {
237
	return;
237
	return;
238
    }
238
    }
239
  ZL2_137:;
239
  ZL2_137:;
Line 287... Line 287...
287
    SAVE_LEXER (26);
287
    SAVE_LEXER (26);
288
    return;
288
    return;
289
}
289
}
290
 
290
 
291
static void
291
static void
292
ZR231 PROTO_Z ()
292
ZR232(void)
293
{
293
{
294
    switch (CURRENT_TERMINAL) {
294
    switch (CURRENT_TERMINAL) {
295
      case 17:
295
      case 17:
296
	{
296
	{
297
	    {
297
	    {
Line 313... Line 313...
313
	    rule_add_empty_alt (sid_current.rule);
313
	    rule_add_empty_alt (sid_current.rule);
314
	}
314
	}
315
    }
315
    }
316
	    }
316
	    }
317
	    ADVANCE_LEXER;
317
	    ADVANCE_LEXER;
318
	    ZR251 ();
318
	    ZR252 ();
319
	    if ((CURRENT_TERMINAL) == 26) {
319
	    if ((CURRENT_TERMINAL) == 26) {
320
		RESTORE_LEXER;
320
		RESTORE_LEXER;
321
		goto ZL1;
321
		goto ZL1;
322
	    }
322
	    }
323
	}
323
	}
Line 336... Line 336...
336
    }
336
    }
337
    if (sid_current_entry) {
337
    if (sid_current_entry) {
338
	sid_current_alt = alt_create ();
338
	sid_current_alt = alt_create ();
339
    }
339
    }
340
	    }
340
	    }
341
	    ZR227 ();
341
	    ZR228 ();
342
	    if ((CURRENT_TERMINAL) == 26) {
342
	    if ((CURRENT_TERMINAL) == 26) {
343
		RESTORE_LEXER;
343
		RESTORE_LEXER;
344
		goto ZL1;
344
		goto ZL1;
345
	    }
345
	    }
346
	    {
346
	    {
Line 381... Line 381...
381
	{
381
	{
382
 
382
 
383
    while ((CURRENT_TERMINAL != LEXER_TOK_EOF) &&
383
    while ((CURRENT_TERMINAL != LEXER_TOK_EOF) &&
384
	   (CURRENT_TERMINAL != LEXER_TOK_ALT_SEP) &&
384
	   (CURRENT_TERMINAL != LEXER_TOK_ALT_SEP) &&
385
	   (CURRENT_TERMINAL != LEXER_TOK_HANDLER_SEP) &&
385
	   (CURRENT_TERMINAL != LEXER_TOK_HANDLER_SEP) &&
386
	   (CURRENT_TERMINAL != LEXER_TOK_END_RULE) &&
386
	   (CURRENT_TERMINAL != LEXER_TOK_END_RULE) &&
387
	   (CURRENT_TERMINAL != LEXER_TOK_END_SCOPE) &&
387
	   (CURRENT_TERMINAL != LEXER_TOK_END_SCOPE) &&
388
	   (CURRENT_TERMINAL != LEXER_TOK_BLT_PRODUCTIONS) &&
388
	   (CURRENT_TERMINAL != LEXER_TOK_BLT_PRODUCTIONS) &&
389
	   (CURRENT_TERMINAL != LEXER_TOK_BLT_ENTRY)) {
389
	   (CURRENT_TERMINAL != LEXER_TOK_BLT_ENTRY)) {
390
	if (CURRENT_TERMINAL == LEXER_TOK_IDENTIFIER) {
390
	if (CURRENT_TERMINAL == LEXER_TOK_IDENTIFIER) {
391
	    nstring_destroy (lexer_string_value (sid_current_stream));
391
	    nstring_destroy (lexer_string_value (sid_current_stream));
392
	}
392
	}
393
	ADVANCE_LEXER;
393
	ADVANCE_LEXER;
394
    }
394
    }
395
    if (CURRENT_TERMINAL == LEXER_TOK_IDENTIFIER) {
395
    if (CURRENT_TERMINAL == LEXER_TOK_IDENTIFIER) {
396
	nstring_destroy (lexer_string_value (sid_current_stream));
396
	nstring_destroy (lexer_string_value (sid_current_stream));
397
    }
397
    }
398
    if (CURRENT_TERMINAL != LEXER_TOK_EOF) {
398
    if (CURRENT_TERMINAL != LEXER_TOK_EOF) {
399
	ADVANCE_LEXER;
399
	ADVANCE_LEXER;
400
    }
400
    }
401
    sid_propagating_error = TRUE;
401
    sid_propagating_error = TRUE;
402
	}
402
	}
403
	{
403
	{
404
 
404
 
405
    sid_propagating_error = FALSE;
405
    sid_propagating_error = FALSE;
406
	}
406
	}
407
    }
407
    }
408
}
408
}
409
 
409
 
410
static void
410
static void
411
ZR171 PROTO_Z ()
411
ZR171(void)
412
{
412
{
413
    switch (CURRENT_TERMINAL) {
413
    switch (CURRENT_TERMINAL) {
414
      case 4: case 18: case 19: case 24:
414
      case 4: case 18: case 19: case 24:
415
	{
415
	{
416
	    ZR168 ();
416
	    ZR168 ();
Line 430... Line 430...
430
    SAVE_LEXER (26);
430
    SAVE_LEXER (26);
431
    return;
431
    return;
432
}
432
}
433
 
433
 
434
static void
434
static void
435
ZR238 PROTO_Z ()
435
ZR239(void)
436
{
436
{
437
    if ((CURRENT_TERMINAL) == 26) {
437
    if ((CURRENT_TERMINAL) == 26) {
438
	return;
438
	return;
439
    }
439
    }
440
    {
440
    {
Line 454... Line 454...
454
	{
454
	{
455
	    switch (CURRENT_TERMINAL) {
455
	    switch (CURRENT_TERMINAL) {
456
	      case 5:
456
	      case 5:
457
		{
457
		{
458
		    ADVANCE_LEXER;
458
		    ADVANCE_LEXER;
459
		    ZR280 (&ZI151);
459
		    ZR281 (&ZI151);
460
		    if ((CURRENT_TERMINAL) == 26) {
460
		    if ((CURRENT_TERMINAL) == 26) {
461
			RESTORE_LEXER;
461
			RESTORE_LEXER;
462
			goto ZL3;
462
			goto ZL3;
463
		    }
463
		    }
464
		}
464
		}
Line 483... Line 483...
483
    } else {
483
    } else {
484
	E_duplicate_rule ((&ZI151));
484
	E_duplicate_rule ((&ZI151));
485
	nstring_destroy (&(ZI151));
485
	nstring_destroy (&(ZI151));
486
    }
486
    }
487
		    }
487
		    }
488
		    ZR247 ();
488
		    ZR248 ();
489
		    if ((CURRENT_TERMINAL) == 26) {
489
		    if ((CURRENT_TERMINAL) == 26) {
490
			RESTORE_LEXER;
490
			RESTORE_LEXER;
491
			goto ZL3;
491
			goto ZL3;
492
		    }
492
		    }
493
		}
493
		}
Line 529... Line 529...
529
    }
529
    }
530
    sid_propagating_error = TRUE;
530
    sid_propagating_error = TRUE;
531
		}
531
		}
532
	    }
532
	    }
533
	  ZL2:;
533
	  ZL2:;
534
	}
534
	}
535
    }
535
    }
536
    return;
536
    return;
537
  ZL1:;
537
  ZL1:;
538
    SAVE_LEXER (26);
538
    SAVE_LEXER (26);
539
    return;
539
    return;
540
}
540
}
541
 
541
 
542
static void
542
static void
543
ZR146 PROTO_Z ()
543
ZR146(void)
544
{
544
{
545
    if ((CURRENT_TERMINAL) == 26) {
545
    if ((CURRENT_TERMINAL) == 26) {
546
	return;
546
	return;
547
    }
547
    }
548
    {
548
    {
549
	switch (CURRENT_TERMINAL) {
549
	switch (CURRENT_TERMINAL) {
550
	  case 8:
550
	  case 8:
551
	    break;
551
	    break;
552
	  default:
552
	  default:
553
	    goto ZL1;
553
	    goto ZL1;
554
	}
554
	}
555
	ADVANCE_LEXER;
555
	ADVANCE_LEXER;
556
    }
556
    }
557
    return;
557
    return;
558
  ZL1:;
558
  ZL1:;
559
    {
559
    {
560
	{
560
	{
561
 
561
 
562
    if (!sid_propagating_error) {
562
    if (!sid_propagating_error) {
563
	E_expected_arrow ();
563
	E_expected_arrow ();
564
    }
564
    }
565
	}
565
	}
566
    }
566
    }
567
}
567
}
568
 
568
 
569
static void
569
static void
570
ZR163 PROTO_Z ()
570
ZR163(void)
-
 
571
{
-
 
572
    if ((CURRENT_TERMINAL) == 26) {
-
 
573
	return;
-
 
574
    }
-
 
575
    {
-
 
576
	{
-
 
577
 
-
 
578
    types_init (&sid_current_type);
-
 
579
    sid_current_pred_id = NIL (EntryP);
-
 
580
	}
-
 
581
	ZR185 ();
-
 
582
	ZR171 ();
-
 
583
	if ((CURRENT_TERMINAL) == 26) {
-
 
584
	    RESTORE_LEXER;
-
 
585
	    goto ZL1;
-
 
586
	}
-
 
587
	{
-
 
588
 
-
 
589
    sid_propagating_error = FALSE;
-
 
590
	}
-
 
591
	ZR186 ();
-
 
592
	if ((CURRENT_TERMINAL) == 26) {
-
 
593
	    RESTORE_LEXER;
-
 
594
	    goto ZL1;
-
 
595
	}
-
 
596
    }
-
 
597
    return;
-
 
598
  ZL1:;
-
 
599
    SAVE_LEXER (26);
-
 
600
    return;
-
 
601
}
-
 
602
 
-
 
603
static void
-
 
604
ZR147(void)
-
 
605
{
-
 
606
  ZL2_147:;
-
 
607
    switch (CURRENT_TERMINAL) {
-
 
608
      case 4:
-
 
609
	{
-
 
610
	    ZR149 ();
-
 
611
	    if ((CURRENT_TERMINAL) == 26) {
-
 
612
		RESTORE_LEXER;
-
 
613
		goto ZL1;
-
 
614
	    } else {
-
 
615
		goto ZL2_147;
-
 
616
	    }
-
 
617
	}
-
 
618
	/*UNREACHED*/
-
 
619
      case 26:
-
 
620
	return;
-
 
621
      default:
-
 
622
	break;
-
 
623
    }
-
 
624
    return;
-
 
625
  ZL1:;
-
 
626
    SAVE_LEXER (26);
-
 
627
    return;
-
 
628
}
-
 
629
 
-
 
630
static void
-
 
631
ZR175(void)
571
{
632
{
572
    if ((CURRENT_TERMINAL) == 26) {
633
    if ((CURRENT_TERMINAL) == 26) {
573
	return;
634
	return;
574
    }
635
    }
575
    {
636
    {
Line 577... Line 638...
577
 
638
 
578
    types_init (&sid_current_type);
639
    types_init (&sid_current_type);
579
    sid_current_pred_id = NIL (EntryP);
640
    sid_current_pred_id = NIL (EntryP);
580
	}
641
	}
581
	ZR185 ();
642
	ZR185 ();
582
	ZR171 ();
643
	ZR183 ();
583
	if ((CURRENT_TERMINAL) == 26) {
644
	if ((CURRENT_TERMINAL) == 26) {
584
	    RESTORE_LEXER;
645
	    RESTORE_LEXER;
585
	    goto ZL1;
646
	    goto ZL1;
586
	}
647
	}
587
	{
648
	{
588
 
649
 
589
    sid_propagating_error = FALSE;
650
    sid_propagating_error = FALSE;
590
	}
651
	}
591
	ZR186 ();
652
	ZR186 ();
592
	if ((CURRENT_TERMINAL) == 26) {
653
	if ((CURRENT_TERMINAL) == 26) {
593
	    RESTORE_LEXER;
654
	    RESTORE_LEXER;
594
	    goto ZL1;
655
	    goto ZL1;
595
	}
656
	}
596
    }
657
    }
597
    return;
658
    return;
598
  ZL1:;
659
  ZL1:;
599
    SAVE_LEXER (26);
660
    SAVE_LEXER (26);
600
    return;
661
    return;
601
}
662
}
602
 
663
 
603
static void
664
static void
604
ZR147 PROTO_Z ()
665
ZR221(void)
605
{
666
{
606
  ZL2_147:;
-
 
607
    switch (CURRENT_TERMINAL) {
667
    switch (CURRENT_TERMINAL) {
-
 
668
      case 13:
-
 
669
	{
-
 
670
	    EntryP ZI194;
-
 
671
	    RuleP ZI67;
-
 
672
	    AltP ZI223;
-
 
673
	    BoolT ZI224;
-
 
674
	    ItemP ZI225;
-
 
675
 
-
 
676
	    ADVANCE_LEXER;
-
 
677
	    {
-
 
678
 
-
 
679
    (ZI194)      = sid_current_entry;
-
 
680
    (ZI67)       = sid_current.rule;
-
 
681
    (ZI223)        = sid_current_alt;
-
 
682
    (ZI224)   = sid_internal_rule;
-
 
683
    (ZI225)             = NIL (ItemP);
-
 
684
    sid_internal_rule = TRUE;
-
 
685
    if ((sid_current_entry) && (sid_current_alt)) {
-
 
686
	sid_current_entry = table_add_generated_rule (sid_current_table,
-
 
687
						      FALSE);
-
 
688
	sid_current.rule  = entry_get_rule (sid_current_entry);
-
 
689
	(ZI225)             = item_create (sid_current_entry);
-
 
690
	rule_defined (sid_current.rule);
-
 
691
	item_inlinable ((ZI225));
-
 
692
	types_copy (item_param ((ZI225)), rule_param ((ZI67)));
-
 
693
	types_append_copy (item_param ((ZI225)), alt_names ((ZI223)));
-
 
694
	types_copy (rule_param (sid_current.rule), item_param ((ZI225)));
-
 
695
	types_make_references (rule_param (sid_current.rule),
-
 
696
			       item_param ((ZI225)));
-
 
697
	alt_add_item ((ZI223), (ZI225));
-
 
698
    } else {
-
 
699
	sid_current_entry = NIL (EntryP);
-
 
700
    }
-
 
701
	    }
-
 
702
	    ZR219 ();
-
 
703
	    if ((CURRENT_TERMINAL) == 26) {
-
 
704
		RESTORE_LEXER;
-
 
705
		goto ZL1;
-
 
706
	    }
-
 
707
	    {
-
 
708
 
-
 
709
    if (((ZI194)) && ((ZI223))) {
-
 
710
	rule_compute_result_intersect (sid_current.rule);
-
 
711
	types_copy (item_result ((ZI225)), rule_result (sid_current.rule));
-
 
712
	types_add_new_names (alt_names ((ZI223)), item_result ((ZI225)),
-
 
713
			     sid_unique_pred_id);
-
 
714
    }
-
 
715
    sid_internal_rule = (ZI224);
-
 
716
    sid_current_alt   = (ZI223);
-
 
717
    sid_current.rule  = (ZI67);
-
 
718
    sid_current_entry = (ZI194);
-
 
719
	    }
-
 
720
	    ZR251 ();
-
 
721
	    ZR252 ();
-
 
722
	    if ((CURRENT_TERMINAL) == 26) {
-
 
723
		RESTORE_LEXER;
-
 
724
		goto ZL1;
-
 
725
	    }
-
 
726
	}
-
 
727
	break;
-
 
728
      case 4: case 6: case 10: case 18: case 19:
608
      case 4:
729
      case 24:
609
	{
730
	{
610
	    ZR149 ();
731
	    ZR208 ();
611
	    if ((CURRENT_TERMINAL) == 26) {
732
	    if ((CURRENT_TERMINAL) == 26) {
612
		RESTORE_LEXER;
733
		RESTORE_LEXER;
613
		goto ZL1;
734
		goto ZL1;
614
	    } else {
735
	    }
615
		goto ZL2_147;
736
	    {
-
 
737
 
-
 
738
    sid_propagating_error = FALSE;
616
	    }
739
	    }
617
	}
740
	}
618
	/*UNREACHED*/
741
	break;
619
      case 26:
742
      case 26:
620
	return;
743
	return;
621
      default:
744
      default:
622
	break;
745
	goto ZL1;
623
    }
746
    }
624
    return;
747
    return;
625
  ZL1:;
748
  ZL1:;
626
    SAVE_LEXER (26);
749
    SAVE_LEXER (26);
627
    return;
750
    return;
628
}
751
}
629
 
752
 
630
static void
753
static void
631
ZR280 PROTO_N ((ZI151))
-
 
632
  PROTO_T (NStringT *ZI151)
754
ZR281(NStringT *ZI151)
633
{
755
{
634
    switch (CURRENT_TERMINAL) {
756
    switch (CURRENT_TERMINAL) {
635
      case 6:
757
      case 6:
636
	{
758
	{
637
	    ZR142 ();
759
	    ZR142 ();
638
	    if ((CURRENT_TERMINAL) == 26) {
760
	    if ((CURRENT_TERMINAL) == 26) {
639
		RESTORE_LEXER;
761
		RESTORE_LEXER;
640
		goto ZL1;
762
		goto ZL1;
641
	    }
763
	    }
642
	    {
764
	    {
643
 
765
 
644
    types_assign (&sid_saved_type, &sid_current_type);
766
    types_assign (&sid_saved_type, &sid_current_type);
Line 661... Line 783...
661
    } else {
783
    } else {
662
	E_duplicate_rule ((ZI151));
784
	E_duplicate_rule ((ZI151));
663
	nstring_destroy (&(*ZI151));
785
	nstring_destroy (&(*ZI151));
664
    }
786
    }
665
	    }
787
	    }
666
	    ZR247 ();
788
	    ZR248 ();
667
	    if ((CURRENT_TERMINAL) == 26) {
789
	    if ((CURRENT_TERMINAL) == 26) {
668
		RESTORE_LEXER;
790
		RESTORE_LEXER;
669
		goto ZL1;
791
		goto ZL1;
670
	    }
792
	    }
671
	}
793
	}
Line 791... Line 913...
791
	types_destroy (&tuple);
913
	types_destroy (&tuple);
792
	non_local_entry_set_initialiser (sid_non_local, entry);
914
	non_local_entry_set_initialiser (sid_non_local, entry);
793
    }
915
    }
794
    nstring_destroy (&(ZI49));
916
    nstring_destroy (&(ZI49));
795
					}
917
					}
796
					ZR245 ();
918
					ZR246 ();
797
					ZR251 ();
919
					ZR252 ();
798
					if ((CURRENT_TERMINAL) == 26) {
920
					if ((CURRENT_TERMINAL) == 26) {
799
					    RESTORE_LEXER;
921
					    RESTORE_LEXER;
800
					    goto ZL9;
922
					    goto ZL9;
801
					}
923
					}
802
				    }
924
				    }
Line 884... Line 1006...
884
    SAVE_LEXER (26);
1006
    SAVE_LEXER (26);
885
    return;
1007
    return;
886
}
1008
}
887
 
1009
 
888
static void
1010
static void
889
ZR175 PROTO_Z ()
-
 
890
{
-
 
891
    if ((CURRENT_TERMINAL) == 26) {
-
 
892
	return;
-
 
893
    }
-
 
894
    {
-
 
895
	{
-
 
896
 
-
 
897
    types_init (&sid_current_type);
-
 
898
    sid_current_pred_id = NIL (EntryP);
-
 
899
	}
-
 
900
	ZR185 ();
-
 
901
	ZR183 ();
-
 
902
	if ((CURRENT_TERMINAL) == 26) {
-
 
903
	    RESTORE_LEXER;
-
 
904
	    goto ZL1;
-
 
905
	}
-
 
906
	{
-
 
907
 
-
 
908
    sid_propagating_error = FALSE;
-
 
909
	}
-
 
910
	ZR186 ();
-
 
911
	if ((CURRENT_TERMINAL) == 26) {
-
 
912
	    RESTORE_LEXER;
-
 
913
	    goto ZL1;
-
 
914
	}
-
 
915
    }
-
 
916
    return;
-
 
917
  ZL1:;
-
 
918
    SAVE_LEXER (26);
-
 
919
    return;
-
 
920
}
-
 
921
 
-
 
922
static void
-
 
923
ZR220 PROTO_Z ()
-
 
924
{
-
 
925
    switch (CURRENT_TERMINAL) {
-
 
926
      case 13:
-
 
927
	{
-
 
928
	    EntryP ZI194;
-
 
929
	    RuleP ZI67;
-
 
930
	    AltP ZI222;
-
 
931
	    BoolT ZI223;
-
 
932
	    ItemP ZI224;
-
 
933
 
-
 
934
	    ADVANCE_LEXER;
-
 
935
	    {
-
 
936
 
-
 
937
    (ZI194)      = sid_current_entry;
-
 
938
    (ZI67)       = sid_current.rule;
-
 
939
    (ZI222)        = sid_current_alt;
-
 
940
    (ZI223)   = sid_internal_rule;
-
 
941
    (ZI224)             = NIL (ItemP);
-
 
942
    sid_internal_rule = TRUE;
-
 
943
    if ((sid_current_entry) && (sid_current_alt)) {
-
 
944
	sid_current_entry = table_add_generated_rule (sid_current_table,
-
 
945
						      FALSE);
-
 
946
	sid_current.rule  = entry_get_rule (sid_current_entry);
-
 
947
	(ZI224)             = item_create (sid_current_entry);
-
 
948
	rule_defined (sid_current.rule);
-
 
949
	item_inlinable ((ZI224));
-
 
950
	types_copy (item_param ((ZI224)), rule_param ((ZI67)));
-
 
951
	types_append_copy (item_param ((ZI224)), alt_names ((ZI222)));
-
 
952
	types_copy (rule_param (sid_current.rule), item_param ((ZI224)));
-
 
953
	types_make_references (rule_param (sid_current.rule),
-
 
954
			       item_param ((ZI224)));
-
 
955
	alt_add_item ((ZI222), (ZI224));
-
 
956
    } else {
-
 
957
	sid_current_entry = NIL (EntryP);
-
 
958
    }
-
 
959
	    }
-
 
960
	    ZR218 ();
-
 
961
	    if ((CURRENT_TERMINAL) == 26) {
-
 
962
		RESTORE_LEXER;
-
 
963
		goto ZL1;
-
 
964
	    }
-
 
965
	    {
-
 
966
 
-
 
967
    if (((ZI194)) && ((ZI222))) {
-
 
968
	rule_compute_result_intersect (sid_current.rule);
-
 
969
	types_copy (item_result ((ZI224)), rule_result (sid_current.rule));
-
 
970
	types_add_new_names (alt_names ((ZI222)), item_result ((ZI224)),
-
 
971
			     sid_unique_pred_id);
-
 
972
    }
-
 
973
    sid_internal_rule = (ZI223);
-
 
974
    sid_current_alt   = (ZI222);
-
 
975
    sid_current.rule  = (ZI67);
-
 
976
    sid_current_entry = (ZI194);
-
 
977
	    }
-
 
978
	    ZR250 ();
-
 
979
	    ZR251 ();
-
 
980
	    if ((CURRENT_TERMINAL) == 26) {
-
 
981
		RESTORE_LEXER;
-
 
982
		goto ZL1;
-
 
983
	    }
-
 
984
	}
-
 
985
	break;
-
 
986
      case 4: case 6: case 10: case 18: case 19:
-
 
987
      case 24:
-
 
988
	{
-
 
989
	    ZR207 ();
-
 
990
	    if ((CURRENT_TERMINAL) == 26) {
-
 
991
		RESTORE_LEXER;
-
 
992
		goto ZL1;
-
 
993
	    }
-
 
994
	    {
-
 
995
 
-
 
996
    sid_propagating_error = FALSE;
-
 
997
	    }
-
 
998
	}
-
 
999
	break;
-
 
1000
      case 26:
-
 
1001
	return;
-
 
1002
      default:
-
 
1003
	goto ZL1;
-
 
1004
    }
-
 
1005
    return;
-
 
1006
  ZL1:;
-
 
1007
    SAVE_LEXER (26);
-
 
1008
    return;
-
 
1009
}
-
 
1010
 
-
 
1011
static void
1011
ZR149(void)
1012
ZR282 PROTO_Z ()
-
 
1013
{
-
 
1014
    switch (CURRENT_TERMINAL) {
-
 
1015
      case 18:
-
 
1016
	{
-
 
1017
	    {
-
 
1018
 
-
 
1019
    if (sid_current_pred_id) {
-
 
1020
	E_multi_predicate_return ();
-
 
1021
    } else if (sid_unique_pred_id == NIL (EntryP)) {
-
 
1022
	sid_unique_pred_id = grammar_get_predicate_id (sid_current_grammar);
-
 
1023
    }
-
 
1024
    sid_current_pred_id = sid_unique_pred_id;
-
 
1025
    types_add_name_entry (&sid_current_type, sid_current_pred_id);
-
 
1026
	    }
-
 
1027
	    ADVANCE_LEXER;
-
 
1028
	    {
-
 
1029
 
-
 
1030
    types_assign (&sid_saved_type, &sid_current_type);
-
 
1031
    sid_saved_pred_id = sid_current_pred_id;
-
 
1032
	    }
-
 
1033
	    ZR248 ();
-
 
1034
	    ZR199 ();
-
 
1035
	    if ((CURRENT_TERMINAL) == 26) {
-
 
1036
		RESTORE_LEXER;
-
 
1037
		goto ZL1;
-
 
1038
	    }
-
 
1039
	}
-
 
1040
	break;
-
 
1041
      case 19:
-
 
1042
	{
-
 
1043
	    {
-
 
1044
 
-
 
1045
    EntryP entry = table_add_generated_name (sid_current_table);
-
 
1046
 
-
 
1047
    types_add_name_entry (&sid_current_type, entry);
-
 
1048
	    }
-
 
1049
	    ADVANCE_LEXER;
-
 
1050
	    {
-
 
1051
 
-
 
1052
    types_assign (&sid_saved_type, &sid_current_type);
-
 
1053
    sid_saved_pred_id = sid_current_pred_id;
-
 
1054
	    }
-
 
1055
	    ZR248 ();
-
 
1056
	    ZR199 ();
-
 
1057
	    if ((CURRENT_TERMINAL) == 26) {
-
 
1058
		RESTORE_LEXER;
-
 
1059
		goto ZL1;
-
 
1060
	    }
-
 
1061
	}
-
 
1062
	break;
-
 
1063
      case 10:
-
 
1064
	{
-
 
1065
	    {
-
 
1066
 
-
 
1067
    types_assign (&sid_saved_type, &sid_current_type);
-
 
1068
    sid_saved_pred_id = sid_current_pred_id;
-
 
1069
	    }
-
 
1070
	    ADVANCE_LEXER;
-
 
1071
	    ZR216 ();
-
 
1072
	    if ((CURRENT_TERMINAL) == 26) {
-
 
1073
		RESTORE_LEXER;
-
 
1074
		goto ZL1;
-
 
1075
	    }
-
 
1076
	}
-
 
1077
	break;
-
 
1078
      case 26:
-
 
1079
	return;
-
 
1080
      default:
-
 
1081
	goto ZL1;
-
 
1082
    }
-
 
1083
    return;
-
 
1084
  ZL1:;
-
 
1085
    SAVE_LEXER (26);
-
 
1086
    return;
-
 
1087
}
-
 
1088
 
-
 
1089
static void
-
 
1090
ZR149 PROTO_Z ()
-
 
1091
{
1012
{
1092
    if ((CURRENT_TERMINAL) == 26) {
1013
    if ((CURRENT_TERMINAL) == 26) {
1093
	return;
1014
	return;
1094
    }
1015
    }
1095
    {
1016
    {
Line 1111... Line 1032...
1111
    if (table_add_type (sid_current_table, &(ZI151)) == NIL (EntryP)) {
1032
    if (table_add_type (sid_current_table, &(ZI151)) == NIL (EntryP)) {
1112
	E_duplicate_type ((&ZI151));
1033
	E_duplicate_type ((&ZI151));
1113
	nstring_destroy (&(ZI151));
1034
	nstring_destroy (&(ZI151));
1114
    }
1035
    }
1115
	}
1036
	}
1116
	ZR251 ();
1037
	ZR252 ();
1117
	if ((CURRENT_TERMINAL) == 26) {
1038
	if ((CURRENT_TERMINAL) == 26) {
1118
	    RESTORE_LEXER;
1039
	    RESTORE_LEXER;
1119
	    goto ZL1;
1040
	    goto ZL1;
1120
	}
1041
	}
1121
    }
1042
    }
Line 1124... Line 1045...
1124
    SAVE_LEXER (26);
1045
    SAVE_LEXER (26);
1125
    return;
1046
    return;
1126
}
1047
}
1127
 
1048
 
1128
static void
1049
static void
-
 
1050
ZR283(void)
-
 
1051
{
-
 
1052
    switch (CURRENT_TERMINAL) {
-
 
1053
      case 18:
-
 
1054
	{
-
 
1055
	    {
-
 
1056
 
-
 
1057
    if (sid_current_pred_id) {
-
 
1058
	E_multi_predicate_return ();
-
 
1059
    } else if (sid_unique_pred_id == NIL (EntryP)) {
-
 
1060
	sid_unique_pred_id = grammar_get_predicate_id (sid_current_grammar);
-
 
1061
    }
-
 
1062
    sid_current_pred_id = sid_unique_pred_id;
-
 
1063
    types_add_name_entry (&sid_current_type, sid_current_pred_id);
-
 
1064
	    }
-
 
1065
	    ADVANCE_LEXER;
-
 
1066
	    {
-
 
1067
 
-
 
1068
    types_assign (&sid_saved_type, &sid_current_type);
-
 
1069
    sid_saved_pred_id = sid_current_pred_id;
-
 
1070
	    }
-
 
1071
	    ZR249 ();
-
 
1072
	    ZR199 ();
-
 
1073
	    if ((CURRENT_TERMINAL) == 26) {
-
 
1074
		RESTORE_LEXER;
-
 
1075
		goto ZL1;
-
 
1076
	    }
-
 
1077
	}
-
 
1078
	break;
-
 
1079
      case 19:
-
 
1080
	{
-
 
1081
	    {
-
 
1082
 
-
 
1083
    EntryP entry = table_add_generated_name (sid_current_table);
-
 
1084
 
-
 
1085
    types_add_name_entry (&sid_current_type, entry);
-
 
1086
	    }
-
 
1087
	    ADVANCE_LEXER;
-
 
1088
	    {
-
 
1089
 
-
 
1090
    types_assign (&sid_saved_type, &sid_current_type);
-
 
1091
    sid_saved_pred_id = sid_current_pred_id;
-
 
1092
	    }
-
 
1093
	    ZR249 ();
-
 
1094
	    ZR199 ();
-
 
1095
	    if ((CURRENT_TERMINAL) == 26) {
-
 
1096
		RESTORE_LEXER;
-
 
1097
		goto ZL1;
-
 
1098
	    }
-
 
1099
	}
-
 
1100
	break;
-
 
1101
      case 10:
-
 
1102
	{
-
 
1103
	    {
-
 
1104
 
-
 
1105
    types_assign (&sid_saved_type, &sid_current_type);
-
 
1106
    sid_saved_pred_id = sid_current_pred_id;
-
 
1107
	    }
-
 
1108
	    ADVANCE_LEXER;
-
 
1109
	    ZR217 ();
-
 
1110
	    if ((CURRENT_TERMINAL) == 26) {
-
 
1111
		RESTORE_LEXER;
-
 
1112
		goto ZL1;
-
 
1113
	    }
-
 
1114
	}
-
 
1115
	break;
-
 
1116
      case 26:
-
 
1117
	return;
-
 
1118
      default:
-
 
1119
	goto ZL1;
-
 
1120
    }
-
 
1121
    return;
-
 
1122
  ZL1:;
-
 
1123
    SAVE_LEXER (26);
-
 
1124
    return;
-
 
1125
}
-
 
1126
 
-
 
1127
static void
-
 
1128
ZR183(void)
-
 
1129
{
-
 
1130
    switch (CURRENT_TERMINAL) {
-
 
1131
      case 4: case 24:
-
 
1132
	{
-
 
1133
	    ZR180 ();
-
 
1134
	    if ((CURRENT_TERMINAL) == 26) {
-
 
1135
		RESTORE_LEXER;
-
 
1136
		goto ZL1;
-
 
1137
	    }
-
 
1138
	}
-
 
1139
	break;
-
 
1140
      case 26:
-
 
1141
	return;
-
 
1142
      default:
-
 
1143
	break;
-
 
1144
    }
-
 
1145
    return;
-
 
1146
  ZL1:;
-
 
1147
    SAVE_LEXER (26);
-
 
1148
    return;
-
 
1149
}
-
 
1150
 
-
 
1151
static void
-
 
1152
ZR192(void)
-
 
1153
{
-
 
1154
    switch (CURRENT_TERMINAL) {
-
 
1155
      case 21:
-
 
1156
	{
1129
ZR283 PROTO_N ((ZI151))
1157
	    EntryP ZI194;
-
 
1158
	    RuleP ZI67;
-
 
1159
 
-
 
1160
	    ADVANCE_LEXER;
-
 
1161
	    {
-
 
1162
 
-
 
1163
    (ZI194)       = sid_current_entry;
-
 
1164
    (ZI67)        = sid_enclosing_rule;
-
 
1165
 
-
 
1166
    sid_enclosing_rule = sid_current.rule;
-
 
1167
	    }
-
 
1168
	    ZR161 ();
-
 
1169
	    if ((CURRENT_TERMINAL) == 26) {
-
 
1170
		RESTORE_LEXER;
-
 
1171
		goto ZL1;
-
 
1172
	    }
-
 
1173
	    {
-
 
1174
 
-
 
1175
    sid_current_entry  = (ZI194);
-
 
1176
    sid_current.rule   = sid_enclosing_rule;
-
 
1177
    sid_enclosing_rule = (ZI67);
-
 
1178
    sid_alternative    = 0;
-
 
1179
    sid_internal_rule  = FALSE;
-
 
1180
    sid_external_rule  = sid_current_entry;
-
 
1181
    nstring_init (&sid_maximum_scope);
-
 
1182
	    }
-
 
1183
	    {
-
 
1184
		{
-
 
1185
		    switch (CURRENT_TERMINAL) {
-
 
1186
		      case 22:
-
 
1187
			break;
-
 
1188
		      default:
-
 
1189
			goto ZL3;
-
 
1190
		    }
-
 
1191
		    ADVANCE_LEXER;
-
 
1192
		}
-
 
1193
		goto ZL2;
-
 
1194
	      ZL3:;
-
 
1195
		{
-
 
1196
		    {
-
 
1197
 
-
 
1198
    if (!sid_propagating_error) {
-
 
1199
	E_expected_end_scope ();
-
 
1200
    }
-
 
1201
		    }
-
 
1202
		}
-
 
1203
	      ZL2:;
-
 
1204
	    }
-
 
1205
	}
-
 
1206
	break;
-
 
1207
      case 26:
-
 
1208
	return;
-
 
1209
      default:
-
 
1210
	break;
-
 
1211
    }
-
 
1212
    return;
-
 
1213
  ZL1:;
-
 
1214
    SAVE_LEXER (26);
-
 
1215
    return;
-
 
1216
}
-
 
1217
 
-
 
1218
static void
1130
  PROTO_T (NStringT *ZI151)
1219
ZR284(NStringT *ZI151)
1131
{
1220
{
1132
    switch (CURRENT_TERMINAL) {
1221
    switch (CURRENT_TERMINAL) {
1133
      case 12:
1222
      case 12:
1134
	{
1223
	{
1135
	    {
1224
	    {
1136
 
1225
 
1137
    NStringT scope;
1226
    NStringT scope;
1138
    EntryP   non_local_entry = scope_stack_get_non_local (&sid_scope_stack,
1227
    EntryP   non_local_entry = scope_stack_get_non_local (&sid_scope_stack,
1139
							  sid_current_table,
1228
							  sid_current_table,
Line 1164... Line 1253...
1164
	if (nstring_length (&scope) > nstring_length (&sid_maximum_scope)) {
1253
	if (nstring_length (&scope) > nstring_length (&sid_maximum_scope)) {
1165
	    nstring_destroy (&sid_maximum_scope);
1254
	    nstring_destroy (&sid_maximum_scope);
1166
	    nstring_assign (&sid_maximum_scope, &scope);
1255
	    nstring_assign (&sid_maximum_scope, &scope);
1167
	} else {
1256
	} else {
1168
	    nstring_destroy (&scope);
1257
	    nstring_destroy (&scope);
1169
	}
1258
	}
1170
	nstring_destroy (&(*ZI151));
1259
	nstring_destroy (&(*ZI151));
1171
    } else {
1260
    } else {
1172
	types_add_name (&sid_current_type, sid_current_table, &(*ZI151), FALSE);
1261
	types_add_name (&sid_current_type, sid_current_table, &(*ZI151), FALSE);
1173
    }
1262
    }
1174
	    }
1263
	    }
Line 1177... Line 1266...
1177
    types_assign (&sid_saved_type, &sid_current_type);
1266
    types_assign (&sid_saved_type, &sid_current_type);
1178
    sid_saved_pred_id = sid_current_pred_id;
1267
    sid_saved_pred_id = sid_current_pred_id;
1179
	    }
1268
	    }
1180
	    ADVANCE_LEXER;
1269
	    ADVANCE_LEXER;
1181
	    ZR199 ();
1270
	    ZR199 ();
1182
	    if ((CURRENT_TERMINAL) == 26) {
1271
	    if ((CURRENT_TERMINAL) == 26) {
1183
		RESTORE_LEXER;
1272
		RESTORE_LEXER;
1184
		goto ZL1;
1273
		goto ZL1;
1185
	    }
1274
	    }
1186
	}
1275
	}
1187
	break;
1276
	break;
1188
      case 6: case 9:
1277
      case 6: case 9:
1189
	{
1278
	{
1190
	    {
1279
	    {
1191
 
1280
 
1192
    types_assign (&sid_saved_type, &sid_current_type);
1281
    types_assign (&sid_saved_type, &sid_current_type);
1193
    sid_saved_pred_id = sid_current_pred_id;
1282
    sid_saved_pred_id = sid_current_pred_id;
1194
	    }
1283
	    }
1195
	    ZR284 (ZI151);
1284
	    ZR285 (ZI151);
1196
	    if ((CURRENT_TERMINAL) == 26) {
-
 
1197
		RESTORE_LEXER;
-
 
1198
		goto ZL1;
-
 
1199
	    }
-
 
1200
	}
-
 
1201
	break;
-
 
1202
      case 26:
-
 
1203
	return;
-
 
1204
      default:
-
 
1205
	goto ZL1;
-
 
1206
    }
-
 
1207
    return;
-
 
1208
  ZL1:;
-
 
1209
    SAVE_LEXER (26);
-
 
1210
    return;
-
 
1211
}
-
 
1212
 
-
 
1213
static void
-
 
1214
ZR183 PROTO_Z ()
-
 
1215
{
-
 
1216
    switch (CURRENT_TERMINAL) {
-
 
1217
      case 4: case 24:
-
 
1218
	{
-
 
1219
	    ZR180 ();
-
 
1220
	    if ((CURRENT_TERMINAL) == 26) {
1285
	    if ((CURRENT_TERMINAL) == 26) {
1221
		RESTORE_LEXER;
1286
		RESTORE_LEXER;
1222
		goto ZL1;
1287
		goto ZL1;
1223
	    }
1288
	    }
1224
	}
1289
	}
1225
	break;
1290
	break;
1226
      case 26:
1291
      case 26:
1227
	return;
1292
	return;
1228
      default:
1293
      default:
1229
	break;
1294
	goto ZL1;
1230
    }
1295
    }
1231
    return;
1296
    return;
1232
  ZL1:;
1297
  ZL1:;
1233
    SAVE_LEXER (26);
1298
    SAVE_LEXER (26);
1234
    return;
1299
    return;
1235
}
1300
}
1236
 
1301
 
1237
static void
1302
static void
1238
ZR192 PROTO_Z ()
-
 
1239
{
-
 
1240
    switch (CURRENT_TERMINAL) {
-
 
1241
      case 21:
-
 
1242
	{
-
 
1243
	    EntryP ZI194;
-
 
1244
	    RuleP ZI67;
-
 
1245
 
-
 
1246
	    ADVANCE_LEXER;
-
 
1247
	    {
-
 
1248
 
-
 
1249
    (ZI194)       = sid_current_entry;
-
 
1250
    (ZI67)        = sid_enclosing_rule;
-
 
1251
 
-
 
1252
    sid_enclosing_rule = sid_current.rule;
-
 
1253
	    }
-
 
1254
	    ZR161 ();
-
 
1255
	    if ((CURRENT_TERMINAL) == 26) {
-
 
1256
		RESTORE_LEXER;
-
 
1257
		goto ZL1;
-
 
1258
	    }
-
 
1259
	    {
-
 
1260
 
-
 
1261
    sid_current_entry  = (ZI194);
-
 
1262
    sid_current.rule   = sid_enclosing_rule;
-
 
1263
    sid_enclosing_rule = (ZI67);
-
 
1264
    sid_alternative    = 0;
-
 
1265
    sid_internal_rule  = FALSE;
-
 
1266
    sid_external_rule  = sid_current_entry;
-
 
1267
    nstring_init (&sid_maximum_scope);
-
 
1268
	    }
-
 
1269
	    {
-
 
1270
		{
-
 
1271
		    switch (CURRENT_TERMINAL) {
-
 
1272
		      case 22:
-
 
1273
			break;
-
 
1274
		      default:
-
 
1275
			goto ZL3;
-
 
1276
		    }
-
 
1277
		    ADVANCE_LEXER;
-
 
1278
		}
-
 
1279
		goto ZL2;
-
 
1280
	      ZL3:;
-
 
1281
		{
-
 
1282
		    {
-
 
1283
 
-
 
1284
    if (!sid_propagating_error) {
-
 
1285
	E_expected_end_scope ();
-
 
1286
    }
-
 
1287
		    }
-
 
1288
		}
-
 
1289
	      ZL2:;
-
 
1290
	    }
-
 
1291
	}
-
 
1292
	break;
-
 
1293
      case 26:
-
 
1294
	return;
-
 
1295
      default:
-
 
1296
	break;
-
 
1297
    }
-
 
1298
    return;
-
 
1299
  ZL1:;
-
 
1300
    SAVE_LEXER (26);
-
 
1301
    return;
-
 
1302
}
-
 
1303
 
-
 
1304
static void
-
 
1305
ZR284 PROTO_N ((ZI151))
-
 
1306
  PROTO_T (NStringT *ZI151)
1303
ZR285(NStringT *ZI151)
1307
{
1304
{
1308
    switch (CURRENT_TERMINAL) {
1305
    switch (CURRENT_TERMINAL) {
1309
      case 6:
1306
      case 6:
1310
	{
1307
	{
1311
	    ZR175 ();
1308
	    ZR175 ();
Line 1346... Line 1343...
1346
	}
1343
	}
1347
    } else {
1344
    } else {
1348
	sid_current_item = NIL (ItemP);
1345
	sid_current_item = NIL (ItemP);
1349
    }
1346
    }
1350
    nstring_destroy (&(*ZI151));
1347
    nstring_destroy (&(*ZI151));
1505
	    errored = TRUE;
1502
	    errored = TRUE;
1506
	}
1503
	}
1507
	if (types_disjoint_names (&sid_saved_type)) {
1504
	if (types_disjoint_names (&sid_saved_type)) {
1508
	    if (types_check_undefined (&sid_saved_type,
1505
	    if (types_check_undefined (&sid_saved_type,
1509
				       rule_param (sid_current.rule),
1506
				       rule_param (sid_current.rule),
Line 1555... Line 1552...
1555
	    (void) alt_deallocate (sid_current_alt);
1552
	    (void) alt_deallocate (sid_current_alt);
1556
	    sid_current_alt = NIL (AltP);
1553
	    sid_current_alt = NIL (AltP);
1557
	}
1554
	}
1558
	types_destroy (&sid_saved_type);
1555
	types_destroy (&sid_saved_type);
1559
	types_destroy (&sid_current_type);
1556
	types_destroy (&sid_current_type);
1560
    }
1557
    }
1561
	    }
1558
	    }
1562
	    ADVANCE_LEXER;
1559
	    ADVANCE_LEXER;
1563
	}
1560
	}
1564
	break;
1561
	break;
1565
      case 26:
1562
      case 26:
1566
	return;
1563
	return;
1567
      default:
1564
      default:
1568
	goto ZL1;
1565
	goto ZL1;
1569
    }
1566
    }
1570
    return;
1567
    return;
1571
  ZL1:;
1568
  ZL1:;
1572
    SAVE_LEXER (26);
1569
    SAVE_LEXER (26);
1573
    return;
1570
    return;
1574
}
1571
}
1575
 
1572
 
1576
static void
1573
static void
1577
ZR165 PROTO_Z ()
1574
ZR165(void)
1578
{
1575
{
1579
    switch (CURRENT_TERMINAL) {
1576
    switch (CURRENT_TERMINAL) {
1580
      case 4:
1577
      case 4:
1581
	{
1578
	{
1582
	    NStringT ZI151;
1579
	    NStringT ZI151;
Line 1714... Line 1711...
1714
    }
1711
    }
1715
		    }
1712
		    }
1716
		}
1713
		}
1717
		goto ZL2;
1714
		goto ZL2;
1718
	      ZL3:;
1715
	      ZL3:;
1719
		{
1716
		{
1720
		    {
1717
		    {
1721
 
1718
 
1722
    if (!sid_propagating_error) {
1719
    if (!sid_propagating_error) {
1723
	E_expected_identifier ();
1720
	E_expected_identifier ();
1724
    }
1721
    }
Line 1727... Line 1724...
1727
	      ZL2:;
1724
	      ZL2:;
1728
	    }
1725
	    }
1729
	}
1726
	}
1730
	break;
1727
	break;
1731
      case 26:
1728
      case 26:
1732
	return;
1729
	return;
1733
      default:
1730
      default:
1734
	goto ZL1;
1731
	goto ZL1;
1735
    }
1732
    }
1736
    return;
1733
    return;
1737
  ZL1:;
1734
  ZL1:;
1738
    {
1735
    {
1739
	{
1736
	{
1740
 
1737
 
1741
    if (!sid_propagating_error) {
1738
    if (!sid_propagating_error) {
1742
	E_expected_lhs_name ();
1739
	E_expected_lhs_name ();
1743
    }
1740
    }
1744
	}
1741
	}
1745
	{
1742
	{
1746
 
1743
 
1747
    while ((CURRENT_TERMINAL != LEXER_TOK_EOF) &&
1744
    while ((CURRENT_TERMINAL != LEXER_TOK_EOF) &&
1748
	   (CURRENT_TERMINAL != LEXER_TOK_TERMINATOR) &&
1745
	   (CURRENT_TERMINAL != LEXER_TOK_TERMINATOR) &&
1749
	   (CURRENT_TERMINAL != LEXER_TOK_BLT_PRODUCTIONS) &&
1746
	   (CURRENT_TERMINAL != LEXER_TOK_BLT_PRODUCTIONS) &&
1750
	   (CURRENT_TERMINAL != LEXER_TOK_BLT_ENTRY)) {
1747
	   (CURRENT_TERMINAL != LEXER_TOK_BLT_ENTRY)) {
Line 1761... Line 1758...
1761
    }
1758
    }
1762
    sid_propagating_error = TRUE;
1759
    sid_propagating_error = TRUE;
1763
	}
1760
	}
1764
    }
1761
    }
1765
}
1762
}
1766
 
1763
 
1767
static void
1764
static void
1768
ZR161 PROTO_Z ()
1765
ZR161(void)
1769
{
1766
{
1770
    if ((CURRENT_TERMINAL) == 26) {
1767
    if ((CURRENT_TERMINAL) == 26) {
1771
	return;
1768
	return;
1772
    }
1769
    }
1773
  ZL2_161:;
1770
  ZL2_161:;
1774
    {
1771
    {
1775
	ZR252 ();
1772
	ZR253 ();
1776
	if ((CURRENT_TERMINAL) == 26) {
1773
	if ((CURRENT_TERMINAL) == 26) {
1777
	    RESTORE_LEXER;
1774
	    RESTORE_LEXER;
1778
	    goto ZL1;
1775
	    goto ZL1;
1779
	}
1776
	}
1780
	{
1777
	{
1781
 
1778
 
1782
    sid_propagating_error = FALSE;
1779
    sid_propagating_error = FALSE;
1783
	}
1780
	}
1784
	{
1781
	{
1785
	    {
1782
	    {
1786
		{
1783
		{
1787
 
1784
 
1788
    (ZI0) = ((CURRENT_TERMINAL == LEXER_TOK_EOF) ||
1785
    (ZI0) = ((CURRENT_TERMINAL == LEXER_TOK_EOF) ||
1789
		  (CURRENT_TERMINAL == LEXER_TOK_END_SCOPE) ||
1786
		  (CURRENT_TERMINAL == LEXER_TOK_END_SCOPE) ||
1790
		  (CURRENT_TERMINAL == LEXER_TOK_BLT_ENTRY));
1787
		  (CURRENT_TERMINAL == LEXER_TOK_BLT_ENTRY));
1791
		}
1788
		}
1792
		if (!ZI0)
1789
		if (!ZI0)
1793
		    goto ZL4;
1790
		    goto ZL4;
1794
		goto ZL3;
1791
		goto ZL3;
1795
	    }
1792
	    }
1796
	    /*UNREACHED*/
1793
	    /*UNREACHED*/
1797
	  ZL4:;
1794
	  ZL4:;
Line 1812... Line 1809...
1812
    {
1809
    {
1813
	{
1810
	{
1814
 
1811
 
1815
    if (!sid_propagating_error) {
1812
    if (!sid_propagating_error) {
1816
	E_expected_production_defn ();
1813
	E_expected_production_defn ();
1817
    }
1814
    }
1818
	}
1815
	}
1819
	{
1816
	{
1820
 
1817
 
1821
    while ((CURRENT_TERMINAL != LEXER_TOK_EOF) &&
1818
    while ((CURRENT_TERMINAL != LEXER_TOK_EOF) &&
1822
	   (CURRENT_TERMINAL != LEXER_TOK_TERMINATOR) &&
1819
	   (CURRENT_TERMINAL != LEXER_TOK_TERMINATOR) &&
1823
	   (CURRENT_TERMINAL != LEXER_TOK_END_SCOPE) &&
1820
	   (CURRENT_TERMINAL != LEXER_TOK_END_SCOPE) &&
1824
	   (CURRENT_TERMINAL != LEXER_TOK_END_RULE) &&
1821
	   (CURRENT_TERMINAL != LEXER_TOK_END_RULE) &&
Line 1856... Line 1853...
1856
	  ZL7:;
1853
	  ZL7:;
1857
	    {
1854
	    {
1858
		goto ZL2_161;
1855
		goto ZL2_161;
1859
	    }
1856
	    }
1860
	    /*UNREACHED*/
1857
	    /*UNREACHED*/
1861
	  ZL6:;
1858
	  ZL6:;
1862
	}
1859
	}
1863
    }
1860
    }
1864
}
1861
}
1865
 
1862
 
1866
void
1863
void
1867
sid_parse_grammar PROTO_Z ()
1864
sid_parse_grammar(void)
1868
{
1865
{
1869
    if ((CURRENT_TERMINAL) == 26) {
1866
    if ((CURRENT_TERMINAL) == 26) {
1870
	return;
1867
	return;
1871
    }
1868
    }
1872
    {
1869
    {
Line 1874... Line 1871...
1874
 
1871
 
1875
sid_current_table      = grammar_table (sid_current_grammar);
1872
sid_current_table      = grammar_table (sid_current_grammar);
1876
sid_current_entry_list = grammar_entry_list (sid_current_grammar);
1873
sid_current_entry_list = grammar_entry_list (sid_current_grammar);
1877
scope_stack_init (&sid_scope_stack);
1874
scope_stack_init (&sid_scope_stack);
1878
scope_stack_init (&sid_global_scope);
1875
scope_stack_init (&sid_global_scope);
1879
	}
1876
	}
1880
	{
1877
	{
1881
	    {
1878
	    {
1882
		switch (CURRENT_TERMINAL) {
1879
		switch (CURRENT_TERMINAL) {
1883
		  case 0:
1880
		  case 0:
1884
		    break;
1881
		    break;
1885
		  default:
1882
		  default:
1886
		    goto ZL3;
1883
		    goto ZL3;
1887
		}
1884
		}
1888
		ADVANCE_LEXER;
1885
		ADVANCE_LEXER;
1889
	    }
1886
	    }
1890
	    goto ZL2;
1887
	    goto ZL2;
1891
	  ZL3:;
1888
	  ZL3:;
1892
	    {
1889
	    {
1893
		{
1890
		{
1894
 
1891
 
1895
    if (!sid_propagating_error) {
1892
    if (!sid_propagating_error) {
1896
	E_expected_blt_types ();
1893
	E_expected_blt_types ();
1897
    }
1894
    }
1898
		}
1895
		}
1899
	    }
1896
	    }
1900
	  ZL2:;
1897
	  ZL2:;
1901
	}
1898
	}
1902
	ZR147 ();
1899
	ZR147 ();
Line 1928... Line 1925...
1928
	}
1925
	}
1929
	ZR153 ();
1926
	ZR153 ();
1930
	if ((CURRENT_TERMINAL) == 26) {
1927
	if ((CURRENT_TERMINAL) == 26) {
1931
	    RESTORE_LEXER;
1928
	    RESTORE_LEXER;
1932
	    goto ZL1;
1929
	    goto ZL1;
1933
	}
1930
	}
1934
	{
1931
	{
1935
 
1932
 
1936
    unsigned max_terminal = grammar_max_terminal (sid_current_grammar);
1933
    unsigned max_terminal = grammar_max_terminal (sid_current_grammar);
1937
 
1934
 
1938
    bitvec_set_size (max_terminal);
1935
    bitvec_set_size (max_terminal);
1939
    sid_finished_terminals = TRUE;
1936
    sid_finished_terminals = TRUE;
1940
	}
1937
	}
1941
	{
1938
	{
1942
	    {
1939
	    {
1943
		switch (CURRENT_TERMINAL) {
1940
		switch (CURRENT_TERMINAL) {
1944
		  case 2:
1941
		  case 2:
1945
		    break;
1942
		    break;
1946
		  default:
1943
		  default:
1947
		    goto ZL7;
1944
		    goto ZL7;
1948
		}
1945
		}
1949
		ADVANCE_LEXER;
1946
		ADVANCE_LEXER;
1950
	    }
1947
	    }
1951
	    goto ZL6;
1948
	    goto ZL6;
1952
	  ZL7:;
1949
	  ZL7:;
1953
	    {
1950
	    {
1954
		{
1951
		{
1955
 
1952
 
1956
    if (!sid_propagating_error) {
1953
    if (!sid_propagating_error) {
1957
	E_expected_blt_productions ();
1954
	E_expected_blt_productions ();
1958
    }
1955
    }
1959
		}
1956
		}
1960
	    }
1957
	    }
1961
	  ZL6:;
1958
	  ZL6:;
Line 1972... Line 1969...
1972
		    break;
1969
		    break;
1973
		  default:
1970
		  default:
1974
		    goto ZL9;
1971
		    goto ZL9;
1975
		}
1972
		}
1976
		ADVANCE_LEXER;
1973
		ADVANCE_LEXER;
1977
	    }
1974
	    }
1978
	    goto ZL8;
1975
	    goto ZL8;
1979
	  ZL9:;
1976
	  ZL9:;
1980
	    {
1977
	    {
1981
		{
1978
		{
1982
 
1979
 
Line 1985... Line 1982...
1985
    }
1982
    }
1986
		}
1983
		}
1987
	    }
1984
	    }
1988
	  ZL8:;
1985
	  ZL8:;
1989
	}
1986
	}
1990
	ZR258 ();
1987
	ZR259 ();
1991
	ZR251 ();
1988
	ZR252 ();
1992
	{
1989
	{
1993
	    if ((CURRENT_TERMINAL) == 26) {
1990
	    if ((CURRENT_TERMINAL) == 26) {
1994
		RESTORE_LEXER;
1991
		RESTORE_LEXER;
1995
		goto ZL1;
1992
		goto ZL1;
1996
	    }
1993
	    }
Line 2025... Line 2022...
2025
	}
2022
	}
2026
    }
2023
    }
2027
}
2024
}
2028
 
2025
 
2029
static void
2026
static void
2030
ZR140 PROTO_Z ()
2027
ZR140(void)
2031
{
2028
{
2032
    switch (CURRENT_TERMINAL) {
2029
    switch (CURRENT_TERMINAL) {
2033
      case 4: case 5:
2030
      case 4: case 5:
2034
	{
2031
	{
2035
	    ZR137 ();
2032
	    ZR137 ();
Line 2049... Line 2046...
2049
    SAVE_LEXER (26);
2046
    SAVE_LEXER (26);
2050
    return;
2047
    return;
2051
}
2048
}
2052
 
2049
 
2053
static void
2050
static void
2054
ZR142 PROTO_Z ()
2051
ZR142(void)
2055
{
2052
{
2056
    if ((CURRENT_TERMINAL) == 26) {
2053
    if ((CURRENT_TERMINAL) == 26) {
2057
	return;
2054
	return;
2058
    }
2055
    }
2059
    {
2056
    {
Line 2062... Line 2059...
2062
    types_init (&sid_current_type);
2059
    types_init (&sid_current_type);
2063
    sid_current_pred_id = NIL (EntryP);
2060
    sid_current_pred_id = NIL (EntryP);
2064
	}
2061
	}
2065
	ZR185 ();
2062
	ZR185 ();
2066
	ZR140 ();
2063
	ZR140 ();
2067
	if ((CURRENT_TERMINAL) == 26) {
2064
	if ((CURRENT_TERMINAL) == 26) {
2068
	    RESTORE_LEXER;
2065
	    RESTORE_LEXER;
2069
	    goto ZL1;
2066
	    goto ZL1;
2070
	}
2067
	}
2071
	{
2068
	{
2072
 
2069
 
2073
    sid_propagating_error = FALSE;
2070
    sid_propagating_error = FALSE;
2074
	}
2071
	}
2075
	ZR186 ();
2072
	ZR186 ();
2076
	if ((CURRENT_TERMINAL) == 26) {
2073
	if ((CURRENT_TERMINAL) == 26) {
2077
	    RESTORE_LEXER;
2074
	    RESTORE_LEXER;
2078
	    goto ZL1;
2075
	    goto ZL1;
2079
	}
2076
	}
2080
    }
2077
    }
2081
    return;
2078
    return;
2082
  ZL1:;
2079
  ZL1:;
2083
    SAVE_LEXER (26);
2080
    SAVE_LEXER (26);
2084
    return;
2081
    return;
2085
}
2082
}
2086
 
2083
 
2087
static void
2084
static void
2088
ZR177 PROTO_Z ()
2085
ZR177(void)
2089
{
2086
{
2090
    switch (CURRENT_TERMINAL) {
2087
    switch (CURRENT_TERMINAL) {
2091
      case 4:
2088
      case 4:
2092
	{
2089
	{
2093
	    NStringT ZI151;
2090
	    NStringT ZI151;
2094
 
2091
 
2095
	    {
2092
	    {
2096
 
2093
 
2097
    nstring_assign (&ZI151, lexer_string_value (sid_current_stream));
2094
    nstring_assign (&ZI151, lexer_string_value (sid_current_stream));
2098
	    }
2095
	    }
2099
	    ADVANCE_LEXER;
2096
	    ADVANCE_LEXER;
2100
	    {
2097
	    {
Line 2118... Line 2115...
2118
    }
2115
    }
2119
    if (name_entry) {
2116
    if (name_entry) {
2120
	types_add_name_and_type (&sid_current_type, name_entry, NIL (EntryP),
2117
	types_add_name_and_type (&sid_current_type, name_entry, NIL (EntryP),
2121
				 FALSE);
2118
				 FALSE);
2122
	if (non_local_entry) {
2119
	if (non_local_entry) {
2123
	    nstring_destroy (&scope);
2120
	    nstring_destroy (&scope);
2124
	}
2121
	}
2125
	nstring_destroy (&(ZI151));
2122
	nstring_destroy (&(ZI151));
2126
    } else if (non_local_entry) {
2123
    } else if (non_local_entry) {
2127
	types_add_name_and_type (&sid_current_type, non_local_entry,
2124
	types_add_name_and_type (&sid_current_type, non_local_entry,
2128
				 NIL (EntryP), FALSE);
2125
				 NIL (EntryP), FALSE);
Line 2133... Line 2130...
2133
	    nstring_destroy (&scope);
2130
	    nstring_destroy (&scope);
2134
	}
2131
	}
2135
	nstring_destroy (&(ZI151));
2132
	nstring_destroy (&(ZI151));
2136
    } else {
2133
    } else {
2137
	types_add_name (&sid_current_type, sid_current_table, &(ZI151), FALSE);
2134
	types_add_name (&sid_current_type, sid_current_table, &(ZI151), FALSE);
2138
    }
2135
    }
2139
	    }
2136
	    }
2140
	}
2137
	}
2141
	break;
2138
	break;
2142
      case 24:
2139
      case 24:
2143
	{
2140
	{
2144
	    ADVANCE_LEXER;
2141
	    ADVANCE_LEXER;
2145
	    {
2142
	    {
2146
		{
2143
		{
2147
		    NStringT ZI151;
2144
		    NStringT ZI151;
2148
 
2145
 
2149
		    switch (CURRENT_TERMINAL) {
2146
		    switch (CURRENT_TERMINAL) {
2150
		      case 4:
2147
		      case 4:
2151
			{
2148
			{
Line 2193... Line 2190...
2193
	    nstring_destroy (&scope);
2190
	    nstring_destroy (&scope);
2194
	}
2191
	}
2195
	nstring_destroy (&(ZI151));
2192
	nstring_destroy (&(ZI151));
2196
    } else {
2193
    } else {
2197
	types_add_name (&sid_current_type, sid_current_table, &(ZI151), TRUE);
2194
	types_add_name (&sid_current_type, sid_current_table, &(ZI151), TRUE);
2198
    }
2195
    }
2199
		    }
2196
		    }
2200
		}
2197
		}
2201
		goto ZL2;
2198
		goto ZL2;
2202
	      ZL3:;
2199
	      ZL3:;
2203
		{
2200
		{
2204
		    {
2201
		    {
2205
 
2202
 
2206
    if (!sid_propagating_error) {
2203
    if (!sid_propagating_error) {
2207
	E_expected_identifier ();
2204
	E_expected_identifier ();
2208
    }
2205
    }
2209
		    }
2206
		    }
2210
		    {
2207
		    {
2211
 
2208
 
2212
    while ((CURRENT_TERMINAL != LEXER_TOK_EOF) &&
2209
    while ((CURRENT_TERMINAL != LEXER_TOK_EOF) &&
2213
	   (CURRENT_TERMINAL != LEXER_TOK_TERMINATOR) &&
2210
	   (CURRENT_TERMINAL != LEXER_TOK_TERMINATOR) &&
2214
	   (CURRENT_TERMINAL != LEXER_TOK_BLT_PRODUCTIONS) &&
2211
	   (CURRENT_TERMINAL != LEXER_TOK_BLT_PRODUCTIONS) &&
2215
	   (CURRENT_TERMINAL != LEXER_TOK_BLT_ENTRY)) {
2212
	   (CURRENT_TERMINAL != LEXER_TOK_BLT_ENTRY)) {
Line 2266... Line 2263...
2266
	}
2263
	}
2267
    }
2264
    }
2268
}
2265
}
2269
 
2266
 
2270
static void
2267
static void
2271
ZR199 PROTO_Z ()
2268
ZR199(void)
2272
{
2269
{
2273
    switch (CURRENT_TERMINAL) {
2270
    switch (CURRENT_TERMINAL) {
2274
      case 10:
2271
      case 10:
2275
	{
2272
	{
2276
	    ADVANCE_LEXER;
2273
	    ADVANCE_LEXER;
2277
	    ZR216 ();
2274
	    ZR217 ();
2278
	    if ((CURRENT_TERMINAL) == 26) {
2275
	    if ((CURRENT_TERMINAL) == 26) {
2279
		RESTORE_LEXER;
2276
		RESTORE_LEXER;
2280
		goto ZL1;
2277
		goto ZL1;
2281
	    }
2278
	    }
2282
	}
2279
	}
Line 2333... Line 2330...
2333
    } else {
2330
    } else {
2334
	sid_current_item = NIL (ItemP);
2331
	sid_current_item = NIL (ItemP);
2335
    }
2332
    }
2336
    nstring_destroy (&(ZI151));
2333
    nstring_destroy (&(ZI151));
2337
    if (sid_current_item) {
2334
    if (sid_current_item) {
2338
	BoolT errored = FALSE;
2335
	BoolT errored = FALSE;
2339
	KeyP  key     = entry_key (entry);
2336
	KeyP  key     = entry_key (entry);
2340
 
2337
 
2341
	if (types_resolve (&sid_current_type, rule_param (sid_current.rule),
2338
	if (types_resolve (&sid_current_type, rule_param (sid_current.rule),
2342
			   alt_names (sid_current_alt), E_undefined_name,
2339
			   alt_names (sid_current_alt), E_undefined_name,
2343
			   entry_key (sid_external_rule), sid_alternative)) {
2340
			   entry_key (sid_external_rule), sid_alternative)) {
2344
	    if (param) {
2341
	    if (param) {
2345
		if (types_equal (&sid_current_type, param)) {
2342
		if (types_equal (&sid_current_type, param)) {
2346
		    item_add_param (sid_current_item, &sid_current_type);
2343
		    item_add_param (sid_current_item, &sid_current_type);
2347
		} else {
2344
		} else {
2348
		    E_rule_param_call_mismatch (key, param, &sid_current_type);
2345
		    E_rule_param_call_mismatch (key, param, &sid_current_type);
2349
		    types_destroy (&sid_current_type);
2346
		    types_destroy (&sid_current_type);
2350
		    errored = TRUE;
2347
		    errored = TRUE;
2351
		}
2348
		}
2352
	    } else {
2349
	    } else {
2353
		if (!types_equal_zero_tuple (&sid_current_type)) {
2350
		if (!types_equal_zero_tuple (&sid_current_type)) {
2354
		    E_basic_param_call_mismatch (key, &sid_current_type);
2351
		    E_basic_param_call_mismatch (key, &sid_current_type);
2355
		    types_destroy (&sid_current_type);
2352
		    types_destroy (&sid_current_type);
2356
		    errored = TRUE;
2353
		    errored = TRUE;
2357
		}
2354
		}
2358
	    }
2355
	    }
2359
	} else {
2356
	} else {
Line 2403... Line 2400...
2403
	    sid_current_item = NIL (ItemP);
2400
	    sid_current_item = NIL (ItemP);
2404
	    (void) alt_deallocate (sid_current_alt);
2401
	    (void) alt_deallocate (sid_current_alt);
2405
	    sid_current_alt  = NIL (AltP);
2402
	    sid_current_alt  = NIL (AltP);
2406
	} else {
2403
	} else {
2407
	    alt_add_item (sid_current_alt, sid_current_item);
2404
	    alt_add_item (sid_current_alt, sid_current_item);
2408
	}
2405
	}
2409
    } else {
2406
    } else {
2410
	if (sid_current_alt) {
2407
	if (sid_current_alt) {
2411
	    (void) alt_deallocate (sid_current_alt);
2408
	    (void) alt_deallocate (sid_current_alt);
2412
	    sid_current_alt = NIL (AltP);
2409
	    sid_current_alt = NIL (AltP);
2413
	}
2410
	}
2414
	types_destroy (&sid_saved_type);
2411
	types_destroy (&sid_saved_type);
2415
	types_destroy (&sid_current_type);
2412
	types_destroy (&sid_current_type);
2416
    }
2413
    }
2417
			}
2414
			}
2418
			ZR251 ();
2415
			ZR252 ();
2419
			if ((CURRENT_TERMINAL) == 26) {
2416
			if ((CURRENT_TERMINAL) == 26) {
2420
			    RESTORE_LEXER;
2417
			    RESTORE_LEXER;
2421
			    goto ZL3;
2418
			    goto ZL3;
2422
			}
2419
			}
2423
		    }
2420
		    }
2424
		    break;
2421
		    break;
2425
		  case 9:
2422
		  case 9:
2426
		    {
2423
		    {
2427
			{
2424
			{
2428
 
2425
 
2429
    types_init (&sid_current_type);
2426
    types_init (&sid_current_type);
2430
    sid_current_pred_id = NIL (EntryP);
2427
    sid_current_pred_id = NIL (EntryP);
2431
			}
2428
			}
Line 2464... Line 2461...
2464
		}
2461
		}
2465
	    }
2462
	    }
2466
	}
2463
	}
2467
	if ((entry == NIL (EntryP)) && (name_entry == NIL (EntryP))) {
2464
	if ((entry == NIL (EntryP)) && (name_entry == NIL (EntryP))) {
2468
	    NStringT scope;
2465
	    NStringT scope;
2469
 
2466
 
2470
	    name_entry = scope_stack_get_non_local (&sid_scope_stack,
2467
	    name_entry = scope_stack_get_non_local (&sid_scope_stack,
2471
						    sid_current_table,
2468
						    sid_current_table,
2472
						    (&ZI151), &scope);
2469
						    (&ZI151), &scope);
2473
	    if (name_entry) {
2470
	    if (name_entry) {
2474
		if (nstring_length (&scope) >
2471
		if (nstring_length (&scope) >
Line 2491... Line 2488...
2491
    }
2488
    }
2492
    nstring_destroy (&(ZI151));
2489
    nstring_destroy (&(ZI151));
2493
    if (entry) {
2490
    if (entry) {
2494
	BoolT errored = FALSE;
2491
	BoolT errored = FALSE;
2495
	KeyP  key     = entry_key (entry);
2492
	KeyP  key     = entry_key (entry);
2496
 
2493
 
2497
	if (types_resolve (&sid_current_type, rule_param (sid_current.rule),
2494
	if (types_resolve (&sid_current_type, rule_param (sid_current.rule),
2498
			   alt_names (sid_current_alt), E_undefined_name,
2495
			   alt_names (sid_current_alt), E_undefined_name,
2499
			   entry_key (sid_external_rule), sid_alternative)) {
2496
			   entry_key (sid_external_rule), sid_alternative)) {
2500
	    if (param) {
2497
	    if (param) {
2501
		if (types_equal (&sid_current_type, param)) {
2498
		if (types_equal (&sid_current_type, param)) {
2502
		    item_add_param (sid_current_item, &sid_current_type);
2499
		    item_add_param (sid_current_item, &sid_current_type);
Line 2635... Line 2632...
2635
	types_destroy (&sid_saved_type);
2632
	types_destroy (&sid_saved_type);
2636
	types_destroy (&sid_current_type);
2633
	types_destroy (&sid_current_type);
2637
    }
2634
    }
2638
			}
2635
			}
2639
			ADVANCE_LEXER;
2636
			ADVANCE_LEXER;
2640
		    }
2637
		    }
2641
		    break;
2638
		    break;
2642
		  default:
2639
		  default:
2643
		    goto ZL3;
2640
		    goto ZL3;
2644
		}
2641
		}
2645
		goto ZL2;
2642
		goto ZL2;
2646
	      ZL3:;
2643
	      ZL3:;
2647
		{
2644
		{
2648
		    {
2645
		    {
2649
 
2646
 
2650
    if (!sid_propagating_error) {
2647
    if (!sid_propagating_error) {
2651
	E_expected_tuple_or_term ();
2648
	E_expected_tuple_or_term ();
2652
    }
2649
    }
2653
		    }
2650
		    }
2654
		    {
2651
		    {
2655
 
2652
 
2656
    nstring_destroy (&(ZI151));
2653
    nstring_destroy (&(ZI151));
2657
		    }
2654
		    }
2658
		    {
2655
		    {
2659
 
2656
 
2660
    while ((CURRENT_TERMINAL != LEXER_TOK_EOF) &&
2657
    while ((CURRENT_TERMINAL != LEXER_TOK_EOF) &&
2661
	   (CURRENT_TERMINAL != LEXER_TOK_TERMINATOR) &&
2658
	   (CURRENT_TERMINAL != LEXER_TOK_TERMINATOR) &&
Line 2666... Line 2663...
2666
	   (CURRENT_TERMINAL != LEXER_TOK_END_SCOPE) &&
2663
	   (CURRENT_TERMINAL != LEXER_TOK_END_SCOPE) &&
2667
	   (CURRENT_TERMINAL != LEXER_TOK_BLT_PRODUCTIONS) &&
2664
	   (CURRENT_TERMINAL != LEXER_TOK_BLT_PRODUCTIONS) &&
2668
	   (CURRENT_TERMINAL != LEXER_TOK_BLT_ENTRY)) {
2665
	   (CURRENT_TERMINAL != LEXER_TOK_BLT_ENTRY)) {
2669
	if (CURRENT_TERMINAL == LEXER_TOK_IDENTIFIER) {
2666
	if (CURRENT_TERMINAL == LEXER_TOK_IDENTIFIER) {
2670
	    nstring_destroy (lexer_string_value (sid_current_stream));
2667
	    nstring_destroy (lexer_string_value (sid_current_stream));
2671
	}
2668
	}
2672
	ADVANCE_LEXER;
2669
	ADVANCE_LEXER;
2673
    }
2670
    }
2674
    if (CURRENT_TERMINAL == LEXER_TOK_IDENTIFIER) {
2671
    if (CURRENT_TERMINAL == LEXER_TOK_IDENTIFIER) {
2675
	nstring_destroy (lexer_string_value (sid_current_stream));
2672
	nstring_destroy (lexer_string_value (sid_current_stream));
2676
    }
2673
    }
2677
    if (CURRENT_TERMINAL != LEXER_TOK_EOF) {
2674
    if (CURRENT_TERMINAL != LEXER_TOK_EOF) {
Line 2679... Line 2676...
2679
    }
2676
    }
2680
    sid_propagating_error = TRUE;
2677
    sid_propagating_error = TRUE;
2681
		    }
2678
		    }
2682
		}
2679
		}
2683
	      ZL2:;
2680
	      ZL2:;
2684
	    }
2681
	    }
2685
	}
2682
	}
2686
	break;
2683
	break;
2687
      case 6:
2684
      case 6:
2688
	{
2685
	{
2689
	    ZR175 ();
2686
	    ZR175 ();
2690
	    if ((CURRENT_TERMINAL) == 26) {
2687
	    if ((CURRENT_TERMINAL) == 26) {
2691
		RESTORE_LEXER;
2688
		RESTORE_LEXER;
2692
		goto ZL1;
2689
		goto ZL1;
2693
	    }
2690
	    }
2694
	    {
2691
	    {
2695
 
2692
 
2696
    if ((sid_current_entry) && (sid_current_alt)) {
2693
    if ((sid_current_entry) && (sid_current_alt)) {
2697
	EntryP entry = table_add_rename (sid_current_table);
2694
	EntryP entry = table_add_rename (sid_current_table);
2698
 
2695
 
2699
	if (types_resolve (&sid_current_type, rule_param (sid_current.rule),
2696
	if (types_resolve (&sid_current_type, rule_param (sid_current.rule),
2700
			   alt_names (sid_current_alt), E_undefined_name,
2697
			   alt_names (sid_current_alt), E_undefined_name,
2701
			   entry_key (sid_external_rule), sid_alternative)) {
2698
			   entry_key (sid_external_rule), sid_alternative)) {
2702
	    if (types_contains_references (&sid_current_type)) {
2699
	    if (types_contains_references (&sid_current_type)) {
2703
		E_identity_param_has_refs (&sid_current_type,
2700
		E_identity_param_has_refs (&sid_current_type,
2704
					   entry_key (sid_external_rule),
2701
					   entry_key (sid_external_rule),
2705
					   sid_alternative);
2702
					   sid_alternative);
2706
		types_destroy (&sid_current_type);
2703
		types_destroy (&sid_current_type);
2707
		sid_current_item = NIL (ItemP);
2704
		sid_current_item = NIL (ItemP);
2708
	    } else {
2705
	    } else {
2709
		sid_current_item = item_create (entry);
2706
		sid_current_item = item_create (entry);
2710
		item_add_param (sid_current_item, &sid_current_type);
2707
		item_add_param (sid_current_item, &sid_current_type);
2711
	    }
2708
	    }
2712
	} else {
2709
	} else {
2713
	    types_destroy (&sid_current_type);
2710
	    types_destroy (&sid_current_type);
2714
	    sid_current_item = NIL (ItemP);
2711
	    sid_current_item = NIL (ItemP);
2715
	}
2712
	}
2716
	if (types_disjoint_names (&sid_saved_type)) {
2713
	if (types_disjoint_names (&sid_saved_type)) {
2717
	    if (types_check_undefined (&sid_saved_type,
2714
	    if (types_check_undefined (&sid_saved_type,
2718
				       rule_param (sid_current.rule),
2715
				       rule_param (sid_current.rule),
2719
				       alt_names (sid_current_alt),
2716
				       alt_names (sid_current_alt),
2720
				       E_redefined_name,
2717
				       E_redefined_name,
2721
				       entry_key (sid_external_rule),
2718
				       entry_key (sid_external_rule),
2722
				       sid_alternative)) {
2719
				       sid_alternative)) {
2723
		if (sid_current_item) {
2720
		if (sid_current_item) {
2724
		    if (types_fillin_types (&sid_saved_type,
2721
		    if (types_fillin_types (&sid_saved_type,
2725
					    item_param (sid_current_item))) {
2722
					    item_param (sid_current_item))) {
2726
			types_add_new_names (alt_names (sid_current_alt),
2723
			types_add_new_names (alt_names (sid_current_alt),
2727
					     &sid_saved_type,
2724
					     &sid_saved_type,
2728
					     sid_unique_pred_id);
2725
					     sid_unique_pred_id);
2729
			if (sid_saved_pred_id) {
2726
			if (sid_saved_pred_id) {
2730
			    E_predicate ();
2727
			    E_predicate ();
Line 2761... Line 2758...
2761
    } else {
2758
    } else {
2762
	types_destroy (&sid_saved_type);
2759
	types_destroy (&sid_saved_type);
2763
	types_destroy (&sid_current_type);
2760
	types_destroy (&sid_current_type);
2764
    }
2761
    }
2765
	    }
2762
	    }
2766
	    ZR251 ();
2763
	    ZR252 ();
2767
	    if ((CURRENT_TERMINAL) == 26) {
2764
	    if ((CURRENT_TERMINAL) == 26) {
2768
		RESTORE_LEXER;
2765
		RESTORE_LEXER;
2769
		goto ZL1;
2766
		goto ZL1;
2770
	    }
2767
	    }
2771
	}
2768
	}
Line 2789... Line 2786...
2789
    nstring_assign (&ZI151, lexer_string_value (sid_current_stream));
2786
    nstring_assign (&ZI151, lexer_string_value (sid_current_stream));
2790
			}
2787
			}
2791
			break;
2788
			break;
2792
		      default:
2789
		      default:
2793
			goto ZL5;
2790
			goto ZL5;
2794
		    }
2791
		    }
2795
		    ADVANCE_LEXER;
2792
		    ADVANCE_LEXER;
2796
		    {
2793
		    {
2797
 
2794
 
2798
    NStringT scope;
2795
    NStringT scope;
2799
    EntryP   non_local_entry = scope_stack_get_non_local (&sid_scope_stack,
2796
    EntryP   non_local_entry = scope_stack_get_non_local (&sid_scope_stack,
2800
							  sid_current_table,
2797
							  sid_current_table,
2801
							  (&ZI151), &scope);
2798
							  (&ZI151), &scope);
2802
    EntryP   name_entry      = table_get_entry (sid_current_table, (&ZI151));
2799
    EntryP   name_entry      = table_get_entry (sid_current_table, (&ZI151));
Line 2902... Line 2899...
2902
	}
2899
	}
2903
    } else {
2900
    } else {
2904
	types_destroy (&sid_saved_type);
2901
	types_destroy (&sid_saved_type);
2905
	types_destroy (&sid_current_type);
2902
	types_destroy (&sid_current_type);
2906
    }
2903
    }
-
 
2904
		    }
-
 
2905
		    ZR252 ();
-
 
2906
		    if ((CURRENT_TERMINAL) == 26) {
-
 
2907
			RESTORE_LEXER;
-
 
2908
			goto ZL5;
2907
		    }
2909
		    }
2908
		}
2910
		}
2909
		goto ZL4;
2911
		goto ZL4;
2910
	      ZL5:;
2912
	      ZL5:;
2911
		{
2913
		{
2912
		    {
2914
		    {
2913
 
2915
 
2914
    if (!sid_propagating_error) {
2916
    if (!sid_propagating_error) {
2915
	E_expected_identifier ();
2917
	E_expected_identifier ();
2916
    }
2918
    }
2917
		    }
2919
		    }
2918
		    {
2920
		    {
2919
 
2921
 
2920
    while ((CURRENT_TERMINAL != LEXER_TOK_EOF) &&
2922
    while ((CURRENT_TERMINAL != LEXER_TOK_EOF) &&
2921
	   (CURRENT_TERMINAL != LEXER_TOK_TERMINATOR) &&
2923
	   (CURRENT_TERMINAL != LEXER_TOK_TERMINATOR) &&
2922
	   (CURRENT_TERMINAL != LEXER_TOK_ALT_SEP) &&
2924
	   (CURRENT_TERMINAL != LEXER_TOK_ALT_SEP) &&
2923
	   (CURRENT_TERMINAL != LEXER_TOK_HANDLER_SEP) &&
2925
	   (CURRENT_TERMINAL != LEXER_TOK_HANDLER_SEP) &&
2924
	   (CURRENT_TERMINAL != LEXER_TOK_BEGIN_RULE) &&
2926
	   (CURRENT_TERMINAL != LEXER_TOK_BEGIN_RULE) &&
2925
	   (CURRENT_TERMINAL != LEXER_TOK_END_RULE) &&
2927
	   (CURRENT_TERMINAL != LEXER_TOK_END_RULE) &&
2926
	   (CURRENT_TERMINAL != LEXER_TOK_END_SCOPE) &&
2928
	   (CURRENT_TERMINAL != LEXER_TOK_END_SCOPE) &&
2927
	   (CURRENT_TERMINAL != LEXER_TOK_BLT_PRODUCTIONS) &&
2929
	   (CURRENT_TERMINAL != LEXER_TOK_BLT_PRODUCTIONS) &&
2928
	   (CURRENT_TERMINAL != LEXER_TOK_BLT_ENTRY)) {
2930
	   (CURRENT_TERMINAL != LEXER_TOK_BLT_ENTRY)) {
2929
	if (CURRENT_TERMINAL == LEXER_TOK_IDENTIFIER) {
2931
	if (CURRENT_TERMINAL == LEXER_TOK_IDENTIFIER) {
2930
	    nstring_destroy (lexer_string_value (sid_current_stream));
2932
	    nstring_destroy (lexer_string_value (sid_current_stream));
2931
	}
2933
	}
2932
	ADVANCE_LEXER;
2934
	ADVANCE_LEXER;
2933
    }
2935
    }
2934
    if (CURRENT_TERMINAL == LEXER_TOK_IDENTIFIER) {
2936
    if (CURRENT_TERMINAL == LEXER_TOK_IDENTIFIER) {
2935
	nstring_destroy (lexer_string_value (sid_current_stream));
2937
	nstring_destroy (lexer_string_value (sid_current_stream));
2936
    }
2938
    }
2937
    if (CURRENT_TERMINAL != LEXER_TOK_EOF) {
2939
    if (CURRENT_TERMINAL != LEXER_TOK_EOF) {
2938
	ADVANCE_LEXER;
2940
	ADVANCE_LEXER;
2939
    }
2941
    }
2940
    sid_propagating_error = TRUE;
2942
    sid_propagating_error = TRUE;
Line 2954... Line 2956...
2954
    {
2956
    {
2955
	{
2957
	{
2956
 
2958
 
2957
    if (!sid_propagating_error) {
2959
    if (!sid_propagating_error) {
2958
	E_expected_item_rhs ();
2960
	E_expected_item_rhs ();
2959
    }
2961
    }
2960
	}
2962
	}
2961
	{
2963
	{
2962
 
2964
 
2963
    while ((CURRENT_TERMINAL != LEXER_TOK_EOF) &&
2965
    while ((CURRENT_TERMINAL != LEXER_TOK_EOF) &&
2964
	   (CURRENT_TERMINAL != LEXER_TOK_TERMINATOR) &&
2966
	   (CURRENT_TERMINAL != LEXER_TOK_TERMINATOR) &&
2965
	   (CURRENT_TERMINAL != LEXER_TOK_ALT_SEP) &&
2967
	   (CURRENT_TERMINAL != LEXER_TOK_ALT_SEP) &&
2966
	   (CURRENT_TERMINAL != LEXER_TOK_HANDLER_SEP) &&
2968
	   (CURRENT_TERMINAL != LEXER_TOK_HANDLER_SEP) &&
2967
	   (CURRENT_TERMINAL != LEXER_TOK_BEGIN_RULE) &&
2969
	   (CURRENT_TERMINAL != LEXER_TOK_BEGIN_RULE) &&
Line 2984... Line 2986...
2984
	}
2986
	}
2985
    }
2987
    }
2986
}
2988
}
2987
 
2989
 
2988
static void
2990
static void
2989
ZR218 PROTO_Z ()
2991
ZR219(void)
2990
{
2992
{
2991
    if ((CURRENT_TERMINAL) == 26) {
2993
    if ((CURRENT_TERMINAL) == 26) {
2992
	return;
2994
	return;
2993
    }
2995
    }
2994
    {
2996
    {
2995
	ZR234 ();
2997
	ZR235 ();
2996
	{
2998
	{
2997
	    switch (CURRENT_TERMINAL) {
2999
	    switch (CURRENT_TERMINAL) {
2998
	      case 16:
3000
	      case 16:
2999
		{
3001
		{
3000
		    ADVANCE_LEXER;
3002
		    ADVANCE_LEXER;
3001
		    ZR229 ();
3003
		    ZR230 ();
3002
		    if ((CURRENT_TERMINAL) == 26) {
3004
		    if ((CURRENT_TERMINAL) == 26) {
3003
			RESTORE_LEXER;
3005
			RESTORE_LEXER;
3004
			goto ZL1;
3006
			goto ZL1;
3005
		    }
3007
		    }
3006
		}
3008
		}
3007
		break;
3009
		break;
3008
	      case 26:
3010
	      case 26:
3009
		RESTORE_LEXER;
3011
		RESTORE_LEXER;
3010
		goto ZL1;
3012
		goto ZL1;
3011
	      default:
3013
	      default:
3012
		break;
3014
		break;
3013
	    }
3015
	    }
3014
	}
3016
	}
3015
    }
3017
    }
3016
    return;
3018
    return;
3017
  ZL1:;
3019
  ZL1:;
3018
    SAVE_LEXER (26);
3020
    SAVE_LEXER (26);
3019
    return;
3021
    return;
3020
}
3022
}
3021
 
3023
 
3022
static void
3024
static void
3023
ZR153 PROTO_Z ()
3025
ZR153(void)
3024
{
3026
{
3025
    if ((CURRENT_TERMINAL) == 26) {
3027
    if ((CURRENT_TERMINAL) == 26) {
3026
	return;
3028
	return;
3027
    }
3029
    }
3028
  ZL2_153:;
3030
  ZL2_153:;
3029
    {
3031
    {
3030
	ZR155 ();
3032
	ZR155 ();
3031
	if ((CURRENT_TERMINAL) == 26) {
3033
	if ((CURRENT_TERMINAL) == 26) {
3032
	    RESTORE_LEXER;
3034
	    RESTORE_LEXER;
3033
	    goto ZL1;
3035
	    goto ZL1;
3034
	}
3036
	}
3035
	{
3037
	{
3036
 
3038
 
3037
    sid_propagating_error = FALSE;
3039
    sid_propagating_error = FALSE;
3038
	}
3040
	}
3039
	{
3041
	{
3040
	    switch (CURRENT_TERMINAL) {
3042
	    switch (CURRENT_TERMINAL) {
3041
	      case 4: case 19:
3043
	      case 4: case 19:
Line 3051... Line 3053...
3051
    return;
3053
    return;
3052
  ZL1:;
3054
  ZL1:;
3053
    SAVE_LEXER (26);
3055
    SAVE_LEXER (26);
3054
    return;
3056
    return;
3055
}
3057
}
3056
 
3058
 
3057
static void
3059
static void
3058
ZR196 PROTO_Z ()
3060
ZR196(void)
3059
{
3061
{
3060
    switch (CURRENT_TERMINAL) {
3062
    switch (CURRENT_TERMINAL) {
3061
      case 6:
3063
      case 6:
3062
	{
3064
	{
3063
	    ZR175 ();
3065
	    ZR175 ();
3064
	    if ((CURRENT_TERMINAL) == 26) {
3066
	    if ((CURRENT_TERMINAL) == 26) {
3065
		RESTORE_LEXER;
3067
		RESTORE_LEXER;
3066
		goto ZL1;
3068
		goto ZL1;
3067
	    }
3069
	    }
3068
	    {
3070
	    {
3069
 
3071
 
3070
    if (sid_current_item) {
3072
    if (sid_current_item) {
3071
	BoolT   errored = FALSE;
3073
	BoolT   errored = FALSE;
3072
	EntryP  entry   = item_entry (sid_current_item);
3074
	EntryP  entry   = item_entry (sid_current_item);
3073
	ActionP action  = entry_get_action (entry);
3075
	ActionP action  = entry_get_action (entry);
3074
 
3076
 
3075
	if (types_resolve (&sid_current_type, rule_param (sid_current.rule),
3077
	if (types_resolve (&sid_current_type, rule_param (sid_current.rule),
3076
			   alt_names (sid_current_alt), E_undefined_name,
3078
			   alt_names (sid_current_alt), E_undefined_name,
3077
			   entry_key (sid_external_rule), sid_alternative)) {
3079
			   entry_key (sid_external_rule), sid_alternative)) {
3078
	    if (types_equal (&sid_current_type, action_param (action))) {
3080
	    if (types_equal (&sid_current_type, action_param (action))) {
3079
		item_add_param (sid_current_item, &sid_current_type);
3081
		item_add_param (sid_current_item, &sid_current_type);
3080
	    } else {
3082
	    } else {
3081
		E_action_param_call_mismatch (entry_key (entry),
3083
		E_action_param_call_mismatch (entry_key (entry),
3082
					      action_param (action),
3084
					      action_param (action),
3083
					      &sid_current_type);
3085
					      &sid_current_type);
3084
		types_destroy (&sid_current_type);
3086
		types_destroy (&sid_current_type);
3085
		errored = TRUE;
3087
		errored = TRUE;
3086
	    }
3088
	    }
3087
	} else {
3089
	} else {
Line 3131... Line 3133...
3131
	    }
3133
	    }
3132
	} else {
3134
	} else {
3133
	    E_action_result_call_clash (entry_key (entry), &sid_saved_type);
3135
	    E_action_result_call_clash (entry_key (entry), &sid_saved_type);
3134
	    types_destroy (&sid_saved_type);
3136
	    types_destroy (&sid_saved_type);
3135
	    errored = TRUE;
3137
	    errored = TRUE;
3136
	}
3138
	}
3137
	if (errored) {
3139
	if (errored) {
3138
	    (void) item_deallocate (sid_current_item);
3140
	    (void) item_deallocate (sid_current_item);
3139
	    sid_current_item = NIL (ItemP);
3141
	    sid_current_item = NIL (ItemP);
3140
	    (void) alt_deallocate (sid_current_alt);
3142
	    (void) alt_deallocate (sid_current_alt);
3141
	    sid_current_alt  = NIL (AltP);
3143
	    sid_current_alt  = NIL (AltP);
Line 3145... Line 3147...
3145
    } else {
3147
    } else {
3146
	types_destroy (&sid_saved_type);
3148
	types_destroy (&sid_saved_type);
3147
	types_destroy (&sid_current_type);
3149
	types_destroy (&sid_current_type);
3148
    }
3150
    }
3149
	    }
3151
	    }
3150
	    ZR251 ();
3152
	    ZR252 ();
3151
	    if ((CURRENT_TERMINAL) == 26) {
3153
	    if ((CURRENT_TERMINAL) == 26) {
3152
		RESTORE_LEXER;
3154
		RESTORE_LEXER;
3153
		goto ZL1;
3155
		goto ZL1;
3154
	    }
3156
	    }
3155
	}
3157
	}
3156
	break;
3158
	break;
3157
      case 9:
3159
      case 9:
3158
	{
3160
	{
3159
	    {
3161
	    {
3160
 
3162
 
3161
    types_init (&sid_current_type);
3163
    types_init (&sid_current_type);
3162
    sid_current_pred_id = NIL (EntryP);
3164
    sid_current_pred_id = NIL (EntryP);
3163
	    }
3165
	    }
3164
	    {
3166
	    {
3165
 
3167
 
3166
    if (sid_current_item) {
3168
    if (sid_current_item) {
3167
	BoolT   errored = FALSE;
3169
	BoolT   errored = FALSE;
3168
	EntryP  entry   = item_entry (sid_current_item);
3170
	EntryP  entry   = item_entry (sid_current_item);
Line 3176... Line 3178...
3176
	    } else {
3178
	    } else {
3177
		E_action_param_call_mismatch (entry_key (entry),
3179
		E_action_param_call_mismatch (entry_key (entry),
3178
					      action_param (action),
3180
					      action_param (action),
3179
					      &sid_current_type);
3181
					      &sid_current_type);
3180
		types_destroy (&sid_current_type);
3182
		types_destroy (&sid_current_type);
3181
		errored = TRUE;
3183
		errored = TRUE;
3182
	    }
3184
	    }
3183
	} else {
3185
	} else {
3184
	    types_destroy (&sid_current_type);
3186
	    types_destroy (&sid_current_type);
3185
	    errored = TRUE;
3187
	    errored = TRUE;
3186
	}
3188
	}
Line 3221... Line 3223...
3221
		    types_destroy (&sid_saved_type);
3223
		    types_destroy (&sid_saved_type);
3222
		    errored = TRUE;
3224
		    errored = TRUE;
3223
		}
3225
		}
3224
	    } else {
3226
	    } else {
3225
		types_destroy (&sid_saved_type);
3227
		types_destroy (&sid_saved_type);
3226
		errored = TRUE;
3228
		errored = TRUE;
3227
	    }
3229
	    }
3228
	} else {
3230
	} else {
3229
	    E_action_result_call_clash (entry_key (entry), &sid_saved_type);
3231
	    E_action_result_call_clash (entry_key (entry), &sid_saved_type);
3230
	    types_destroy (&sid_saved_type);
3232
	    types_destroy (&sid_saved_type);
3231
	    errored = TRUE;
3233
	    errored = TRUE;
3232
	}
3234
	}
3233
	if (errored) {
3235
	if (errored) {
3234
	    (void) item_deallocate (sid_current_item);
3236
	    (void) item_deallocate (sid_current_item);
3235
	    sid_current_item = NIL (ItemP);
3237
	    sid_current_item = NIL (ItemP);
3236
	    (void) alt_deallocate (sid_current_alt);
3238
	    (void) alt_deallocate (sid_current_alt);
3237
	    sid_current_alt  = NIL (AltP);
3239
	    sid_current_alt  = NIL (AltP);
3238
	} else {
3240
	} else {
3239
	    alt_add_item (sid_current_alt, sid_current_item);
3241
	    alt_add_item (sid_current_alt, sid_current_item);
Line 3286... Line 3288...
3286
	}
3288
	}
3287
    }
3289
    }
3288
}
3290
}
3289
 
3291
 
3290
static void
3292
static void
3291
ZR185 PROTO_Z ()
3293
ZR185(void)
3292
{
3294
{
3293
    if ((CURRENT_TERMINAL) == 26) {
3295
    if ((CURRENT_TERMINAL) == 26) {
3294
	return;
3296
	return;
3295
    }
3297
    }
3296
    {
3298
    {
Line 3313... Line 3315...
3313
	}
3315
	}
3314
    }
3316
    }
3315
}
3317
}
3316
 
3318
 
3317
static void
3319
static void
3318
ZR252 PROTO_Z ()
3320
ZR253(void)
3319
{
3321
{
3320
    if ((CURRENT_TERMINAL) == 26) {
3322
    if ((CURRENT_TERMINAL) == 26) {
3321
	return;
3323
	return;
3322
    }
3324
    }
3323
    {
3325
    {
Line 3353... Line 3355...
3353
		    }
3355
		    }
3354
		}
3356
		}
3355
		break;
3357
		break;
3356
	      case 4:
3358
	      case 4:
3357
		{
3359
		{
3358
		    ZR238 ();
3360
		    ZR239 ();
3359
		    if ((CURRENT_TERMINAL) == 26) {
3361
		    if ((CURRENT_TERMINAL) == 26) {
3360
			RESTORE_LEXER;
3362
			RESTORE_LEXER;
3361
			goto ZL1;
3363
			goto ZL1;
3362
		    }
3364
		    }
3363
		}
3365
		}
Line 3372... Line 3374...
3372
    SAVE_LEXER (26);
3374
    SAVE_LEXER (26);
3373
    return;
3375
    return;
3374
}
3376
}
3375
 
3377
 
3376
static void
3378
static void
3377
ZR186 PROTO_Z ()
3379
ZR186(void)
3378
{
3380
{
3379
    if ((CURRENT_TERMINAL) == 26) {
3381
    if ((CURRENT_TERMINAL) == 26) {
3380
	return;
3382
	return;
3381
    }
3383
    }
3382
    {
3384
    {
Line 3399... Line 3401...
3399
	}
3401
	}
3400
    }
3402
    }
3401
}
3403
}
3402
 
3404
 
3403
static void
3405
static void
3404
ZR128 PROTO_Z ()
3406
ZR128(void)
3405
{
3407
{
3406
    switch (CURRENT_TERMINAL) {
3408
    switch (CURRENT_TERMINAL) {
3407
      case 4:
3409
      case 4:
3408
	{
3410
	{
3409
	    NStringT ZI130;
3411
	    NStringT ZI130;
Line 3704... Line 3706...
3704
	}
3706
	}
3705
    }
3707
    }
3706
}
3708
}
3707
 
3709
 
3708
static void
3710
static void
3709
ZR258 PROTO_Z ()
3711
ZR259(void)
3710
{
3712
{
3711
    if ((CURRENT_TERMINAL) == 26) {
3713
    if ((CURRENT_TERMINAL) == 26) {
3712
	return;
3714
	return;
3713
    }
3715
    }
3714
  ZL2_258:;
3716
  ZL2_259:;
3715
    {
3717
    {
3716
	ZR260 ();
3718
	ZR261 ();
3717
	{
3719
	{
3718
	    if ((CURRENT_TERMINAL) == 26) {
3720
	    if ((CURRENT_TERMINAL) == 26) {
3719
		RESTORE_LEXER;
3721
		RESTORE_LEXER;
3720
		goto ZL1;
3722
		goto ZL1;
3721
	    }
3723
	    }
Line 3732... Line 3734...
3732
	  ZL5:;
3734
	  ZL5:;
3733
	    switch (CURRENT_TERMINAL) {
3735
	    switch (CURRENT_TERMINAL) {
3734
	      case 23:
3736
	      case 23:
3735
		{
3737
		{
3736
		    ADVANCE_LEXER;
3738
		    ADVANCE_LEXER;
3737
		    goto ZL2_258;
3739
		    goto ZL2_259;
3738
		}
3740
		}
3739
		/*UNREACHED*/
3741
		/*UNREACHED*/
3740
	      default:
3742
	      default:
3741
		goto ZL4;
3743
		goto ZL4;
3742
	    }
3744
	    }
Line 3781... Line 3783...
3781
			    goto ZL7;
3783
			    goto ZL7;
3782
		    }
3784
		    }
3783
		    goto ZL6;
3785
		    goto ZL6;
3784
		  ZL7:;
3786
		  ZL7:;
3785
		    {
3787
		    {
3786
			goto ZL2_258;
3788
			goto ZL2_259;
3787
		    }
3789
		    }
3788
		    /*UNREACHED*/
3790
		    /*UNREACHED*/
3789
		  ZL6:;
3791
		  ZL6:;
3790
		}
3792
		}
3791
	    }
3793
	    }
Line 3797... Line 3799...
3797
    SAVE_LEXER (26);
3799
    SAVE_LEXER (26);
3798
    return;
3800
    return;
3799
}
3801
}
3800
 
3802
 
3801
static void
3803
static void
3802
ZR126 PROTO_Z ()
3804
ZR126(void)
3803
{
3805
{
3804
    switch (CURRENT_TERMINAL) {
3806
    switch (CURRENT_TERMINAL) {
3805
      case 5:
3807
      case 5:
3806
	{
3808
	{
3807
	    ADVANCE_LEXER;
3809
	    ADVANCE_LEXER;
Line 3842... Line 3844...
3842
    SAVE_LEXER (26);
3844
    SAVE_LEXER (26);
3843
    return;
3845
    return;
3844
}
3846
}
3845
 
3847
 
3846
static void
3848
static void
3847
ZR207 PROTO_Z ()
3849
ZR208(void)
3848
{
3850
{
3849
    switch (CURRENT_TERMINAL) {
3851
    switch (CURRENT_TERMINAL) {
3850
      case 4:
3852
      case 4:
3851
	{
3853
	{
3852
	    NStringT ZI151;
3854
	    NStringT ZI151;
Line 3861... Line 3863...
3861
		    {
3863
		    {
3862
 
3864
 
3863
    types_init (&sid_current_type);
3865
    types_init (&sid_current_type);
3864
    sid_current_pred_id = NIL (EntryP);
3866
    sid_current_pred_id = NIL (EntryP);
3865
		    }
3867
		    }
3866
		    ZR283 (&ZI151);
3868
		    ZR284 (&ZI151);
3867
		    if ((CURRENT_TERMINAL) == 26) {
3869
		    if ((CURRENT_TERMINAL) == 26) {
3868
			RESTORE_LEXER;
3870
			RESTORE_LEXER;
3869
			goto ZL3;
3871
			goto ZL3;
3870
		    }
3872
		    }
3871
		}
3873
		}
Line 3978... Line 3980...
3978
		    {
3980
		    {
3979
 
3981
 
3980
    types_assign (&sid_saved_type, &sid_current_type);
3982
    types_assign (&sid_saved_type, &sid_current_type);
3981
    sid_saved_pred_id = sid_current_pred_id;
3983
    sid_saved_pred_id = sid_current_pred_id;
3982
		    }
3984
		    }
3983
		    ZR248 ();
3985
		    ZR249 ();
3984
		    ZR199 ();
3986
		    ZR199 ();
3985
		    if ((CURRENT_TERMINAL) == 26) {
3987
		    if ((CURRENT_TERMINAL) == 26) {
3986
			RESTORE_LEXER;
3988
			RESTORE_LEXER;
3987
			goto ZL5;
3989
			goto ZL5;
3988
		    }
3990
		    }
3989
		}
3991
		}
3990
		goto ZL4;
3992
		goto ZL4;
3991
	      ZL5:;
3993
	      ZL5:;
3992
		{
3994
		{
3993
		    {
3995
		    {
3994
 
3996
 
3995
    if (!sid_propagating_error) {
3997
    if (!sid_propagating_error) {
3996
	E_expected_identifier ();
3998
	E_expected_identifier ();
3997
    }
3999
    }
3998
		    }
4000
		    }
3999
		}
4001
		}
4000
	      ZL4:;
4002
	      ZL4:;
4001
	    }
4003
	    }
4002
	}
4004
	}
4003
	break;
4005
	break;
4004
      case 6:
4006
      case 6:
4005
	{
4007
	{
4006
	    ZR163 ();
4008
	    ZR163 ();
4007
	    if ((CURRENT_TERMINAL) == 26) {
4009
	    if ((CURRENT_TERMINAL) == 26) {
4008
		RESTORE_LEXER;
4010
		RESTORE_LEXER;
4009
		goto ZL1;
4011
		goto ZL1;
4010
	    }
4012
	    }
4011
	    {
4013
	    {
4012
 
4014
 
4013
    types_assign (&sid_saved_type, &sid_current_type);
4015
    types_assign (&sid_saved_type, &sid_current_type);
4014
    sid_saved_pred_id = sid_current_pred_id;
4016
    sid_saved_pred_id = sid_current_pred_id;
4015
	    }
4017
	    }
4016
	    ZR248 ();
4018
	    ZR249 ();
4017
	    ZR199 ();
4019
	    ZR199 ();
4018
	    if ((CURRENT_TERMINAL) == 26) {
4020
	    if ((CURRENT_TERMINAL) == 26) {
4019
		RESTORE_LEXER;
4021
		RESTORE_LEXER;
4020
		goto ZL1;
4022
		goto ZL1;
4021
	    }
4023
	    }
Line 4024... Line 4026...
4024
      case 10: case 18: case 19:
4026
      case 10: case 18: case 19:
4025
	{
4027
	{
4026
	    {
4028
	    {
4027
 
4029
 
4028
    types_init (&sid_current_type);
4030
    types_init (&sid_current_type);
4029
    sid_current_pred_id = NIL (EntryP);
4031
    sid_current_pred_id = NIL (EntryP);
4030
	    }
4032
	    }
4031
	    ZR282 ();
4033
	    ZR283 ();
4032
	    if ((CURRENT_TERMINAL) == 26) {
4034
	    if ((CURRENT_TERMINAL) == 26) {
4033
		RESTORE_LEXER;
4035
		RESTORE_LEXER;
4034
		goto ZL1;
4036
		goto ZL1;
4035
	    }
4037
	    }
4036
	}
4038
	}
4037
	break;
4039
	break;
4038
      case 26:
4040
      case 26:
4039
	return;
4041
	return;
4040
      default:
4042
      default:
4041
	goto ZL1;
4043
	goto ZL1;
4042
    }
4044
    }
4043
    return;
4045
    return;
4044
  ZL1:;
4046
  ZL1:;
4045
    SAVE_LEXER (26);
4047
    SAVE_LEXER (26);
4046
    return;
4048
    return;
4047
}
4049
}
4048
 
4050
 
4049
static void
4051
static void
4050
ZR216 PROTO_Z ()
4052
ZR217(void)
4051
{
4053
{
4052
    if ((CURRENT_TERMINAL) == 26) {
4054
    if ((CURRENT_TERMINAL) == 26) {
4053
	return;
4055
	return;
4054
    }
4056
    }
4055
    {
4057
    {
4056
	NStringT ZI151;
4058
	NStringT ZI151;
4057
 
4059
 
4058
	switch (CURRENT_TERMINAL) {
4060
	switch (CURRENT_TERMINAL) {
4059
	  case 4:
4061
	  case 4:
4060
	    {
4062
	    {
4061
 
4063
 
4062
    nstring_assign (&ZI151, lexer_string_value (sid_current_stream));
4064
    nstring_assign (&ZI151, lexer_string_value (sid_current_stream));
4063
	    }
4065
	    }
4064
	    break;
4066
	    break;
4065
	  default:
4067
	  default:
4066
	    goto ZL1;
4068
	    goto ZL1;
4067
	}
4069
	}
4068
	ADVANCE_LEXER;
4070
	ADVANCE_LEXER;
4069
	{
4071
	{
4070
 
4072
 
4071
    if ((sid_current_entry) && (sid_current_alt)) {
4073
    if ((sid_current_entry) && (sid_current_alt)) {
4072
	EntryP entry = scope_stack_get_action (&sid_scope_stack,
4074
	EntryP entry = scope_stack_get_action (&sid_scope_stack,
Line 4080... Line 4082...
4080
	    (void) alt_deallocate (sid_current_alt);
4082
	    (void) alt_deallocate (sid_current_alt);
4081
	    sid_current_alt  = NIL (AltP);
4083
	    sid_current_alt  = NIL (AltP);
4082
	}
4084
	}
4083
    } else {
4085
    } else {
4084
	sid_current_item = NIL (ItemP);
4086
	sid_current_item = NIL (ItemP);
4085
    }
4087
    }
4086
    nstring_destroy (&(ZI151));
4088
    nstring_destroy (&(ZI151));
4087
	}
4089
	}
4088
	ZR245 ();
4090
	ZR246 ();
4089
	ZR196 ();
4091
	ZR196 ();
4090
	if ((CURRENT_TERMINAL) == 26) {
4092
	if ((CURRENT_TERMINAL) == 26) {
4091
	    RESTORE_LEXER;
4093
	    RESTORE_LEXER;
4092
	    goto ZL1;
4094
	    goto ZL1;
4093
	}
4095
	}
4094
    }
4096
    }
4095
    return;
4097
    return;
4096
  ZL1:;
4098
  ZL1:;
4097
    {
4099
    {
4098
	{
4100
	{
4099
 
4101
 
4100
    if (!sid_propagating_error) {
4102
    if (!sid_propagating_error) {
4101
	E_expected_identifier ();
4103
	E_expected_identifier ();
4102
    }
4104
    }
4103
	}
4105
	}
4104
	{
4106
	{
4105
 
4107
 
4106
    while ((CURRENT_TERMINAL != LEXER_TOK_EOF) &&
4108
    while ((CURRENT_TERMINAL != LEXER_TOK_EOF) &&
4107
	   (CURRENT_TERMINAL != LEXER_TOK_TERMINATOR) &&
4109
	   (CURRENT_TERMINAL != LEXER_TOK_TERMINATOR) &&
4108
	   (CURRENT_TERMINAL != LEXER_TOK_ALT_SEP) &&
4110
	   (CURRENT_TERMINAL != LEXER_TOK_ALT_SEP) &&
4109
	   (CURRENT_TERMINAL != LEXER_TOK_HANDLER_SEP) &&
4111
	   (CURRENT_TERMINAL != LEXER_TOK_HANDLER_SEP) &&
Line 4117... Line 4119...
4117
	}
4119
	}
4118
	ADVANCE_LEXER;
4120
	ADVANCE_LEXER;
4119
    }
4121
    }
4120
    if (CURRENT_TERMINAL == LEXER_TOK_IDENTIFIER) {
4122
    if (CURRENT_TERMINAL == LEXER_TOK_IDENTIFIER) {
4121
	nstring_destroy (lexer_string_value (sid_current_stream));
4123
	nstring_destroy (lexer_string_value (sid_current_stream));
4122
    }
4124
    }
4123
    if (CURRENT_TERMINAL != LEXER_TOK_EOF) {
4125
    if (CURRENT_TERMINAL != LEXER_TOK_EOF) {
4124
	ADVANCE_LEXER;
4126
	ADVANCE_LEXER;
4125
    }
4127
    }
4126
    sid_propagating_error = TRUE;
4128
    sid_propagating_error = TRUE;
4127
	}
4129
	}
4128
    }
4130
    }
4129
}
4131
}
4130
 
4132
 
4131
static void
4133
static void
4132
ZR155 PROTO_Z ()
4134
ZR155(void)
4133
{
4135
{
4134
    switch (CURRENT_TERMINAL) {
4136
    switch (CURRENT_TERMINAL) {
4135
      case 4:
4137
      case 4:
4136
	{
4138
	{
4137
	    NStringT ZI151;
4139
	    NStringT ZI151;
4138
 
4140
 
4139
	    {
4141
	    {
4140
 
4142
 
4141
    nstring_assign (&ZI151, lexer_string_value (sid_current_stream));
4143
    nstring_assign (&ZI151, lexer_string_value (sid_current_stream));
Line 4156... Line 4158...
4156
	    if ((CURRENT_TERMINAL) == 26) {
4158
	    if ((CURRENT_TERMINAL) == 26) {
4157
		RESTORE_LEXER;
4159
		RESTORE_LEXER;
4158
		goto ZL1;
4160
		goto ZL1;
4159
	    }
4161
	    }
4160
	    {
4162
	    {
4161
 
4163
 
4162
    if (sid_current_entry) {
4164
    if (sid_current_entry) {
4163
	KeyP key = entry_key (sid_current_entry);
4165
	KeyP key = entry_key (sid_current_entry);
4164
 
4166
 
4165
	if (types_contains_names (&sid_saved_type)) {
4167
	if (types_contains_names (&sid_saved_type)) {
4166
	    E_basic_param_has_names (key, &sid_saved_type);
4168
	    E_basic_param_has_names (key, &sid_saved_type);
4167
	}
4169
	}
4168
	if (types_contains_names (&sid_current_type)) {
4170
	if (types_contains_names (&sid_current_type)) {
4169
	    E_basic_result_has_names (key, &sid_current_type);
4171
	    E_basic_result_has_names (key, &sid_current_type);
4170
	}
4172
	}
4171
	if (types_contains_references (&sid_current_type)) {
4173
	if (types_contains_references (&sid_current_type)) {
4172
	    E_basic_result_has_refs (key, &sid_current_type);
4174
	    E_basic_result_has_refs (key, &sid_current_type);
4173
	}
4175
	}
4174
	if (!types_equal_zero_tuple (&sid_saved_type)) {
4176
	if (!types_equal_zero_tuple (&sid_saved_type)) {
4175
	    E_basic_param_mismatch (key, &sid_saved_type);
4177
	    E_basic_param_mismatch (key, &sid_saved_type);
4176
	}
4178
	}
4177
	types_assign (basic_result (sid_current.basic), &sid_current_type);
4179
	types_assign (basic_result (sid_current.basic), &sid_current_type);
4178
    } else {
4180
    } else {
4179
	types_destroy (&sid_current_type);
4181
	types_destroy (&sid_current_type);
4180
    }
4182
    }
4181
    types_destroy (&sid_saved_type);
4183
    types_destroy (&sid_saved_type);
4182
	    }
4184
	    }
4183
	    ZR251 ();
4185
	    ZR252 ();
4184
	    if ((CURRENT_TERMINAL) == 26) {
4186
	    if ((CURRENT_TERMINAL) == 26) {
4185
		RESTORE_LEXER;
4187
		RESTORE_LEXER;
4186
		goto ZL1;
4188
		goto ZL1;
4187
	    }
4189
	    }
4188
	}
4190
	}
4189
	break;
4191
	break;
4190
      case 19:
4192
      case 19:
4191
	{
4193
	{
Line 4242... Line 4244...
4242
    } else {
4244
    } else {
4243
	types_destroy (&sid_current_type);
4245
	types_destroy (&sid_current_type);
4244
    }
4246
    }
4245
    types_destroy (&sid_saved_type);
4247
    types_destroy (&sid_saved_type);
4246
		    }
4248
		    }
4247
		    ZR251 ();
4249
		    ZR252 ();
4248
		    if ((CURRENT_TERMINAL) == 26) {
4250
		    if ((CURRENT_TERMINAL) == 26) {
4249
			RESTORE_LEXER;
4251
			RESTORE_LEXER;
4250
			goto ZL3;
4252
			goto ZL3;
4251
		    }
4253
		    }
4252
		}
4254
		}
Line 4318... Line 4320...
4318
	}
4320
	}
4319
    }
4321
    }
4320
}
4322
}
4321
 
4323
 
4322
static void
4324
static void
4323
ZR187 PROTO_Z ()
4325
ZR187(void)
4324
{
4326
{
4325
    if ((CURRENT_TERMINAL) == 26) {
4327
    if ((CURRENT_TERMINAL) == 26) {
4326
	return;
4328
	return;
4327
    }
4329
    }
4328
    {
4330
    {
Line 4359... Line 4361...
4359
    } else {
4361
    } else {
4360
	E_duplicate_action ((&ZI151));
4362
	E_duplicate_action ((&ZI151));
4361
	nstring_destroy (&(ZI151));
4363
	nstring_destroy (&(ZI151));
4362
    }
4364
    }
4363
		}
4365
		}
4364
		ZR245 ();
4366
		ZR246 ();
4365
		ZR126 ();
4367
		ZR126 ();
4366
		if ((CURRENT_TERMINAL) == 26) {
4368
		if ((CURRENT_TERMINAL) == 26) {
4367
		    RESTORE_LEXER;
4369
		    RESTORE_LEXER;
4368
		    goto ZL3;
4370
		    goto ZL3;
4369
		}
4371
		}
Line 4380... Line 4382...
4380
	    errored = TRUE;
4382
	    errored = TRUE;
4381
	}
4383
	}
4382
	if (sid_redefining_entry) {
4384
	if (sid_redefining_entry) {
4383
	    if (!types_equal (param, &sid_saved_type)) {
4385
	    if (!types_equal (param, &sid_saved_type)) {
4384
		E_action_param_mismatch (key, param, &sid_saved_type);
4386
		E_action_param_mismatch (key, param, &sid_saved_type);
4385
		errored = TRUE;
4387
		errored = TRUE;
4386
	    }
4388
	    }
4387
	}
4389
	}
4388
	if (types_contains_names (&sid_current_type)) {
4390
	if (types_contains_names (&sid_current_type)) {
4389
	    E_action_result_has_names (key, &sid_current_type);
4391
	    E_action_result_has_names (key, &sid_current_type);
4390
	    errored = TRUE;
4392
	    errored = TRUE;
4391
	}
4393
	}
Line 4395... Line 4397...
4395
	}
4397
	}
4396
	if (sid_redefining_entry) {
4398
	if (sid_redefining_entry) {
4397
	    if (!types_equal (result, &sid_current_type)) {
4399
	    if (!types_equal (result, &sid_current_type)) {
4398
		E_action_result_mismatch (key, result, &sid_current_type);
4400
		E_action_result_mismatch (key, result, &sid_current_type);
4399
		errored = TRUE;
4401
		errored = TRUE;
4400
	    }
4402
	    }
4401
	}
4403
	}
4402
	if (errored || sid_redefining_entry) {
4404
	if (errored || sid_redefining_entry) {
4403
	    types_destroy (&sid_saved_type);
4405
	    types_destroy (&sid_saved_type);
4404
	    types_destroy (&sid_current_type);
4406
	    types_destroy (&sid_current_type);
4405
	} else {
4407
	} else {
4406
	    types_assign (param, &sid_saved_type);
4408
	    types_assign (param, &sid_saved_type);
Line 4409... Line 4411...
4409
    } else {
4411
    } else {
4410
	types_destroy (&sid_saved_type);
4412
	types_destroy (&sid_saved_type);
4411
	types_destroy (&sid_current_type);
4413
	types_destroy (&sid_current_type);
4412
    }
4414
    }
4413
		}
4415
		}
4414
		ZR251 ();
4416
		ZR252 ();
4415
		if ((CURRENT_TERMINAL) == 26) {
4417
		if ((CURRENT_TERMINAL) == 26) {
4416
		    RESTORE_LEXER;
4418
		    RESTORE_LEXER;
4417
		    goto ZL3;
4419
		    goto ZL3;
4418
		}
4420
		}
4419
	    }
4421
	    }
4420
	    goto ZL2;
4422
	    goto ZL2;
4421
	  ZL3:;
4423
	  ZL3:;
4422
	    {
4424
	    {
4423
		{
4425
		{
Line 4446... Line 4448...
4446
    }
4448
    }
4447
    sid_propagating_error = TRUE;
4449
    sid_propagating_error = TRUE;
4448
		}
4450
		}
4449
	    }
4451
	    }
4450
	  ZL2:;
4452
	  ZL2:;
4451
	}
4453
	}
4452
    }
4454
    }
4453
    return;
4455
    return;
4454
  ZL1:;
4456
  ZL1:;
4455
    SAVE_LEXER (26);
4457
    SAVE_LEXER (26);
4456
    return;
4458
    return;
4457
}
4459
}
4458
 
4460
 
4459
static void
4461
static void
4460
ZR227 PROTO_Z ()
4462
ZR228(void)
4461
{
4463
{
4462
    if ((CURRENT_TERMINAL) == 26) {
4464
    if ((CURRENT_TERMINAL) == 26) {
4463
	return;
4465
	return;
4464
    }
4466
    }
4465
  ZL2_227:;
4467
  ZL2_228:;
4466
    {
4468
    {
4467
	ZR220 ();
4469
	ZR221 ();
4468
	{
4470
	{
4469
	    switch (CURRENT_TERMINAL) {
4471
	    switch (CURRENT_TERMINAL) {
4470
	      case 4: case 6: case 10: case 13: case 18:
4472
	      case 4: case 6: case 10: case 13: case 18:
4471
	      case 19: case 24:
4473
	      case 19: case 24:
4472
		{
4474
		{
4473
		    goto ZL2_227;
4475
		    goto ZL2_228;
4474
		}
4476
		}
4475
		/*UNREACHED*/
4477
		/*UNREACHED*/
4476
	      case 26:
4478
	      case 26:
4477
		RESTORE_LEXER;
4479
		RESTORE_LEXER;
4478
		goto ZL1;
4480
		goto ZL1;
Line 4501... Line 4503...
4501
	   (CURRENT_TERMINAL != LEXER_TOK_END_SCOPE) &&
4503
	   (CURRENT_TERMINAL != LEXER_TOK_END_SCOPE) &&
4502
	   (CURRENT_TERMINAL != LEXER_TOK_BLT_PRODUCTIONS) &&
4504
	   (CURRENT_TERMINAL != LEXER_TOK_BLT_PRODUCTIONS) &&
4503
	   (CURRENT_TERMINAL != LEXER_TOK_BLT_ENTRY)) {
4505
	   (CURRENT_TERMINAL != LEXER_TOK_BLT_ENTRY)) {
4504
	if (CURRENT_TERMINAL == LEXER_TOK_IDENTIFIER) {
4506
	if (CURRENT_TERMINAL == LEXER_TOK_IDENTIFIER) {
4505
	    nstring_destroy (lexer_string_value (sid_current_stream));
4507
	    nstring_destroy (lexer_string_value (sid_current_stream));
4506
	}
4508
	}
4507
	ADVANCE_LEXER;
4509
	ADVANCE_LEXER;
4508
    }
4510
    }
4509
    if (CURRENT_TERMINAL == LEXER_TOK_IDENTIFIER) {
4511
    if (CURRENT_TERMINAL == LEXER_TOK_IDENTIFIER) {
4510
	nstring_destroy (lexer_string_value (sid_current_stream));
4512
	nstring_destroy (lexer_string_value (sid_current_stream));
4511
    }
4513
    }
4512
    if (CURRENT_TERMINAL != LEXER_TOK_EOF) {
4514
    if (CURRENT_TERMINAL != LEXER_TOK_EOF) {
4513
	ADVANCE_LEXER;
4515
	ADVANCE_LEXER;
Line 4520... Line 4522...
4520
	}
4522
	}
4521
    }
4523
    }
4522
}
4524
}
4523
 
4525
 
4524
static void
4526
static void
4525
ZR260 PROTO_Z ()
4527
ZR261(void)
4526
{
4528
{
4527
    if ((CURRENT_TERMINAL) == 26) {
4529
    if ((CURRENT_TERMINAL) == 26) {
4528
	return;
4530
	return;
4529
    }
4531
    }
4530
    {
4532
    {
4531
	NStringT ZI151;
4533
	NStringT ZI151;
4532
 
4534
 
4533
	switch (CURRENT_TERMINAL) {
4535
	switch (CURRENT_TERMINAL) {
4534
	  case 4:
4536
	  case 4:
4535
	    {
4537
	    {
4536
 
4538
 
4537
    nstring_assign (&ZI151, lexer_string_value (sid_current_stream));
4539
    nstring_assign (&ZI151, lexer_string_value (sid_current_stream));
4538
	    }
4540
	    }
4539
	    break;
4541
	    break;
4540
	  default:
4542
	  default:
Line 4554... Line 4556...
4554
	}
4556
	}
4555
    } else {
4557
    } else {
4556
	E_unknown_rule ((&ZI151));
4558
	E_unknown_rule ((&ZI151));
4557
    }
4559
    }
4558
    nstring_destroy (&(ZI151));
4560
    nstring_destroy (&(ZI151));
4559
	}
4561
	}
4560
    }
4562
    }
4561
    return;
4563
    return;
4562
  ZL1:;
4564
  ZL1:;
4563
    {
4565
    {
4564
	{
4566
	{
4565
 
4567
 
Line 4569... Line 4571...
4569
	}
4571
	}
4570
    }
4572
    }
4571
}
4573
}
4572
 
4574
 
4573
static void
4575
static void
4574
ZR168 PROTO_Z ()
4576
ZR168(void)
4575
{
4577
{
4576
    if ((CURRENT_TERMINAL) == 26) {
4578
    if ((CURRENT_TERMINAL) == 26) {
4577
	return;
4579
	return;
4578
    }
4580
    }
4579
  ZL2_168:;
4581
  ZL2_168:;
Line 4600... Line 4602...
4600
	    switch (CURRENT_TERMINAL) {
4602
	    switch (CURRENT_TERMINAL) {
4601
	      case 23:
4603
	      case 23:
4602
		{
4604
		{
4603
		    ADVANCE_LEXER;
4605
		    ADVANCE_LEXER;
4604
		    goto ZL2_168;
4606
		    goto ZL2_168;
4605
		}
4607
		}
4606
		/*UNREACHED*/
4608
		/*UNREACHED*/
4607
	      default:
4609
	      default:
4608
		goto ZL4;
4610
		goto ZL4;
4609
	    }
4611
	    }
4610
	    /*UNREACHED*/
4612
	    /*UNREACHED*/
4611
	  ZL4:;
4613
	  ZL4:;
4612
	    {
4614
	    {
Line 4627... Line 4629...
4627
    SAVE_LEXER (26);
4629
    SAVE_LEXER (26);
4628
    return;
4630
    return;
4629
}
4631
}
4630
 
4632
 
4631
static void
4633
static void
4632
ZR245 PROTO_Z ()
4634
ZR246(void)
4633
{
4635
{
4634
    if ((CURRENT_TERMINAL) == 26) {
4636
    if ((CURRENT_TERMINAL) == 26) {
4635
	return;
4637
	return;
4636
    }
4638
    }
4637
    {
4639
    {
Line 4654... Line 4656...
4654
	}
4656
	}
4655
    }
4657
    }
4656
}
4658
}
4657
 
4659
 
4658
static void
4660
static void
4659
ZR247 PROTO_Z ()
4661
ZR248(void)
4660
{
4662
{
4661
    switch (CURRENT_TERMINAL) {
4663
    switch (CURRENT_TERMINAL) {
4662
      case 12: case 21:
4664
      case 12: case 21:
4663
	{
4665
	{
4664
	    {
4666
	    {
Line 4741... Line 4743...
4741
 
4743
 
4742
	scope_stack_push (&sid_scope_stack, scope);
4744
	scope_stack_push (&sid_scope_stack, scope);
4743
    }
4745
    }
4744
	    }
4746
	    }
4745
	    ZR192 ();
4747
	    ZR192 ();
4746
	    ZR248 ();
4748
	    ZR249 ();
4747
	    {
4749
	    {
4748
		if ((CURRENT_TERMINAL) == 26) {
4750
		if ((CURRENT_TERMINAL) == 26) {
4749
		    RESTORE_LEXER;
4751
		    RESTORE_LEXER;
4750
		    goto ZL1;
4752
		    goto ZL1;
4751
		}
4753
		}
4752
		{
4754
		{
4753
		    switch (CURRENT_TERMINAL) {
4755
		    switch (CURRENT_TERMINAL) {
4754
		      case 13:
4756
		      case 13:
4755
			break;
4757
			break;
4756
		      default:
4758
		      default:
4757
			goto ZL3;
4759
			goto ZL3;
Line 4767... Line 4769...
4767
	E_expected_begin_rule ();
4769
	E_expected_begin_rule ();
4768
    }
4770
    }
4769
		    }
4771
		    }
4770
		}
4772
		}
4771
	      ZL2:;
4773
	      ZL2:;
4772
	    }
4774
	    }
4773
	    ZR218 ();
4775
	    ZR219 ();
4774
	    ZR250 ();
4776
	    ZR251 ();
4775
	    if ((CURRENT_TERMINAL) == 26) {
4777
	    if ((CURRENT_TERMINAL) == 26) {
4776
		RESTORE_LEXER;
4778
		RESTORE_LEXER;
4777
		goto ZL1;
4779
		goto ZL1;
4778
	    }
4780
	    }
4779
	    {
4781
	    {
4780
 
4782
 
4781
    if (sid_current_entry) {
4783
    if (sid_current_entry) {
4782
	scope_stack_pop (&sid_scope_stack);
4784
	scope_stack_pop (&sid_scope_stack);
4783
    }
4785
    }
4784
	    }
4786
	    }
4785
	    {
4787
	    {
4786
 
4788
 
4787
    if (sid_current_entry) {
4789
    if (sid_current_entry) {
4788
	nstring_assign (rule_maximum_scope (sid_current.rule),
4790
	nstring_assign (rule_maximum_scope (sid_current.rule),
4789
			&sid_maximum_scope);
4791
			&sid_maximum_scope);
4790
    } else {
4792
    } else {
4791
	nstring_destroy (&sid_maximum_scope);
4793
	nstring_destroy (&sid_maximum_scope);
4792
    }
4794
    }
4793
	    }
4795
	    }
4794
	    ZR251 ();
4796
	    ZR252 ();
4795
	    if ((CURRENT_TERMINAL) == 26) {
4797
	    if ((CURRENT_TERMINAL) == 26) {
4796
		RESTORE_LEXER;
4798
		RESTORE_LEXER;
4797
		goto ZL1;
4799
		goto ZL1;
4798
	    }
4800
	    }
4799
	}
4801
	}
Line 4857... Line 4859...
4857
    SAVE_LEXER (26);
4859
    SAVE_LEXER (26);
4858
    return;
4860
    return;
4859
}
4861
}
4860
 
4862
 
4861
static void
4863
static void
4862
ZR248 PROTO_Z ()
4864
ZR249(void)
4863
{
4865
{
4864
    if ((CURRENT_TERMINAL) == 26) {
4866
    if ((CURRENT_TERMINAL) == 26) {
4865
	return;
4867
	return;
4866
    }
4868
    }
4867
    {
4869
    {
Line 4884... Line 4886...
4884
	}
4886
	}
4885
    }
4887
    }
4886
}
4888
}
4887
 
4889
 
4888
static void
4890
static void
4889
ZR250 PROTO_Z ()
-
 
4890
{
-
 
4891
    if ((CURRENT_TERMINAL) == 26) {
-
 
4892
	return;
-
 
4893
    }
-
 
4894
    {
-
 
4895
	switch (CURRENT_TERMINAL) {
-
 
4896
	  case 14:
-
 
4897
	    break;
-
 
4898
	  default:
-
 
4899
	    goto ZL1;
-
 
4900
	}
-
 
4901
	ADVANCE_LEXER;
-
 
4902
    }
-
 
4903
    return;
-
 
4904
  ZL1:;
-
 
4905
    {
-
 
4906
	{
-
 
4907
 
-
 
4908
    if (!sid_propagating_error) {
-
 
4909
	E_expected_end_rule ();
-
 
4910
    }
-
 
4911
	}
-
 
4912
    }
-
 
4913
}
-
 
4914
 
-
 
4915
static void
4891
ZR180(void)
4916
ZR180 PROTO_Z ()
-
 
4917
{
4892
{
4918
    if ((CURRENT_TERMINAL) == 26) {
4893
    if ((CURRENT_TERMINAL) == 26) {
4919
	return;
4894
	return;
4920
    }
4895
    }
4921
  ZL2_180:;
4896
  ZL2_180:;
Line 4969... Line 4944...
4969
    SAVE_LEXER (26);
4944
    SAVE_LEXER (26);
4970
    return;
4945
    return;
4971
}
4946
}
4972
 
4947
 
4973
static void
4948
static void
4974
ZR251 PROTO_Z ()
4949
ZR251(void)
-
 
4950
{
-
 
4951
    if ((CURRENT_TERMINAL) == 26) {
-
 
4952
	return;
-
 
4953
    }
-
 
4954
    {
-
 
4955
	switch (CURRENT_TERMINAL) {
-
 
4956
	  case 14:
-
 
4957
	    break;
-
 
4958
	  default:
-
 
4959
	    goto ZL1;
-
 
4960
	}
-
 
4961
	ADVANCE_LEXER;
-
 
4962
    }
-
 
4963
    return;
-
 
4964
  ZL1:;
-
 
4965
    {
-
 
4966
	{
-
 
4967
 
-
 
4968
    if (!sid_propagating_error) {
-
 
4969
	E_expected_end_rule ();
-
 
4970
    }
-
 
4971
	}
-
 
4972
    }
-
 
4973
}
-
 
4974
 
-
 
4975
static void
-
 
4976
ZR252(void)
4975
{
4977
{
4976
    if ((CURRENT_TERMINAL) == 26) {
4978
    if ((CURRENT_TERMINAL) == 26) {
4977
	return;
4979
	return;
4978
    }
4980
    }
4979
    {
4981
    {