Edinburgh Speech Tools  2.1-release
siod_defs.h File Reference
#include "EST_Val.h"
Include dependency graph for siod_defs.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  LISP
 
struct  gen_readio
 
struct  repl_hooks
 

Macros

#define DEFAULT_HEAP_SIZE   -1
 
#define ACTUAL_DEFAULT_HEAP_SIZE   210000
 
#define CAR(x)   ((*x).storage_as.cons.car)
 
#define CDR(x)   ((*x).storage_as.cons.cdr)
 
#define PNAME(x)   ((*x).storage_as.symbol.pname)
 
#define VCELL(x)   ((*x).storage_as.symbol.vcell)
 
#define SUBR0(x)   (*((*x).storage_as.subr0.f))
 
#define SUBR1(x)   (*((*x).storage_as.subr1.f))
 
#define SUBR2(x)   (*((*x).storage_as.subr2.f))
 
#define SUBR3(x)   (*((*x).storage_as.subr3.f))
 
#define SUBR4(x)   (*((*x).storage_as.subr4.f))
 
#define SUBRM(x)   (*((*x).storage_as.subrm.f))
 
#define SUBRF(x)   (*((*x).storage_as.subr.f))
 
#define FLONM(x)   ((*x).storage_as.flonum.data)
 
#define FLONMPNAME(x)   ((*x).pname)
 
#define USERVAL(x)   ((*x).storage_as.user.p)
 
#define UNTYPEDVAL(x)   ((*x).storage_as.user.p)
 
#define NIL   ((struct obj *) 0)
 
#define EQ(x, y)   ((x) == (y))
 
#define NEQ(x, y)   ((x) != (y))
 
#define NULLP(x)   EQ(x,NIL)
 
#define NNULLP(x)   NEQ(x,NIL)
 
#define TYPE(x)   (((x) == NIL) ? 0 : ((*(x)).type))
 
#define TYPEP(x, y)   (TYPE(x) == (y))
 
#define NTYPEP(x, y)   (TYPE(x) != (y))
 
#define tc_nil   0
 
#define tc_cons   1
 
#define tc_flonum   2
 
#define tc_symbol   3
 
#define tc_subr_0   4
 
#define tc_subr_1   5
 
#define tc_subr_2   6
 
#define tc_subr_3   7
 
#define tc_lsubr   8
 
#define tc_fsubr   9
 
#define tc_msubr   10
 
#define tc_closure   11
 
#define tc_free_cell   12
 
#define tc_string   13
 
#define tc_double_array   14
 
#define tc_long_array   15
 
#define tc_lisp_array   16
 
#define tc_c_file   17
 
#define tc_untyped   18
 
#define tc_subr_4   19
 
#define tc_sys_1   31
 
#define tc_sys_2   32
 
#define tc_sys_3   33
 
#define tc_sys_4   34
 
#define tc_sys_5   35
 
#define tc_application_1   41
 
#define tc_application_2   42
 
#define tc_application_3   43
 
#define tc_application_4   44
 
#define tc_application_5   45
 
#define tc_application_6   46
 
#define tc_application_7   47
 
#define tc_first_user_type   50
 
#define tc_table_dim   100
 
#define FO_fetch   127
 
#define FO_store   126
 
#define FO_list   125
 
#define FO_listd   124
 
#define CONSP(x)   TYPEP(x,tc_cons)
 
#define FLONUMP(x)   TYPEP(x,tc_flonum)
 
#define SYMBOLP(x)   TYPEP(x,tc_symbol)
 
#define STRINGP(x)   TYPEP(x,tc_string)
 
#define NCONSP(x)   NTYPEP(x,tc_cons)
 
#define NFLONUMP(x)   NTYPEP(x,tc_flonum)
 
#define NSYMBOLP(x)   NTYPEP(x,tc_symbol)
 
#define CAR1(x)   CAR(x)
 
#define CDR1(x)   CDR(x)
 
#define CAR2(x)   CAR(CDR1(x))
 
#define CDR2(x)   CDR(CDR1(x))
 
#define CAR3(x)   CAR(CDR2(x))
 
#define CDR3(x)   CDR(CDR2(x))
 
#define CAR4(x)   CAR(CDR3(x))
 
#define CDR4(x)   CDR(CDR3(x))
 
#define CAR5(x)   CAR(CDR4(x))
 
#define CDR5(x)   CDR(CDR4(x))
 
#define LISTP(x)   (NULLP(x) || CONSP(x))
 
#define LIST1P(x)   (CONSP(x) && NULLP(CDR(x)))
 
#define LIST2P(x)   (CONSP(x) && CONSP(CDR1(x)) && NULLP(CDR2(x)))
 
#define LIST3P(x)   (CONSP(x) && CONSP(CDR1(x)) && CONSP(CDR2(x)) && NULLP(CDR3(x)))
 
#define LIST4P(x)   (CONSP(x) && CONSP(CDR1(x)) && CONSP(CDR2(x)) && CONSP(CDR3(x)) && NULLP(CDR4(x)))
 
#define LIST5P(x)   (CONSP(x) && CONSP(CDR1(x)) && CONSP(CDR2(x)) && CONSP(CDR3(x)) && CONSP(CDR4(x)) && NULLP(CDR5(x)))
 
#define MKPTR(x)   (siod_make_ptr((void *)x))
 
#define GETC_FCN(x)   (*((*x).getc_fcn))((*x).cb_argument)
 
#define UNGETC_FCN(c, x)   (*((*x).ungetc_fcn))(c,(*x).cb_argument)
 
#define SIOD_REGISTER_CLASS_DCLS(NAME, CLASS)
 
#define SIOD_REGISTER_CLASS(NAME, CLASS)
 
#define SIOD_REGISTER_TYPE_DCLS(NAME, CLASS)
 
#define SIOD_REGISTER_TYPE(NAME, CLASS)
 
#define SIOD_REGISTER_FUNCPTR(NAME, CLASS)
 

Typedefs

typedef LISP(* SUBR_FUNC) (void)
 

Macro Definition Documentation

#define DEFAULT_HEAP_SIZE   -1

Definition at line 29 of file siod_defs.h.

#define ACTUAL_DEFAULT_HEAP_SIZE   210000

Definition at line 30 of file siod_defs.h.

#define CAR (   x)    ((*x).storage_as.cons.car)

Definition at line 76 of file siod_defs.h.

#define CDR (   x)    ((*x).storage_as.cons.cdr)

Definition at line 77 of file siod_defs.h.

#define PNAME (   x)    ((*x).storage_as.symbol.pname)

Definition at line 78 of file siod_defs.h.

#define VCELL (   x)    ((*x).storage_as.symbol.vcell)

Definition at line 79 of file siod_defs.h.

#define SUBR0 (   x)    (*((*x).storage_as.subr0.f))

Definition at line 80 of file siod_defs.h.

#define SUBR1 (   x)    (*((*x).storage_as.subr1.f))

Definition at line 81 of file siod_defs.h.

#define SUBR2 (   x)    (*((*x).storage_as.subr2.f))

Definition at line 82 of file siod_defs.h.

#define SUBR3 (   x)    (*((*x).storage_as.subr3.f))

Definition at line 83 of file siod_defs.h.

#define SUBR4 (   x)    (*((*x).storage_as.subr4.f))

Definition at line 84 of file siod_defs.h.

#define SUBRM (   x)    (*((*x).storage_as.subrm.f))

Definition at line 85 of file siod_defs.h.

#define SUBRF (   x)    (*((*x).storage_as.subr.f))

Definition at line 86 of file siod_defs.h.

#define FLONM (   x)    ((*x).storage_as.flonum.data)

Definition at line 87 of file siod_defs.h.

#define FLONMPNAME (   x)    ((*x).pname)

Definition at line 88 of file siod_defs.h.

#define USERVAL (   x)    ((*x).storage_as.user.p)

Definition at line 89 of file siod_defs.h.

#define UNTYPEDVAL (   x)    ((*x).storage_as.user.p)

Definition at line 90 of file siod_defs.h.

#define NIL   ((struct obj *) 0)

Definition at line 92 of file siod_defs.h.

#define EQ (   x,
 
)    ((x) == (y))

Definition at line 93 of file siod_defs.h.

#define NEQ (   x,
 
)    ((x) != (y))

Definition at line 94 of file siod_defs.h.

#define NULLP (   x)    EQ(x,NIL)

Definition at line 95 of file siod_defs.h.

#define NNULLP (   x)    NEQ(x,NIL)

Definition at line 96 of file siod_defs.h.

#define TYPE (   x)    (((x) == NIL) ? 0 : ((*(x)).type))

Definition at line 98 of file siod_defs.h.

#define TYPEP (   x,
 
)    (TYPE(x) == (y))

Definition at line 100 of file siod_defs.h.

#define NTYPEP (   x,
 
)    (TYPE(x) != (y))

Definition at line 101 of file siod_defs.h.

#define tc_nil   0

Definition at line 103 of file siod_defs.h.

#define tc_cons   1

Definition at line 104 of file siod_defs.h.

#define tc_flonum   2

Definition at line 105 of file siod_defs.h.

#define tc_symbol   3

Definition at line 106 of file siod_defs.h.

#define tc_subr_0   4

Definition at line 107 of file siod_defs.h.

#define tc_subr_1   5

Definition at line 108 of file siod_defs.h.

#define tc_subr_2   6

Definition at line 109 of file siod_defs.h.

#define tc_subr_3   7

Definition at line 110 of file siod_defs.h.

#define tc_lsubr   8

Definition at line 111 of file siod_defs.h.

#define tc_fsubr   9

Definition at line 112 of file siod_defs.h.

#define tc_msubr   10

Definition at line 113 of file siod_defs.h.

#define tc_closure   11

Definition at line 114 of file siod_defs.h.

#define tc_free_cell   12

Definition at line 115 of file siod_defs.h.

#define tc_string   13

Definition at line 116 of file siod_defs.h.

#define tc_double_array   14

Definition at line 117 of file siod_defs.h.

#define tc_long_array   15

Definition at line 118 of file siod_defs.h.

#define tc_lisp_array   16

Definition at line 119 of file siod_defs.h.

#define tc_c_file   17

Definition at line 120 of file siod_defs.h.

#define tc_untyped   18

Definition at line 121 of file siod_defs.h.

#define tc_subr_4   19

Definition at line 122 of file siod_defs.h.

#define tc_sys_1   31

Definition at line 124 of file siod_defs.h.

#define tc_sys_2   32

Definition at line 125 of file siod_defs.h.

#define tc_sys_3   33

Definition at line 126 of file siod_defs.h.

#define tc_sys_4   34

Definition at line 127 of file siod_defs.h.

#define tc_sys_5   35

Definition at line 128 of file siod_defs.h.

#define tc_application_1   41

Definition at line 131 of file siod_defs.h.

#define tc_application_2   42

Definition at line 132 of file siod_defs.h.

#define tc_application_3   43

Definition at line 133 of file siod_defs.h.

#define tc_application_4   44

Definition at line 134 of file siod_defs.h.

#define tc_application_5   45

Definition at line 135 of file siod_defs.h.

#define tc_application_6   46

Definition at line 136 of file siod_defs.h.

#define tc_application_7   47

Definition at line 137 of file siod_defs.h.

#define tc_first_user_type   50

Definition at line 141 of file siod_defs.h.

#define tc_table_dim   100

Definition at line 143 of file siod_defs.h.

#define FO_fetch   127

Definition at line 145 of file siod_defs.h.

#define FO_store   126

Definition at line 146 of file siod_defs.h.

#define FO_list   125

Definition at line 147 of file siod_defs.h.

#define FO_listd   124

Definition at line 148 of file siod_defs.h.

#define CONSP (   x)    TYPEP(x,tc_cons)

Definition at line 153 of file siod_defs.h.

#define FLONUMP (   x)    TYPEP(x,tc_flonum)

Definition at line 154 of file siod_defs.h.

#define SYMBOLP (   x)    TYPEP(x,tc_symbol)

Definition at line 155 of file siod_defs.h.

#define STRINGP (   x)    TYPEP(x,tc_string)

Definition at line 156 of file siod_defs.h.

#define NCONSP (   x)    NTYPEP(x,tc_cons)

Definition at line 158 of file siod_defs.h.

#define NFLONUMP (   x)    NTYPEP(x,tc_flonum)

Definition at line 159 of file siod_defs.h.

#define NSYMBOLP (   x)    NTYPEP(x,tc_symbol)

Definition at line 160 of file siod_defs.h.

#define CAR1 (   x)    CAR(x)

Definition at line 165 of file siod_defs.h.

#define CDR1 (   x)    CDR(x)

Definition at line 166 of file siod_defs.h.

#define CAR2 (   x)    CAR(CDR1(x))

Definition at line 167 of file siod_defs.h.

#define CDR2 (   x)    CDR(CDR1(x))

Definition at line 168 of file siod_defs.h.

#define CAR3 (   x)    CAR(CDR2(x))

Definition at line 169 of file siod_defs.h.

#define CDR3 (   x)    CDR(CDR2(x))

Definition at line 170 of file siod_defs.h.

#define CAR4 (   x)    CAR(CDR3(x))

Definition at line 171 of file siod_defs.h.

#define CDR4 (   x)    CDR(CDR3(x))

Definition at line 172 of file siod_defs.h.

#define CAR5 (   x)    CAR(CDR4(x))

Definition at line 173 of file siod_defs.h.

#define CDR5 (   x)    CDR(CDR4(x))

Definition at line 174 of file siod_defs.h.

#define LISTP (   x)    (NULLP(x) || CONSP(x))

Definition at line 176 of file siod_defs.h.

#define LIST1P (   x)    (CONSP(x) && NULLP(CDR(x)))

Definition at line 177 of file siod_defs.h.

#define LIST2P (   x)    (CONSP(x) && CONSP(CDR1(x)) && NULLP(CDR2(x)))

Definition at line 178 of file siod_defs.h.

#define LIST3P (   x)    (CONSP(x) && CONSP(CDR1(x)) && CONSP(CDR2(x)) && NULLP(CDR3(x)))

Definition at line 179 of file siod_defs.h.

#define LIST4P (   x)    (CONSP(x) && CONSP(CDR1(x)) && CONSP(CDR2(x)) && CONSP(CDR3(x)) && NULLP(CDR4(x)))

Definition at line 180 of file siod_defs.h.

#define LIST5P (   x)    (CONSP(x) && CONSP(CDR1(x)) && CONSP(CDR2(x)) && CONSP(CDR3(x)) && CONSP(CDR4(x)) && NULLP(CDR5(x)))

Definition at line 181 of file siod_defs.h.

#define MKPTR (   x)    (siod_make_ptr((void *)x))

Definition at line 183 of file siod_defs.h.

#define GETC_FCN (   x)    (*((*x).getc_fcn))((*x).cb_argument)

Definition at line 190 of file siod_defs.h.

#define UNGETC_FCN (   c,
 
)    (*((*x).ungetc_fcn))(c,(*x).cb_argument)

Definition at line 191 of file siod_defs.h.

#define SIOD_REGISTER_CLASS_DCLS (   NAME,
  CLASS 
)
Value:
class CLASS *NAME(LISP x); \
int NAME##_p(LISP x); \
EST_Val est_val(const class CLASS *v); \
LISP siod(const class CLASS *v);
LISP siod(const class EST_Val v)
Definition: siod_est.cc:184
EST_Val est_val(const EST_Item_featfunc f)
Definition: item_feats.cc:122
#define CLASS(C, CL)
Definition: EST_Token.cc:719
getString int
Definition: EST_item_aux.cc:50

Definition at line 200 of file siod_defs.h.

#define SIOD_REGISTER_CLASS (   NAME,
  CLASS 
)
Value:
class CLASS *NAME(LISP x) \
{ \
return NAME(val(x)); \
} \
\
int NAME##_p(LISP x) \
{ \
if (val_p(x) && \
(val_type_##NAME == val(x).type())) \
return TRUE; \
else \
return FALSE; \
} \
\
LISP siod(const class CLASS *v) \
{ \
if (v == 0) \
return NIL; \
else \
return siod(est_val(v)); \
} \
LISP siod(const class EST_Val v)
Definition: siod_est.cc:184
EST_Val est_val(const EST_Item_featfunc f)
Definition: item_feats.cc:122
#define NIL
Definition: siod_defs.h:92
#define CLASS(C, CL)
Definition: EST_Token.cc:719
#define FALSE
Definition: EST_bool.h:119
getString int
Definition: EST_item_aux.cc:50
int val_p(LISP x)
Definition: siod_est.cc:176
#define TRUE
Definition: EST_bool.h:118

Definition at line 207 of file siod_defs.h.

#define SIOD_REGISTER_TYPE_DCLS (   NAME,
  CLASS 
)
Value:
CLASS *NAME(LISP x); \
int NAME##_p(LISP x); \
EST_Val est_val(const CLASS *v); \
LISP siod(const CLASS *v);
LISP siod(const class EST_Val v)
Definition: siod_est.cc:184
EST_Val est_val(const EST_Item_featfunc f)
Definition: item_feats.cc:122
#define CLASS(C, CL)
Definition: EST_Token.cc:719
getString int
Definition: EST_item_aux.cc:50

Definition at line 232 of file siod_defs.h.

#define SIOD_REGISTER_TYPE (   NAME,
  CLASS 
)
Value:
CLASS *NAME(LISP x) \
{ \
return NAME(val(x)); \
} \
\
int NAME##_p(LISP x) \
{ \
if (val_p(x) && \
(val_type_##NAME == val(x).type())) \
return TRUE; \
else \
return FALSE; \
} \
\
LISP siod(const CLASS *v) \
{ \
if (v == 0) \
return NIL; \
else \
return siod(est_val(v)); \
} \
LISP siod(const class EST_Val v)
Definition: siod_est.cc:184
EST_Val est_val(const EST_Item_featfunc f)
Definition: item_feats.cc:122
#define NIL
Definition: siod_defs.h:92
#define CLASS(C, CL)
Definition: EST_Token.cc:719
#define FALSE
Definition: EST_bool.h:119
getString int
Definition: EST_item_aux.cc:50
int val_p(LISP x)
Definition: siod_est.cc:176
#define TRUE
Definition: EST_bool.h:118

Definition at line 239 of file siod_defs.h.

#define SIOD_REGISTER_FUNCPTR (   NAME,
  CLASS 
)
Value:
CLASS NAME(LISP x) \
{ \
return NAME(val(x)); \
} \
\
int NAME##_p(LISP x) \
{ \
if (val_p(x) && \
(val_type_##NAME == val(x).type())) \
return TRUE; \
else \
return FALSE; \
} \
\
LISP siod(const CLASS v) \
{ \
if (v == 0) \
return NIL; \
else \
return siod(est_val(v)); \
} \
LISP siod(const class EST_Val v)
Definition: siod_est.cc:184
EST_Val est_val(const EST_Item_featfunc f)
Definition: item_feats.cc:122
#define NIL
Definition: siod_defs.h:92
#define CLASS(C, CL)
Definition: EST_Token.cc:719
#define FALSE
Definition: EST_bool.h:119
getString int
Definition: EST_item_aux.cc:50
int val_p(LISP x)
Definition: siod_est.cc:176
#define TRUE
Definition: EST_bool.h:118

Definition at line 264 of file siod_defs.h.

Typedef Documentation

typedef LISP(* SUBR_FUNC) (void)

Definition at line 151 of file siod_defs.h.