2 * The Regina Rexx Interpreter
3 * Copyright (C) 1992-1994 Anders Christensen <anders@pvv.unit.no>
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version.
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Library General Public License for more details.
15 * You should have received a copy of the GNU Library General Public
16 * License along with this library; if not, write to the Free
17 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
34 #define X_REP_FOREVER 11
35 #define X_REP_COUNT 12
55 #define X_PARSE_ARG 32
56 #define X_PARSE_EXT 33
57 #define X_PARSE_NUM 34
58 #define X_PARSE_PULL 35
59 #define X_PARSE_SRC 36
60 #define X_PARSE_VAR 37
61 #define X_PARSE_VAL 38
62 #define X_PARSE_VER 39
63 #define X_PARSE_ARG_U 40
73 #define X_OTHERWISE 50
81 #define X_S_NOVALUE 58
99 #define X_UPPER_VAR 76
119 #define X_SIM_SYMBOL 96
120 #define X_CON_SYMBOL 97
124 #define X_U_MINUS 101
125 #define X_S_EQUAL 102
127 #define X_SIMSYMB 104
129 #define X_EX_FUNC 106
130 #define X_IN_FUNC 107
131 #define X_TPL_SOLID 108
132 #define X_TPL_MVE 109
133 #define X_TPL_VAR 110
135 #define X_TPL_SYMBOL 112
136 #define X_TPL_SPACE 113
137 #define X_TPL_POINT 114
139 #define X_TPL_OFF 116
140 #define X_TPL_PATT 117
141 #define X_POS_OFFS 118
142 #define X_NEG_OFFS 119
143 #define X_ABS_OFFS 120
144 #define X_EXPRLIST 121
145 #define X_SYMBOLS 122
148 #define X_S_NOTREADY 125
149 #define X_S_FAILURE 126
151 #define X_CALL_SET 128
152 #define X_IN_CALL 129
153 #define X_NO_OTHERWISE 130
154 #define X_IND_SYMBOL 131
155 #define X_IS_INTERNAL 132
156 #define X_IS_BUILTIN 133
157 #define X_IS_EXTERNAL 134
158 #define X_CTAIL_SYMBOL 135
159 #define X_VTAIL_SYMBOL 136
160 #define X_HEAD_SYMBOL 137
161 #define X_STEM_SYMBOL 138
174 #define X_NASSIGN 151
175 #define X_CEXPRLIST 152
176 #define X_U_PLUSS 153
177 #define X_TPL_NEG 154
178 #define X_TPL_POS 155
179 #define X_TPL_ABS 156
180 #define X_OPTIONS 157
182 #define X_NUM_DDEF 159
183 #define X_NUM_FDEF 160
184 #define X_NUM_FRMDEF 161
193 #define X_ADDR_WITH 171
194 #define X_S_LOSTDIGITS 172
195 #define X_DO_EXPR 173
198 /* The three first two numbers have not errortext attched to them */
199 #define ERR_PROG_UNREADABLE 3
200 #define ERR_PROG_INTERRUPT 4
201 #define ERR_STORAGE_EXHAUSTED 5
202 #define ERR_UNMATCHED_QUOTE 6
203 #define ERR_WHEN_EXPECTED 7
204 #define ERR_THEN_UNEXPECTED 8
205 #define ERR_WHEN_UNEXPECTED 9
206 #define ERR_UNMATCHED_END 10
207 #define ERR_FULL_CTRL_STACK 11
208 #define ERR_TOO_LONG_LINE 12
209 #define ERR_INVALID_CHAR 13
210 #define ERR_INCOMPLETE_STRUCT 14
211 #define ERR_INVALID_HEX_CONST 15
212 #define ERR_UNEXISTENT_LABEL 16
213 #define ERR_UNEXPECTED_PROC 17
214 #define ERR_THEN_EXPECTED 18
215 #define ERR_STRING_EXPECTED 19
216 #define ERR_SYMBOL_EXPECTED 20
217 #define ERR_EXTRA_DATA 21
218 /* The next to number have not been assigned an errortext */
219 #define ERR_INVALID_TRACE 24
220 #define ERR_INV_SUBKEYWORD 25
221 #define ERR_INVALID_INTEGER 26
222 #define ERR_INVALID_DO_SYNTAX 27
223 #define ERR_INVALID_LEAVE 28
224 #define ERR_ENVIRON_TOO_LONG 29
225 #define ERR_TOO_LONG_STRING 30
226 #define ERR_INVALID_START 31
227 #define ERR_INVALID_STEM 32
228 #define ERR_INVALID_RESULT 33
229 #define ERR_UNLOGICAL_VALUE 34
230 #define ERR_INVALID_EXPRESSION 35
231 #define ERR_UNMATCHED_PARAN 36
232 #define ERR_UNEXPECTED_PARAN 37
233 #define ERR_INVALID_TEMPLATE 38
234 #define ERR_STACK_OVERFLOW 39
235 #define ERR_INCORRECT_CALL 40
236 #define ERR_BAD_ARITHMETIC 41
237 #define ERR_ARITH_OVERFLOW 42
238 #define ERR_ROUTINE_NOT_FOUND 43
239 #define ERR_NO_DATA_RETURNED 44
240 #define ERR_DATA_NOT_SPEC 45
241 /* No errortexts have not been defined to the next to numbers */
242 #define ERR_SYSTEM_FAILURE 48
243 #define ERR_INTERPRETER_FAILURE 49
244 #define ERR_UNQUOTED_FUNC_STOP 51
245 #define ERR_INVALID_OPTION 53
246 #define ERR_INVALID_STEM_OPTION 54
248 #define ERR_CANT_REWIND 60
249 #define ERR_IMPROPER_SEEK 61
251 #define ERR_YACC_SYNTAX 64
253 #define ERR_NON_ANSI_FEATURE 90
254 #define ERR_STREAM_COMMAND 93
255 #define ERR_EXTERNAL_QUEUE 94
257 #define ERR_RESTRICTED 95
259 #define ERR_UNKNOWN_FS_ERROR 100
261 #define ERR_MAX_NUMBER 100
263 #define ENV_BOURNE_SH 0
264 #define ENV_C_SHELL 1
265 #define ENV_COMMAND 2
272 * NOTE: There is a close correspondance between these and the char
273 * array alloc in memory.c
275 # define TRC_LEAKED 0
276 # define TRC_HASHTAB 1
277 # define TRC_PROCBOX 2
278 # define TRC_SOURCE 3
279 # define TRC_SOURCEL 4
280 # define TRC_TREENODE 5
281 # define TRC_VARVALUE 6
282 # define TRC_VARNAME 7
283 # define TRC_VARBOX 8
284 # define TRC_STACKBOX 9
285 # define TRC_STACKLINE 10
286 # define TRC_SYSINFO 11
287 # define TRC_FILEPTR 12
288 # define TRC_PROCARG 13
289 # define TRC_LABEL 14
290 # define TRC_STATIC 15
291 # define TRC_P_CACHE 16
293 # define TRC_ENVIRBOX 18
294 # define TRC_ENVIRNAME 19
295 # define TRC_SPCV_BOX 20
296 # define TRC_SPCV_NAME 21
297 # define TRC_SPCV_NUMB 22
298 # define TRC_SPCV_NUMC 23
302 # define MEMTRC_NONE 0
303 # define MEMTRC_ALL 1
304 # define MEMTRC_LEAKED 2
307 # define MEM_CURRENT 1
308 # define MEM_LEAKED 2
309 #endif /* TRACEMEM */
313 * Note: must match the definition of numeric_forms in rexx.c
315 #define NUM_FORM_SCI 0
316 #define NUM_FORM_ENG 1
319 #define SIGNAL_FATAL -1
320 #define SIGNAL_ERROR 0
321 #define SIGNAL_FAILURE 1
322 #define SIGNAL_HALT 2
323 #define SIGNAL_NOVALUE 3
324 #define SIGNAL_NOTREADY 4
325 #define SIGNAL_SYNTAX 5
329 #define SIGTYPE_OFF 1
330 #define SIGTYPE_DELAY 2
333 #define ENVIR_SHELL 1
335 #if defined(_AMIGA) || defined(__AROS__)
336 #define ENVIR_AMIGA 3
339 #define SUBENVIR_PATH 1
340 #define SUBENVIR_SYSTEM 2
341 #define SUBENVIR_COMMAND 3
342 #define SUBENVIR_REXX 4
345 #define REDIR_NONE 0x00000000
346 #define REDIR_INPUT 0x00000001
347 #define REDIR_OUTLIFO 0x00000002
348 #define REDIR_OUTFIFO 0x00000004
349 #define REDIR_OUTPUT 0x00000006
350 #define REDIR_CLEAR 0x00000008
351 #define REDIR_OUTSTRING 0x00000010
354 #define HOOK_LINEFEED 1
360 #define HOOK_STDOUT 0
361 #define HOOK_STDERR 1
365 #define HOOK_TERMIN 5
366 #define HOOK_SUBCOM 6
368 #define HOOK_GETENV 8
369 #define HOOK_SETENV 9
371 #define HOOK_MASK(a) (1<<(a))
373 #define PARAM_TYPE_HARD 0
374 #define PARAM_TYPE_SOFT 1
376 #define INVO_COMMAND 0
377 #define INVO_FUNCTION 1
378 #define INVO_SUBROUTINE 2
381 #define SYMBOL_CONSTANT 1
382 #define SYMBOL_STEM 2
383 #define SYMBOL_SIMPLE 3
384 #define SYMBOL_COMPOUND 4
387 #define VFLAG_NONE 0x0000
388 #define VFLAG_STR 0x0001
389 #define VFLAG_NUM 0x0002
391 #define VFLAG_BOTH (VFLAG_STR | VFLAG_NUM)
393 #define UNKNOWN_QUEUE -1
395 * For refering to the extensions, must correspond with the bitfields
396 * in the definition of the u.options field of proclevel in types.h
398 #define EXT_FLUSHSTACK 0
399 #define EXT_LINEOUTTRUNC 1
400 #define EXT_CLOSE_BIF 2
401 #define EXT_OPEN_BIF 3
402 #define EXT_BUFTYPE_BIF 4
403 #define EXT_DESBUF_BIF 5
404 #define EXT_DROPBUF_BIF 6
405 #define EXT_MAKEBUF_BIF 7
406 #define EXT_CACHEEXT 8
407 #define EXT_FIND_BIF 9
408 #define EXT_PRUNE_TRACE 10
409 #define EXT_EXT_COMMANDS_AS_FUNCS 11
410 #define EXT_STDOUT_FOR_STDERR 12
411 #define EXT_TRACE_HTML 13
412 #define EXT_FAST_LINES_BIF_DEFAULT 14
413 #define EXT_STRICT_ANSI 15
414 #define EXT_INTERNAL_QUEUES 16
415 #define EXT_PGB_PATCH1 17 /* pgb */
416 #define EXT_REGINA_BIFS 18