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))

Defined struct's

opinfo defined in line 13; never used

Defined macros

BINARY defined in line 113; used 27 times
BOOL defined in line 114; used 1 times
INTOP defined in line 116; used 16 times
LEAF defined in line 111; used 9 times
O_ADD defined in line 36; never used
O_ADDF defined in line 37; never used
O_ALIAS defined in line 102; never used
O_AND defined in line 52; never used
O_ASSIGN defined in line 76; never used
O_CALL defined in line 87; never used
O_CHFILE defined in line 77; never used
O_COMMA defined in line 29; never used
O_CONT defined in line 78; never used
O_DELETE defined in line 99; never used
O_DIV defined in line 45; never used
O_DIVF defined in line 44; never used
O_DUMP defined in line 89; never used
O_EDIT defined in line 88; never used
O_EQ defined in line 67; never used
O_EQF defined in line 68; never used
O_FCON defined in line 24; never used
O_GE defined in line 65; never used
O_GEF defined in line 66; never used
O_GRIPE defined in line 103; never used
O_GT defined in line 63; never used
O_GTF defined in line 64; never used
O_HELP defined in line 90; never used
O_INDEX defined in line 26; never used
O_INDIR defined in line 27; never used
O_ITOF defined in line 35; never used
O_LASTOP defined in line 105; never used
O_LCON defined in line 23; never used
O_LE defined in line 61; never used
O_LEF defined in line 62; never used
O_LIST defined in line 79; never used
O_LT defined in line 59; never used
O_LTF defined in line 60; never used
O_MOD defined in line 46; never used
O_MUL defined in line 42; never used
O_MULF defined in line 43; never used
O_NAME defined in line 21; never used
O_NE defined in line 69; never used
O_NEF defined in line 70; never used
O_NEG defined in line 40; never used
O_NEGF defined in line 41; never used
O_NEXT defined in line 80; never used
O_NOP defined in line 20; never used
O_OR defined in line 53; never used
O_PRINT defined in line 81; never used
O_QLINE defined in line 101; never used
O_QNAME defined in line 22; never used
O_REMAKE defined in line 91; never used
O_RUN defined in line 92; never used
O_RVAL defined in line 28; never used
O_SCON defined in line 25; never used
O_SOURCE defined in line 93; never used
O_STATUS defined in line 94; never used
O_STEP defined in line 82; never used
O_STOP defined in line 97; never used
O_STOPI defined in line 98; never used
O_SUB defined in line 38; never used
O_SUBF defined in line 39; never used
O_TRACE defined in line 95; never used
O_TRACEI defined in line 96; never used
O_WHATIS defined in line 83; never used
O_WHERE defined in line 84; never used
O_WHICH defined in line 100; never used
O_XD defined in line 86; never used
O_XI defined in line 85; never used
REALOP defined in line 115; used 12 times
UNARY defined in line 112; used 8 times
degree defined in line 126; never used
isbinary defined in line 121; never used
isbitset defined in line 118; used 6 times
isboolean defined in line 124; never used
isint defined in line 123; never used
isleaf defined in line 119; never used
isreal defined in line 122; never used
isunary defined in line 120; never used

Usage of this include

Last modified: 1985-06-07
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 1683
Valid CSS Valid XHTML 1.0 Strict