Annotation of 43BSDTahoe/ucb/pascal/pdx/tree/opinfo.h, revision 1.1

1.1     ! root        1: /*
        !             2:  * Copyright (c) 1980 Regents of the University of California.
        !             3:  * All rights reserved.  The Berkeley software License Agreement
        !             4:  * specifies the terms and conditions for redistribution.
        !             5:  *
        !             6:  *     @(#)opinfo.h    5.1 (Berkeley) 6/6/85
        !             7:  */
        !             8: 
        !             9: /*
        !            10:  * Tree operator definitions.
        !            11:  */
        !            12: 
        !            13: struct opinfo {
        !            14:        short opflags;
        !            15:        char *opstring;
        !            16: };
        !            17: 
        !            18: OPINFO opinfo[];
        !            19: 
        !            20: #define O_NOP  0       /* no op */
        !            21: #define O_NAME 1       /* leaf op for address of a variable */
        !            22: #define O_QNAME        2       /* variable qualified by surrounding block */
        !            23: #define O_LCON 3       /* long constant (i.e. integer) */
        !            24: #define O_FCON 4       /* floating constant (i.e. real) */
        !            25: #define O_SCON 5       /* string constant (type alfa) */
        !            26: #define O_INDEX        6       /* array subscript (does just one index) */
        !            27: #define O_INDIR 7      /* indirection through a pointer */
        !            28: #define O_RVAL 8       /* get value of an operand address */
        !            29: #define O_COMMA        9       /* as in parameter lists */
        !            30: 
        !            31: /*
        !            32:  * arithmetic operators
        !            33:  */
        !            34: 
        !            35: #define O_ITOF 10      /* convert integer to real */
        !            36: #define O_ADD  11
        !            37: #define O_ADDF 12
        !            38: #define O_SUB  13
        !            39: #define O_SUBF 14
        !            40: #define O_NEG  15
        !            41: #define O_NEGF 16
        !            42: #define O_MUL  17
        !            43: #define O_MULF 18
        !            44: #define O_DIVF 19      /* real divided by real */
        !            45: #define O_DIV  20      /* integer divided by integer, integer result */
        !            46: #define O_MOD  21
        !            47: 
        !            48: /*
        !            49:  * logical operators
        !            50:  */
        !            51: 
        !            52: #define O_AND  22
        !            53: #define O_OR   23
        !            54: 
        !            55: /*
        !            56:  * relational operators
        !            57:  */
        !            58: 
        !            59: #define O_LT   24
        !            60: #define O_LTF  25
        !            61: #define O_LE   26
        !            62: #define O_LEF  27
        !            63: #define O_GT   28
        !            64: #define O_GTF  29
        !            65: #define O_GE   30
        !            66: #define O_GEF  31
        !            67: #define O_EQ   32
        !            68: #define O_EQF  33
        !            69: #define O_NE   34
        !            70: #define O_NEF  35
        !            71: 
        !            72: /*
        !            73:  * debugger commands
        !            74:  */
        !            75: 
        !            76: #define O_ASSIGN 36
        !            77: #define O_CHFILE 37
        !            78: #define O_CONT 38
        !            79: #define O_LIST 39
        !            80: #define O_NEXT 40
        !            81: #define O_PRINT        41
        !            82: #define O_STEP 42
        !            83: #define O_WHATIS 43
        !            84: #define O_WHERE        44
        !            85: #define O_XI   45
        !            86: #define O_XD   46
        !            87: #define O_CALL 47
        !            88: #define O_EDIT 48
        !            89: #define O_DUMP 49
        !            90: #define O_HELP 50
        !            91: #define O_REMAKE 51
        !            92: #define O_RUN  52
        !            93: #define O_SOURCE 53
        !            94: #define O_STATUS 54
        !            95: #define O_TRACE        55
        !            96: #define O_TRACEI 56
        !            97: #define O_STOP 57
        !            98: #define O_STOPI        58
        !            99: #define O_DELETE 59
        !           100: #define O_WHICH 60
        !           101: #define O_QLINE 61             /* filename : linenumber */
        !           102: #define O_ALIAS 62
        !           103: #define O_GRIPE 63
        !           104: 
        !           105: #define O_LASTOP 63            /* must be number of last operator */
        !           106: 
        !           107: /*
        !           108:  * operator flags and predicates
        !           109:  */
        !           110: 
        !           111: #define LEAF 01
        !           112: #define UNARY 02
        !           113: #define BINARY 04
        !           114: #define BOOL 010
        !           115: #define REALOP 020
        !           116: #define INTOP 040
        !           117: 
        !           118: #define isbitset(a, m) ((a&m) == m)
        !           119: #define isleaf(o)      isbitset(opinfo[o].opflags, LEAF)
        !           120: #define isunary(o)     isbitset(opinfo[o].opflags, UNARY)
        !           121: #define isbinary(o)    isbitset(opinfo[o].opflags, BINARY)
        !           122: #define isreal(o)      isbitset(opinfo[o].opflags, REALOP)
        !           123: #define isint(o)       isbitset(opinfo[o].opflags, INTOP)
        !           124: #define isboolean(o)   isbitset(opinfo[o].opflags, BOOL)
        !           125: 
        !           126: #define degree(o)      (opinfo[o].opflags&(LEAF|UNARY|BINARY))

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.