Annotation of 42BSD/ingres/source/parser/tables.y, revision 1.1.1.1

1.1       root        1: /*
                      2: **     SCANNER KEYWORD TABLES
                      3: **
                      4: **     Keywords, tokens, and opcode tuples are included in this file
                      5: **     The keyword table MUST be in sorted order.
                      6: **     The operator table does not need to be sorted
                      7: **
                      8: **     Version:
                      9: **             @(#)tables.y    7.1     2/5/81
                     10: */
                     11: struct optab   Keyword[] =
                     12: {
                     13:        "abs",                  FOP,                    opABS,
                     14:        "all",                  ALL,                    0,
                     15:        "and",                  LBOP,                   AND,
                     16:        "any",                  AGOP,                   opANY,
                     17:        "append",               APPEND,                 GOVAL,
                     18:        "ascii",                FOP,                    opASCII,
                     19:        "at",                   AT,                     0,
                     20:        "atan",                 FOP,                    opATAN,
                     21:        "avg",                  AGOP,                   opAVG,
                     22:        "avgu",                 AGOP,                   opAVGU,
                     23:        "by",                   BY,                     opEQ,
                     24:        "concat",               FBOP,                   opCONCAT,
                     25:        "copy",                 COPY,                   GOVAL,
                     26:        "cos",                  FOP,                    opCOS,
                     27:        "count",                AGOP,                   opCOUNT,
                     28:        "countu",               AGOP,                   opCOUNTU,
                     29:        "create",               CREATE,                 GOVAL,
                     30:        "define",               DEFINE,                 GOVAL,
                     31:        "delete",               DELETE,                 GOVAL,
                     32:        "destroy",              DESTROY,                GOVAL,
                     33: #      ifdef   DISTRIB
                     34:        "distribute",           DISTRIBUTE,             0,
                     35:        "distributed",          DISTRD,                 0,
                     36: #      endif
                     37:        "exp",                  FOP,                    opEXP,
                     38:        "float4",               FOP,                    opFLOAT4,
                     39:        "float8",               FOP,                    opFLOAT8,
                     40:        "from",                 FROM,                   0,
                     41: #      ifdef xV6_UNIX
                     42:        "gamma",                FOP,                    opGAMMA,
                     43: #      endif
                     44:        "help",                 HELP,                   GOVAL,
                     45:        "in",                   IN,                     0,
                     46:        "index",                INDEX,                  GOVAL,
                     47:        "int1",                 FOP,                    opINT1,
                     48:        "int2",                 FOP,                    opINT2,
                     49:        "int4",                 FOP,                    opINT4,
                     50:        "integrity",            INTEGRITY,              0,
                     51:        "into",                 INTO,                   0,
                     52:        "is",                   IS,                     opEQ,
                     53:        "log",                  FOP,                    opLOG,
                     54:        "max",                  AGOP,                   opMAX,
                     55:        "min",                  AGOP,                   opMIN,
                     56:        "mod",                  FBOP,                   opMOD,
                     57:        "modify",               MODIFY,                 GOVAL,
                     58:        "not",                  LUOP,                   opNOT,
                     59:        "of",                   OF,                     0,
                     60:        "on",                   ON,                     0,
                     61:        "onto",                 ONTO,                   0,
                     62:        "or",                   LBOP,                   OR,
                     63:        "permit",               PERMIT,                 0,
                     64:        "print",                PRINT,                  GOVAL,
                     65:        "range",                RANGE,                  GOVAL,
                     66:        "replace",              REPLACE,                GOVAL,
                     67:        "retrieve",             RETRIEVE,               GOVAL,
                     68:        "save",                 SAVE,                   GOVAL,
                     69:        "sin",                  FOP,                    opSIN,
                     70:        "sqrt",                 FOP,                    opSQRT,
                     71:        "sum",                  AGOP,                   opSUM,
                     72:        "sumu",                 AGOP,                   opSUMU,
                     73:        "to",                   TO,                     0,
                     74:        "unique",               UNIQUE,                 0,
                     75:        "until",                UNTIL,                  0,
                     76:        "view",                 VIEW,                   0,
                     77:        "where",                WHERE,                  0,
                     78: };
                     79: int    Keyent =                sizeof Keyword / sizeof Keyword[0];
                     80: 
                     81: struct optab   Optab[] =
                     82: {
                     83:        /* PUNCTUATION */
                     84:        ",",                    COMMA,                  0,
                     85:        "(",                    LPAREN,                 0,
                     86:        ".",                    PERIOD,                 0,
                     87:        ")",                    RPAREN,                 0,
                     88:        "\"",                   SCONST,                 0,
                     89:        "/*",                   BGNCMNT,                0,
                     90:        "*/",                   ENDCMNT,                0,
                     91:        ":",                    COLON,                  0,
                     92: 
                     93:        /* UNARY ARITHMETIC OPERATORS */
                     94:        "+",                    UAOP,                   opADD,
                     95:        "-",                    UAOP,                   opSUB,
                     96: 
                     97:        /* BINARY ARITHMETIC OPERATORS */
                     98:        "*",                    BAOP,                   opMUL,
                     99:        "/",                    BAOP,                   opDIV,
                    100:        "**",                   BAOPH,                  opPOW,
                    101: 
                    102:        /* BOUNDS OPERATORS */
                    103:        ">",                    BDOP,                   opGT,
                    104:        ">=",                   BDOP,                   opGE,
                    105:        "<",                    BDOP,                   opLT,
                    106:        "<=",                   BDOP,                   opLE,
                    107: 
                    108:        /* EQUALITY OPERATORS */
                    109:        "!=",                   EOP,                    opNE,
                    110:        "=",                    IS,                     opEQ,
                    111:        0
                    112: };
                    113: 
                    114: /* constant operators table for lookup */
                    115: struct constop Coptab[] =
                    116: {
                    117:        "dba",          opDBA,          CHAR,           2,
                    118:        "usercode",     opUSERCODE,     CHAR,           2,
                    119:        0,              0,              0,              0,
                    120:        "date",         opDATE,         '?',            '?',
                    121:        "time",         opDATE,         '?',            '?',
                    122:        0,              0,              0,              0
                    123: };
                    124: 
                    125: 
                    126: /*
                    127: ** Tokens
                    128: ** a structure initialized here to contain the
                    129: ** yacc generated tokens for the indicated
                    130: ** terminal symbols.
                    131: */
                    132: struct special Tokens =
                    133: {
                    134:        SCONST,
                    135:        BGNCMNT,
                    136:        ENDCMNT,
                    137:        I2CONST,
                    138:        I4CONST,
                    139:        F4CONST,
                    140:        F8CONST,
                    141:        NAME
                    142: };

unix.superglobalmegacorp.com

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