source: git/Singular/tok.h @ 35cfa3

spielwiese
Last change on this file since 35cfa3 was 35cfa3, checked in by Hans Schönemann <hannes@…>, 16 years ago
*hannes: sqrfree git-svn-id: file:///usr/local/Singular/svn/trunk@10519 2c84dea3-7e68-4137-9b89-c4e89433aadc
  • Property mode set to 100644
File size: 5.4 KB
Line 
1#ifndef TOK_H
2#define TOK_H
3/****************************************
4*  Computer Algebra System SINGULAR     *
5****************************************/
6/*
7* ABSTRACT: tokens, types for interpreter; general macros
8*/
9/* $Id: tok.h,v 1.69 2008-01-22 09:40:03 Singular Exp $ */
10
11#ifndef MYYSTYPE
12#include "structs.h"
13#endif
14#ifndef UMINUS
15#include "grammar.h"
16#endif
17
18extern int      yylineno;
19extern char     my_yylinebuf[80];
20
21#if defined(__cplusplus)
22extern int  yyparse(void);
23#endif
24
25/* Define to use old mechanismen for saving currRing with procedures
26 * Does work with HAVE_NAMESPACES enabled
27 */
28#define USE_IILOCALRING 1
29
30
31/* the follwing defines for infix operators should not be changed: *
32*  grammar.y does not use the symbolic names                       *
33*  scanner.l uses the identies for some optimzations              */
34#define LOGIC_OP         '&'
35#define MULDIV_OP        '/'
36#define COMP_OP          '<'
37
38#define COMMAND           UMINUS+2 /* in tok.h */
39#define ANY_TYPE          UMINUS+3
40#define IDHDL             UMINUS+4
41#define NSHDL             UMINUS+5
42
43enum {
44  ALIAS_CMD     = UMINUS + 15,
45  ATTRIB_CMD,
46  BAREISS_CMD,
47  BIGINT_CMD,
48  BRACKET_CMD,
49  BREAKPOINT_CMD,
50  CHARACTERISTIC_CMD,
51  CHARSTR_CMD,
52  CHAR_SERIES_CMD,
53  CHINREM_CMD,
54  CLOSE_CMD,
55  COLS_CMD,
56  CONTENT_CMD,
57  COUNT_CMD,
58  DBPRINT_CMD,
59  DEF_CMD,
60  DEFINED_CMD,
61  DELETE_CMD,
62  DET_CMD,
63  DUMP_CMD,
64  END_GRAMMAR,
65  ENVELOPE_CMD,
66  ERROR_CMD,
67  EXECUTE_CMD,
68  EXPORTTO_CMD,
69  EXTGCD_CMD,
70  FAC_CMD,
71  FIND_CMD,
72  FACSTD_CMD,
73  FWALK_CMD,
74  FGLM_CMD,
75  FGLMQUOT_CMD,
76  FINDUNI_CMD,
77  GCD_CMD,
78  GETDUMP_CMD,
79  HIGHCORNER_CMD,
80  HRES_CMD,
81  IMPART_CMD,
82  IMPORTFROM_CMD,
83  INSERT_CMD,
84  INT_CMD,
85  INTDIV_CMD,
86  INTERPOLATE_CMD,
87  INTMOD_CMD,
88  INTVEC_CMD,
89  IS_RINGVAR,
90  JANET_CMD,
91  KILLATTR_CMD,
92  KRES_CMD,
93  LAGSOLVE_CMD,
94  LINK_CMD,
95  LIST_CMD,
96  LOAD_CMD,
97  LRES_CMD,
98  MEMORY_CMD,
99  MONITOR_CMD,
100  MPRES_CMD,
101  MSTD_CMD,
102  NAMEOF_CMD,
103  NAMES_CMD,
104  NCALGEBRA_CMD,
105  NC_ALGEBRA_CMD,
106  NEWTONPOLY_CMD,
107  NPARS_CMD,
108  NVARS_CMD,
109  OPEN_CMD,
110  OPPOSE_CMD,
111  OPPOSITE_CMD,
112  OPTION_CMD,
113  ORDSTR_CMD,
114  PACKAGE_CMD,
115  PARSTR_CMD,
116  POINTER_CMD,
117  PRIME_CMD,
118  PRINT_CMD,
119  PRUNE_CMD,
120  QRING_CMD,
121  RANDOM_CMD,
122  READ_CMD,
123  REPART_CMD,
124  RESERVEDNAME_CMD,
125  RESULTANT_CMD,
126  RINGLIST_CMD,
127  ROWS_CMD,
128  SIMPLEX_CMD,
129  SLIM_GB_CMD,
130  SQR_FREE_CMD,
131  STATUS_CMD,
132  STRING_CMD,
133  SYSTEM_CMD,
134  TEST_CMD,
135  TRANSPOSE_CMD,
136  TRACE_CMD,
137  TWOSTD_CMD,
138  TYPEOF_CMD,
139  UNIVARIATE_CMD,
140  UNLOAD_CMD,
141  URSOLVE_CMD,
142  VANDER_CMD,
143  VARIABLES_CMD,
144  VARSTR_CMD,
145  WRITE_CMD,
146  /* start system var section: VECHO */
147  VECHO,
148  VPAGELENGTH,
149  VCOLMAX,
150  VTIMER,
151  VRTIMER,
152  TRACE,
153  VOICE,
154  VSHORTOUT,
155  VPRINTLEVEL,
156  /* end system var section: VPRINTLEVEL */
157
158  MAX_TOK /* must be the last, biggest token number */
159};
160
161#define NONE END_RING
162#define UNKNOWN 0
163
164/*
165**  Set operations (small sets only)
166*/
167
168#define Sy_bit(x)     ((unsigned)1<<(x))
169#define Sy_inset(x,s) ((Sy_bit(x)&(s))?TRUE:FALSE)
170#define BTEST1(a)     Sy_inset((a), test)
171#define BVERBOSE(a)   Sy_inset((a), verbose)
172
173/*
174** defines for BITSETs
175*/
176
177#define V_SHOW_MEM  2
178#define V_YACC      3
179#define V_REDEFINE  4
180#define V_READING   5
181#define V_LOAD_LIB  6
182#define V_DEBUG_LIB 7
183#define V_LOAD_PROC 8
184#define V_DEF_RES   9
185#define V_DEBUG_MEM 10
186#define V_SHOW_USE  11
187#define V_IMAP      12
188#define V_PROMPT    13
189#define V_NSB       14
190#define V_CONTENTSB 15
191#define V_CANCELUNIT 16
192#define V_DEG_STOP  31
193
194
195#define OPT_PROT           0
196#define OPT_REDSB          1
197#define OPT_NOT_BUCKETS    2
198#define OPT_NOT_SUGAR      3
199#define OPT_INTERRUPT      4
200#define OPT_SUGARCRIT      5
201#define OPT_DEBUG          6
202#define OPT_REDTHROUGH     7
203#define OPT_RETURN_SB      9
204#define OPT_FASTHC        10
205#define OPT_OLDSTD        20
206#define OPT_KEEPVARS      21
207#define OPT_STAIRCASEBOUND 22
208#define OPT_MULTBOUND     23
209#define OPT_DEGBOUND      24
210#define OPT_REDTAIL       25
211#define OPT_INTSTRATEGY   26
212#define OPT_INFREDTAIL    28
213#define OPT_SB_1          29
214#define OPT_NOTREGULARITY 30
215#define OPT_WEIGHTM       31
216
217/* define ring dependent options */ 
218#define TEST_RINGDEP_OPTS \
219 (Sy_bit(OPT_INTSTRATEGY) | Sy_bit(OPT_REDTHROUGH) | Sy_bit(OPT_REDTAIL))
220
221#define TEST_OPT_PROT              BTEST1(OPT_PROT)
222#define TEST_OPT_REDSB             BTEST1(OPT_REDSB)
223#define TEST_OPT_NOT_BUCKETS       BTEST1(OPT_NOT_BUCKETS)
224#define TEST_OPT_NOT_SUGAR         BTEST1(OPT_NOT_SUGAR)
225#define TEST_OPT_SUGARCRIT         BTEST1(OPT_SUGARCRIT)
226#define TEST_OPT_DEBUG             BTEST1(OPT_DEBUG)
227#define TEST_OPT_FASTHC            BTEST1(OPT_FASTHC)
228#define TEST_OPT_INTSTRATEGY       BTEST1(OPT_INTSTRATEGY)
229#define TEST_OPT_RETURN_SB         BTEST1(OPT_RETURN_SB)
230#define TEST_OPT_KEEPVARS          BTEST1(OPT_KEEPVARS)
231#define TEST_OPT_DEGBOUND          BTEST1(OPT_DEGBOUND)
232#define TEST_OPT_MULTBOUND         BTEST1(OPT_MULTBOUND)
233#define TEST_OPT_STAIRCASEBOUND    BTEST1(OPT_STAIRCASEBOUND)
234#define TEST_OPT_REDTAIL           BTEST1(OPT_REDTAIL)
235#define TEST_OPT_INFREDTAIL        BTEST1(OPT_INFREDTAIL)
236#define TEST_OPT_SB_1              BTEST1(OPT_SB_1)
237#define TEST_OPT_NOTREGULARITY     BTEST1(OPT_NOTREGULARITY)
238#define TEST_OPT_WEIGHTM           BTEST1(OPT_WEIGHTM)
239#define TEST_OPT_REDTHROUGH        BTEST1(OPT_REDTHROUGH)
240#define TEST_OPT_OLDSTD            BTEST1(OPT_OLDSTD)
241#define TEST_OPT_CONTENTSB         BVERBOSE(V_CONTENTSB)
242#define TEST_OPT_CANCELUNIT        BVERBOSE(V_CANCELUNIT)
243
244#define TEST_VERB_NSB              BVERBOSE(V_NSB)
245#define TEST_V_DEG_STOP            BVERBOSE(V_DEG_STOP)
246
247#endif
Note: See TracBrowser for help on using the repository browser.