source: git/Singular/tok.h @ 49eeee

spielwiese
Last change on this file since 49eeee was 49eeee, checked in by Hans Schönemann <hannes@…>, 26 years ago
* hannes: fixed bug in maps.cc: size of monom is not pMonomSize but mmGetSpecSize() changed header in tesths.cc changed handling of ring changes (polys*.cc ring.cc) git-svn-id: file:///usr/local/Singular/svn/trunk@1462 2c84dea3-7e68-4137-9b89-c4e89433aadc
  • Property mode set to 100644
File size: 4.2 KB
Line 
1#ifndef TOK_H
2#define TOK_H
3/****************************************
4*  Computer Algebra System SINGULAR     *
5****************************************/
6/*
7* ABSTRACT: token for interpreter, as types; general macros
8*/
9/* $Id: tok.h,v 1.15 1998-04-24 16:39:27 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 loop for(;;)
26
27#ifndef ABS
28#define ABS(x) ((x)<0?(-(x)):(x))
29#endif
30
31#if defined(__cplusplus) 
32inline int max(const int a, const int b)  { return (a>b) ? a : b; }
33inline int min(const int a, const int b)  { return (a<b) ? a : b; }
34#else
35#define max(A,B) ((A) > (B) ? (A) : (B))
36#define min(A,B) ((A) < (B) ? (A) : (B))
37#endif
38
39#define COMMAND           UMINUS+2 /* in tok.h */
40#define ANY_TYPE          UMINUS+3
41#define IDHDL             UMINUS+4
42
43enum {
44  ATTRIB_CMD     = UMINUS + 15,
45  CHARACTERISTIC_CMD,
46  CHARSTR_CMD,
47  CHAR_SERIES_CMD,
48  CLOSE_CMD,
49  COLS_CMD,
50  CONTENT_CMD,
51  COUNT_CMD,
52  DBPRINT_CMD,
53  DEF_CMD,
54  DEFINED_CMD,
55  DELETE_CMD,
56  DET_CMD,
57  DUMP_CMD,
58  END_GRAMMAR,
59  EXTGCD_CMD,
60  FAC_CMD,
61  FIND_CMD,
62  FACSTD_CMD,
63  FGLM_CMD,
64  FINDUNI_CMD,
65  GCD_CMD,
66  GETDUMP_CMD,
67  INSERT_CMD,
68  INT_CMD,
69  INTVEC_CMD,
70  IS_RINGVAR,
71  KILLATTR_CMD,
72  LINK_CMD,
73  LIST_CMD,
74  MEMORY_CMD,
75  MONITOR_CMD,
76  MSTD_CMD,
77  NAMEOF_CMD,
78  NAMES_CMD,
79  NPARS_CMD,
80  NVARS_CMD,
81  OPEN_CMD,
82  OPTION_CMD,
83  ORDSTR_CMD,
84  PACKAGE_CMD,
85  PARSTR_CMD,
86  PRIME_CMD,
87  PRINT_CMD,
88  PRUNE_CMD,
89  QRING_CMD,
90  RANDOM_CMD,
91  READ_CMD,
92  RESERVEDNAME_CMD,
93  RESULTANT_CMD,
94  ROWS_CMD,
95  STATUS_CMD,
96  SQR_FREE_DEC_CMD,
97  STRING_CMD,
98  SYSTEM_CMD,
99  TEST_CMD,
100  TRANSPOSE_CMD,
101  TRACE_CMD,
102  TYPEOF_CMD,
103  VARSTR_CMD,
104  WRITE_CMD,
105  /* start system var section: VECHO */
106  VECHO,
107  VPAGELENGTH,
108  VCOLMAX,
109  VTIMER,
110  VRTIMER,
111  TRACE,
112  VOICE,
113  VSHORTOUT,
114  VPRINTLEVEL,
115  /* end system var section: VPRINTLEVEL */
116
117  MAX_TOK /* must be the last, biggest token number */
118};
119
120#define NONE END_RING
121#define UNKNOWN 0
122
123/*
124**  Set operations (small sets only)
125*/
126
127#define Sy_bit(x)     (1<<(x))
128#define Sy_inset(x,s) ((Sy_bit(x)&(s))?TRUE:FALSE)
129#define BTEST1(a)     Sy_inset((a), test)
130#define BVERBOSE(a)   Sy_inset((a), verbose)
131
132/*
133** defines for BITSETs
134*/
135
136#define V_SHOW_MEM  2
137#define V_YACC      3
138#define V_REDEFINE  4
139#define V_READING   5
140#define V_LOAD_LIB  6
141#define V_DEBUG_LIB 7
142#define V_LOAD_PROC 8
143#define V_DEF_RES   9
144#define V_DEBUG_MEM 10
145#define V_SHOW_USE  11
146#define V_IMAP      12
147#define V_PROMPT    13
148#define V_NSB       14
149
150#define TEST_VERB_NSB              BVERBOSE(V_NSB)
151
152#define OPT_PROT           0
153#define OPT_REDSB          1
154#define OPT_NOT_SUGAR      3
155#define OPT_INTERRUPT      4
156#define OPT_SUGARCRIT      5
157#define OPT_DEBUG          6
158#define OPT_CANCELUNIT     7
159#define OPT_MOREPAIRS      8
160#define OPT_RETURN_SB      9
161#define OPT_FASTHC        10
162#define OPT_KEEPVARS      21
163#define OPT_STAIRCASEBOUND 22
164#define OPT_MULTBOUND     23
165#define OPT_DEGBOUND      24
166#define OPT_REDTAIL       25
167#define OPT_INTSTRATEGY   26
168#define OPT_MINRES        28
169#define OPT_SB_1          29
170#define OPT_NOTREGULARITY 30
171#define OPT_WEIGHTM       31
172
173#define TEST_OPT_PROT              BTEST1(OPT_PROT)
174#define TEST_OPT_REDSB             BTEST1(OPT_REDSB)
175#define TEST_OPT_NOT_SUGAR         BTEST1(OPT_NOT_SUGAR)
176#define TEST_OPT_SUGARCRIT         BTEST1(OPT_SUGARCRIT)
177#define TEST_OPT_DEBUG             BTEST1(OPT_DEBUG)
178#define TEST_OPT_MOREPAIRS         BTEST1(OPT_MOREPAIRS)
179#define TEST_OPT_FASTHC            BTEST1(OPT_FASTHC)
180#define TEST_OPT_INTSTRATEGY       BTEST1(OPT_INTSTRATEGY)
181#define TEST_OPT_CANCELUNIT        BTEST1(OPT_CANCELUNIT)
182#define TEST_OPT_RETURN_SB         BTEST1(OPT_RETURN_SB)
183#define TEST_OPT_KEEPVARS          BTEST1(OPT_KEEPVARS)
184#define TEST_OPT_DEGBOUND          BTEST1(OPT_DEGBOUND)
185#define TEST_OPT_MULTBOUND         BTEST1(OPT_MULTBOUND)
186#define TEST_OPT_STAIRCASEBOUND    BTEST1(OPT_STAIRCASEBOUND)
187#define TEST_OPT_REDTAIL           BTEST1(OPT_REDTAIL)
188#define TEST_OPT_MINRES            BTEST1(OPT_MINRES)
189#define TEST_OPT_SB_1              BTEST1(OPT_SB_1)
190#define TEST_OPT_NOTREGULARITY     BTEST1(OPT_NOTREGULARITY)
191#define TEST_OPT_WEIGHTM           BTEST1(OPT_WEIGHTM)
192
193#endif
Note: See TracBrowser for help on using the repository browser.