1: #
2:
3: /*
4: ** CONSTANTS.H -- manifest constants, operand and operator codes
5: **
6: ** Defines:
7: ** op_codes for operands
8: ** Opflag's domain set
9: ** Type_spec's domain set
10: **
11: **
12: ** Required By:
13: ** most lexical routines and the parser actions
14: **
15: ** History:
16: ** 5/31/78 -- (marc) modified from previous
17: ** equels' "scanner.h" file to include some
18: ** information previously contained in
19: ** globals.h, and remove some unused imformation.
20: ** 8/24/78 -- (marc) opSTRUCT added to include structure vars
21: **
22: */
23:
24: /*
25: ** Manifest constants used throughout Equel
26: */
27:
28:
29: # define CONTINUE 1 /* "loop" flag for yylex */
30: # ifdef MAXNAME
31: # undef MAXNAME
32: # endif
33: # define MAXNAME 13 /* maximum length for equel
34: * identifiers (or keywords)
35: */
36: # define MAXSTRING 255 /* maximum length for equel strings */
37: # define FILLCNT 110 /* length to fill lines when in Fillmode */
38:
39:
40: /* debugging info conditional compilation flag */
41: # define xDEBUG /* on for "-c" and "-v" flags */
42:
43:
44: /*
45: ** Character types [cmap.c]
46: */
47:
48: # define EOF_TOK 0 /* end of parse input too */
49: # define ALPHA 1 /* alphabetic or '_' */
50: # define NUMBR 2 /* numeric */
51: # define OPATR 3 /* other non control characters */
52: # define PUNCT 4 /* white space */
53: # define CNTRL 5 /* control-characters */
54:
55: /*
56: ** Modes for Lastc in w_op() and w_key() [prtout.c]
57: */
58:
59: # define OPCHAR 0 /* last character
60: * printed was an operator
61: */
62: # define KEYCHAR 1 /* last was alphanumeric */
63:
64:
65: /*
66: * Modes used in parser actions to distinguish contexts in which
67: * the same syntax applies. Opflag is set to these modes.
68: *
69: * (There are some modes that are never referenced, but are useful
70: * for extension).
71: */
72:
73: /* quel statements */
74:
75: # define mdAPPEND 1
76: # define mdCOPY 2
77: # define mdCREATE 3
78: # define mdDEFINE 4
79: # define mdDELETE 5
80: # define mdDESTROY 6
81: # define mdHELP 7
82: # define mdINDEX 8
83: # define mdINTEGRITY 9
84: # define mdMODIFY 10
85: # define mdPRINT 11
86: # define mdRANGE 12
87: # define mdREPLACE 13
88: # define mdRETRIEVE 14
89: # define mdSAVE 15
90: # define mdVIEW 16
91: # define mdPROT 17
92:
93: /* statements particular to Equel */
94:
95: # define mdDECL 16 /* C - declaration */
96: # define mdCTLELM 17 /* left hand side of target list element
97: * in "retrieve" to C-variables
98: */
99: # define mdEXIT 18 /* ## exit */
100: # define mdINGRES 19 /* ## ingres */
101: # define mdTUPRET 20 /* "retrieve" w/o an "into" */
102: # define mdFILENAME 21 /* used in "copy" statement */
103:
104:
105:
106:
107:
108:
109:
110: /* define typTYPE xx /* c types "Type_spec" */
111: # define opINT 1
112: # define opFLOAT 2
113: # define opSTRING 3
114: # define opDOUBLE 4
115: # define opCHAR 5
116: # define opLONG 6
117: # define opIDSTRING 7
118: # define opSTRUCT 8
119:
120:
121: /* define typALLOC xx /* c var allocation types */
122: # define opAUTO 0
123: # define opSTATIC 1
124: # define opEXTERN 2
125: # define opREGISTER 3
Defined macros
ALPHA
defined in line
49; used 56 times
CNTRL
defined in line
53; used 30 times
NUMBR
defined in line
50; used 18 times
OPATR
defined in line
51; used 32 times
PUNCT
defined in line
52; used 4 times
Usage of this include