ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/cvsroot/microscheme/opdefines.h
Revision: 1.2
Committed: Thu Nov 26 08:56:32 2015 UTC (8 years, 7 months ago) by root
Content type: text/plain
Branch: MAIN
Changes since 1.1: +5 -5 lines
Log Message:
*** empty log message ***

File Contents

# User Rev Content
1 root 1.1 OP_DEF (opexe_0, "load", 1, 1, TST_STRING, OP_LOAD)
2     OP_DEF (opexe_0, 0, 0, 0, 0, OP_T0LVL)
3     OP_DEF (opexe_0, 0, 0, 0, 0, OP_T1LVL)
4     OP_DEF (opexe_0, 0, 0, 0, 0, OP_READ_INTERNAL)
5     OP_DEF (opexe_0, "gensym", 0, 0, 0, OP_GENSYM) OP_DEF (opexe_0, 0, 0, 0, 0, OP_VALUEPRINT) OP_DEF (opexe_0, 0, 0, 0, 0, OP_EVAL)
6     #if USE_TRACING
7     OP_DEF (opexe_0, 0, 0, 0, 0, OP_REAL_EVAL)
8     #endif
9     OP_DEF (opexe_0, 0, 0, 0, 0, OP_E0ARGS) OP_DEF (opexe_0, 0, 0, 0, 0, OP_E1ARGS) OP_DEF (opexe_0, 0, 0, 0, 0, OP_APPLY)
10     #if USE_TRACING
11     OP_DEF (opexe_0, 0, 0, 0, 0, OP_REAL_APPLY) OP_DEF (opexe_0, "tracing", 1, 1, TST_NATURAL, OP_TRACING)
12     #endif
13     OP_DEF (opexe_0, 0, 0, 0, 0, OP_DOMACRO)
14     OP_DEF (opexe_0, 0, 0, 0, 0, OP_LAMBDA)
15     OP_DEF (opexe_0, 0, 0, 0, 0, OP_LAMBDA1)
16     OP_DEF (opexe_0, "make-closure", 1, 2, TST_PAIR TST_ENVIRONMENT, OP_MKCLOSURE)
17     OP_DEF (opexe_0, 0, 0, 0, 0, OP_QUOTE)
18     OP_DEF (opexe_0, 0, 0, 0, 0, OP_DEF0)
19     OP_DEF (opexe_0, 0, 0, 0, 0, OP_DEF1)
20     OP_DEF (opexe_0, "defined?", 1, 2, TST_SYMBOL TST_ENVIRONMENT, OP_DEFP)
21     OP_DEF (opexe_0, 0, 0, 0, 0, OP_BEGIN)
22     OP_DEF (opexe_0, 0, 0, 0, 0, OP_IF0)
23     OP_DEF (opexe_0, 0, 0, 0, 0, OP_IF1)
24     OP_DEF (opexe_0, 0, 0, 0, 0, OP_SET0)
25     OP_DEF (opexe_0, 0, 0, 0, 0, OP_SET1)
26     OP_DEF (opexe_0, 0, 0, 0, 0, OP_LET0)
27     OP_DEF (opexe_0, 0, 0, 0, 0, OP_LET1)
28     OP_DEF (opexe_0, 0, 0, 0, 0, OP_LET2)
29     OP_DEF (opexe_0, 0, 0, 0, 0, OP_LET0AST)
30     OP_DEF (opexe_0, 0, 0, 0, 0, OP_LET1AST)
31     OP_DEF (opexe_0, 0, 0, 0, 0, OP_LET2AST)
32     OP_DEF (opexe_0, 0, 0, 0, 0, OP_LET0REC)
33     OP_DEF (opexe_0, 0, 0, 0, 0, OP_LET1REC)
34     OP_DEF (opexe_0, 0, 0, 0, 0, OP_LET2REC)
35     OP_DEF (opexe_0, 0, 0, 0, 0, OP_COND0)
36     OP_DEF (opexe_0, 0, 0, 0, 0, OP_COND1)
37     OP_DEF (opexe_0, 0, 0, 0, 0, OP_DELAY)
38     OP_DEF (opexe_0, 0, 0, 0, 0, OP_AND0)
39     OP_DEF (opexe_0, 0, 0, 0, 0, OP_AND1)
40     OP_DEF (opexe_0, 0, 0, 0, 0, OP_OR0)
41     OP_DEF (opexe_0, 0, 0, 0, 0, OP_OR1)
42     OP_DEF (opexe_0, 0, 0, 0, 0, OP_C0STREAM)
43     OP_DEF (opexe_0, 0, 0, 0, 0, OP_C1STREAM)
44     OP_DEF (opexe_0, 0, 0, 0, 0, OP_MACRO0)
45     OP_DEF (opexe_0, 0, 0, 0, 0, OP_MACRO1)
46     OP_DEF (opexe_0, 0, 0, 0, 0, OP_CASE0)
47     OP_DEF (opexe_0, 0, 0, 0, 0, OP_CASE1)
48     OP_DEF (opexe_0, 0, 0, 0, 0, OP_CASE2)
49     OP_DEF (opexe_0, "eval", 1, 2, TST_ANY TST_ENVIRONMENT, OP_PEVAL)
50     OP_DEF (opexe_0, "apply", 1, INF_ARG, TST_NONE, OP_PAPPLY)
51     OP_DEF (opexe_0, "call-with-current-continuation", 1, 1, TST_NONE, OP_CONTINUATION)
52     #if USE_MATH
53     OP_DEF (opexe_2, "inexact->exact", 1, 1, TST_NUMBER, OP_INEX2EX)
54     OP_DEF (opexe_2, "exp", 1, 1, TST_NUMBER, OP_EXP)
55     OP_DEF (opexe_2, "log", 1, 1, TST_NUMBER, OP_LOG)
56     OP_DEF (opexe_2, "sin", 1, 1, TST_NUMBER, OP_SIN)
57     OP_DEF (opexe_2, "cos", 1, 1, TST_NUMBER, OP_COS)
58     OP_DEF (opexe_2, "tan", 1, 1, TST_NUMBER, OP_TAN)
59     OP_DEF (opexe_2, "asin", 1, 1, TST_NUMBER, OP_ASIN)
60     OP_DEF (opexe_2, "acos", 1, 1, TST_NUMBER, OP_ACOS)
61     OP_DEF (opexe_2, "atan", 1, 2, TST_NUMBER, OP_ATAN)
62     OP_DEF (opexe_2, "sqrt", 1, 1, TST_NUMBER, OP_SQRT)
63     OP_DEF (opexe_2, "expt", 2, 2, TST_NUMBER, OP_EXPT)
64     OP_DEF (opexe_2, "floor", 1, 1, TST_NUMBER, OP_FLOOR)
65     OP_DEF (opexe_2, "ceiling", 1, 1, TST_NUMBER, OP_CEILING)
66     OP_DEF (opexe_2, "truncate", 1, 1, TST_NUMBER, OP_TRUNCATE) OP_DEF (opexe_2, "round", 1, 1, TST_NUMBER, OP_ROUND)
67     #endif
68     OP_DEF (opexe_2, "+", 0, INF_ARG, TST_NUMBER, OP_ADD)
69     OP_DEF (opexe_2, "-", 1, INF_ARG, TST_NUMBER, OP_SUB)
70     OP_DEF (opexe_2, "*", 0, INF_ARG, TST_NUMBER, OP_MUL)
71     OP_DEF (opexe_2, "/", 1, INF_ARG, TST_NUMBER, OP_DIV)
72     OP_DEF (opexe_2, "quotient", 1, INF_ARG, TST_INTEGER, OP_INTDIV)
73     OP_DEF (opexe_2, "remainder", 2, 2, TST_INTEGER, OP_REM)
74     OP_DEF (opexe_2, "modulo", 2, 2, TST_INTEGER, OP_MOD)
75     OP_DEF (opexe_2, "car", 1, 1, TST_PAIR, OP_CAR)
76     OP_DEF (opexe_2, "cdr", 1, 1, TST_PAIR, OP_CDR)
77     OP_DEF (opexe_2, "cons", 2, 2, TST_NONE, OP_CONS)
78     OP_DEF (opexe_2, "set-car!", 2, 2, TST_PAIR TST_ANY, OP_SETCAR)
79     OP_DEF (opexe_2, "set-cdr!", 2, 2, TST_PAIR TST_ANY, OP_SETCDR)
80     OP_DEF (opexe_2, "char->integer", 1, 1, TST_CHAR, OP_CHAR2INT)
81     OP_DEF (opexe_2, "integer->char", 1, 1, TST_NATURAL, OP_INT2CHAR)
82     OP_DEF (opexe_2, "char-upcase", 1, 1, TST_CHAR, OP_CHARUPCASE)
83     OP_DEF (opexe_2, "char-downcase", 1, 1, TST_CHAR, OP_CHARDNCASE)
84     OP_DEF (opexe_2, "symbol->string", 1, 1, TST_SYMBOL, OP_SYM2STR)
85     OP_DEF (opexe_2, "atom->string", 1, 2, TST_ANY TST_NATURAL, OP_ATOM2STR)
86     OP_DEF (opexe_2, "string->symbol", 1, 1, TST_STRING, OP_STR2SYM)
87     OP_DEF (opexe_2, "string->atom", 1, 2, TST_STRING TST_NATURAL, OP_STR2ATOM)
88     OP_DEF (opexe_2, "make-string", 1, 2, TST_NATURAL TST_CHAR, OP_MKSTRING)
89     OP_DEF (opexe_2, "string-length", 1, 1, TST_STRING, OP_STRLEN)
90     OP_DEF (opexe_2, "string-ref", 2, 2, TST_STRING TST_NATURAL, OP_STRREF)
91     OP_DEF (opexe_2, "string-set!", 3, 3, TST_STRING TST_NATURAL TST_CHAR, OP_STRSET)
92     OP_DEF (opexe_2, "string-append", 0, INF_ARG, TST_STRING, OP_STRAPPEND)
93     OP_DEF (opexe_2, "substring", 2, 3, TST_STRING TST_NATURAL, OP_SUBSTR)
94     OP_DEF (opexe_2, "vector", 0, INF_ARG, TST_NONE, OP_VECTOR)
95     OP_DEF (opexe_2, "make-vector", 1, 2, TST_NATURAL TST_ANY, OP_MKVECTOR)
96     OP_DEF (opexe_2, "vector-length", 1, 1, TST_VECTOR, OP_VECLEN)
97     OP_DEF (opexe_2, "vector-ref", 2, 2, TST_VECTOR TST_NATURAL, OP_VECREF)
98     OP_DEF (opexe_2, "vector-set!", 3, 3, TST_VECTOR TST_NATURAL TST_ANY, OP_VECSET)
99 root 1.2 OP_DEF (opexe_r, "=", 2, INF_ARG, TST_NUMBER, OP_NUMEQ)
100     OP_DEF (opexe_r, "<", 2, INF_ARG, TST_NUMBER, OP_LESS)
101     OP_DEF (opexe_r, ">", 2, INF_ARG, TST_NUMBER, OP_GRE)
102     OP_DEF (opexe_r, "<=", 2, INF_ARG, TST_NUMBER, OP_LEQ)
103     OP_DEF (opexe_r, ">=", 2, INF_ARG, TST_NUMBER, OP_GEQ)
104 root 1.1 OP_DEF (opexe_3, "not", 1, 1, TST_NONE, OP_NOT)
105     OP_DEF (opexe_3, "boolean?", 1, 1, TST_NONE, OP_BOOLP)
106     OP_DEF (opexe_3, "eof-object?", 1, 1, TST_NONE, OP_EOFOBJP)
107     OP_DEF (opexe_3, "null?", 1, 1, TST_NONE, OP_NULLP)
108     OP_DEF (opexe_3, "symbol?", 1, 1, TST_ANY, OP_SYMBOLP)
109     OP_DEF (opexe_3, "number?", 1, 1, TST_ANY, OP_NUMBERP)
110     OP_DEF (opexe_3, "string?", 1, 1, TST_ANY, OP_STRINGP)
111     OP_DEF (opexe_3, "integer?", 1, 1, TST_ANY, OP_INTEGERP)
112     OP_DEF (opexe_3, "real?", 1, 1, TST_ANY, OP_REALP) OP_DEF (opexe_3, "char?", 1, 1, TST_ANY, OP_CHARP)
113     #if USE_CHAR_CLASSIFIERS
114     OP_DEF (opexe_3, "char-alphabetic?", 1, 1, TST_CHAR, OP_CHARAP)
115     OP_DEF (opexe_3, "char-numeric?", 1, 1, TST_CHAR, OP_CHARNP)
116     OP_DEF (opexe_3, "char-whitespace?", 1, 1, TST_CHAR, OP_CHARWP)
117     OP_DEF (opexe_3, "char-upper-case?", 1, 1, TST_CHAR, OP_CHARUP) OP_DEF (opexe_3, "char-lower-case?", 1, 1, TST_CHAR, OP_CHARLP)
118     #endif
119     #if USE_PORTS
120     OP_DEF (opexe_3, "port?", 1, 1, TST_ANY, OP_PORTP)
121     OP_DEF (opexe_3, "input-port?", 1, 1, TST_ANY, OP_INPORTP) OP_DEF (opexe_3, "output-port?", 1, 1, TST_ANY, OP_OUTPORTP)
122     #endif
123     OP_DEF (opexe_3, "procedure?", 1, 1, TST_ANY, OP_PROCP)
124     OP_DEF (opexe_3, "pair?", 1, 1, TST_ANY, OP_PAIRP)
125     OP_DEF (opexe_3, "list?", 1, 1, TST_ANY, OP_LISTP)
126     OP_DEF (opexe_3, "environment?", 1, 1, TST_ANY, OP_ENVP)
127     OP_DEF (opexe_3, "vector?", 1, 1, TST_ANY, OP_VECTORP)
128     OP_DEF (opexe_3, "eq?", 2, 2, TST_ANY, OP_EQ)
129     OP_DEF (opexe_3, "eqv?", 2, 2, TST_ANY, OP_EQV)
130     OP_DEF (opexe_4, "force", 1, 1, TST_ANY, OP_FORCE) OP_DEF (opexe_4, 0, 0, 0, 0, OP_SAVE_FORCED)
131     #if USE_PORTS
132     OP_DEF (opexe_4, "write", 1, 2, TST_ANY TST_OUTPORT, OP_WRITE)
133     OP_DEF (opexe_4, "write-char", 1, 2, TST_CHAR TST_OUTPORT, OP_WRITE_CHAR)
134     OP_DEF (opexe_4, "display", 1, 2, TST_ANY TST_OUTPORT, OP_DISPLAY) OP_DEF (opexe_4, "newline", 0, 1, TST_OUTPORT, OP_NEWLINE)
135     #endif
136     OP_DEF (opexe_4, "error", 1, INF_ARG, TST_NONE, OP_ERR0)
137     OP_DEF (opexe_4, 0, 0, 0, 0, OP_ERR1)
138     OP_DEF (opexe_4, "reverse", 1, 1, TST_LIST, OP_REVERSE)
139     OP_DEF (opexe_4, "list*", 1, INF_ARG, TST_NONE, OP_LIST_STAR) OP_DEF (opexe_4, "append", 0, INF_ARG, TST_NONE, OP_APPEND)
140     #if USE_PLIST
141     OP_DEF (opexe_4, "put", 3, 3, TST_NONE, OP_PUT) OP_DEF (opexe_4, "get", 2, 2, TST_NONE, OP_GET)
142     #endif
143     OP_DEF (opexe_4, "quit", 0, 1, TST_NUMBER, OP_QUIT)
144     OP_DEF (opexe_4, "gc", 0, 0, 0, OP_GC)
145     OP_DEF (opexe_4, "gc-verbose", 0, 1, TST_NONE, OP_GCVERB)
146     OP_DEF (opexe_4, "new-segment", 0, 1, TST_NUMBER, OP_NEWSEGMENT) OP_DEF (opexe_4, "oblist", 0, 0, 0, OP_OBLIST)
147     #if USE_PORTS
148     OP_DEF (opexe_4, "current-input-port", 0, 0, 0, OP_CURR_INPORT)
149     OP_DEF (opexe_4, "current-output-port", 0, 0, 0, OP_CURR_OUTPORT)
150     OP_DEF (opexe_4, "open-input-file", 1, 1, TST_STRING, OP_OPEN_INFILE)
151     OP_DEF (opexe_4, "open-output-file", 1, 1, TST_STRING, OP_OPEN_OUTFILE)
152     OP_DEF (opexe_4, "open-input-output-file", 1, 1, TST_STRING, OP_OPEN_INOUTFILE)
153     # if USE_STRING_PORTS
154     OP_DEF (opexe_4, "open-input-string", 1, 1, TST_STRING, OP_OPEN_INSTRING)
155     OP_DEF (opexe_4, "open-input-output-string", 1, 1, TST_STRING, OP_OPEN_INOUTSTRING)
156     OP_DEF (opexe_4, "open-output-string", 0, 1, TST_STRING, OP_OPEN_OUTSTRING)
157     OP_DEF (opexe_4, "get-output-string", 1, 1, TST_OUTPORT, OP_GET_OUTSTRING)
158     # endif
159     OP_DEF (opexe_4, "close-input-port", 1, 1, TST_INPORT, OP_CLOSE_INPORT)
160     OP_DEF (opexe_4, "close-output-port", 1, 1, TST_OUTPORT, OP_CLOSE_OUTPORT)
161     #endif
162     OP_DEF (opexe_4, "interaction-environment", 0, 0, 0, OP_INT_ENV) OP_DEF (opexe_4, "current-environment", 0, 0, 0, OP_CURR_ENV)
163     #if USE_PORTS
164     OP_DEF (opexe_5, "read", 0, 1, TST_INPORT, OP_READ)
165     OP_DEF (opexe_5, "read-char", 0, 1, TST_INPORT, OP_READ_CHAR)
166     OP_DEF (opexe_5, "peek-char", 0, 1, TST_INPORT, OP_PEEK_CHAR)
167     OP_DEF (opexe_5, "char-ready?", 0, 1, TST_INPORT, OP_CHAR_READY)
168     OP_DEF (opexe_5, "set-input-port", 1, 1, TST_INPORT, OP_SET_INPORT) OP_DEF (opexe_5, "set-output-port", 1, 1, TST_OUTPORT, OP_SET_OUTPORT)
169     #endif
170     OP_DEF (opexe_5, 0, 0, 0, 0, OP_RDSEXPR)
171     OP_DEF (opexe_5, 0, 0, 0, 0, OP_RDLIST)
172     OP_DEF (opexe_5, 0, 0, 0, 0, OP_RDDOT)
173     OP_DEF (opexe_5, 0, 0, 0, 0, OP_RDQUOTE)
174     OP_DEF (opexe_5, 0, 0, 0, 0, OP_RDQQUOTE)
175     OP_DEF (opexe_5, 0, 0, 0, 0, OP_RDQQUOTEVEC)
176     OP_DEF (opexe_5, 0, 0, 0, 0, OP_RDUNQUOTE)
177     OP_DEF (opexe_5, 0, 0, 0, 0, OP_RDUQTSP)
178     OP_DEF (opexe_5, 0, 0, 0, 0, OP_RDVEC)
179     OP_DEF (opexe_5, 0, 0, 0, 0, OP_P0LIST)
180     OP_DEF (opexe_5, 0, 0, 0, 0, OP_P1LIST)
181     OP_DEF (opexe_5, 0, 0, 0, 0, OP_PVECFROM)
182     OP_DEF (opexe_6, "length", 1, 1, TST_LIST, OP_LIST_LENGTH)
183     OP_DEF (opexe_6, "assq", 2, 2, TST_NONE, OP_ASSQ)
184     OP_DEF (opexe_6, "get-closure-code", 1, 1, TST_NONE, OP_GET_CLOSURE)
185     OP_DEF (opexe_6, "closure?", 1, 1, TST_NONE, OP_CLOSUREP) OP_DEF (opexe_6, "macro?", 1, 1, TST_NONE, OP_MACROP)
186     #undef OP_DEF