PageRenderTime 47ms CodeModel.GetById 22ms app.highlight 21ms RepoModel.GetById 1ms app.codeStats 0ms

/include/OPDefines.h

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