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/tools/tnc/tdf.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 -... Line 1...
-
 
1
/*
-
 
2
 * Copyright (c) 2002-2005 The TenDRA Project <http://www.tendra.org/>.
-
 
3
 * All rights reserved.
-
 
4
 *
-
 
5
 * Redistribution and use in source and binary forms, with or without
-
 
6
 * modification, are permitted provided that the following conditions are met:
-
 
7
 *
-
 
8
 * 1. Redistributions of source code must retain the above copyright notice,
-
 
9
 *    this list of conditions and the following disclaimer.
-
 
10
 * 2. Redistributions in binary form must reproduce the above copyright notice,
-
 
11
 *    this list of conditions and the following disclaimer in the documentation
-
 
12
 *    and/or other materials provided with the distribution.
-
 
13
 * 3. Neither the name of The TenDRA Project nor the names of its contributors
-
 
14
 *    may be used to endorse or promote products derived from this software
-
 
15
 *    without specific, prior written permission.
-
 
16
 *
-
 
17
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS
-
 
18
 * IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
-
 
19
 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-
 
20
 * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR
-
 
21
 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-
 
22
 * EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-
 
23
 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
-
 
24
 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-
 
25
 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
-
 
26
 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
-
 
27
 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
 
28
 *
-
 
29
 * $Id$
-
 
30
 */
1
/*
31
/*
2
    		 Crown Copyright (c) 1997
32
    		 Crown Copyright (c) 1997
3
    
33
 
4
    This TenDRA(r) Computer Program is subject to Copyright
34
    This TenDRA(r) Computer Program is subject to Copyright
5
    owned by the United Kingdom Secretary of State for Defence
35
    owned by the United Kingdom Secretary of State for Defence
6
    acting through the Defence Evaluation and Research Agency
36
    acting through the Defence Evaluation and Research Agency
7
    (DERA).  It is made available to Recipients with a
37
    (DERA).  It is made available to Recipients with a
8
    royalty-free licence for its use, reproduction, transfer
38
    royalty-free licence for its use, reproduction, transfer
9
    to other parties and amendment for any purpose not excluding
39
    to other parties and amendment for any purpose not excluding
10
    product development provided that any such use et cetera
40
    product development provided that any such use et cetera
11
    shall be deemed to be acceptance of the following conditions:-
41
    shall be deemed to be acceptance of the following conditions:-
12
    
42
 
13
        (1) Its Recipients shall ensure that this Notice is
43
        (1) Its Recipients shall ensure that this Notice is
14
        reproduced upon any copies or amended versions of it;
44
        reproduced upon any copies or amended versions of it;
15
    
45
 
16
        (2) Any amended version of it shall be clearly marked to
46
        (2) Any amended version of it shall be clearly marked to
17
        show both the nature of and the organisation responsible
47
        show both the nature of and the organisation responsible
18
        for the relevant amendment or amendments;
48
        for the relevant amendment or amendments;
19
    
49
 
20
        (3) Its onward transfer from a recipient to another
50
        (3) Its onward transfer from a recipient to another
21
        party shall be deemed to be that party's acceptance of
51
        party shall be deemed to be that party's acceptance of
22
        these conditions;
52
        these conditions;
23
    
53
 
24
        (4) DERA gives no warranty or assurance as to its
54
        (4) DERA gives no warranty or assurance as to its
25
        quality or suitability for any purpose and DERA accepts
55
        quality or suitability for any purpose and DERA accepts
26
        no liability whatsoever in relation to any use to which
56
        no liability whatsoever in relation to any use to which
27
        it may be put.
57
        it may be put.
28
*/
58
*/
Line 47... Line 77...
47
#include "utility.h"
77
#include "utility.h"
48
 
78
 
49
 
79
 
50
/* INITIALISE CONSTRUCTS */
80
/* INITIALISE CONSTRUCTS */
51
 
81
 
408
 
438
 
409
    s = SORT_shape ;
439
    s = SORT_shape;
410
    sort_letters [s] = 'S' ;
440
    sort_letters[s] = 'S';
411
    sort_encoding [s] = 4 ;
441
    sort_encoding[s] = 4;
412
    sort_extension [s] = 1 ;
442
    sort_extension[s] = 1;
413
    sort_decode [s] = de_shape ;
443
    sort_decode[s] = de_shape;
414
    sort_read [s] = read_shape ;
444
    sort_read[s] = read_shape;
415
    new_sort ( s, 13 ) ;
445
    new_sort(s, 13);
416
    new_cons ( "shape_apply_token", s, 1, "!" ) ;
446
    new_cons("shape_apply_token", s, 1, "!");
417
    sort_tokens [s] = 1 ;
447
    sort_tokens[s] = 1;
418
    new_cons ( "shape_cond", s, 2, "x@[S]@[S]" ) ;
448
    new_cons("shape_cond", s, 2, "x@[S]@[S]");
419
    sort_conds [s] = 2 ;
449
    sort_conds[s] = 2;
420
    new_cons ( "bitfield", s, 3, "B" ) ;
450
    new_cons("bitfield", s, 3, "B");
421
    new_cons ( "bottom", s, 4, ( char * ) null ) ;
451
    new_cons("bottom", s, 4,(char *)null);
422
    new_cons ( "compound", s, 5, "x" ) ;
452
    new_cons("compound", s, 5, "x");
423
    new_cons ( "floating", s, 6, "f" ) ;
453
    new_cons("floating", s, 6, "f");
424
    new_cons ( "integer", s, 7, "v" ) ;
454
    new_cons("integer", s, 7, "v");
425
    new_cons ( "nof", s, 8, "nS" ) ;
455
    new_cons("nof", s, 8, "nS");
426
    new_cons ( "offset", s, 9, "aa" ) ;
456
    new_cons("offset", s, 9, "aa");
427
    new_cons ( "pointer", s, 10, "a" ) ;
457
    new_cons("pointer", s, 10, "a");
428
    new_cons ( "proc", s, 11, ( char * ) null ) ;
458
    new_cons("proc", s, 11,(char *)null);
429
    new_cons ( "top", s, 12, ( char * ) null ) ;
459
    new_cons("top", s, 12,(char *)null);
430
 
460
 
431
    s = SORT_signed_nat ;
461
    s = SORT_signed_nat;
432
    sort_letters [s] = 's' ;
462
    sort_letters[s] = 's';
433
    sort_encoding [s] = 3 ;
463
    sort_encoding[s] = 3;
434
    sort_extension [s] = 1 ;
464
    sort_extension[s] = 1;
435
    sort_decode [s] = de_signed_nat ;
465
    sort_decode[s] = de_signed_nat;
436
    sort_read [s] = read_signed_nat ;
466
    sort_read[s] = read_signed_nat;
437
    new_sort ( s, 6 ) ;
467
    new_sort(s, 6);
438
    new_cons ( "signed_nat_apply_token", s, 1, "!" ) ;
468
    new_cons("signed_nat_apply_token", s, 1, "!");
439
    sort_tokens [s] = 1 ;
469
    sort_tokens[s] = 1;
440
    new_cons ( "signed_nat_cond", s, 2, "x@[s]@[s]" ) ;
470
    new_cons("signed_nat_cond", s, 2, "x@[s]@[s]");
441
    sort_conds [s] = 2 ;
471
    sort_conds[s] = 2;
442
    new_cons ( "computed_signed_nat", s, 3, "x" ) ;
472
    new_cons("computed_signed_nat", s, 3, "x");
443
    new_cons ( "make_signed_nat", s, 4, "ji" ) ;
473
    new_cons("make_signed_nat", s, 4, "ji");
444
    new_cons ( "snat_from_nat", s, 5, "bn" ) ;
474
    new_cons("snat_from_nat", s, 5, "bn");
445
 
475
 
446
    s = SORT_sortname ;
476
    s = SORT_sortname;
447
    new_sort ( s, 24 ) ;
477
    new_sort(s, 24);
448
    new_cons ( "access", s, 1, ( char * ) null ) ;
478
    new_cons("access", s, 1,(char *)null);
449
    new_cons ( "al_tag", s, 2, ( char * ) null ) ;
479
    new_cons("al_tag", s, 2,(char *)null);
450
    new_cons ( "alignment", s, 3, ( char * ) null ) ;
480
    new_cons("alignment", s, 3,(char *)null);
451
    new_cons ( "bitfield_variety", s, 4, ( char * ) null ) ;
481
    new_cons("bitfield_variety", s, 4,(char *)null);
452
    new_cons ( "bool", s, 5, ( char * ) null ) ;
482
    new_cons("bool", s, 5,(char *)null);
453
    new_cons ( "error_treatment", s, 6, ( char * ) null ) ;
483
    new_cons("error_treatment", s, 6,(char *)null);
454
    new_cons ( "exp", s, 7, ( char * ) null ) ;
484
    new_cons("exp", s, 7,(char *)null);
455
    new_cons ( "floating_variety", s, 8, ( char * ) null ) ;
485
    new_cons("floating_variety", s, 8,(char *)null);
456
    new_cons ( "foreign_sort", s, 9, "X" ) ;
486
    new_cons("foreign_sort", s, 9, "X");
457
    new_cons ( "label", s, 10, ( char * ) null ) ;
487
    new_cons("label", s, 10,(char *)null);
458
    new_cons ( "nat", s, 11, ( char * ) null ) ;
488
    new_cons("nat", s, 11,(char *)null);
459
    new_cons ( "ntest", s, 12, ( char * ) null ) ;
489
    new_cons("ntest", s, 12,(char *)null);
460
    new_cons ( "procprops", s, 13, ( char * ) null ) ;
490
    new_cons("procprops", s, 13,(char *)null);
461
    new_cons ( "rounding_mode", s, 14, ( char * ) null ) ;
491
    new_cons("rounding_mode", s, 14,(char *)null);
462
    new_cons ( "shape", s, 15, ( char * ) null ) ;
492
    new_cons("shape", s, 15,(char *)null);
463
    new_cons ( "signed_nat", s, 16, ( char * ) null ) ;
493
    new_cons("signed_nat", s, 16,(char *)null);
464
    new_cons ( "string", s, 17, ( char * ) null ) ;
494
    new_cons("string", s, 17,(char *)null);
465
    new_cons ( "tag", s, 18, ( char * ) null ) ;
495
    new_cons("tag", s, 18,(char *)null);
466
    new_cons ( "transfer_mode", s, 19, ( char * ) null ) ;
496
    new_cons("transfer_mode", s, 19,(char *)null);
467
    new_cons ( "token", s, 20, "~*[~]" ) ;
497
    new_cons("token", s, 20, "~*[~]");
468
    new_cons ( "variety", s, 21, ( char * ) null ) ;
498
    new_cons("variety", s, 21,(char *)null);
469
    new_cons ( "callees", s, 22, ( char * ) null ) ;
499
    new_cons("callees", s, 22,(char *)null);
470
    new_cons ( "error_code", s, 23, ( char * ) null ) ;
500
    new_cons("error_code", s, 23,(char *)null);
471
 
501
 
472
    s = SORT_string ;
502
    s = SORT_string;
473
    sort_letters [s] = 'X' ;
503
    sort_letters[s] = 'X';
474
    sort_encoding [s] = 3 ;
504
    sort_encoding[s] = 3;
475
    sort_extension [s] = 1 ;
505
    sort_extension[s] = 1;
476
    sort_decode [s] = de_string ;
506
    sort_decode[s] = de_string;
477
    sort_read [s] = read_string ;
507
    sort_read[s] = read_string;
478
    new_sort ( s, 5 ) ;
508
    new_sort(s, 5);
479
    new_cons ( "string_apply_token", s, 1, "!" ) ;
509
    new_cons("string_apply_token", s, 1, "!");
480
    sort_tokens [s] = 1 ;
510
    sort_tokens[s] = 1;
481
    new_cons ( "string_cond", s, 2, "x@[X]@[X]" ) ;
511
    new_cons("string_cond", s, 2, "x@[X]@[X]");
482
    sort_conds [s] = 2 ;
512
    sort_conds[s] = 2;
483
    new_cons ( "concat_string", s, 3, "XX" ) ;
513
    new_cons("concat_string", s, 3, "XX");
484
    new_cons ( "make_string", s, 4, "$" ) ;
514
    new_cons("make_string", s, 4, "$");
485
 
515
 
486
    s = SORT_tag ;
516
    s = SORT_tag;
487
    sort_letters [s] = 't' ;
517
    sort_letters[s] = 't';
488
    sort_encoding [s] = 1 ;
518
    sort_encoding[s] = 1;
489
    sort_extension [s] = 1 ;
519
    sort_extension[s] = 1;
490
    sort_decode [s] = de_tag ;
520
    sort_decode[s] = de_tag;
491
    sort_read [s] = read_tag ;
521
    sort_read[s] = read_tag;
492
    new_sort ( s, 3 ) ;
522
    new_sort(s, 3);
493
    new_cons ( "tag_apply_token", s, 2, "!" ) ;
523
    new_cons("tag_apply_token", s, 2, "!");
494
    sort_tokens [s] = 2 ;
524
    sort_tokens[s] = 2;
495
    new_cons ( "make_tag", s, 1, "i" ) ;
525
    new_cons("make_tag", s, 1, "i");
496
 
526
 
497
    s = SORT_transfer_mode ;
527
    s = SORT_transfer_mode;
498
    sort_letters [s] = 'm' ;
528
    sort_letters[s] = 'm';
499
    sort_encoding [s] = 3 ;
529
    sort_encoding[s] = 3;
500
    sort_extension [s] = 1 ;
530
    sort_extension[s] = 1;
501
    sort_decode [s] = de_transfer_mode ;
531
    sort_decode[s] = de_transfer_mode;
502
    sort_read [s] = read_transfer_mode ;
532
    sort_read[s] = read_transfer_mode;
503
    new_sort ( s, 9 ) ;
533
    new_sort(s, 9);
504
    new_cons ( "transfer_mode_apply_token", s, 1, "!" ) ;
534
    new_cons("transfer_mode_apply_token", s, 1, "!");
505
    sort_tokens [s] = 1 ;
535
    sort_tokens[s] = 1;
506
    new_cons ( "transfer_mode_cond", s, 2, "x@[m]@[m]" ) ;
536
    new_cons("transfer_mode_cond", s, 2, "x@[m]@[m]");
507
    sort_conds [s] = 2 ;
537
    sort_conds[s] = 2;
508
    new_cons ( "add_modes", s, 3, "mm" ) ;
538
    new_cons("add_modes", s, 3, "mm");
509
    new_cons ( "overlap", s, 4, ( char * ) null ) ;
539
    new_cons("overlap", s, 4,(char *)null);
510
    new_cons ( "standard_transfer_mode", s, 5, ( char * ) null ) ;
540
    new_cons("standard_transfer_mode", s, 5,(char *)null);
511
    new_cons ( "trap_on_nil", s, 6, ( char * ) null ) ;
541
    new_cons("trap_on_nil", s, 6,(char *)null);
512
    new_cons ( "volatile", s, 7, ( char * ) null ) ;
542
    new_cons("volatile", s, 7,(char *)null);
513
    new_cons ( "complete", s, 8, ( char * ) null ) ;
543
    new_cons("complete", s, 8,(char *)null);
514
 
544
 
515
    s = SORT_variety ;
545
    s = SORT_variety;
516
    sort_letters [s] = 'v' ;
546
    sort_letters[s] = 'v';
517
    sort_encoding [s] = 2 ;
547
    sort_encoding[s] = 2;
518
    sort_extension [s] = 1 ;
548
    sort_extension[s] = 1;
519
    sort_decode [s] = de_variety ;
549
    sort_decode[s] = de_variety;
520
    sort_read [s] = read_variety ;
550
    sort_read[s] = read_variety;
521
    new_sort ( s, 5 ) ;
551
    new_sort(s, 5);
522
    new_cons ( "var_apply_token", s, 1, "!" ) ;
552
    new_cons("var_apply_token", s, 1, "!");
523
    sort_tokens [s] = 1 ;
553
    sort_tokens[s] = 1;
524
    new_cons ( "var_cond", s, 2, "x@[v]@[v]" ) ;
554
    new_cons("var_cond", s, 2, "x@[v]@[v]");
525
    sort_conds [s] = 2 ;
555
    sort_conds[s] = 2;
526
    new_cons ( "var_limits", s, 3, "ss" ) ;
556
    new_cons("var_limits", s, 3, "ss");
527
    new_cons ( "var_width", s, 4, "bn" ) ;
557
    new_cons("var_width", s, 4, "bn");
528
    return ;
558
    return;
529
}
559
}
530
 
560
 
531
 
561
 
532
/* FIND A SORT NAME */
562
/* FIND A SORT NAME */
533
 
563
 
534
sortname find_sort
564
sortname
535
    PROTO_N ( ( c ) )
-
 
536
    PROTO_T ( char c )
565
find_sort(char c)
537
{
566
{
538
    sortname s ;
567
    sortname s;
539
    switch ( c ) {
568
    switch (c) {
540
	case 'u' : s = SORT_access ; break ;
569
	case 'u': s = SORT_access; break;
541
	case 'A' : s = SORT_al_tag ; break ;
570
	case 'A': s = SORT_al_tag; break;
542
	case 'a' : s = SORT_alignment ; break ;
571
	case 'a': s = SORT_alignment; break;
543
	case 'B' : s = SORT_bitfield_variety ; break ;
572
	case 'B': s = SORT_bitfield_variety; break;
544
	case 'b' : s = SORT_bool ; break ;
573
	case 'b': s = SORT_bool; break;
545
	case 'q' : s = SORT_callees ; break ;
574
	case 'q': s = SORT_callees; break;
546
	case 'c' : s = SORT_error_code ; break ;
575
	case 'c': s = SORT_error_code; break;
547
	case 'e' : s = SORT_error_treatment ; break ;
576
	case 'e': s = SORT_error_treatment; break;
548
	case 'x' : s = SORT_exp ; break ;
577
	case 'x': s = SORT_exp; break;
549
	case 'f' : s = SORT_floating_variety ; break ;
578
	case 'f': s = SORT_floating_variety; break;
550
	case 'l' : s = SORT_label ; break ;
579
	case 'l': s = SORT_label; break;
551
	case 'n' : s = SORT_nat ; break ;
580
	case 'n': s = SORT_nat; break;
552
	case 'N' : s = SORT_ntest ; break ;
581
	case 'N': s = SORT_ntest; break;
553
	case 'P' : s = SORT_procprops ; break ;
582
	case 'P': s = SORT_procprops; break;
554
	case 'r' : s = SORT_rounding_mode ; break ;
583
	case 'r': s = SORT_rounding_mode; break;
555
	case 'S' : s = SORT_shape ; break ;
584
	case 'S': s = SORT_shape; break;
556
	case 's' : s = SORT_signed_nat ; break ;
585
	case 's': s = SORT_signed_nat; break;
557
	case 'X' : s = SORT_string ; break ;
586
	case 'X': s = SORT_string; break;
558
	case 't' : s = SORT_tag ; break ;
587
	case 't': s = SORT_tag; break;
559
	case 'm' : s = SORT_transfer_mode ; break ;
588
	case 'm': s = SORT_transfer_mode; break;
560
	case 'v' : s = SORT_variety ; break ;
589
	case 'v': s = SORT_variety; break;
561
	default : {
590
	default : {
562
	    input_error ( "Illegal decode letter, %c", c ) ;
591
	    input_error("Illegal decode letter, %c", c);
563
	    s = SORT_unknown ;
592
	    s = SORT_unknown;
564
	    break ;
593
	    break;
565
	}
594
	}
566
    }
595
    }
567
    return ( s ) ;
596
    return(s);
568
}
597
}
569
 
598
 
570
 
599
 
571
/* DECODE A ACCESS */
600
/* DECODE A ACCESS */
572
 
601
 
573
node *de_access
602
node *
574
    PROTO_Z ()
603
de_access(void)
575
{
604
{
576
    long n = fetch_extn ( 4 ) ;
605
    long n = fetch_extn(4);
577
    char *args ;
606
    char *args;
578
    node *p = new_node () ;
607
    node *p = new_node();
579
    construct *cons = cons_no ( SORT_access, n ) ;
608
    construct *cons = cons_no(SORT_access, n);
580
    p->cons = cons ;
609
    p->cons = cons;
581
    if ( n < 1 || n > 13 || cons->name == null ) {
610
    if (n < 1 || n > 13 || cons->name == null) {
582
	input_error ( "Illegal access value, %ld", n ) ;
611
	input_error("Illegal access value, %ld", n);
583
    }
612
    }
584
    switch ( n ) {
613
    switch (n) {
585
	case 1 : {
614
	case 1: {
586
	    IGNORE de_token ( p, SORT_access ) ;
615
	    IGNORE de_token(p, SORT_access);
-
 
616
	    break;
-
 
617
	}
-
 
618
	case 2: {
-
 
619
	    args = get_char_info(cons);
-
 
620
	    p->son = de_node(args);
-
 
621
	    if (do_check) {
-
 
622
		checking = "access_cond";
-
 
623
		IGNORE check1(ENC_integer, p->son);
-
 
624
	    }
587
	    break ;
625
	    break;
588
	}
626
	}
589
	case 2 : {
627
	default : {
590
	    args = get_char_info ( cons ) ;
628
	    args = get_char_info(cons);
591
	    p->son = de_node ( args ) ;
-
 
592
	    if ( do_check ) {
629
	    if (args) {
593
		checking = "access_cond" ;
630
		p->son = de_node(args);
594
		IGNORE check1 ( ENC_integer, p->son ) ;
-
 
595
	    }
631
	    }
596
	    break ;
-
 
597
	}
-
 
598
	default : {
-
 
599
	    args = get_char_info ( cons ) ;
-
 
600
	    if ( args ) p->son = de_node ( args ) ;
-
 
601
	    break ;
632
	    break;
602
	}
633
	}
603
    }
634
    }
604
#ifdef check_access
635
#ifdef check_access
605
    check_access ( p ) ;
636
    check_access(p);
606
#endif
637
#endif
607
    return ( p ) ;
638
    return(p);
608
}
639
}
609
 
640
 
610
 
641
 
611
/* DECODE A AL_TAG */
642
/* DECODE A AL_TAG */
612
 
643
 
613
node *de_al_tag
644
node *
614
    PROTO_Z ()
645
de_al_tag(void)
615
{
646
{
616
    long n = fetch_extn ( 1 ) ;
647
    long n = fetch_extn(1);
617
    char *args ;
648
    char *args;
618
    node *p = new_node () ;
649
    node *p = new_node();
619
    construct *cons = cons_no ( SORT_al_tag, n ) ;
650
    construct *cons = cons_no(SORT_al_tag, n);
620
    p->cons = cons ;
651
    p->cons = cons;
621
    if ( n < 1 || n > 2 || cons->name == null ) {
652
    if (n < 1 || n > 2 || cons->name == null) {
622
	input_error ( "Illegal al_tag value, %ld", n ) ;
653
	input_error("Illegal al_tag value, %ld", n);
623
    }
654
    }
624
    switch ( n ) {
655
    switch (n) {
625
	case 2 : {
656
	case 2: {
626
	    IGNORE de_token ( p, SORT_al_tag ) ;
657
	    IGNORE de_token(p, SORT_al_tag);
627
	    break ;
658
	    break;
628
	}
659
	}
629
	case 1 : {
660
	case 1: {
630
	    p->son = de_var_sort ( al_tag_var ) ;
661
	    p->son = de_var_sort(al_tag_var);
631
	    break ;
662
	    break;
632
	}
663
	}
633
	default : {
664
	default : {
634
	    args = get_char_info ( cons ) ;
665
	    args = get_char_info(cons);
-
 
666
	    if (args) {
635
	    if ( args ) p->son = de_node ( args ) ;
667
		p->son = de_node(args);
-
 
668
	    }
636
	    break ;
669
	    break;
637
	}
670
	}
638
    }
671
    }
639
#ifdef check_al_tag
672
#ifdef check_al_tag
640
    check_al_tag ( p ) ;
673
    check_al_tag(p);
641
#endif
674
#endif
642
    return ( p ) ;
675
    return(p);
643
}
676
}
644
 
677
 
645
 
678
 
646
/* DECODE A AL_TAGDEF */
679
/* DECODE A AL_TAGDEF */
647
 
680
 
-
 
681
long
648
long de_al_tagdef_bits
682
de_al_tagdef_bits(void)
649
    PROTO_Z ()
-
 
650
{
683
{
651
    long n = fetch_extn ( 1 ) ;
684
    long n = fetch_extn(1);
652
    if ( n < 1 || n > 1 ) {
685
    if (n < 1 || n > 1) {
653
	input_error ( "Illegal al_tagdef value, %ld", n ) ;
686
	input_error("Illegal al_tagdef value, %ld", n);
654
    }
687
    }
655
    return ( n ) ;
688
    return(n);
656
}
689
}
657
 
690
 
658
 
691
 
659
/* DECODE A ALIGNMENT */
692
/* DECODE A ALIGNMENT */
660
 
693
 
661
node *de_alignment
694
node *
662
    PROTO_Z ()
695
de_alignment(void)
663
{
696
{
664
    long n = fetch_extn ( 4 ) ;
697
    long n = fetch_extn(4);
665
    char *args ;
698
    char *args;
666
    node *p = new_node () ;
699
    node *p = new_node();
667
    construct *cons = cons_no ( SORT_alignment, n ) ;
700
    construct *cons = cons_no(SORT_alignment, n);
668
    p->cons = cons ;
701
    p->cons = cons;
669
    if ( n < 1 || n > 12 || cons->name == null ) {
702
    if (n < 1 || n > 12 || cons->name == null) {
670
	input_error ( "Illegal alignment value, %ld", n ) ;
703
	input_error("Illegal alignment value, %ld", n);
671
    }
704
    }
672
    switch ( n ) {
705
    switch (n) {
673
	case 1 : {
706
	case 1: {
674
	    IGNORE de_token ( p, SORT_alignment ) ;
707
	    IGNORE de_token(p, SORT_alignment);
675
	    break ;
708
	    break;
676
	}
709
	}
677
	case 2 : {
710
	case 2: {
678
	    args = get_char_info ( cons ) ;
711
	    args = get_char_info(cons);
679
	    p->son = de_node ( args ) ;
712
	    p->son = de_node(args);
680
	    if ( do_check ) {
713
	    if (do_check) {
681
		checking = "alignment_cond" ;
714
		checking = "alignment_cond";
682
		IGNORE check1 ( ENC_integer, p->son ) ;
715
		IGNORE check1(ENC_integer, p->son);
-
 
716
	    }
-
 
717
	    break;
-
 
718
	}
-
 
719
	default : {
-
 
720
	    args = get_char_info(cons);
-
 
721
	    if (args) {
-
 
722
		p->son = de_node(args);
683
	    }
723
	    }
684
	    break ;
724
	    break;
685
	}
-
 
686
	default : {
-
 
687
	    args = get_char_info ( cons ) ;
-
 
688
	    if ( args ) p->son = de_node ( args ) ;
-
 
689
	    break ;
-
 
690
	}
725
	}
691
    }
726
    }
692
#ifdef check_alignment
727
#ifdef check_alignment
693
    check_alignment ( p ) ;
728
    check_alignment(p);
694
#endif
729
#endif
695
    return ( p ) ;
730
    return(p);
696
}
731
}
697
 
732
 
698
 
733
 
699
/* DECODE A BITFIELD_VARIETY */
734
/* DECODE A BITFIELD_VARIETY */
700
 
735
 
-
 
736
node *
701
node *de_bitfield_variety
737
de_bitfield_variety(void)
702
    PROTO_Z ()
-
 
703
{
738
{
704
    long n = fetch_extn ( 2 ) ;
739
    long n = fetch_extn(2);
705
    char *args ;
740
    char *args;
706
    node *p = new_node () ;
741
    node *p = new_node();
707
    construct *cons = cons_no ( SORT_bitfield_variety, n ) ;
742
    construct *cons = cons_no(SORT_bitfield_variety, n);
708
    p->cons = cons ;
743
    p->cons = cons;
709
    if ( n < 1 || n > 3 || cons->name == null ) {
744
    if (n < 1 || n > 3 || cons->name == null) {
710
	input_error ( "Illegal bitfield_variety value, %ld", n ) ;
745
	input_error("Illegal bitfield_variety value, %ld", n);
711
    }
746
    }
712
    switch ( n ) {
747
    switch (n) {
713
	case 1 : {
748
	case 1: {
714
	    IGNORE de_token ( p, SORT_bitfield_variety ) ;
749
	    IGNORE de_token(p, SORT_bitfield_variety);
715
	    break ;
750
	    break;
716
	}
751
	}
717
	case 2 : {
752
	case 2: {
718
	    args = get_char_info ( cons ) ;
753
	    args = get_char_info(cons);
719
	    p->son = de_node ( args ) ;
754
	    p->son = de_node(args);
720
	    if ( do_check ) {
755
	    if (do_check) {
721
		checking = "bfvar_cond" ;
756
		checking = "bfvar_cond";
722
		IGNORE check1 ( ENC_integer, p->son ) ;
-
 
723
	    }
-
 
724
	    break ;
-
 
725
	}
-
 
726
	default : {
-
 
727
	    args = get_char_info ( cons ) ;
-
 
728
	    if ( args ) p->son = de_node ( args ) ;
-
 
729
	    break ;
-
 
730
	}
-
 
731
    }
-
 
732
#ifdef check_bitfield_variety
-
 
733
    check_bitfield_variety ( p ) ;
-
 
734
#endif
-
 
735
    return ( p ) ;
-
 
736
}
-
 
737
 
-
 
738
 
-
 
739
/* DECODE A BOOL */
-
 
740
 
-
 
741
node *de_bool
-
 
742
    PROTO_Z ()
-
 
743
{
-
 
744
    long n = fetch_extn ( 3 ) ;
-
 
745
    char *args ;
-
 
746
    node *p = new_node () ;
-
 
747
    construct *cons = cons_no ( SORT_bool, n ) ;
-
 
748
    p->cons = cons ;
-
 
749
    if ( n < 1 || n > 4 || cons->name == null ) {
-
 
750
	input_error ( "Illegal bool value, %ld", n ) ;
-
 
751
    }
-
 
752
    switch ( n ) {
-
 
753
	case 1 : {
-
 
754
	    IGNORE de_token ( p, SORT_bool ) ;
-
 
755
	    break ;
-
 
756
	}
-
 
757
	case 2 : {
-
 
758
	    args = get_char_info ( cons ) ;
-
 
759
	    p->son = de_node ( args ) ;
-
 
760
	    if ( do_check ) {
-
 
761
		checking = "bool_cond" ;
-
 
762
		IGNORE check1 ( ENC_integer, p->son ) ;
757
		IGNORE check1(ENC_integer, p->son);
763
	    }
758
	    }
764
	    break ;
759
	    break;
765
	}
760
	}
766
	default : {
761
	default : {
767
	    args = get_char_info ( cons ) ;
762
	    args = get_char_info(cons);
768
	    if ( args ) p->son = de_node ( args ) ;
-
 
769
	    break ;
-
 
770
	}
-
 
771
    }
-
 
772
#ifdef check_bool
-
 
773
    check_bool ( p ) ;
-
 
774
#endif
-
 
775
    return ( p ) ;
-
 
776
}
-
 
777
 
-
 
778
 
-
 
779
/* DECODE A CALLEES */
-
 
780
 
-
 
781
node *de_callees
-
 
782
    PROTO_Z ()
-
 
783
{
-
 
784
    long n = fetch_extn ( 2 ) ;
-
 
785
    char *args ;
-
 
786
    node *p = new_node () ;
-
 
787
    construct *cons = cons_no ( SORT_callees, n ) ;
-
 
788
    p->cons = cons ;
-
 
789
    if ( n < 1 || n > 3 || cons->name == null ) {
-
 
790
	input_error ( "Illegal callees value, %ld", n ) ;
-
 
791
    }
-
 
792
    args = get_char_info ( cons ) ;
-
 
793
    if ( args ) p->son = de_node ( args ) ;
-
 
794
#ifdef check_callees
-
 
795
    check_callees ( p ) ;
-
 
796
#endif
-
 
797
    return ( p ) ;
-
 
798
}
-
 
799
 
-
 
800
 
-
 
801
/* DECODE A ERROR_CODE */
-
 
802
 
-
 
803
node *de_error_code
-
 
804
    PROTO_Z ()
-
 
805
{
-
 
806
    long n = fetch_extn ( 2 ) ;
-
 
807
    char *args ;
-
 
808
    node *p = new_node () ;
-
 
809
    construct *cons = cons_no ( SORT_error_code, n ) ;
-
 
810
    p->cons = cons ;
-
 
811
    if ( n < 1 || n > 3 || cons->name == null ) {
-
 
812
	input_error ( "Illegal error_code value, %ld", n ) ;
-
 
813
    }
-
 
814
    args = get_char_info ( cons ) ;
-
 
815
    if ( args ) p->son = de_node ( args ) ;
-
 
816
#ifdef check_error_code
-
 
817
    check_error_code ( p ) ;
-
 
818
#endif
-
 
819
    return ( p ) ;
-
 
820
}
-
 
821
 
-
 
822
 
-
 
823
/* DECODE A ERROR_TREATMENT */
-
 
824
 
-
 
825
node *de_error_treatment
-
 
826
    PROTO_Z ()
-
 
827
{
-
 
828
    long n = fetch_extn ( 3 ) ;
-
 
829
    char *args ;
763
	    if (args) {
830
    node *p = new_node () ;
-
 
831
    construct *cons = cons_no ( SORT_error_treatment, n ) ;
-
 
832
    p->cons = cons ;
-
 
833
    if ( n < 1 || n > 7 || cons->name == null ) {
-
 
834
	input_error ( "Illegal error_treatment value, %ld", n ) ;
-
 
835
    }
-
 
836
    switch ( n ) {
-
 
837
	case 1 : {
-
 
838
	    IGNORE de_token ( p, SORT_error_treatment ) ;
-
 
839
	    break ;
-
 
840
	}
-
 
841
	case 2 : {
-
 
842
	    args = get_char_info ( cons ) ;
-
 
843
	    p->son = de_node ( args ) ;
764
		p->son = de_node(args);
844
	    if ( do_check ) {
-
 
845
		checking = "errt_cond" ;
-
 
846
		IGNORE check1 ( ENC_integer, p->son ) ;
-
 
847
	    }
765
	    }
848
	    break ;
766
	    break;
849
	}
-
 
850
	default : {
-
 
851
	    args = get_char_info ( cons ) ;
-
 
852
	    if ( args ) p->son = de_node ( args ) ;
-
 
853
	    break ;
-
 
854
	}
767
	}
855
    }
768
    }
856
#ifdef check_error_treatment
769
#ifdef check_bitfield_variety
857
    check_error_treatment ( p ) ;
770
    check_bitfield_variety(p);
858
#endif
771
#endif
859
    return ( p ) ;
772
    return(p);
860
}
773
}
861
 
774
 
862
 
775
 
863
/* DECODE A EXP */
776
/* DECODE A BOOL */
864
 
777
 
865
node *de_exp
778
node *
866
    PROTO_Z ()
779
de_bool(void)
867
{
780
{
868
    long n = fetch_extn ( 7 ) ;
781
    long n = fetch_extn(3);
869
    char *args ;
782
    char *args;
870
    node *p = new_node () ;
783
    node *p = new_node();
871
    construct *cons = cons_no ( SORT_exp, n ) ;
784
    construct *cons = cons_no(SORT_bool, n);
872
    p->cons = cons ;
785
    p->cons = cons;
873
    if ( n < 1 || n > 116 || cons->name == null ) {
786
    if (n < 1 || n > 4 || cons->name == null) {
874
	input_error ( "Illegal exp value, %ld", n ) ;
787
	input_error("Illegal bool value, %ld", n);
875
    }
788
    }
876
    switch ( n ) {
789
    switch (n) {
877
	case 1 : {
790
	case 1: {
878
	    IGNORE de_token ( p, SORT_exp ) ;
791
	    IGNORE de_token(p, SORT_bool);
879
	    break ;
792
	    break;
880
	}
793
	}
881
	case 2 : {
794
	case 2: {
882
	    args = get_char_info ( cons ) ;
795
	    args = get_char_info(cons);
883
	    p->son = de_node ( args ) ;
796
	    p->son = de_node(args);
884
	    if ( do_check ) {
797
	    if (do_check) {
885
		checking = "exp_cond" ;
798
		checking = "bool_cond";
886
		IGNORE check1 ( ENC_integer, p->son ) ;
799
		IGNORE check1(ENC_integer, p->son);
887
	    }
800
	    }
888
	    break ;
801
	    break;
889
	}
802
	}
890
	default : {
803
	default : {
891
	    args = get_char_info ( cons ) ;
804
	    args = get_char_info(cons);
-
 
805
	    if (args) {
892
	    if ( args ) p->son = de_node ( args ) ;
806
		p->son = de_node(args);
-
 
807
	    }
893
	    break ;
808
	    break;
894
	}
809
	}
895
    }
810
    }
896
#ifdef check_exp
811
#ifdef check_bool
897
    check_exp ( p ) ;
812
    check_bool(p);
-
 
813
#endif
-
 
814
    return(p);
-
 
815
}
-
 
816
 
-
 
817
 
-
 
818
/* DECODE A CALLEES */
-
 
819
 
-
 
820
node *
-
 
821
de_callees(void)
-
 
822
{
-
 
823
    long n = fetch_extn(2);
-
 
824
    char *args;
-
 
825
    node *p = new_node();
-
 
826
    construct *cons = cons_no(SORT_callees, n);
-
 
827
    p->cons = cons;
-
 
828
    if (n < 1 || n > 3 || cons->name == null) {
-
 
829
	input_error("Illegal callees value, %ld", n);
-
 
830
    }
-
 
831
    args = get_char_info(cons);
-
 
832
    if (args) {
-
 
833
	p->son = de_node(args);
-
 
834
    }
-
 
835
#ifdef check_callees
-
 
836
    check_callees(p);
-
 
837
#endif
-
 
838
    return(p);
-
 
839
}
-
 
840
 
-
 
841
 
-
 
842
/* DECODE A ERROR_CODE */
-
 
843
 
-
 
844
node *
-
 
845
de_error_code(void)
-
 
846
{
-
 
847
    long n = fetch_extn(2);
-
 
848
    char *args;
-
 
849
    node *p = new_node();
-
 
850
    construct *cons = cons_no(SORT_error_code, n);
-
 
851
    p->cons = cons;
-
 
852
    if (n < 1 || n > 3 || cons->name == null) {
-
 
853
	input_error("Illegal error_code value, %ld", n);
-
 
854
    }
-
 
855
    args = get_char_info(cons);
-
 
856
    if (args) {
-
 
857
	p->son = de_node(args);
-
 
858
    }
-
 
859
#ifdef check_error_code
-
 
860
    check_error_code(p);
898
#endif
861
#endif
-
 
862
    return(p);
-
 
863
}
-
 
864
 
-
 
865
 
-
 
866
/* DECODE A ERROR_TREATMENT */
-
 
867
 
-
 
868
node *
-
 
869
de_error_treatment(void)
-
 
870
{
-
 
871
    long n = fetch_extn(3);
-
 
872
    char *args;
-
 
873
    node *p = new_node();
-
 
874
    construct *cons = cons_no(SORT_error_treatment, n);
-
 
875
    p->cons = cons;
-
 
876
    if (n < 1 || n > 7 || cons->name == null) {
-
 
877
	input_error("Illegal error_treatment value, %ld", n);
-
 
878
    }
-
 
879
    switch (n) {
-
 
880
	case 1: {
-
 
881
	    IGNORE de_token(p, SORT_error_treatment);
-
 
882
	    break;
-
 
883
	}
-
 
884
	case 2: {
-
 
885
	    args = get_char_info(cons);
-
 
886
	    p->son = de_node(args);
-
 
887
	    if (do_check) {
-
 
888
		checking = "errt_cond";
-
 
889
		IGNORE check1(ENC_integer, p->son);
-
 
890
	    }
-
 
891
	    break;
-
 
892
	}
-
 
893
	default : {
-
 
894
	    args = get_char_info(cons);
-
 
895
	    if (args) {
-
 
896
		p->son = de_node(args);
-
 
897
	    }
-
 
898
	    break;
-
 
899
	}
-
 
900
    }
-
 
901
#ifdef check_error_treatment
-
 
902
    check_error_treatment(p);
-
 
903
#endif
-
 
904
    return(p);
-
 
905
}
-
 
906
 
-
 
907
 
-
 
908
/* DECODE A EXP */
-
 
909
 
-
 
910
node *
-
 
911
de_exp(void)
-
 
912
{
-
 
913
    long n = fetch_extn(7);
-
 
914
    char *args;
-
 
915
    node *p = new_node();
-
 
916
    construct *cons = cons_no(SORT_exp, n);
-
 
917
    p->cons = cons;
-
 
918
    if (n < 1 || n > 116 || cons->name == null) {
-
 
919
	input_error("Illegal exp value, %ld", n);
-
 
920
    }
-
 
921
    switch (n) {
-
 
922
	case 1: {
-
 
923
	    IGNORE de_token(p, SORT_exp);
-
 
924
	    break;
-
 
925
	}
-
 
926
	case 2: {
-
 
927
	    args = get_char_info(cons);
-
 
928
	    p->son = de_node(args);
-
 
929
	    if (do_check) {
-
 
930
		checking = "exp_cond";
-
 
931
		IGNORE check1(ENC_integer, p->son);
-
 
932
	    }
-
 
933
	    break;
-
 
934
	}
-
 
935
	default : {
-
 
936
	    args = get_char_info(cons);
-
 
937
	    if (args) {
-
 
938
		p->son = de_node(args);
-
 
939
	    }
-
 
940
	    break;
-
 
941
	}
-
 
942
    }
-
 
943
#ifdef check_exp
-
 
944
    check_exp(p);
-
 
945
#endif
899
    return ( p ) ;
946
    return(p);
900
}
947
}
901
 
948
 
902
 
949
 
903
/* DECODE A EXTERNAL */
950
/* DECODE A EXTERNAL */
904
 
951
 
-
 
952
long
905
long de_external_bits
953
de_external_bits(void)
906
    PROTO_Z ()
-
 
907
{
954
{
908
    long n = fetch_extn ( 2 ) ;
955
    long n = fetch_extn(2);
909
    if ( n < 1 || n > 3 ) {
956
    if (n < 1 || n > 3) {
910
	input_error ( "Illegal external value, %ld", n ) ;
957
	input_error("Illegal external value, %ld", n);
911
    }
958
    }
912
    return ( n ) ;
959
    return(n);
913
}
960
}
914
 
961
 
915
 
962
 
916
/* DECODE A FLOATING_VARIETY */
963
/* DECODE A FLOATING_VARIETY */
917
 
964
 
-
 
965
node *
918
node *de_floating_variety
966
de_floating_variety(void)
919
    PROTO_Z ()
-
 
920
{
967
{
921
    long n = fetch_extn ( 3 ) ;
968
    long n = fetch_extn(3);
922
    char *args ;
969
    char *args;
923
    node *p = new_node () ;
970
    node *p = new_node();
924
    construct *cons = cons_no ( SORT_floating_variety, n ) ;
971
    construct *cons = cons_no(SORT_floating_variety, n);
925
    p->cons = cons ;
972
    p->cons = cons;
926
    if ( n < 1 || n > 6 || cons->name == null ) {
973
    if (n < 1 || n > 6 || cons->name == null) {
927
	input_error ( "Illegal floating_variety value, %ld", n ) ;
974
	input_error("Illegal floating_variety value, %ld", n);
928
    }
975
    }
929
    switch ( n ) {
976
    switch (n) {
930
	case 1 : {
977
	case 1: {
931
	    IGNORE de_token ( p, SORT_floating_variety ) ;
978
	    IGNORE de_token(p, SORT_floating_variety);
932
	    break ;
979
	    break;
933
	}
980
	}
934
	case 2 : {
981
	case 2: {
935
	    args = get_char_info ( cons ) ;
982
	    args = get_char_info(cons);
936
	    p->son = de_node ( args ) ;
983
	    p->son = de_node(args);
937
	    if ( do_check ) {
984
	    if (do_check) {
938
		checking = "flvar_cond" ;
985
		checking = "flvar_cond";
939
		IGNORE check1 ( ENC_integer, p->son ) ;
986
		IGNORE check1(ENC_integer, p->son);
-
 
987
	    }
-
 
988
	    break;
-
 
989
	}
-
 
990
	default : {
-
 
991
	    args = get_char_info(cons);
-
 
992
	    if (args) {
-
 
993
		p->son = de_node(args);
940
	    }
994
	    }
941
	    break ;
995
	    break;
942
	}
-
 
943
	default : {
-
 
944
	    args = get_char_info ( cons ) ;
-
 
945
	    if ( args ) p->son = de_node ( args ) ;
-
 
946
	    break ;
-
 
947
	}
996
	}
948
    }
997
    }
949
#ifdef check_floating_variety
998
#ifdef check_floating_variety
950
    check_floating_variety ( p ) ;
999
    check_floating_variety(p);
951
#endif
1000
#endif
952
    return ( p ) ;
1001
    return(p);
953
}
1002
}
954
 
1003
 
955
 
1004
 
956
/* DECODE A LABEL */
1005
/* DECODE A LABEL */
957
 
1006
 
958
node *de_label
1007
node *
959
    PROTO_Z ()
1008
de_label(void)
960
{
1009
{
961
    long n = fetch_extn ( 1 ) ;
1010
    long n = fetch_extn(1);
962
    char *args ;
1011
    char *args;
963
    node *p = new_node () ;
1012
    node *p = new_node();
964
    construct *cons = cons_no ( SORT_label, n ) ;
1013
    construct *cons = cons_no(SORT_label, n);
965
    p->cons = cons ;
1014
    p->cons = cons;
966
    if ( n < 1 || n > 2 || cons->name == null ) {
1015
    if (n < 1 || n > 2 || cons->name == null) {
967
	input_error ( "Illegal label value, %ld", n ) ;
1016
	input_error("Illegal label value, %ld", n);
968
    }
1017
    }
969
    switch ( n ) {
1018
    switch (n) {
970
	case 2 : {
1019
	case 2: {
971
	    IGNORE de_token ( p, SORT_label ) ;
1020
	    IGNORE de_token(p, SORT_label);
972
	    break ;
1021
	    break;
973
	}
1022
	}
974
	case 1 : {
1023
	case 1: {
975
	    long m = tdf_int () ;
1024
	    long m = tdf_int();
976
	    p->son = new_node () ;
1025
	    p->son = new_node();
977
	    p->son->cons = find_label ( m ) ;
1026
	    p->son->cons = find_label(m);
978
	    break ;
1027
	    break;
979
	}
1028
	}
980
	default : {
1029
	default : {
981
	    args = get_char_info ( cons ) ;
1030
	    args = get_char_info(cons);
-
 
1031
	    if (args) {
982
	    if ( args ) p->son = de_node ( args ) ;
1032
		p->son = de_node(args);
-
 
1033
	    }
983
	    break ;
1034
	    break;
984
	}
1035
	}
985
    }
1036
    }
986
#ifdef check_label
1037
#ifdef check_label
987
    check_label ( p ) ;
1038
    check_label(p);
988
#endif
1039
#endif
989
    return ( p ) ;
1040
    return(p);
990
}
1041
}
991
 
1042
 
992
 
1043
 
993
/* DECODE A NAT */
1044
/* DECODE A NAT */
994
 
1045
 
995
node *de_nat
1046
node *
996
    PROTO_Z ()
1047
de_nat(void)
997
{
1048
{
998
    long n = fetch_extn ( 3 ) ;
1049
    long n = fetch_extn(3);
999
    char *args ;
1050
    char *args;
1000
    node *p = new_node () ;
1051
    node *p = new_node();
1001
    construct *cons = cons_no ( SORT_nat, n ) ;
1052
    construct *cons = cons_no(SORT_nat, n);
1002
    p->cons = cons ;
1053
    p->cons = cons;
1003
    if ( n < 1 || n > 5 || cons->name == null ) {
1054
    if (n < 1 || n > 5 || cons->name == null) {
1004
	input_error ( "Illegal nat value, %ld", n ) ;
1055
	input_error("Illegal nat value, %ld", n);
1005
    }
1056
    }
1006
    switch ( n ) {
1057
    switch (n) {
1007
	case 1 : {
1058
	case 1: {
1008
	    IGNORE de_token ( p, SORT_nat ) ;
1059
	    IGNORE de_token(p, SORT_nat);
1009
	    break ;
1060
	    break;
1010
	}
1061
	}
1011
	case 2 : {
1062
	case 2: {
1012
	    args = get_char_info ( cons ) ;
1063
	    args = get_char_info(cons);
1013
	    p->son = de_node ( args ) ;
1064
	    p->son = de_node(args);
1014
	    if ( do_check ) {
1065
	    if (do_check) {
1015
		checking = "nat_cond" ;
1066
		checking = "nat_cond";
1016
		IGNORE check1 ( ENC_integer, p->son ) ;
1067
		IGNORE check1(ENC_integer, p->son);
1017
	    }
1068
	    }
1018
	    break ;
1069
	    break;
1019
	}
1070
	}
1020
	default : {
1071
	default : {
1021
	    args = get_char_info ( cons ) ;
1072
	    args = get_char_info(cons);
-
 
1073
	    if (args) {
1022
	    if ( args ) p->son = de_node ( args ) ;
1074
		p->son = de_node(args);
-
 
1075
	    }
1023
	    break ;
1076
	    break;
1024
	}
1077
	}
1025
    }
1078
    }
1026
#ifdef check_nat
1079
#ifdef check_nat
1027
    check_nat ( p ) ;
1080
    check_nat(p);
1028
#endif
1081
#endif
1029
    return ( p ) ;
1082
    return(p);
1030
}
1083
}
1031
 
1084
 
1032
 
1085
 
1033
/* DECODE A NTEST */
1086
/* DECODE A NTEST */
1034
 
1087
 
1035
node *de_ntest
1088
node *
1036
    PROTO_Z ()
1089
de_ntest(void)
1037
{
1090
{
1038
    long n = fetch_extn ( 4 ) ;
1091
    long n = fetch_extn(4);
1039
    char *args ;
1092
    char *args;
1040
    node *p = new_node () ;
1093
    node *p = new_node();
1041
    construct *cons = cons_no ( SORT_ntest, n ) ;
1094
    construct *cons = cons_no(SORT_ntest, n);
1042
    p->cons = cons ;
1095
    p->cons = cons;
1043
    if ( n < 1 || n > 16 || cons->name == null ) {
1096
    if (n < 1 || n > 16 || cons->name == null) {
1044
	input_error ( "Illegal ntest value, %ld", n ) ;
1097
	input_error("Illegal ntest value, %ld", n);
1045
    }
1098
    }
1046
    switch ( n ) {
1099
    switch (n) {
1047
	case 1 : {
1100
	case 1: {
1048
	    IGNORE de_token ( p, SORT_ntest ) ;
1101
	    IGNORE de_token(p, SORT_ntest);
-
 
1102
	    break;
-
 
1103
	}
-
 
1104
	case 2: {
-
 
1105
	    args = get_char_info(cons);
-
 
1106
	    p->son = de_node(args);
-
 
1107
	    if (do_check) {
-
 
1108
		checking = "ntest_cond";
-
 
1109
		IGNORE check1(ENC_integer, p->son);
-
 
1110
	    }
1049
	    break ;
1111
	    break;
1050
	}
1112
	}
1051
	case 2 : {
1113
	default : {
1052
	    args = get_char_info ( cons ) ;
1114
	    args = get_char_info(cons);
1053
	    p->son = de_node ( args ) ;
-
 
1054
	    if ( do_check ) {
1115
	    if (args) {
1055
		checking = "ntest_cond" ;
1116
		p->son = de_node(args);
1056
		IGNORE check1 ( ENC_integer, p->son ) ;
-
 
1057
	    }
1117
	    }
1058
	    break ;
1118
	    break;
1059
	}
-
 
1060
	default : {
-
 
1061
	    args = get_char_info ( cons ) ;
-
 
1062
	    if ( args ) p->son = de_node ( args ) ;
-
 
1063
	    break ;
-
 
1064
	}
1119
	}
1065
    }
1120
    }
1066
#ifdef check_ntest
1121
#ifdef check_ntest
1067
    check_ntest ( p ) ;
1122
    check_ntest(p);
1068
#endif
1123
#endif
1069
    return ( p ) ;
1124
    return(p);
1070
}
1125
}
1071
 
1126
 
1072
 
1127
 
1073
/* DECODE A PROCPROPS */
1128
/* DECODE A PROCPROPS */
1074
 
1129
 
1075
node *de_procprops
1130
node *
1076
    PROTO_Z ()
1131
de_procprops(void)
1077
{
1132
{
1078
    long n = fetch_extn ( 4 ) ;
1133
    long n = fetch_extn(4);
1079
    char *args ;
1134
    char *args;
1080
    node *p = new_node () ;
1135
    node *p = new_node();
1081
    construct *cons = cons_no ( SORT_procprops, n ) ;
1136
    construct *cons = cons_no(SORT_procprops, n);
1082
    p->cons = cons ;
1137
    p->cons = cons;
1083
    if ( n < 1 || n > 9 || cons->name == null ) {
1138
    if (n < 1 || n > 9 || cons->name == null) {
1084
	input_error ( "Illegal procprops value, %ld", n ) ;
1139
	input_error("Illegal procprops value, %ld", n);
1085
    }
1140
    }
1086
    switch ( n ) {
1141
    switch (n) {
1087
	case 1 : {
1142
	case 1: {
1088
	    IGNORE de_token ( p, SORT_procprops ) ;
1143
	    IGNORE de_token(p, SORT_procprops);
1089
	    break ;
1144
	    break;
1090
	}
1145
	}
1091
	case 2 : {
1146
	case 2: {
1092
	    args = get_char_info ( cons ) ;
1147
	    args = get_char_info(cons);
1093
	    p->son = de_node ( args ) ;
1148
	    p->son = de_node(args);
1094
	    if ( do_check ) {
1149
	    if (do_check) {
1095
		checking = "procprops_cond" ;
1150
		checking = "procprops_cond";
1096
		IGNORE check1 ( ENC_integer, p->son ) ;
1151
		IGNORE check1(ENC_integer, p->son);
1097
	    }
1152
	    }
1098
	    break ;
1153
	    break;
1099
	}
1154
	}
1100
	default : {
1155
	default : {
1101
	    args = get_char_info ( cons ) ;
1156
	    args = get_char_info(cons);
-
 
1157
	    if (args) {
1102
	    if ( args ) p->son = de_node ( args ) ;
1158
		p->son = de_node(args);
-
 
1159
	    }
1103
	    break ;
1160
	    break;
1104
	}
1161
	}
1105
    }
1162
    }
1106
#ifdef check_procprops
1163
#ifdef check_procprops
1107
    check_procprops ( p ) ;
1164
    check_procprops(p);
1108
#endif
1165
#endif
1109
    return ( p ) ;
1166
    return(p);
1110
}
1167
}
1111
 
1168
 
1112
 
1169
 
1113
/* DECODE A ROUNDING_MODE */
1170
/* DECODE A ROUNDING_MODE */
1114
 
1171
 
1115
node *de_rounding_mode
1172
node *
1116
    PROTO_Z ()
1173
de_rounding_mode(void)
1117
{
1174
{
1118
    long n = fetch_extn ( 3 ) ;
1175
    long n = fetch_extn(3);
1119
    char *args ;
1176
    char *args;
1120
    node *p = new_node () ;
1177
    node *p = new_node();
1121
    construct *cons = cons_no ( SORT_rounding_mode, n ) ;
1178
    construct *cons = cons_no(SORT_rounding_mode, n);
1122
    p->cons = cons ;
1179
    p->cons = cons;
1123
    if ( n < 1 || n > 7 || cons->name == null ) {
1180
    if (n < 1 || n > 7 || cons->name == null) {
1124
	input_error ( "Illegal rounding_mode value, %ld", n ) ;
1181
	input_error("Illegal rounding_mode value, %ld", n);
1125
    }
1182
    }
1126
    switch ( n ) {
1183
    switch (n) {
1127
	case 1 : {
1184
	case 1: {
1128
	    IGNORE de_token ( p, SORT_rounding_mode ) ;
1185
	    IGNORE de_token(p, SORT_rounding_mode);
1129
	    break ;
1186
	    break;
1130
	}
1187
	}
1131
	case 2 : {
1188
	case 2: {
1132
	    args = get_char_info ( cons ) ;
1189
	    args = get_char_info(cons);
1133
	    p->son = de_node ( args ) ;
1190
	    p->son = de_node(args);
1134
	    if ( do_check ) {
1191
	    if (do_check) {
1135
		checking = "rounding_mode_cond" ;
1192
		checking = "rounding_mode_cond";
1136
		IGNORE check1 ( ENC_integer, p->son ) ;
1193
		IGNORE check1(ENC_integer, p->son);
1137
	    }
1194
	    }
1138
	    break ;
1195
	    break;
1139
	}
1196
	}
1140
	default : {
1197
	default : {
1141
	    args = get_char_info ( cons ) ;
1198
	    args = get_char_info(cons);
-
 
1199
	    if (args) {
1142
	    if ( args ) p->son = de_node ( args ) ;
1200
		p->son = de_node(args);
-
 
1201
	    }
1143
	    break ;
1202
	    break;
1144
	}
1203
	}
1145
    }
1204
    }
1146
#ifdef check_rounding_mode
1205
#ifdef check_rounding_mode
1147
    check_rounding_mode ( p ) ;
1206
    check_rounding_mode(p);
1148
#endif
1207
#endif
1149
    return ( p ) ;
1208
    return(p);
1150
}
1209
}
1151
 
1210
 
1152
 
1211
 
1153
/* DECODE A SHAPE */
1212
/* DECODE A SHAPE */
1154
 
1213
 
1155
node *de_shape
1214
node *
1156
    PROTO_Z ()
1215
de_shape(void)
1157
{
1216
{
1158
    long n = fetch_extn ( 4 ) ;
1217
    long n = fetch_extn(4);
1159
    char *args ;
1218
    char *args;
1160
    node *p = new_node () ;
1219
    node *p = new_node();
1161
    construct *cons = cons_no ( SORT_shape, n ) ;
1220
    construct *cons = cons_no(SORT_shape, n);
1162
    p->cons = cons ;
1221
    p->cons = cons;
1163
    if ( n < 1 || n > 12 || cons->name == null ) {
1222
    if (n < 1 || n > 12 || cons->name == null) {
1164
	input_error ( "Illegal shape value, %ld", n ) ;
1223
	input_error("Illegal shape value, %ld", n);
1165
    }
1224
    }
1166
    switch ( n ) {
1225
    switch (n) {
1167
	case 1 : {
1226
	case 1: {
1168
	    IGNORE de_token ( p, SORT_shape ) ;
1227
	    IGNORE de_token(p, SORT_shape);
1169
	    break ;
1228
	    break;
1170
	}
1229
	}
1171
	case 2 : {
1230
	case 2: {
1172
	    args = get_char_info ( cons ) ;
1231
	    args = get_char_info(cons);
1173
	    p->son = de_node ( args ) ;
1232
	    p->son = de_node(args);
1174
	    if ( do_check ) {
1233
	    if (do_check) {
1175
		checking = "shape_cond" ;
1234
		checking = "shape_cond";
1176
		IGNORE check1 ( ENC_integer, p->son ) ;
1235
		IGNORE check1(ENC_integer, p->son);
-
 
1236
	    }
-
 
1237
	    break;
-
 
1238
	}
-
 
1239
	default : {
-
 
1240
	    args = get_char_info(cons);
-
 
1241
	    if (args) {
-
 
1242
		p->son = de_node(args);
1177
	    }
1243
	    }
1178
	    break ;
1244
	    break;
1179
	}
-
 
1180
	default : {
-
 
1181
	    args = get_char_info ( cons ) ;
-
 
1182
	    if ( args ) p->son = de_node ( args ) ;
-
 
1183
	    break ;
-
 
1184
	}
1245
	}
1185
    }
1246
    }
1186
#ifdef check_shape
1247
#ifdef check_shape
1187
    check_shape ( p ) ;
1248
    check_shape(p);
1188
#endif
1249
#endif
1189
    return ( p ) ;
1250
    return(p);
1190
}
1251
}
1191
 
1252
 
1192
 
1253
 
1193
/* DECODE A SIGNED_NAT */
1254
/* DECODE A SIGNED_NAT */
1194
 
1255
 
1195
node *de_signed_nat
1256
node *
1196
    PROTO_Z ()
1257
de_signed_nat(void)
1197
{
1258
{
1198
    long n = fetch_extn ( 3 ) ;
1259
    long n = fetch_extn(3);
1199
    char *args ;
1260
    char *args;
1200
    node *p = new_node () ;
1261
    node *p = new_node();
1201
    construct *cons = cons_no ( SORT_signed_nat, n ) ;
1262
    construct *cons = cons_no(SORT_signed_nat, n);
1202
    p->cons = cons ;
1263
    p->cons = cons;
1203
    if ( n < 1 || n > 5 || cons->name == null ) {
1264
    if (n < 1 || n > 5 || cons->name == null) {
1204
	input_error ( "Illegal signed_nat value, %ld", n ) ;
1265
	input_error("Illegal signed_nat value, %ld", n);
1205
    }
1266
    }
1206
    switch ( n ) {
1267
    switch (n) {
1207
	case 1 : {
1268
	case 1: {
1208
	    IGNORE de_token ( p, SORT_signed_nat ) ;
1269
	    IGNORE de_token(p, SORT_signed_nat);
1209
	    break ;
1270
	    break;
1210
	}
1271
	}
1211
	case 2 : {
1272
	case 2: {
1212
	    args = get_char_info ( cons ) ;
1273
	    args = get_char_info(cons);
1213
	    p->son = de_node ( args ) ;
1274
	    p->son = de_node(args);
1214
	    if ( do_check ) {
1275
	    if (do_check) {
1215
		checking = "signed_nat_cond" ;
1276
		checking = "signed_nat_cond";
1216
		IGNORE check1 ( ENC_integer, p->son ) ;
1277
		IGNORE check1(ENC_integer, p->son);
1217
	    }
1278
	    }
1218
	    break ;
1279
	    break;
1219
	}
1280
	}
1220
	default : {
1281
	default : {
1221
	    args = get_char_info ( cons ) ;
1282
	    args = get_char_info(cons);
-
 
1283
	    if (args) {
1222
	    if ( args ) p->son = de_node ( args ) ;
1284
		p->son = de_node(args);
-
 
1285
	    }
1223
	    break ;
1286
	    break;
1224
	}
1287
	}
1225
    }
1288
    }
1226
#ifdef check_signed_nat
1289
#ifdef check_signed_nat
1227
    check_signed_nat ( p ) ;
1290
    check_signed_nat(p);
1228
#endif
1291
#endif
1229
    return ( p ) ;
1292
    return(p);
1230
}
1293
}
1231
 
1294
 
1232
 
1295
 
1233
/* DECODE A SORTNAME */
1296
/* DECODE A SORTNAME */
1234
 
1297
 
-
 
1298
long
1235
long de_sortname_bits
1299
de_sortname_bits(void)
1236
    PROTO_Z ()
-
 
1237
{
1300
{
1238
    long n = fetch_extn ( 5 ) ;
1301
    long n = fetch_extn(5);
1239
    if ( n < 1 || n > 21 ) {
1302
    if (n < 1 || n > 21) {
1240
	input_error ( "Illegal sortname value, %ld", n ) ;
1303
	input_error("Illegal sortname value, %ld", n);
1241
    }
1304
    }
1242
    return ( n ) ;
1305
    return(n);
1243
}
1306
}
1244
 
1307
 
1245
 
1308
 
1246
/* DECODE A STRING */
1309
/* DECODE A STRING */
1247
 
1310
 
1248
node *de_string
1311
node *
1249
    PROTO_Z ()
1312
de_string(void)
1250
{
1313
{
1251
    long n = fetch_extn ( 3 ) ;
1314
    long n = fetch_extn(3);
1252
    char *args ;
1315
    char *args;
1253
    node *p = new_node () ;
1316
    node *p = new_node();
1254
    construct *cons = cons_no ( SORT_string, n ) ;
1317
    construct *cons = cons_no(SORT_string, n);
1255
    p->cons = cons ;
1318
    p->cons = cons;
1256
    if ( n < 1 || n > 4 || cons->name == null ) {
1319
    if (n < 1 || n > 4 || cons->name == null) {
1257
	input_error ( "Illegal string value, %ld", n ) ;
1320
	input_error("Illegal string value, %ld", n);
1258
    }
1321
    }
1259
    switch ( n ) {
1322
    switch (n) {
1260
	case 1 : {
1323
	case 1: {
1261
	    IGNORE de_token ( p, SORT_string ) ;
1324
	    IGNORE de_token(p, SORT_string);
1262
	    break ;
1325
	    break;
1263
	}
1326
	}
1264
	case 2 : {
1327
	case 2: {
1265
	    args = get_char_info ( cons ) ;
1328
	    args = get_char_info(cons);
1266
	    p->son = de_node ( args ) ;
1329
	    p->son = de_node(args);
1267
	    if ( do_check ) {
1330
	    if (do_check) {
1268
		checking = "string_cond" ;
1331
		checking = "string_cond";
1269
		IGNORE check1 ( ENC_integer, p->son ) ;
1332
		IGNORE check1(ENC_integer, p->son);
1270
	    }
1333
	    }
1271
	    break ;
1334
	    break;
1272
	}
1335
	}
1273
	default : {
1336
	default : {
1274
	    args = get_char_info ( cons ) ;
1337
	    args = get_char_info(cons);
-
 
1338
	    if (args) {
1275
	    if ( args ) p->son = de_node ( args ) ;
1339
		p->son = de_node(args);
-
 
1340
	    }
1276
	    break ;
1341
	    break;
1277
	}
1342
	}
1278
    }
1343
    }
1279
#ifdef check_string
1344
#ifdef check_string
1280
    check_string ( p ) ;
1345
    check_string(p);
1281
#endif
1346
#endif
1282
    return ( p ) ;
1347
    return(p);
1283
}
1348
}
1284
 
1349
 
1285
 
1350
 
1286
/* DECODE A TAG */
1351
/* DECODE A TAG */
1287
 
1352
 
1288
node *de_tag
1353
node *
1289
    PROTO_Z ()
1354
de_tag(void)
1290
{
1355
{
1291
    long n = fetch_extn ( 1 ) ;
1356
    long n = fetch_extn(1);
1292
    char *args ;
1357
    char *args;
1293
    node *p = new_node () ;
1358
    node *p = new_node();
1294
    construct *cons = cons_no ( SORT_tag, n ) ;
1359
    construct *cons = cons_no(SORT_tag, n);
1295
    p->cons = cons ;
1360
    p->cons = cons;
1296
    if ( n < 1 || n > 2 || cons->name == null ) {
1361
    if (n < 1 || n > 2 || cons->name == null) {
1297
	input_error ( "Illegal tag value, %ld", n ) ;
1362
	input_error("Illegal tag value, %ld", n);
1298
    }
1363
    }
1299
    switch ( n ) {
1364
    switch (n) {
1300
	case 2 : {
1365
	case 2: {
1301
	    IGNORE de_token ( p, SORT_tag ) ;
1366
	    IGNORE de_token(p, SORT_tag);
1302
	    break ;
1367
	    break;
1303
	}
1368
	}
1304
	case 1 : {
1369
	case 1: {
1305
	    p->son = de_var_sort ( tag_var ) ;
1370
	    p->son = de_var_sort(tag_var);
1306
	    break ;
1371
	    break;
1307
	}
1372
	}
1308
	default : {
1373
	default : {
1309
	    args = get_char_info ( cons ) ;
1374
	    args = get_char_info(cons);
-
 
1375
	    if (args) {
1310
	    if ( args ) p->son = de_node ( args ) ;
1376
		p->son = de_node(args);
-
 
1377
	    }
1311
	    break ;
1378
	    break;
1312
	}
1379
	}
1313
    }
1380
    }
1314
#ifdef check_tag
1381
#ifdef check_tag
1315
    check_tag ( p ) ;
1382
    check_tag(p);
1316
#endif
1383
#endif
1317
    return ( p ) ;
1384
    return(p);
1318
}
1385
}
1319
 
1386
 
1320
 
1387
 
1321
/* DECODE A TAGDEC */
1388
/* DECODE A TAGDEC */
1322
 
1389
 
1323
long de_tagdec_bits
1390
long
1324
    PROTO_Z ()
1391
de_tagdec_bits(void)
1325
{
1392
{
1326
    long n = fetch_extn ( 2 ) ;
1393
    long n = fetch_extn(2);
1327
    if ( n < 1 || n > 3 ) {
1394
    if (n < 1 || n > 3) {
1328
	input_error ( "Illegal tagdec value, %ld", n ) ;
1395
	input_error("Illegal tagdec value, %ld", n);
1329
    }
1396
    }
1330
    return ( n ) ;
1397
    return(n);
1331
}
1398
}
1332
 
1399
 
1333
 
1400
 
1334
/* DECODE A TAGDEF */
1401
/* DECODE A TAGDEF */
1335
 
1402
 
-
 
1403
long
1336
long de_tagdef_bits
1404
de_tagdef_bits(void)
-
 
1405
{
-
 
1406
    long n = fetch_extn(2);
-
 
1407
    if (n < 1 || n > 3) {
-
 
1408
	input_error("Illegal tagdef value, %ld", n);
-
 
1409
    }
1337
    PROTO_Z ()
1410
    return(n);
-
 
1411
}
-
 
1412
 
-
 
1413
 
-
 
1414
/* DECODE A TOKDEC */
-
 
1415
 
-
 
1416
long
-
 
1417
de_tokdec_bits(void)
1338
{
1418
{
1339
    long n = fetch_extn ( 2 ) ;
1419
    long n = fetch_extn(1);
1340
    if ( n < 1 || n > 3 ) {
1420
    if (n < 1 || n > 1) {
1341
	input_error ( "Illegal tagdef value, %ld", n ) ;
1421
	input_error("Illegal tokdec value, %ld", n);
1342
    }
1422
    }
1343
    return ( n ) ;
1423
    return(n);
1344
}
1424
}
1345
 
1425
 
1346
 
1426
 
1347
/* DECODE A TOKDEC */
1427
/* DECODE A TOKDEF */
1348
 
1428
 
1349
long de_tokdec_bits
1429
long
1350
    PROTO_Z ()
1430
de_tokdef_bits(void)
1351
{
1431
{
1352
    long n = fetch_extn ( 1 ) ;
1432
    long n = fetch_extn(1);
1353
    if ( n < 1 || n > 1 ) {
1433
    if (n < 1 || n > 1) {
1354
	input_error ( "Illegal tokdec value, %ld", n ) ;
1434
	input_error("Illegal tokdef value, %ld", n);
1355
    }
1435
    }
1356
    return ( n ) ;
1436
    return(n);
1357
}
-
 
1358
 
-
 
1359
 
-
 
1360
/* DECODE A TOKDEF */
-
 
1361
 
-
 
1362
long de_tokdef_bits
-
 
1363
    PROTO_Z ()
-
 
1364
{
-
 
1365
    long n = fetch_extn ( 1 ) ;
-
 
1366
    if ( n < 1 || n > 1 ) {
-
 
1367
	input_error ( "Illegal tokdef value, %ld", n ) ;
-
 
1368
    }
-
 
1369
    return ( n ) ;
-
 
1370
}
1437
}
1371
 
1438
 
1372
 
1439
 
1373
/* DECODE A TOKEN */
1440
/* DECODE A TOKEN */
1374
 
1441
 
1375
long de_token_bits
1442
long
1376
    PROTO_Z ()
1443
de_token_bits(void)
1377
{
1444
{
1378
    long n = fetch_extn ( 2 ) ;
1445
    long n = fetch_extn(2);
1379
    if ( n < 1 || n > 3 ) {
1446
    if (n < 1 || n > 3) {
1380
	input_error ( "Illegal token value, %ld", n ) ;
1447
	input_error("Illegal token value, %ld", n);
1381
    }
1448
    }
1382
    return ( n ) ;
1449
    return(n);
1383
}
1450
}
1384
 
1451
 
1385
 
1452
 
1386
/* DECODE A TOKEN_DEFN */
1453
/* DECODE A TOKEN_DEFN */
1387
 
1454
 
-
 
1455
long
1388
long de_token_defn_bits
1456
de_token_defn_bits(void)
1389
    PROTO_Z ()
-
 
1390
{
1457
{
1391
    long n = fetch_extn ( 1 ) ;
1458
    long n = fetch_extn(1);
1392
    if ( n < 1 || n > 1 ) {
1459
    if (n < 1 || n > 1) {
1393
	input_error ( "Illegal token_defn value, %ld", n ) ;
1460
	input_error("Illegal token_defn value, %ld", n);
1394
    }
1461
    }
1395
    return ( n ) ;
1462
    return(n);
1396
}
1463
}
1397
 
1464
 
1398
 
1465
 
1399
/* DECODE A TRANSFER_MODE */
1466
/* DECODE A TRANSFER_MODE */
1400
 
1467
 
1401
node *de_transfer_mode
1468
node *
1402
    PROTO_Z ()
1469
de_transfer_mode(void)
1403
{
1470
{
1404
    long n = fetch_extn ( 3 ) ;
1471
    long n = fetch_extn(3);
1405
    char *args ;
1472
    char *args;
1406
    node *p = new_node () ;
1473
    node *p = new_node();
1407
    construct *cons = cons_no ( SORT_transfer_mode, n ) ;
1474
    construct *cons = cons_no(SORT_transfer_mode, n);
1408
    p->cons = cons ;
1475
    p->cons = cons;
1409
    if ( n < 1 || n > 8 || cons->name == null ) {
1476
    if (n < 1 || n > 8 || cons->name == null) {
1410
	input_error ( "Illegal transfer_mode value, %ld", n ) ;
1477
	input_error("Illegal transfer_mode value, %ld", n);
1411
    }
1478
    }
1412
    switch ( n ) {
1479
    switch (n) {
1413
	case 1 : {
1480
	case 1: {
1414
	    IGNORE de_token ( p, SORT_transfer_mode ) ;
1481
	    IGNORE de_token(p, SORT_transfer_mode);
1415
	    break ;
1482
	    break;
1416
	}
1483
	}
1417
	case 2 : {
1484
	case 2: {
1418
	    args = get_char_info ( cons ) ;
1485
	    args = get_char_info(cons);
1419
	    p->son = de_node ( args ) ;
1486
	    p->son = de_node(args);
1420
	    if ( do_check ) {
1487
	    if (do_check) {
1421
		checking = "transfer_mode_cond" ;
1488
		checking = "transfer_mode_cond";
1422
		IGNORE check1 ( ENC_integer, p->son ) ;
1489
		IGNORE check1(ENC_integer, p->son);
-
 
1490
	    }
-
 
1491
	    break;
-
 
1492
	}
-
 
1493
	default : {
-
 
1494
	    args = get_char_info(cons);
-
 
1495
	    if (args) {
-
 
1496
		p->son = de_node(args);
1423
	    }
1497
	    }
1424
	    break ;
1498
	    break;
1425
	}
-
 
1426
	default : {
-
 
1427
	    args = get_char_info ( cons ) ;
-
 
1428
	    if ( args ) p->son = de_node ( args ) ;
-
 
1429
	    break ;
-
 
1430
	}
1499
	}
1431
    }
1500
    }
1432
#ifdef check_transfer_mode
1501
#ifdef check_transfer_mode
1433
    check_transfer_mode ( p ) ;
1502
    check_transfer_mode(p);
1434
#endif
1503
#endif
1435
    return ( p ) ;
1504
    return(p);
1436
}
1505
}
1437
 
1506
 
1438
 
1507
 
1439
/* DECODE A VARIETY */
1508
/* DECODE A VARIETY */
1440
 
1509
 
1441
node *de_variety
1510
node *
1442
    PROTO_Z ()
1511
de_variety(void)
1443
{
1512
{
1444
    long n = fetch_extn ( 2 ) ;
1513
    long n = fetch_extn(2);
1445
    char *args ;
1514
    char *args;
1446
    node *p = new_node () ;
1515
    node *p = new_node();
1447
    construct *cons = cons_no ( SORT_variety, n ) ;
1516
    construct *cons = cons_no(SORT_variety, n);
1448
    p->cons = cons ;
1517
    p->cons = cons;
1449
    if ( n < 1 || n > 4 || cons->name == null ) {
1518
    if (n < 1 || n > 4 || cons->name == null) {
1450
	input_error ( "Illegal variety value, %ld", n ) ;
1519
	input_error("Illegal variety value, %ld", n);
1451
    }
1520
    }
1452
    switch ( n ) {
1521
    switch (n) {
1453
	case 1 : {
1522
	case 1: {
1454
	    IGNORE de_token ( p, SORT_variety ) ;
1523
	    IGNORE de_token(p, SORT_variety);
1455
	    break ;
1524
	    break;
1456
	}
1525
	}
1457
	case 2 : {
1526
	case 2: {
1458
	    args = get_char_info ( cons ) ;
1527
	    args = get_char_info(cons);
1459
	    p->son = de_node ( args ) ;
1528
	    p->son = de_node(args);
1460
	    if ( do_check ) {
1529
	    if (do_check) {
1461
		checking = "var_cond" ;
1530
		checking = "var_cond";
1462
		IGNORE check1 ( ENC_integer, p->son ) ;
1531
		IGNORE check1(ENC_integer, p->son);
1463
	    }
1532
	    }
1464
	    break ;
1533
	    break;
1465
	}
1534
	}
1466
	default : {
1535
	default : {
1467
	    args = get_char_info ( cons ) ;
1536
	    args = get_char_info(cons);
-
 
1537
	    if (args) {
1468
	    if ( args ) p->son = de_node ( args ) ;
1538
		p->son = de_node(args);
-
 
1539
	    }
1469
	    break ;
1540
	    break;
1470
	}
1541
	}
1471
    }
1542
    }
1472
#ifdef check_variety
1543
#ifdef check_variety
1473
    check_variety ( p ) ;
1544
    check_variety(p);
1474
#endif
1545
#endif
1475
    return ( p ) ;
-
 
1476
}
-
 
1477
 
-
 
1478
 
-
 
1479
/* DECODE A VERSION */
-
 
1480
 
-
 
1481
long de_version_bits
-
 
1482
    PROTO_Z ()
-
 
1483
{
-
 
1484
    long n = fetch_extn ( 1 ) ;
-
 
1485
    if ( n < 1 || n > 2 ) {
-
 
1486
	input_error ( "Illegal version value, %ld", n ) ;
-
 
1487
    }
-
 
1488
    return ( n ) ;
-
 
1489
}
-
 
1490
 
-
 
1491
 
-
 
1492
/* ENCODE A AL_TAG */
-
 
1493
 
-
 
1494
void enc_al_tag_bits
-
 
1495
    PROTO_N ( ( p, n ) )
-
 
1496
    PROTO_T ( bitstream *p X int n )
-
 
1497
{
-
 
1498
    enc_bits_extn ( p, 1, ( long ) n ) ;
-
 
1499
    return ;
-
 
1500
}
-
 
1501
 
-
 
1502
 
-
 
1503
/* ENCODE A AL_TAGDEF */
-
 
1504
 
-
 
1505
void enc_al_tagdef_bits
-
 
1506
    PROTO_N ( ( p, n ) )
-
 
1507
    PROTO_T ( bitstream *p X int n )
-
 
1508
{
-
 
1509
    enc_bits_extn ( p, 1, ( long ) n ) ;
-
 
1510
    return ;
-
 
1511
}
-
 
1512
 
-
 
1513
 
-
 
1514
/* ENCODE A EXTERNAL */
-
 
1515
 
-
 
1516
void enc_external_bits
-
 
1517
    PROTO_N ( ( p, n ) )
-
 
1518
    PROTO_T ( bitstream *p X int n )
-
 
1519
{
-
 
1520
    enc_bits_extn ( p, 2, ( long ) n ) ;
-
 
1521
    return ;
-
 
1522
}
-
 
1523
 
-
 
1524
 
-
 
1525
/* ENCODE A LABEL */
-
 
1526
 
-
 
1527
void enc_label_bits
-
 
1528
    PROTO_N ( ( p, n ) )
-
 
1529
    PROTO_T ( bitstream *p X int n )
-
 
1530
{
-
 
1531
    enc_bits_extn ( p, 1, ( long ) n ) ;
-
 
1532
    return ;
-
 
1533
}
-
 
1534
 
-
 
1535
 
-
 
1536
/* ENCODE A SORTNAME */
-
 
1537
 
-
 
1538
void enc_sortname_bits
-
 
1539
    PROTO_N ( ( p, n ) )
-
 
1540
    PROTO_T ( bitstream *p X int n )
-
 
1541
{
-
 
1542
    enc_bits_extn ( p, 5, ( long ) n ) ;
-
 
1543
    return ;
-
 
1544
}
-
 
1545
 
-
 
1546
 
-
 
1547
/* ENCODE A TAG */
-
 
1548
 
-
 
1549
void enc_tag_bits
-
 
1550
    PROTO_N ( ( p, n ) )
-
 
1551
    PROTO_T ( bitstream *p X int n )
-
 
1552
{
-
 
1553
    enc_bits_extn ( p, 1, ( long ) n ) ;
-
 
1554
    return ;
-
 
1555
}
-
 
1556
 
-
 
1557
 
-
 
1558
/* ENCODE A TAGDEC */
-
 
1559
 
-
 
1560
void enc_tagdec_bits
-
 
1561
    PROTO_N ( ( p, n ) )
-
 
1562
    PROTO_T ( bitstream *p X int n )
-
 
1563
{
-
 
1564
    enc_bits_extn ( p, 2, ( long ) n ) ;
-
 
1565
    return ;
-
 
1566
}
-
 
1567
 
-
 
1568
 
-
 
1569
/* ENCODE A TAGDEF */
-
 
1570
 
-
 
1571
void enc_tagdef_bits
-
 
1572
    PROTO_N ( ( p, n ) )
-
 
1573
    PROTO_T ( bitstream *p X int n )
-
 
1574
{
-
 
1575
    enc_bits_extn ( p, 2, ( long ) n ) ;
-
 
1576
    return ;
-
 
1577
}
-
 
1578
 
-
 
1579
 
-
 
1580
/* ENCODE A TOKDEC */
-
 
1581
 
-
 
1582
void enc_tokdec_bits
-
 
1583
    PROTO_N ( ( p, n ) )
-
 
1584
    PROTO_T ( bitstream *p X int n )
-
 
1585
{
-
 
1586
    enc_bits_extn ( p, 1, ( long ) n ) ;
-
 
1587
    return ;
-
 
1588
}
-
 
1589
 
-
 
1590
 
-
 
1591
/* ENCODE A TOKDEF */
-
 
1592
 
-
 
1593
void enc_tokdef_bits
-
 
1594
    PROTO_N ( ( p, n ) )
-
 
1595
    PROTO_T ( bitstream *p X int n )
-
 
1596
{
-
 
1597
    enc_bits_extn ( p, 1, ( long ) n ) ;
-
 
1598
    return ;
1546
    return(p);
1599
}
1547
}
1600
 
1548
 
1601
 
1549
 
1602
/* ENCODE A TOKEN */
1550
/* DECODE A VERSION */
1603
 
1551
 
1604
void enc_token_bits
1552
long
1605
    PROTO_N ( ( p, n ) )
1553
de_version_bits(void)
1606
    PROTO_T ( bitstream *p X int n )
-
 
1607
{
1554
{
-
 
1555
    long n = fetch_extn(1);
1608
    enc_bits_extn ( p, 2, ( long ) n ) ;
1556
    if (n < 1 || n > 2) {
-
 
1557
	input_error("Illegal version value, %ld", n);
-
 
1558
    }
1609
    return ;
1559
    return(n);
1610
}
1560
}
1611
 
1561
 
1612
 
1562
 
-
 
1563
/* ENCODE A AL_TAG */
-
 
1564
 
-
 
1565
void
-
 
1566
enc_al_tag_bits(bitstream *p, int n)
-
 
1567
{
-
 
1568
    enc_bits_extn(p, 1,(long)n);
-
 
1569
    return;
-
 
1570
}
-
 
1571
 
-
 
1572
 
-
 
1573
/* ENCODE A AL_TAGDEF */
-
 
1574
 
-
 
1575
void
-
 
1576
enc_al_tagdef_bits(bitstream *p, int n)
-
 
1577
{
-
 
1578
    enc_bits_extn(p, 1,(long)n);
-
 
1579
    return;
-
 
1580
}
-
 
1581
 
-
 
1582
 
-
 
1583
/* ENCODE A EXTERNAL */
-
 
1584
 
-
 
1585
void
-
 
1586
enc_external_bits(bitstream *p, int n)
-
 
1587
{
-
 
1588
    enc_bits_extn(p, 2,(long)n);
-
 
1589
    return;
-
 
1590
}
-
 
1591
 
-
 
1592
 
-
 
1593
/* ENCODE A LABEL */
-
 
1594
 
-
 
1595
void
-
 
1596
enc_label_bits(bitstream *p, int n)
-
 
1597
{
-
 
1598
    enc_bits_extn(p, 1,(long)n);
-
 
1599
    return;
-
 
1600
}
-
 
1601
 
-
 
1602
 
-
 
1603
/* ENCODE A SORTNAME */
-
 
1604
 
-
 
1605
void
-
 
1606
enc_sortname_bits(bitstream *p, int n)
-
 
1607
{
-
 
1608
    enc_bits_extn(p, 5,(long)n);
-
 
1609
    return;
-
 
1610
}
-
 
1611
 
-
 
1612
 
-
 
1613
/* ENCODE A TAG */
-
 
1614
 
-
 
1615
void
-
 
1616
enc_tag_bits(bitstream *p, int n)
-
 
1617
{
-
 
1618
    enc_bits_extn(p, 1,(long)n);
-
 
1619
    return;
-
 
1620
}
-
 
1621
 
-
 
1622
 
-
 
1623
/* ENCODE A TAGDEC */
-
 
1624
 
-
 
1625
void
-
 
1626
enc_tagdec_bits(bitstream *p, int n)
-
 
1627
{
-
 
1628
    enc_bits_extn(p, 2,(long)n);
-
 
1629
    return;
-
 
1630
}
-
 
1631
 
-
 
1632
 
-
 
1633
/* ENCODE A TAGDEF */
-
 
1634
 
-
 
1635
void
-
 
1636
enc_tagdef_bits(bitstream *p, int n)
-
 
1637
{
-
 
1638
    enc_bits_extn(p, 2,(long)n);
-
 
1639
    return;
-
 
1640
}
-
 
1641
 
-
 
1642
 
-
 
1643
/* ENCODE A TOKDEC */
-
 
1644
 
-
 
1645
void
-
 
1646
enc_tokdec_bits(bitstream *p, int n)
-
 
1647
{
-
 
1648
    enc_bits_extn(p, 1,(long)n);
-
 
1649
    return;
-
 
1650
}
-
 
1651
 
-
 
1652
 
1613
/* ENCODE A TOKEN_DEFN */
1653
/* ENCODE A TOKDEF */
-
 
1654
 
-
 
1655
void
-
 
1656
enc_tokdef_bits(bitstream *p, int n)
-
 
1657
{
-
 
1658
    enc_bits_extn(p, 1,(long)n);
-
 
1659
    return;
-
 
1660
}
-
 
1661
 
-
 
1662
 
-
 
1663
/* ENCODE A TOKEN */
-
 
1664
 
-
 
1665
void
-
 
1666
enc_token_bits(bitstream *p, int n)
-
 
1667
{
-
 
1668
    enc_bits_extn(p, 2,(long)n);
-
 
1669
    return;
-
 
1670
}
-
 
1671
 
1614
 
1672
 
1615
void enc_token_defn_bits
-
 
1616
    PROTO_N ( ( p, n ) )
1673
/* ENCODE A TOKEN_DEFN */
-
 
1674
 
-
 
1675
void
1617
    PROTO_T ( bitstream *p X int n )
1676
enc_token_defn_bits(bitstream *p, int n)
1618
{
1677
{
1619
    enc_bits_extn ( p, 1, ( long ) n ) ;
1678
    enc_bits_extn(p, 1,(long)n);
1620
    return ;
1679
    return;
1621
}
1680
}
1622
 
1681
 
1623
 
1682
 
1624
/* ENCODE A VERSION */
1683
/* ENCODE A VERSION */
1625
 
-
 
1626
void enc_version_bits
-
 
1627
    PROTO_N ( ( p, n ) )
-
 
1628
    PROTO_T ( bitstream *p X int n )
-
 
1629
{
-
 
1630
    enc_bits_extn ( p, 1, ( long ) n ) ;
-
 
1631
    return ;
-
 
1632
}
-
 
1633
 
-
 
1634
 
-
 
1635
/* READ A ACCESS */
-
 
1636
 
1684
 
1637
node *read_access
1685
void
1638
    PROTO_N ( ( n ) )
-
 
1639
    PROTO_T ( long n )
1686
enc_version_bits(bitstream *p, int n)
1640
{
1687
{
-
 
1688
    enc_bits_extn(p, 1,(long)n);
-
 
1689
    return;
-
 
1690
}
-
 
1691
 
-
 
1692
 
-
 
1693
/* READ A ACCESS */
-
 
1694
 
-
 
1695
node *
-
 
1696
read_access(long n)
-
 
1697
{
1641
    char *args ;
1698
    char *args;
1642
    node *p = new_node () ;
1699
    node *p = new_node();
1643
    construct *cons = cons_no ( SORT_access, n ) ;
1700
    construct *cons = cons_no(SORT_access, n);
1644
    p->cons = cons ;
1701
    p->cons = cons;
1645
    if ( n < 0 || n > 13 || cons->name == null ) {
1702
    if (n < 0 || n > 13 || cons->name == null) {
1646
	input_error ( "Illegal access value, %ld", n ) ;
1703
	input_error("Illegal access value, %ld", n);
1647
    }
1704
    }
1648
    switch ( n ) {
1705
    switch (n) {
1649
	case 1 : {
1706
	case 1: {
1650
	    read_token ( p, SORT_access ) ;
1707
	    read_token(p, SORT_access);
1651
	    break ;
1708
	    break;
1652
	}
1709
	}
1653
	case 2 : {
1710
	case 2: {
1654
	    args = get_char_info ( cons ) ;
1711
	    args = get_char_info(cons);
1655
	    p->son = read_node ( args ) ;
1712
	    p->son = read_node(args);
1656
	    if ( do_check ) {
1713
	    if (do_check) {
1657
		checking = "access_cond" ;
1714
		checking = "access_cond";
1658
		IGNORE check1 ( ENC_integer, p->son ) ;
1715
		IGNORE check1(ENC_integer, p->son);
-
 
1716
	    }
-
 
1717
	    break;
-
 
1718
	}
-
 
1719
	default : {
-
 
1720
	    args = get_char_info(cons);
-
 
1721
	    if (args) {
-
 
1722
		p->son = read_node(args);
1659
	    }
1723
	    }
1660
	    break ;
1724
	    break;
1661
	}
-
 
1662
	default : {
-
 
1663
	    args = get_char_info ( cons ) ;
-
 
1664
	    if ( args ) p->son = read_node ( args ) ;
-
 
1665
	    break ;
-
 
1666
	}
1725
	}
1667
    }
1726
    }
1668
#ifdef check_access
1727
#ifdef check_access
1669
    check_access ( p ) ;
1728
    check_access(p);
1670
#endif
1729
#endif
1671
    return ( p ) ;
1730
    return(p);
1672
}
1731
}
1673
 
1732
 
1674
 
1733
 
1675
/* READ A AL_TAG */
1734
/* READ A AL_TAG */
1676
 
1735
 
1677
node *read_al_tag
1736
node *
1678
    PROTO_N ( ( n ) )
-
 
1679
    PROTO_T ( long n )
1737
read_al_tag(long n)
1680
{
1738
{
1681
    char *args ;
1739
    char *args;
1682
    node *p = new_node () ;
1740
    node *p = new_node();
1683
    construct *cons = cons_no ( SORT_al_tag, n ) ;
1741
    construct *cons = cons_no(SORT_al_tag, n);
1684
    p->cons = cons ;
1742
    p->cons = cons;
1685
    if ( n < 0 || n > 2 || cons->name == null ) {
1743
    if (n < 0 || n > 2 || cons->name == null) {
1686
	input_error ( "Illegal al_tag value, %ld", n ) ;
1744
	input_error("Illegal al_tag value, %ld", n);
1687
    }
1745
    }
1688
    switch ( n ) {
1746
    switch (n) {
1689
	case 2 : {
1747
	case 2: {
1690
	    read_token ( p, SORT_al_tag ) ;
1748
	    read_token(p, SORT_al_tag);
1691
	    break ;
1749
	    break;
1692
	}
1750
	}
1693
	case 1 : {
1751
	case 1: {
1694
	    p->son = read_var_sort ( SORT_al_tag ) ;
1752
	    p->son = read_var_sort(SORT_al_tag);
1695
	    break ;
1753
	    break;
1696
	}
1754
	}
1697
	default : {
1755
	default : {
1698
	    args = get_char_info ( cons ) ;
1756
	    args = get_char_info(cons);
-
 
1757
	    if (args) {
1699
	    if ( args ) p->son = read_node ( args ) ;
1758
		p->son = read_node(args);
-
 
1759
	    }
1700
	    break ;
1760
	    break;
1701
	}
1761
	}
1702
    }
1762
    }
1703
#ifdef check_al_tag
1763
#ifdef check_al_tag
1704
    check_al_tag ( p ) ;
1764
    check_al_tag(p);
1705
#endif
1765
#endif
1706
    return ( p ) ;
1766
    return(p);
1707
}
1767
}
1708
 
1768
 
1709
 
1769
 
1710
/* READ A ALIGNMENT */
1770
/* READ A ALIGNMENT */
1711
 
1771
 
1712
node *read_alignment
1772
node *
1713
    PROTO_N ( ( n ) )
-
 
1714
    PROTO_T ( long n )
1773
read_alignment(long n)
1715
{
1774
{
1716
    char *args ;
1775
    char *args;
1717
    node *p = new_node () ;
1776
    node *p = new_node();
1718
    construct *cons = cons_no ( SORT_alignment, n ) ;
1777
    construct *cons = cons_no(SORT_alignment, n);
1719
    p->cons = cons ;
1778
    p->cons = cons;
1720
    if ( n < 0 || n > 12 || cons->name == null ) {
1779
    if (n < 0 || n > 12 || cons->name == null) {
1721
	input_error ( "Illegal alignment value, %ld", n ) ;
1780
	input_error("Illegal alignment value, %ld", n);
1722
    }
1781
    }
1723
    switch ( n ) {
1782
    switch (n) {
1724
	case 1 : {
1783
	case 1: {
1725
	    read_token ( p, SORT_alignment ) ;
1784
	    read_token(p, SORT_alignment);
1726
	    break ;
1785
	    break;
1727
	}
1786
	}
1728
	case 2 : {
1787
	case 2: {
1729
	    args = get_char_info ( cons ) ;
1788
	    args = get_char_info(cons);
1730
	    p->son = read_node ( args ) ;
1789
	    p->son = read_node(args);
1731
	    if ( do_check ) {
1790
	    if (do_check) {
1732
		checking = "alignment_cond" ;
1791
		checking = "alignment_cond";
1733
		IGNORE check1 ( ENC_integer, p->son ) ;
1792
		IGNORE check1(ENC_integer, p->son);
1734
	    }
1793
	    }
1735
	    break ;
1794
	    break;
1736
	}
1795
	}
1737
	default : {
1796
	default : {
1738
	    args = get_char_info ( cons ) ;
1797
	    args = get_char_info(cons);
-
 
1798
	    if (args) {
1739
	    if ( args ) p->son = read_node ( args ) ;
1799
		p->son = read_node(args);
-
 
1800
	    }
1740
	    break ;
1801
	    break;
1741
	}
1802
	}
1742
    }
1803
    }
1743
#ifdef check_alignment
1804
#ifdef check_alignment
1744
    check_alignment ( p ) ;
1805
    check_alignment(p);
1745
#endif
1806
#endif
1746
    return ( p ) ;
1807
    return(p);
1747
}
1808
}
1748
 
1809
 
1749
 
1810
 
1750
/* READ A BITFIELD_VARIETY */
1811
/* READ A BITFIELD_VARIETY */
1751
 
1812
 
1752
node *read_bitfield_variety
1813
node *
1753
    PROTO_N ( ( n ) )
-
 
1754
    PROTO_T ( long n )
1814
read_bitfield_variety(long n)
1755
{
1815
{
1756
    char *args ;
1816
    char *args;
1757
    node *p = new_node () ;
1817
    node *p = new_node();
1758
    construct *cons = cons_no ( SORT_bitfield_variety, n ) ;
1818
    construct *cons = cons_no(SORT_bitfield_variety, n);
1759
    p->cons = cons ;
1819
    p->cons = cons;
1760
    if ( n < 0 || n > 3 || cons->name == null ) {
1820
    if (n < 0 || n > 3 || cons->name == null) {
1761
	input_error ( "Illegal bitfield_variety value, %ld", n ) ;
1821
	input_error("Illegal bitfield_variety value, %ld", n);
1762
    }
1822
    }
1763
    switch ( n ) {
1823
    switch (n) {
1764
	case 1 : {
1824
	case 1: {
1765
	    read_token ( p, SORT_bitfield_variety ) ;
1825
	    read_token(p, SORT_bitfield_variety);
1766
	    break ;
1826
	    break;
1767
	}
1827
	}
1768
	case 2 : {
1828
	case 2: {
1769
	    args = get_char_info ( cons ) ;
1829
	    args = get_char_info(cons);
1770
	    p->son = read_node ( args ) ;
1830
	    p->son = read_node(args);
1771
	    if ( do_check ) {
1831
	    if (do_check) {
1772
		checking = "bfvar_cond" ;
1832
		checking = "bfvar_cond";
1773
		IGNORE check1 ( ENC_integer, p->son ) ;
1833
		IGNORE check1(ENC_integer, p->son);
1774
	    }
1834
	    }
1775
	    break ;
1835
	    break;
1776
	}
1836
	}
1777
	default : {
1837
	default : {
1778
	    args = get_char_info ( cons ) ;
1838
	    args = get_char_info(cons);
-
 
1839
	    if (args) {
1779
	    if ( args ) p->son = read_node ( args ) ;
1840
		p->son = read_node(args);
-
 
1841
	    }
1780
	    break ;
1842
	    break;
1781
	}
1843
	}
1782
    }
1844
    }
1783
#ifdef check_bitfield_variety
1845
#ifdef check_bitfield_variety
1784
    check_bitfield_variety ( p ) ;
1846
    check_bitfield_variety(p);
1785
#endif
1847
#endif
1786
    return ( p ) ;
1848
    return(p);
1787
}
1849
}
1788
 
1850
 
1789
 
1851
 
1790
/* READ A BOOL */
1852
/* READ A BOOL */
1791
 
1853
 
1792
node *read_bool
1854
node *
1793
    PROTO_N ( ( n ) )
-
 
1794
    PROTO_T ( long n )
1855
read_bool(long n)
1795
{
1856
{
1796
    char *args ;
1857
    char *args;
1797
    node *p = new_node () ;
1858
    node *p = new_node();
1798
    construct *cons = cons_no ( SORT_bool, n ) ;
1859
    construct *cons = cons_no(SORT_bool, n);
1799
    p->cons = cons ;
1860
    p->cons = cons;
1800
    if ( n < 0 || n > 4 || cons->name == null ) {
1861
    if (n < 0 || n > 4 || cons->name == null) {
1801
	input_error ( "Illegal bool value, %ld", n ) ;
1862
	input_error("Illegal bool value, %ld", n);
1802
    }
1863
    }
1803
    switch ( n ) {
1864
    switch (n) {
1804
	case 1 : {
1865
	case 1: {
1805
	    read_token ( p, SORT_bool ) ;
1866
	    read_token(p, SORT_bool);
1806
	    break ;
1867
	    break;
1807
	}
1868
	}
1808
	case 2 : {
1869
	case 2: {
1809
	    args = get_char_info ( cons ) ;
1870
	    args = get_char_info(cons);
1810
	    p->son = read_node ( args ) ;
1871
	    p->son = read_node(args);
1811
	    if ( do_check ) {
1872
	    if (do_check) {
1812
		checking = "bool_cond" ;
1873
		checking = "bool_cond";
1813
		IGNORE check1 ( ENC_integer, p->son ) ;
1874
		IGNORE check1(ENC_integer, p->son);
-
 
1875
	    }
-
 
1876
	    break;
-
 
1877
	}
-
 
1878
	default : {
-
 
1879
	    args = get_char_info(cons);
-
 
1880
	    if (args) {
-
 
1881
		p->son = read_node(args);
1814
	    }
1882
	    }
1815
	    break ;
1883
	    break;
1816
	}
1884
	}
1817
	default : {
-
 
1818
	    args = get_char_info ( cons ) ;
-
 
1819
	    if ( args ) p->son = read_node ( args ) ;
-
 
1820
	    break ;
-
 
1821
	}
-
 
1822
    }
1885
    }
1823
#ifdef check_bool
1886
#ifdef check_bool
1824
    check_bool ( p ) ;
1887
    check_bool(p);
1825
#endif
1888
#endif
1826
    return ( p ) ;
1889
    return(p);
1827
}
1890
}
1828
 
1891
 
1829
 
1892
 
1830
/* READ A CALLEES */
1893
/* READ A CALLEES */
1831
 
1894
 
1832
node *read_callees
1895
node *
1833
    PROTO_N ( ( n ) )
-
 
1834
    PROTO_T ( long n )
1896
read_callees(long n)
1835
{
1897
{
1836
    char *args ;
1898
    char *args;
1837
    node *p = new_node () ;
1899
    node *p = new_node();
1838
    construct *cons = cons_no ( SORT_callees, n ) ;
1900
    construct *cons = cons_no(SORT_callees, n);
1839
    p->cons = cons ;
1901
    p->cons = cons;
1840
    if ( n < 0 || n > 3 || cons->name == null ) {
1902
    if (n < 0 || n > 3 || cons->name == null) {
1841
	input_error ( "Illegal callees value, %ld", n ) ;
1903
	input_error("Illegal callees value, %ld", n);
1842
    }
1904
    }
1843
    args = get_char_info ( cons ) ;
1905
    args = get_char_info(cons);
-
 
1906
    if (args) {
1844
    if ( args ) p->son = read_node ( args ) ;
1907
	p->son = read_node(args);
-
 
1908
    }
1845
#ifdef check_callees
1909
#ifdef check_callees
1846
    check_callees ( p ) ;
1910
    check_callees(p);
1847
#endif
1911
#endif
1848
    return ( p ) ;
1912
    return(p);
1849
}
1913
}
1850
 
1914
 
1851
 
1915
 
1852
/* READ A ERROR_CODE */
1916
/* READ A ERROR_CODE */
1853
 
1917
 
1854
node *read_error_code
1918
node *
1855
    PROTO_N ( ( n ) )
-
 
1856
    PROTO_T ( long n )
1919
read_error_code(long n)
1857
{
1920
{
1858
    char *args ;
1921
    char *args;
1859
    node *p = new_node () ;
1922
    node *p = new_node();
1860
    construct *cons = cons_no ( SORT_error_code, n ) ;
1923
    construct *cons = cons_no(SORT_error_code, n);
1861
    p->cons = cons ;
1924
    p->cons = cons;
1862
    if ( n < 0 || n > 3 || cons->name == null ) {
1925
    if (n < 0 || n > 3 || cons->name == null) {
1863
	input_error ( "Illegal error_code value, %ld", n ) ;
1926
	input_error("Illegal error_code value, %ld", n);
-
 
1927
    }
-
 
1928
    args = get_char_info(cons);
-
 
1929
    if (args) {
-
 
1930
	p->son = read_node(args);
1864
    }
1931
    }
1865
    args = get_char_info ( cons ) ;
-
 
1866
    if ( args ) p->son = read_node ( args ) ;
-
 
1867
#ifdef check_error_code
1932
#ifdef check_error_code
1868
    check_error_code ( p ) ;
1933
    check_error_code(p);
1869
#endif
1934
#endif
1870
    return ( p ) ;
1935
    return(p);
1871
}
1936
}
1872
 
1937
 
1873
 
1938
 
1874
/* READ A ERROR_TREATMENT */
1939
/* READ A ERROR_TREATMENT */
1875
 
1940
 
1876
node *read_error_treatment
1941
node *
1877
    PROTO_N ( ( n ) )
-
 
1878
    PROTO_T ( long n )
1942
read_error_treatment(long n)
1879
{
1943
{
1880
    char *args ;
1944
    char *args;
1881
    node *p = new_node () ;
1945
    node *p = new_node();
1882
    construct *cons = cons_no ( SORT_error_treatment, n ) ;
1946
    construct *cons = cons_no(SORT_error_treatment, n);
1883
    p->cons = cons ;
1947
    p->cons = cons;
1884
    if ( n < 0 || n > 7 || cons->name == null ) {
1948
    if (n < 0 || n > 7 || cons->name == null) {
1885
	input_error ( "Illegal error_treatment value, %ld", n ) ;
1949
	input_error("Illegal error_treatment value, %ld", n);
1886
    }
1950
    }
1887
    switch ( n ) {
1951
    switch (n) {
1888
	case 1 : {
1952
	case 1: {
1889
	    read_token ( p, SORT_error_treatment ) ;
1953
	    read_token(p, SORT_error_treatment);
1890
	    break ;
1954
	    break;
1891
	}
1955
	}
1892
	case 2 : {
1956
	case 2: {
1893
	    args = get_char_info ( cons ) ;
1957
	    args = get_char_info(cons);
1894
	    p->son = read_node ( args ) ;
1958
	    p->son = read_node(args);
1895
	    if ( do_check ) {
1959
	    if (do_check) {
1896
		checking = "errt_cond" ;
1960
		checking = "errt_cond";
1897
		IGNORE check1 ( ENC_integer, p->son ) ;
1961
		IGNORE check1(ENC_integer, p->son);
1898
	    }
1962
	    }
1899
	    break ;
1963
	    break;
1900
	}
1964
	}
1901
	default : {
1965
	default : {
1902
	    args = get_char_info ( cons ) ;
1966
	    args = get_char_info(cons);
-
 
1967
	    if (args) {
1903
	    if ( args ) p->son = read_node ( args ) ;
1968
		p->son = read_node(args);
-
 
1969
	    }
1904
	    break ;
1970
	    break;
1905
	}
1971
	}
1906
    }
1972
    }
1907
#ifdef check_error_treatment
1973
#ifdef check_error_treatment
1908
    check_error_treatment ( p ) ;
1974
    check_error_treatment(p);
1909
#endif
1975
#endif
1910
    return ( p ) ;
1976
    return(p);
1911
}
1977
}
1912
 
1978
 
1913
 
1979
 
1914
/* READ A EXP */
1980
/* READ A EXP */
1915
 
1981
 
1916
node *read_exp
1982
node *
1917
    PROTO_N ( ( n ) )
-
 
1918
    PROTO_T ( long n )
1983
read_exp(long n)
1919
{
1984
{
1920
    char *args ;
1985
    char *args;
1921
    node *p = new_node () ;
1986
    node *p = new_node();
1922
    construct *cons = cons_no ( SORT_exp, n ) ;
1987
    construct *cons = cons_no(SORT_exp, n);
1923
    p->cons = cons ;
1988
    p->cons = cons;
1924
    if ( n < 0 || n > 116 || cons->name == null ) {
1989
    if (n < 0 || n > 116 || cons->name == null) {
1925
	input_error ( "Illegal exp value, %ld", n ) ;
1990
	input_error("Illegal exp value, %ld", n);
1926
    }
1991
    }
1927
    switch ( n ) {
1992
    switch (n) {
1928
	case 1 : {
1993
	case 1: {
1929
	    read_token ( p, SORT_exp ) ;
1994
	    read_token(p, SORT_exp);
1930
	    break ;
1995
	    break;
1931
	}
1996
	}
1932
	case 2 : {
1997
	case 2: {
1933
	    args = get_char_info ( cons ) ;
1998
	    args = get_char_info(cons);
1934
	    p->son = read_node ( args ) ;
1999
	    p->son = read_node(args);
1935
	    if ( do_check ) {
2000
	    if (do_check) {
1936
		checking = "exp_cond" ;
2001
		checking = "exp_cond";
1937
		IGNORE check1 ( ENC_integer, p->son ) ;
2002
		IGNORE check1(ENC_integer, p->son);
1938
	    }
2003
	    }
1939
	    break ;
2004
	    break;
1940
	}
2005
	}
1941
	case 106 : {
2006
	case 106: {
1942
	    read_sequence ( p, get_char_info ( cons ) ) ;
2007
	    read_sequence(p, get_char_info(cons));
1943
	    break ;
2008
	    break;
1944
	}
2009
	}
1945
	default : {
2010
	default : {
1946
	    args = get_char_info ( cons ) ;
2011
	    args = get_char_info(cons);
-
 
2012
	    if (args) {
1947
	    if ( args ) p->son = read_node ( args ) ;
2013
		p->son = read_node(args);
-
 
2014
	    }
1948
	    break ;
2015
	    break;
1949
	}
2016
	}
1950
    }
2017
    }
1951
#ifdef check_exp
2018
#ifdef check_exp
1952
    check_exp ( p ) ;
2019
    check_exp(p);
1953
#endif
2020
#endif
1954
    return ( p ) ;
2021
    return(p);
1955
}
2022
}
1956
 
2023
 
1957
 
2024
 
1958
/* READ A FLOATING_VARIETY */
2025
/* READ A FLOATING_VARIETY */
1959
 
2026
 
1960
node *read_floating_variety
2027
node *
1961
    PROTO_N ( ( n ) )
-
 
1962
    PROTO_T ( long n )
2028
read_floating_variety(long n)
1963
{
2029
{
1964
    char *args ;
2030
    char *args;
1965
    node *p = new_node () ;
2031
    node *p = new_node();
1966
    construct *cons = cons_no ( SORT_floating_variety, n ) ;
2032
    construct *cons = cons_no(SORT_floating_variety, n);
1967
    p->cons = cons ;
2033
    p->cons = cons;
1968
    if ( n < 0 || n > 6 || cons->name == null ) {
2034
    if (n < 0 || n > 6 || cons->name == null) {
1969
	input_error ( "Illegal floating_variety value, %ld", n ) ;
2035
	input_error("Illegal floating_variety value, %ld", n);
1970
    }
2036
    }
1971
    switch ( n ) {
2037
    switch (n) {
1972
	case 1 : {
2038
	case 1: {
1973
	    read_token ( p, SORT_floating_variety ) ;
2039
	    read_token(p, SORT_floating_variety);
1974
	    break ;
2040
	    break;
1975
	}
2041
	}
1976
	case 2 : {
2042
	case 2: {
1977
	    args = get_char_info ( cons ) ;
2043
	    args = get_char_info(cons);
1978
	    p->son = read_node ( args ) ;
2044
	    p->son = read_node(args);
1979
	    if ( do_check ) {
2045
	    if (do_check) {
1980
		checking = "flvar_cond" ;
2046
		checking = "flvar_cond";
1981
		IGNORE check1 ( ENC_integer, p->son ) ;
2047
		IGNORE check1(ENC_integer, p->son);
-
 
2048
	    }
-
 
2049
	    break;
-
 
2050
	}
-
 
2051
	default : {
-
 
2052
	    args = get_char_info(cons);
-
 
2053
	    if (args) {
-
 
2054
		p->son = read_node(args);
1982
	    }
2055
	    }
1983
	    break ;
2056
	    break;
1984
	}
-
 
1985
	default : {
-
 
1986
	    args = get_char_info ( cons ) ;
-
 
1987
	    if ( args ) p->son = read_node ( args ) ;
-
 
1988
	    break ;
-
 
1989
	}
2057
	}
1990
    }
2058
    }
1991
#ifdef check_floating_variety
2059
#ifdef check_floating_variety
1992
    check_floating_variety ( p ) ;
2060
    check_floating_variety(p);
1993
#endif
2061
#endif
1994
    return ( p ) ;
2062
    return(p);
1995
}
2063
}
1996
 
2064
 
1997
 
2065
 
1998
/* READ A LABEL */
2066
/* READ A LABEL */
1999
 
2067
 
2000
node *read_label
2068
node *
2001
    PROTO_N ( ( n ) )
-
 
2002
    PROTO_T ( long n )
2069
read_label(long n)
2003
{
2070
{
2004
    char *args ;
2071
    char *args;
2005
    node *p = new_node () ;
2072
    node *p = new_node();
2006
    construct *cons = cons_no ( SORT_label, n ) ;
2073
    construct *cons = cons_no(SORT_label, n);
2007
    p->cons = cons ;
2074
    p->cons = cons;
2008
    if ( n < 0 || n > 2 || cons->name == null ) {
2075
    if (n < 0 || n > 2 || cons->name == null) {
2009
	input_error ( "Illegal label value, %ld", n ) ;
2076
	input_error("Illegal label value, %ld", n);
2010
    }
2077
    }
2011
    switch ( n ) {
2078
    switch (n) {
2012
	case 2 : {
2079
	case 2: {
2013
	    read_token ( p, SORT_label ) ;
2080
	    read_token(p, SORT_label);
2014
	    break ;
2081
	    break;
2015
	}
2082
	}
2016
	case 1 : {
2083
	case 1: {
2017
	    p->son = read_var_sort ( SORT_label ) ;
2084
	    p->son = read_var_sort(SORT_label);
2018
	    break ;
2085
	    break;
2019
	}
2086
	}
2020
	default : {
2087
	default : {
2021
	    args = get_char_info ( cons ) ;
2088
	    args = get_char_info(cons);
-
 
2089
	    if (args) {
2022
	    if ( args ) p->son = read_node ( args ) ;
2090
		p->son = read_node(args);
-
 
2091
	    }
2023
	    break ;
2092
	    break;
2024
	}
2093
	}
2025
    }
2094
    }
2026
#ifdef check_label
2095
#ifdef check_label
2027
    check_label ( p ) ;
2096
    check_label(p);
2028
#endif
2097
#endif
2029
    return ( p ) ;
2098
    return(p);
2030
}
2099
}
2031
 
2100
 
2032
 
2101
 
2033
/* READ A NAT */
2102
/* READ A NAT */
2034
 
2103
 
2035
node *read_nat
2104
node *
2036
    PROTO_N ( ( n ) )
-
 
2037
    PROTO_T ( long n )
2105
read_nat(long n)
2038
{
2106
{
2039
    char *args ;
2107
    char *args;
2040
    node *p = new_node () ;
2108
    node *p = new_node();
2041
    construct *cons = cons_no ( SORT_nat, n ) ;
2109
    construct *cons = cons_no(SORT_nat, n);
2042
    p->cons = cons ;
2110
    p->cons = cons;
2043
    if ( n < 0 || n > 5 || cons->name == null ) {
2111
    if (n < 0 || n > 5 || cons->name == null) {
2044
	input_error ( "Illegal nat value, %ld", n ) ;
2112
	input_error("Illegal nat value, %ld", n);
2045
    }
2113
    }
2046
    switch ( n ) {
2114
    switch (n) {
2047
	case 1 : {
2115
	case 1: {
2048
	    read_token ( p, SORT_nat ) ;
2116
	    read_token(p, SORT_nat);
2049
	    break ;
2117
	    break;
2050
	}
2118
	}
2051
	case 2 : {
2119
	case 2: {
2052
	    args = get_char_info ( cons ) ;
2120
	    args = get_char_info(cons);
2053
	    p->son = read_node ( args ) ;
2121
	    p->son = read_node(args);
2054
	    if ( do_check ) {
2122
	    if (do_check) {
2055
		checking = "nat_cond" ;
2123
		checking = "nat_cond";
2056
		IGNORE check1 ( ENC_integer, p->son ) ;
2124
		IGNORE check1(ENC_integer, p->son);
2057
	    }
2125
	    }
2058
	    break ;
2126
	    break;
2059
	}
2127
	}
2060
	default : {
2128
	default : {
2061
	    args = get_char_info ( cons ) ;
2129
	    args = get_char_info(cons);
-
 
2130
	    if (args) {
2062
	    if ( args ) p->son = read_node ( args ) ;
2131
		p->son = read_node(args);
-
 
2132
	    }
2063
	    break ;
2133
	    break;
2064
	}
2134
	}
2065
    }
2135
    }
2066
#ifdef check_nat
2136
#ifdef check_nat
2067
    check_nat ( p ) ;
2137
    check_nat(p);
2068
#endif
2138
#endif
2069
    return ( p ) ;
2139
    return(p);
2070
}
2140
}
2071
 
2141
 
2072
 
2142
 
2073
/* READ A NTEST */
2143
/* READ A NTEST */
2074
 
2144
 
2075
node *read_ntest
2145
node *
2076
    PROTO_N ( ( n ) )
-
 
2077
    PROTO_T ( long n )
2146
read_ntest(long n)
2078
{
2147
{
2079
    char *args ;
2148
    char *args;
2080
    node *p = new_node () ;
2149
    node *p = new_node();
2081
    construct *cons = cons_no ( SORT_ntest, n ) ;
2150
    construct *cons = cons_no(SORT_ntest, n);
2082
    p->cons = cons ;
2151
    p->cons = cons;
2083
    if ( n < 0 || n > 16 || cons->name == null ) {
2152
    if (n < 0 || n > 16 || cons->name == null) {
2084
	input_error ( "Illegal ntest value, %ld", n ) ;
2153
	input_error("Illegal ntest value, %ld", n);
2085
    }
2154
    }
2086
    switch ( n ) {
2155
    switch (n) {
2087
	case 1 : {
2156
	case 1: {
2088
	    read_token ( p, SORT_ntest ) ;
2157
	    read_token(p, SORT_ntest);
2089
	    break ;
2158
	    break;
2090
	}
2159
	}
2091
	case 2 : {
2160
	case 2: {
2092
	    args = get_char_info ( cons ) ;
2161
	    args = get_char_info(cons);
2093
	    p->son = read_node ( args ) ;
2162
	    p->son = read_node(args);
2094
	    if ( do_check ) {
2163
	    if (do_check) {
2095
		checking = "ntest_cond" ;
2164
		checking = "ntest_cond";
2096
		IGNORE check1 ( ENC_integer, p->son ) ;
2165
		IGNORE check1(ENC_integer, p->son);
2097
	    }
2166
	    }
2098
	    break ;
2167
	    break;
2099
	}
2168
	}
2100
	default : {
2169
	default : {
2101
	    args = get_char_info ( cons ) ;
2170
	    args = get_char_info(cons);
-
 
2171
	    if (args) {
2102
	    if ( args ) p->son = read_node ( args ) ;
2172
		p->son = read_node(args);
-
 
2173
	    }
2103
	    break ;
2174
	    break;
2104
	}
2175
	}
2105
    }
2176
    }
2106
#ifdef check_ntest
2177
#ifdef check_ntest
2107
    check_ntest ( p ) ;
2178
    check_ntest(p);
2108
#endif
2179
#endif
2109
    return ( p ) ;
2180
    return(p);
2110
}
2181
}
2111
 
2182
 
2112
 
2183
 
2113
/* READ A PROCPROPS */
2184
/* READ A PROCPROPS */
2114
 
2185
 
2115
node *read_procprops
2186
node *
2116
    PROTO_N ( ( n ) )
-
 
2117
    PROTO_T ( long n )
2187
read_procprops(long n)
2118
{
2188
{
2119
    char *args ;
2189
    char *args;
2120
    node *p = new_node () ;
2190
    node *p = new_node();
2121
    construct *cons = cons_no ( SORT_procprops, n ) ;
2191
    construct *cons = cons_no(SORT_procprops, n);
2122
    p->cons = cons ;
2192
    p->cons = cons;
2123
    if ( n < 0 || n > 9 || cons->name == null ) {
2193
    if (n < 0 || n > 9 || cons->name == null) {
2124
	input_error ( "Illegal procprops value, %ld", n ) ;
2194
	input_error("Illegal procprops value, %ld", n);
2125
    }
2195
    }
2126
    switch ( n ) {
2196
    switch (n) {
2127
	case 1 : {
2197
	case 1: {
2128
	    read_token ( p, SORT_procprops ) ;
2198
	    read_token(p, SORT_procprops);
2129
	    break ;
2199
	    break;
2130
	}
2200
	}
2131
	case 2 : {
2201
	case 2: {
2132
	    args = get_char_info ( cons ) ;
2202
	    args = get_char_info(cons);
2133
	    p->son = read_node ( args ) ;
2203
	    p->son = read_node(args);
2134
	    if ( do_check ) {
2204
	    if (do_check) {
2135
		checking = "procprops_cond" ;
2205
		checking = "procprops_cond";
2136
		IGNORE check1 ( ENC_integer, p->son ) ;
2206
		IGNORE check1(ENC_integer, p->son);
2137
	    }
2207
	    }
2138
	    break ;
2208
	    break;
2139
	}
2209
	}
2140
	default : {
2210
	default : {
2141
	    args = get_char_info ( cons ) ;
2211
	    args = get_char_info(cons);
-
 
2212
	    if (args) {
2142
	    if ( args ) p->son = read_node ( args ) ;
2213
		p->son = read_node(args);
-
 
2214
	    }
2143
	    break ;
2215
	    break;
2144
	}
2216
	}
2145
    }
2217
    }
2146
#ifdef check_procprops
2218
#ifdef check_procprops
2147
    check_procprops ( p ) ;
2219
    check_procprops(p);
2148
#endif
2220
#endif
2149
    return ( p ) ;
2221
    return(p);
2150
}
2222
}
2151
 
2223
 
2152
 
2224
 
2153
/* READ A ROUNDING_MODE */
2225
/* READ A ROUNDING_MODE */
2154
 
2226
 
2155
node *read_rounding_mode
2227
node *
2156
    PROTO_N ( ( n ) )
-
 
2157
    PROTO_T ( long n )
2228
read_rounding_mode(long n)
2158
{
2229
{
2159
    char *args ;
2230
    char *args;
2160
    node *p = new_node () ;
2231
    node *p = new_node();
2161
    construct *cons = cons_no ( SORT_rounding_mode, n ) ;
2232
    construct *cons = cons_no(SORT_rounding_mode, n);
2162
    p->cons = cons ;
2233
    p->cons = cons;
2163
    if ( n < 0 || n > 7 || cons->name == null ) {
2234
    if (n < 0 || n > 7 || cons->name == null) {
2164
	input_error ( "Illegal rounding_mode value, %ld", n ) ;
2235
	input_error("Illegal rounding_mode value, %ld", n);
2165
    }
2236
    }
2166
    switch ( n ) {
2237
    switch (n) {
2167
	case 1 : {
2238
	case 1: {
2168
	    read_token ( p, SORT_rounding_mode ) ;
2239
	    read_token(p, SORT_rounding_mode);
2169
	    break ;
2240
	    break;
2170
	}
2241
	}
2171
	case 2 : {
2242
	case 2: {
2172
	    args = get_char_info ( cons ) ;
2243
	    args = get_char_info(cons);
2173
	    p->son = read_node ( args ) ;
2244
	    p->son = read_node(args);
2174
	    if ( do_check ) {
2245
	    if (do_check) {
2175
		checking = "rounding_mode_cond" ;
2246
		checking = "rounding_mode_cond";
2176
		IGNORE check1 ( ENC_integer, p->son ) ;
2247
		IGNORE check1(ENC_integer, p->son);
2177
	    }
2248
	    }
2178
	    break ;
2249
	    break;
2179
	}
2250
	}
2180
	default : {
2251
	default : {
2181
	    args = get_char_info ( cons ) ;
2252
	    args = get_char_info(cons);
-
 
2253
	    if (args) {
2182
	    if ( args ) p->son = read_node ( args ) ;
2254
		p->son = read_node(args);
-
 
2255
	    }
2183
	    break ;
2256
	    break;
2184
	}
2257
	}
2185
    }
2258
    }
2186
#ifdef check_rounding_mode
2259
#ifdef check_rounding_mode
2187
    check_rounding_mode ( p ) ;
2260
    check_rounding_mode(p);
2188
#endif
2261
#endif
2189
    return ( p ) ;
2262
    return(p);
2190
}
2263
}
2191
 
2264
 
2192
 
2265
 
2193
/* READ A SHAPE */
2266
/* READ A SHAPE */
2194
 
2267
 
2195
node *read_shape
2268
node *
2196
    PROTO_N ( ( n ) )
-
 
2197
    PROTO_T ( long n )
2269
read_shape(long n)
2198
{
2270
{
2199
    char *args ;
2271
    char *args;
2200
    node *p = new_node () ;
2272
    node *p = new_node();
2201
    construct *cons = cons_no ( SORT_shape, n ) ;
2273
    construct *cons = cons_no(SORT_shape, n);
2202
    p->cons = cons ;
2274
    p->cons = cons;
2203
    if ( n < 0 || n > 12 || cons->name == null ) {
2275
    if (n < 0 || n > 12 || cons->name == null) {
2204
	input_error ( "Illegal shape value, %ld", n ) ;
2276
	input_error("Illegal shape value, %ld", n);
2205
    }
2277
    }
2206
    switch ( n ) {
2278
    switch (n) {
2207
	case 1 : {
2279
	case 1: {
2208
	    read_token ( p, SORT_shape ) ;
2280
	    read_token(p, SORT_shape);
2209
	    break ;
2281
	    break;
2210
	}
2282
	}
2211
	case 2 : {
2283
	case 2: {
2212
	    args = get_char_info ( cons ) ;
2284
	    args = get_char_info(cons);
2213
	    p->son = read_node ( args ) ;
2285
	    p->son = read_node(args);
2214
	    if ( do_check ) {
2286
	    if (do_check) {
2215
		checking = "shape_cond" ;
2287
		checking = "shape_cond";
2216
		IGNORE check1 ( ENC_integer, p->son ) ;
2288
		IGNORE check1(ENC_integer, p->son);
2217
	    }
2289
	    }
2218
	    break ;
2290
	    break;
2219
	}
2291
	}
2220
	default : {
2292
	default : {
2221
	    args = get_char_info ( cons ) ;
2293
	    args = get_char_info(cons);
-
 
2294
	    if (args) {
2222
	    if ( args ) p->son = read_node ( args ) ;
2295
		p->son = read_node(args);
-
 
2296
	    }
2223
	    break ;
2297
	    break;
2224
	}
2298
	}
2225
    }
2299
    }
2226
#ifdef check_shape
2300
#ifdef check_shape
2227
    check_shape ( p ) ;
2301
    check_shape(p);
2228
#endif
2302
#endif
2229
    return ( p ) ;
2303
    return(p);
2230
}
2304
}
2231
 
2305
 
2232
 
2306
 
2233
/* READ A SIGNED_NAT */
2307
/* READ A SIGNED_NAT */
2234
 
2308
 
2235
node *read_signed_nat
2309
node *
2236
    PROTO_N ( ( n ) )
-
 
2237
    PROTO_T ( long n )
2310
read_signed_nat(long n)
2238
{
2311
{
2239
    char *args ;
2312
    char *args;
2240
    node *p = new_node () ;
2313
    node *p = new_node();
2241
    construct *cons = cons_no ( SORT_signed_nat, n ) ;
2314
    construct *cons = cons_no(SORT_signed_nat, n);
2242
    p->cons = cons ;
2315
    p->cons = cons;
2243
    if ( n < 0 || n > 5 || cons->name == null ) {
2316
    if (n < 0 || n > 5 || cons->name == null) {
2244
	input_error ( "Illegal signed_nat value, %ld", n ) ;
2317
	input_error("Illegal signed_nat value, %ld", n);
2245
    }
2318
    }
2246
    switch ( n ) {
2319
    switch (n) {
2247
	case 1 : {
2320
	case 1: {
2248
	    read_token ( p, SORT_signed_nat ) ;
2321
	    read_token(p, SORT_signed_nat);
2249
	    break ;
2322
	    break;
2250
	}
2323
	}
2251
	case 2 : {
2324
	case 2: {
2252
	    args = get_char_info ( cons ) ;
2325
	    args = get_char_info(cons);
2253
	    p->son = read_node ( args ) ;
2326
	    p->son = read_node(args);
2254
	    if ( do_check ) {
2327
	    if (do_check) {
2255
		checking = "signed_nat_cond" ;
2328
		checking = "signed_nat_cond";
2256
		IGNORE check1 ( ENC_integer, p->son ) ;
2329
		IGNORE check1(ENC_integer, p->son);
2257
	    }
2330
	    }
2258
	    break ;
2331
	    break;
2259
	}
2332
	}
2260
	case 4 : {
2333
	case 4: {
2261
	    read_make_signed_nat ( p, get_char_info ( cons ) ) ;
2334
	    read_make_signed_nat(p, get_char_info(cons));
2262
	    break ;
2335
	    break;
2263
	}
2336
	}
2264
	default : {
2337
	default : {
2265
	    args = get_char_info ( cons ) ;
2338
	    args = get_char_info(cons);
-
 
2339
	    if (args) {
2266
	    if ( args ) p->son = read_node ( args ) ;
2340
		p->son = read_node(args);
-
 
2341
	    }
2267
	    break ;
2342
	    break;
2268
	}
2343
	}
2269
    }
2344
    }
2270
#ifdef check_signed_nat
2345
#ifdef check_signed_nat
2271
    check_signed_nat ( p ) ;
2346
    check_signed_nat(p);
2272
#endif
2347
#endif
2273
    return ( p ) ;
2348
    return(p);
2274
}
2349
}
2275
 
2350
 
2276
 
2351
 
2277
/* READ A STRING */
2352
/* READ A STRING */
2278
 
2353
 
2279
node *read_string
2354
node *
2280
    PROTO_N ( ( n ) )
-
 
2281
    PROTO_T ( long n )
2355
read_string(long n)
2282
{
2356
{
2283
    char *args ;
2357
    char *args;
2284
    node *p = new_node () ;
2358
    node *p = new_node();
2285
    construct *cons = cons_no ( SORT_string, n ) ;
2359
    construct *cons = cons_no(SORT_string, n);
2286
    p->cons = cons ;
2360
    p->cons = cons;
2287
    if ( n < 0 || n > 4 || cons->name == null ) {
2361
    if (n < 0 || n > 4 || cons->name == null) {
2288
	input_error ( "Illegal string value, %ld", n ) ;
2362
	input_error("Illegal string value, %ld", n);
2289
    }
2363
    }
2290
    switch ( n ) {
2364
    switch (n) {
2291
	case 1 : {
2365
	case 1: {
2292
	    read_token ( p, SORT_string ) ;
2366
	    read_token(p, SORT_string);
2293
	    break ;
2367
	    break;
2294
	}
2368
	}
2295
	case 2 : {
2369
	case 2: {
2296
	    args = get_char_info ( cons ) ;
2370
	    args = get_char_info(cons);
2297
	    p->son = read_node ( args ) ;
2371
	    p->son = read_node(args);
2298
	    if ( do_check ) {
2372
	    if (do_check) {
2299
		checking = "string_cond" ;
2373
		checking = "string_cond";
2300
		IGNORE check1 ( ENC_integer, p->son ) ;
2374
		IGNORE check1(ENC_integer, p->son);
2301
	    }
2375
	    }
2302
	    break ;
2376
	    break;
2303
	}
2377
	}
2304
	default : {
2378
	default : {
2305
	    args = get_char_info ( cons ) ;
2379
	    args = get_char_info(cons);
-
 
2380
	    if (args) {
2306
	    if ( args ) p->son = read_node ( args ) ;
2381
		p->son = read_node(args);
-
 
2382
	    }
2307
	    break ;
2383
	    break;
2308
	}
2384
	}
2309
    }
2385
    }
2310
#ifdef check_string
2386
#ifdef check_string
2311
    check_string ( p ) ;
2387
    check_string(p);
2312
#endif
2388
#endif
2313
    return ( p ) ;
2389
    return(p);
2314
}
2390
}
2315
 
2391
 
2316
 
2392
 
2317
/* READ A TAG */
2393
/* READ A TAG */
2318
 
2394
 
2319
node *read_tag
2395
node *
2320
    PROTO_N ( ( n ) )
-
 
2321
    PROTO_T ( long n )
2396
read_tag(long n)
2322
{
2397
{
2323
    char *args ;
2398
    char *args;
2324
    node *p = new_node () ;
2399
    node *p = new_node();
2325
    construct *cons = cons_no ( SORT_tag, n ) ;
2400
    construct *cons = cons_no(SORT_tag, n);
2326
    p->cons = cons ;
2401
    p->cons = cons;
2327
    if ( n < 0 || n > 2 || cons->name == null ) {
2402
    if (n < 0 || n > 2 || cons->name == null) {
2328
	input_error ( "Illegal tag value, %ld", n ) ;
2403
	input_error("Illegal tag value, %ld", n);
2329
    }
2404
    }
2330
    switch ( n ) {
2405
    switch (n) {
2331
	case 2 : {
2406
	case 2: {
2332
	    read_token ( p, SORT_tag ) ;
2407
	    read_token(p, SORT_tag);
2333
	    break ;
2408
	    break;
2334
	}
2409
	}
2335
	case 1 : {
2410
	case 1: {
2336
	    p->son = read_var_sort ( SORT_tag ) ;
2411
	    p->son = read_var_sort(SORT_tag);
2337
	    break ;
2412
	    break;
2338
	}
2413
	}
2339
	default : {
2414
	default : {
2340
	    args = get_char_info ( cons ) ;
2415
	    args = get_char_info(cons);
-
 
2416
	    if (args) {
2341
	    if ( args ) p->son = read_node ( args ) ;
2417
		p->son = read_node(args);
-
 
2418
	    }
2342
	    break ;
2419
	    break;
2343
	}
2420
	}
2344
    }
2421
    }
2345
#ifdef check_tag
2422
#ifdef check_tag
2346
    check_tag ( p ) ;
2423
    check_tag(p);
2347
#endif
2424
#endif
2348
    return ( p ) ;
2425
    return(p);
2349
}
2426
}
2350
 
2427
 
2351
 
2428
 
2352
/* READ A TRANSFER_MODE */
2429
/* READ A TRANSFER_MODE */
2353
 
2430
 
2354
node *read_transfer_mode
2431
node *
2355
    PROTO_N ( ( n ) )
-
 
2356
    PROTO_T ( long n )
2432
read_transfer_mode(long n)
2357
{
2433
{
2358
    char *args ;
2434
    char *args;
2359
    node *p = new_node () ;
2435
    node *p = new_node();
2360
    construct *cons = cons_no ( SORT_transfer_mode, n ) ;
2436
    construct *cons = cons_no(SORT_transfer_mode, n);
2361
    p->cons = cons ;
2437
    p->cons = cons;
2362
    if ( n < 0 || n > 8 || cons->name == null ) {
2438
    if (n < 0 || n > 8 || cons->name == null) {
2363
	input_error ( "Illegal transfer_mode value, %ld", n ) ;
2439
	input_error("Illegal transfer_mode value, %ld", n);
2364
    }
2440
    }
2365
    switch ( n ) {
2441
    switch (n) {
2366
	case 1 : {
2442
	case 1: {
2367
	    read_token ( p, SORT_transfer_mode ) ;
2443
	    read_token(p, SORT_transfer_mode);
2368
	    break ;
2444
	    break;
2369
	}
2445
	}
2370
	case 2 : {
2446
	case 2: {
2371
	    args = get_char_info ( cons ) ;
2447
	    args = get_char_info(cons);
2372
	    p->son = read_node ( args ) ;
2448
	    p->son = read_node(args);
2373
	    if ( do_check ) {
2449
	    if (do_check) {
2374
		checking = "transfer_mode_cond" ;
2450
		checking = "transfer_mode_cond";
2375
		IGNORE check1 ( ENC_integer, p->son ) ;
2451
		IGNORE check1(ENC_integer, p->son);
2376
	    }
2452
	    }
2377
	    break ;
2453
	    break;
2378
	}
2454
	}
2379
	default : {
2455
	default : {
2380
	    args = get_char_info ( cons ) ;
2456
	    args = get_char_info(cons);
-
 
2457
	    if (args) {
2381
	    if ( args ) p->son = read_node ( args ) ;
2458
		p->son = read_node(args);
-
 
2459
	    }
2382
	    break ;
2460
	    break;
2383
	}
2461
	}
2384
    }
2462
    }
2385
#ifdef check_transfer_mode
2463
#ifdef check_transfer_mode
2386
    check_transfer_mode ( p ) ;
2464
    check_transfer_mode(p);
2387
#endif
2465
#endif
2388
    return ( p ) ;
2466
    return(p);
2389
}
2467
}
2390
 
2468
 
2391
 
2469
 
2392
/* READ A VARIETY */
2470
/* READ A VARIETY */
2393
 
2471
 
2394
node *read_variety
2472
node *
2395
    PROTO_N ( ( n ) )
-
 
2396
    PROTO_T ( long n )
2473
read_variety(long n)
2397
{
2474
{
2398
    char *args ;
2475
    char *args;
2399
    node *p = new_node () ;
2476
    node *p = new_node();
2400
    construct *cons = cons_no ( SORT_variety, n ) ;
2477
    construct *cons = cons_no(SORT_variety, n);
2401
    p->cons = cons ;
2478
    p->cons = cons;
2402
    if ( n < 0 || n > 4 || cons->name == null ) {
2479
    if (n < 0 || n > 4 || cons->name == null) {
2403
	input_error ( "Illegal variety value, %ld", n ) ;
2480
	input_error("Illegal variety value, %ld", n);
2404
    }
2481
    }
2405
    switch ( n ) {
2482
    switch (n) {
2406
	case 1 : {
2483
	case 1: {
2407
	    read_token ( p, SORT_variety ) ;
2484
	    read_token(p, SORT_variety);
2408
	    break ;
2485
	    break;
2409
	}
2486
	}
2410
	case 2 : {
2487
	case 2: {
2411
	    args = get_char_info ( cons ) ;
2488
	    args = get_char_info(cons);
2412
	    p->son = read_node ( args ) ;
2489
	    p->son = read_node(args);
2413
	    if ( do_check ) {
2490
	    if (do_check) {
2414
		checking = "var_cond" ;
2491
		checking = "var_cond";
2415
		IGNORE check1 ( ENC_integer, p->son ) ;
2492
		IGNORE check1(ENC_integer, p->son);
2416
	    }
2493
	    }
2417
	    break ;
2494
	    break;
2418
	}
2495
	}
2419
	default : {
2496
	default : {
2420
	    args = get_char_info ( cons ) ;
2497
	    args = get_char_info(cons);
-
 
2498
	    if (args) {
2421
	    if ( args ) p->son = read_node ( args ) ;
2499
		p->son = read_node(args);
-
 
2500
	    }
2422
	    break ;
2501
	    break;
2423
	}
2502
	}
2424
    }
2503
    }
2425
#ifdef check_variety
2504
#ifdef check_variety
2426
    check_variety ( p ) ;
2505
    check_variety(p);
2427
#endif
2506
#endif
2428
    return ( p ) ;
2507
    return(p);
2429
}
2508
}