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	8.2	3/2/85
  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:     "delim",        DELIM,          0,
  33:     "destroy",      DESTROY,        GOVAL,
  34: #	ifdef DISTRIB
  35:     "distribute",       DISTRIBUTE,     0,
  36:     "distributed",      DISTRD,         0,
  37: #	endif
  38:     "exp",          FOP,            opEXP,
  39:     "float4",       FOP,            opFLOAT4,
  40:     "float8",       FOP,            opFLOAT8,
  41:     "from",         FROM,           0,
  42: # 	ifdef xV6_UNIX
  43:     "gamma",        FOP,            opGAMMA,
  44: # 	endif
  45:     "help",         HELP,           GOVAL,
  46:     "in",           IN,         0,
  47:     "index",        INDEX,          GOVAL,
  48:     "int1",         FOP,            opINT1,
  49:     "int2",         FOP,            opINT2,
  50:     "int4",         FOP,            opINT4,
  51:     "integrity",        INTEGRITY,      0,
  52:     "into",         INTO,           0,
  53:     "is",           IS,         opEQ,
  54:     "log",          FOP,            opLOG,
  55:     "max",          AGOP,           opMAX,
  56:     "min",          AGOP,           opMIN,
  57:     "mod",          FBOP,           opMOD,
  58:     "modify",       MODIFY,         GOVAL,
  59:     "not",          LUOP,           opNOT,
  60:     "of",           OF,         0,
  61:     "on",           ON,         0,
  62:     "onto",         ONTO,           0,
  63:     "or",           LBOP,           OR,
  64:     "permit",       PERMIT,         0,
  65:     "print",        PRINT,          GOVAL,
  66:     "range",        RANGE,          GOVAL,
  67:     "replace",      REPLACE,        GOVAL,
  68:     "retrieve",     RETRIEVE,       GOVAL,
  69:     "save",         SAVE,           GOVAL,
  70:     "sin",          FOP,            opSIN,
  71:     "sqrt",         FOP,            opSQRT,
  72:     "sum",          AGOP,           opSUM,
  73:     "sumu",         AGOP,           opSUMU,
  74:     "to",           TO,         0,
  75:     "unique",       UNIQUE,         0,
  76:     "until",        UNTIL,          0,
  77:     "unuse",        UNUSE,          GOVAL,
  78:     "use",          USE,            GOVAL,
  79:     "view",         VIEW,           0,
  80:     "where",        WHERE,          0,
  81: };
  82: int Keyent =        sizeof Keyword / sizeof Keyword[0];
  83: 
  84: struct optab    Optab[] =
  85: {
  86:     /* PUNCTUATION */
  87:     ",",            COMMA,          0,
  88:     "(",            LPAREN,         '(',
  89:     ".",            PERIOD,         0,
  90:     ")",            RPAREN,         ')',
  91:     "\"",           SCONST,         0,
  92:     "/*",           BGNCMNT,        0,
  93:     "*/",           ENDCMNT,        0,
  94:     ":",            COLON,          0,
  95:     "]",            RBRAC,          ']',
  96:     "[",            LBRAC,          '[',
  97:     "$",            DOLLAR,         0,
  98:     "%",            PCT,            '%',
  99: 
 100: 
 101:     /* UNARY ARITHMETIC OPERATORS */
 102:     "+",            UAOP,           opADD,
 103:     "-",            UAOP,           opSUB,
 104: 
 105:     /* BINARY ARITHMETIC OPERATORS */
 106:     "*",            BAOP,           opMUL,
 107:     "/",            BAOP,           opDIV,
 108:     "**",           BAOPH,          opPOW,
 109: 
 110:     /* BOUNDS OPERATORS */
 111:     ">",            BDOP,           opGT,
 112:     ">=",           BDOP,           opGE,
 113:     "<",            BDOP,           opLT,
 114:     "<=",           BDOP,           opLE,
 115: 
 116:     /* EQUALITY OPERATORS */
 117:     "!=",           EOP,            opNE,
 118:     "=",            IS,         opEQ,
 119:     0
 120: };
 121: 
 122: /* constant operators table for lookup */
 123: struct constop  Coptab[] =
 124: {
 125:     "dba",      opDBA,      CHAR,       2,
 126:     "usercode", opUSERCODE, CHAR,       2,
 127:     0,      0,      0,      0,
 128:     "date",     opDATE,     '?',        '?',
 129:     "time",     opDATE,     '?',        '?',
 130:     0,      0,      0,      0
 131: };
 132: 
 133: 
 134: /*
 135: ** Tokens
 136: ** a structure initialized here to contain the
 137: ** yacc generated tokens for the indicated
 138: ** terminal symbols.
 139: */
 140: struct special  Tokens =
 141: {
 142:     SCONST,
 143:     BGNCMNT,
 144:     ENDCMNT,
 145:     I2CONST,
 146:     I4CONST,
 147:     F4CONST,
 148:     F8CONST,
 149:     NAME
 150: };

Defined variables

_Coptab defined in line 123; never used
_Keyent defined in line 82; never used
_Keyword defined in line 11; used 2 times
  • in line 82(2)
_Optab defined in line 84; never used
_Tokens defined in line 140; never used

Usage of this include

Last modified: 1986-04-17
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 838
Valid CSS Valid XHTML 1.0 Strict