Back to index

plt-scheme  4.2.1
schexpobs.h
Go to the documentation of this file.
00001 
00002 #ifndef __mzscheme_expobs__
00003 #define __mzscheme_expobs__
00004 
00005 #define SCHEME_EXPAND_OBSERVE_ENABLE
00006 
00007 extern void scheme_call_expand_observe(Scheme_Object *obs, int signal, Scheme_Object *argument);
00008 extern Scheme_Object *scheme_expand_observe_renames(Scheme_Object *env_pair);
00009 extern void scheme_init_expand_observe(Scheme_Env *);
00010 extern Scheme_Object *scheme_get_expand_observe();
00011 
00012 
00013 #ifdef SCHEME_EXPAND_OBSERVE_ENABLE
00014 # define _SCHEME_EXPOBS(observer, signal, argument)         \
00015     if (observer) { scheme_call_expand_observe(observer, signal, argument); } else {}
00016 #endif
00017 
00018 #ifndef SCHEME_EXPAND_OBSERVE_ENABLE
00019 #define _SCHEME_EXPOBS(observer, signal, argument) \
00020     ((void)0)
00021 #endif
00022 
00023 /* Individual signals */
00024 
00025 #define SCHEME_EXPAND_OBSERVE_VISIT(observer,stx)         _SCHEME_EXPOBS(observer,0,stx)
00026 #define SCHEME_EXPAND_OBSERVE_RESOLVE(observer,stx)       _SCHEME_EXPOBS(observer,1,stx)
00027 #define SCHEME_EXPAND_OBSERVE_RETURN(observer,stx)        _SCHEME_EXPOBS(observer,2,stx)
00028 #define SCHEME_EXPAND_OBSERVE_NEXT(observer)              _SCHEME_EXPOBS(observer,3,NULL)
00029 #define SCHEME_EXPAND_OBSERVE_ENTER_LIST(observer,stx)    _SCHEME_EXPOBS(observer,4,stx)
00030 #define SCHEME_EXPAND_OBSERVE_EXIT_LIST(observer,stx)     _SCHEME_EXPOBS(observer,5,stx)
00031 #define SCHEME_EXPAND_OBSERVE_ENTER_PRIM(observer,stx)    _SCHEME_EXPOBS(observer,6,stx)
00032 #define SCHEME_EXPAND_OBSERVE_EXIT_PRIM(observer,stx)     _SCHEME_EXPOBS(observer,7,stx)
00033 #define SCHEME_EXPAND_OBSERVE_ENTER_MACRO(observer,stx)   _SCHEME_EXPOBS(observer,8,stx)
00034 #define SCHEME_EXPAND_OBSERVE_EXIT_MACRO(observer,stx)    _SCHEME_EXPOBS(observer,9,stx)
00035 #define SCHEME_EXPAND_OBSERVE_ENTER_BLOCK(observer,stx)   _SCHEME_EXPOBS(observer,10,stx)
00036 #define SCHEME_EXPAND_OBSERVE_SPLICE(observer,stx)        _SCHEME_EXPOBS(observer,11,stx)
00037 #define SCHEME_EXPAND_OBSERVE_BLOCK_TO_LIST(observer,stx) _SCHEME_EXPOBS(observer,12,stx)
00038 #define SCHEME_EXPAND_OBSERVE_NEXT_GROUP(observer)       _SCHEME_EXPOBS(observer,13,NULL)
00039 #define SCHEME_EXPAND_OBSERVE_BLOCK_TO_LETREC(observer,stx) _SCHEME_EXPOBS(observer,14,stx)
00040 #define SCHEME_EXPAND_OBSERVE_LET_RENAMES(observer,vars,body)        \
00041   _SCHEME_EXPOBS(observer,16, scheme_make_pair(vars, body))
00042 #define SCHEME_EXPAND_OBSERVE_LAMBDA_RENAMES(observer,vars,body)     \
00043   _SCHEME_EXPOBS(observer,17, scheme_make_pair(vars, body))
00044 #define SCHEME_EXPAND_OBSERVE_CASE_LAMBDA_RENAMES(observer,vars,body)        \
00045   _SCHEME_EXPOBS(observer,18, scheme_make_pair(vars, body))
00046 #define SCHEME_EXPAND_OBSERVE_LETREC_SYNTAXES_RENAMES(observer,sbinds,vbinds,body) \
00047   _SCHEME_EXPOBS(observer,19, scheme_make_pair(sbinds, scheme_make_pair(vbinds, body)))
00048 #define SCHEME_EXPAND_OBSERVE_PHASE_UP(observer)           _SCHEME_EXPOBS(observer,20,NULL)
00049 
00050 #define SCHEME_EXPAND_OBSERVE_MACRO_PRE_X(observer,stx)   _SCHEME_EXPOBS(observer,21,stx)
00051 #define SCHEME_EXPAND_OBSERVE_MACRO_POST_X(observer,stx)  _SCHEME_EXPOBS(observer,22,stx)
00052 
00053 #define SCHEME_EXPAND_OBSERVE_MODULE_BODY(observer,list)  _SCHEME_EXPOBS(observer,23,list)
00054 #define SCHEME_EXPAND_OBSERVE_BLOCK_RENAMES(observer,old,new)        \
00055   _SCHEME_EXPOBS(observer,24, scheme_make_pair(old, new))
00056 
00057 /* Prim signals */
00058 #define SCHEME_EXPAND_OBSERVE_PRIM_STOP(observer) \
00059         _SCHEME_EXPOBS(observer,100,NULL)
00060 #define SCHEME_EXPAND_OBSERVE_PRIM_MODULE(observer) \
00061         _SCHEME_EXPOBS(observer,101,NULL)
00062 #define SCHEME_EXPAND_OBSERVE_PRIM_MODULE_BEGIN(observer) \
00063          _SCHEME_EXPOBS(observer,102,NULL)
00064 #define SCHEME_EXPAND_OBSERVE_PRIM_DEFINE_SYNTAXES(observer) \
00065         _SCHEME_EXPOBS(observer,103,NULL)
00066 #define SCHEME_EXPAND_OBSERVE_PRIM_DEFINE_VALUES(observer) \
00067         _SCHEME_EXPOBS(observer,104,NULL)
00068 #define SCHEME_EXPAND_OBSERVE_PRIM_IF(observer) \
00069         _SCHEME_EXPOBS(observer,105,NULL)
00070 #define SCHEME_EXPAND_OBSERVE_PRIM_WCM(observer) \
00071         _SCHEME_EXPOBS(observer,106,NULL)
00072 #define SCHEME_EXPAND_OBSERVE_PRIM_BEGIN(observer) \
00073         _SCHEME_EXPOBS(observer,107,NULL)
00074 #define SCHEME_EXPAND_OBSERVE_PRIM_BEGIN0(observer) \
00075         _SCHEME_EXPOBS(observer,108,NULL)
00076 #define SCHEME_EXPAND_OBSERVE_PRIM_APP(observer) \
00077         _SCHEME_EXPOBS(observer,109,NULL)
00078 #define SCHEME_EXPAND_OBSERVE_PRIM_LAMBDA(observer) \
00079         _SCHEME_EXPOBS(observer,110,NULL)
00080 #define SCHEME_EXPAND_OBSERVE_PRIM_CASE_LAMBDA(observer) \
00081         _SCHEME_EXPOBS(observer,111,NULL)
00082 #define SCHEME_EXPAND_OBSERVE_PRIM_LET_VALUES(observer) \
00083         _SCHEME_EXPOBS(observer,112,NULL)
00084 #define SCHEME_EXPAND_OBSERVE_PRIM_LETREC_VALUES(observer) \
00085         _SCHEME_EXPOBS(observer,113,NULL)
00086 #define SCHEME_EXPAND_OBSERVE_PRIM_LETREC_SYNTAXES_VALUES(observer) \
00087         _SCHEME_EXPOBS(observer,114,NULL)
00088 #define SCHEME_EXPAND_OBSERVE_PRIM_DATUM(observer) \
00089         _SCHEME_EXPOBS(observer,115,NULL)
00090 #define SCHEME_EXPAND_OBSERVE_PRIM_TOP(observer) \
00091         _SCHEME_EXPOBS(observer,116,NULL)
00092 #define SCHEME_EXPAND_OBSERVE_PRIM_QUOTE(observer) \
00093         _SCHEME_EXPOBS(observer,117,NULL)
00094 #define SCHEME_EXPAND_OBSERVE_PRIM_QUOTE_SYNTAX(observer) \
00095         _SCHEME_EXPOBS(observer,118,NULL)
00096 #define SCHEME_EXPAND_OBSERVE_PRIM_REQUIRE(observer) \
00097         _SCHEME_EXPOBS(observer,119,NULL)
00098 #define SCHEME_EXPAND_OBSERVE_PRIM_REQUIRE_FOR_SYNTAX(observer) \
00099         _SCHEME_EXPOBS(observer,120,NULL)
00100 #define SCHEME_EXPAND_OBSERVE_PRIM_REQUIRE_FOR_TEMPLATE(observer)   \
00101         _SCHEME_EXPOBS(observer,121,NULL)
00102 #define SCHEME_EXPAND_OBSERVE_PRIM_PROVIDE(observer) \
00103         _SCHEME_EXPOBS(observer,122,NULL)
00104 
00105 #define SCHEME_EXPAND_OBSERVE_PRIM_SET(observer) \
00106         _SCHEME_EXPOBS(observer,123,NULL)
00107 #define SCHEME_EXPAND_OBSERVE_PRIM_LETSTAR_VALUES(observer) \
00108         _SCHEME_EXPOBS(observer,124,NULL)
00109 #define SCHEME_EXPAND_OBSERVE_PRIM_EXPRESSION(obs) \
00110         _SCHEME_EXPOBS(obs,138,scheme_false)
00111 #define SCHEME_EXPAND_OBSERVE_PRIM_VARREF(obs) \
00112         _SCHEME_EXPOBS(obs,149,scheme_false)
00113 
00114 
00115 #define SCHEME_EXPAND_OBSERVE_VARIABLE(observer,e1,e2)       \
00116         _SCHEME_EXPOBS(observer,125,scheme_make_pair(e1, e2))
00117 
00118 #define SCHEME_EXPAND_OBSERVE_ENTER_CHECK(observer,stx) \
00119         _SCHEME_EXPOBS(observer,126,stx)
00120 #define SCHEME_EXPAND_OBSERVE_EXIT_CHECK(observer,stx) \
00121         _SCHEME_EXPOBS(observer,127,stx)
00122 
00123 #define SCHEME_EXPAND_OBSERVE_LIFT_LOOP(observer,stx) \
00124         _SCHEME_EXPOBS(observer,128,stx)
00125 #define SCHEME_EXPAND_OBSERVE_LETLIFT_LOOP(observer,stx) \
00126         _SCHEME_EXPOBS(observer,136,stx)
00127 #define SCHEME_EXPAND_OBSERVE_MODULE_LIFT_LOOP(observe,stxs) \
00128         _SCHEME_EXPOBS(observer,137,stxs)
00129 #define SCHEME_EXPAND_OBSERVE_MODULE_LIFT_END_LOOP(observer,stx) \
00130         _SCHEME_EXPOBS(observer,135,stx)
00131 
00132 #define SCHEME_EXPAND_OBSERVE_LOCAL_LIFT(obs,id,stx) \
00133         _SCHEME_EXPOBS(obs,129,scheme_make_pair(id,stx))
00134 #define SCHEME_EXPAND_OBSERVE_LIFT_STATEMENT(obs,stx) \
00135         _SCHEME_EXPOBS(obs,134,stx)
00136 #define SCHEME_EXPAND_OBSERVE_ENTER_LOCAL(obs,stx) \
00137         _SCHEME_EXPOBS(obs,130,stx)
00138 #define SCHEME_EXPAND_OBSERVE_EXIT_LOCAL(obs,stx) \
00139         _SCHEME_EXPOBS(obs,131,stx)
00140 #define SCHEME_EXPAND_OBSERVE_LOCAL_PRE(obs,stx) \
00141         _SCHEME_EXPOBS(obs,132,stx)
00142 #define SCHEME_EXPAND_OBSERVE_LOCAL_POST(obs,stx) \
00143         _SCHEME_EXPOBS(obs,133,stx)
00144 
00145 #define SCHEME_EXPAND_OBSERVE_ENTER_LOCAL_EXPR(obs,stx) \
00146         _SCHEME_EXPOBS(obs,139,stx)
00147 #define SCHEME_EXPAND_OBSERVE_EXIT_LOCAL_EXPR(obs,stx,opaque) \
00148         _SCHEME_EXPOBS(obs,140,scheme_make_pair(stx,opaque))
00149 
00150 #define SCHEME_EXPAND_OBSERVE_START_EXPAND(obs) \
00151         _SCHEME_EXPOBS(obs,141,scheme_false)
00152 
00153 #define SCHEME_EXPAND_OBSERVE_TAG(obs,stx) \
00154         _SCHEME_EXPOBS(obs,142,stx)
00155 
00156 #define SCHEME_EXPAND_OBSERVE_LOCAL_BIND(obs,ids) \
00157         _SCHEME_EXPOBS(obs,143,ids)
00158 #define SCHEME_EXPAND_OBSERVE_ENTER_BIND(obs) \
00159         _SCHEME_EXPOBS(obs,144,scheme_false)
00160 #define SCHEME_EXPAND_OBSERVE_EXIT_BIND(obs) \
00161         _SCHEME_EXPOBS(obs,145,scheme_false)
00162 
00163 #define SCHEME_EXPAND_OBSERVE_OPAQUE_EXPR(obs,val) \
00164         _SCHEME_EXPOBS(obs,146,val)
00165 
00166 #define SCHEME_EXPAND_OBSERVE_RENAME_LIST(obs,vals) \
00167         _SCHEME_EXPOBS(obs,147,vals)
00168 
00169 #define SCHEME_EXPAND_OBSERVE_RENAME_ONE(obs,val) \
00170         _SCHEME_EXPOBS(obs,148,val)
00171 
00172 #endif