home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Programming / Misc / CLISP-1.LHA / CLISP960530-sr.lha / src / fsubr.d < prev    next >
Encoding:
Text File  |  1996-04-15  |  3.1 KB  |  94 lines

  1. # Liste aller FSUBRs
  2. # Bruno Haible 10.7.1994
  3.  
  4. # Eine Special-Form wird definiert durch eine Deklaration
  5. #   LISPSPECFORM(name,req_anz,opt_anz,body_flag)
  6. # in diesem File.
  7. # Zusätzlich muß in CONTROL.D dieselbe Deklaration samt C-Body stehen.
  8.  
  9. # name ist der Funktionsname (ein C-Identifier), req_anz die Anzahl der
  10. # required-Parameter (eine Zahl), opt_anz die Anzahl der optional-Parameter
  11. # (eine Zahl), body_flag entweder nobody oder body.
  12.  
  13.  
  14. # Expander für die Konstruktion der extern-Deklarationen:
  15.   #define LISPSPECFORM_A(name,req_anz,opt_anz,body_flag)  \
  16.     extern fsubr_function C_##name;
  17.  
  18. # Expander für die Konstruktion der Deklaration der C-Funktion:
  19.   #ifdef ANSI
  20.     #define LISPSPECFORM_B(name,req_anz,opt_anz,body_flag)  \
  21.       global Values C_##name (void)
  22.   #else
  23.     #define LISPSPECFORM_B(name,req_anz,opt_anz,body_flag)  \
  24.       global Values C_##name ()
  25.   #endif
  26.  
  27. # Expander für die Deklaration der FSUBR-Tabelle:
  28.   #define LISPSPECFORM_C(name,req_anz,opt_anz,body_flag)  \
  29.     fsubr_ D_##name;
  30.  
  31. # Expander für die Initialisierung der FSUBR-Tabelle:
  32.   #define LISPSPECFORM_D(name,req_anz,opt_anz,body_flag)  \
  33.     &C_##name,
  34.  
  35. # Expander für die Initialisierung der FSUBR-Symbole:
  36.   #define LISPSPECFORM_E(name,req_anz,opt_anz,body_flag)  \
  37.     { offsetof(struct symbol_tab_,S_##name), \
  38.       req_anz,                  \
  39.       opt_anz,                  \
  40.       (uintW)fsubr_##body_flag, \
  41.     },
  42.   #define LISPSPECFORM_F(name,req_anz,opt_anz,body_flag)  \
  43.     { S(name),                  \
  44.       req_anz,                  \
  45.       opt_anz,                  \
  46.       (uintW)fsubr_##body_flag, \
  47.     },
  48.  
  49. # Welcher Expander benutzt wird, muß vom Hauptfile aus eingestellt werden.
  50. # Default ist   #define LISPSPECFORM LISPSPECFORM_B
  51.  
  52. # ---------- CONTROL ----------
  53. LISPSPECFORM(eval_when, 1,0,body)
  54. LISPSPECFORM(quote, 1,0,nobody)
  55. LISPSPECFORM(function, 1,1,nobody)
  56. LISPSPECFORM(setq, 0,0,body)
  57. LISPSPECFORM(psetq, 0,0,body)
  58. LISPSPECFORM(progn, 0,0,body)
  59. LISPSPECFORM(prog1, 1,0,body)
  60. LISPSPECFORM(prog2, 2,0,body)
  61. LISPSPECFORM(let, 1,0,body)
  62. LISPSPECFORM(letstern, 1,0,body)
  63. LISPSPECFORM(locally, 0,0,body)
  64. LISPSPECFORM(compiler_let, 1,0,body)
  65. LISPSPECFORM(progv, 2,0,body)
  66. LISPSPECFORM(flet, 1,0,body)
  67. LISPSPECFORM(labels, 1,0,body)
  68. LISPSPECFORM(macrolet, 1,0,body)
  69. LISPSPECFORM(symbol_macrolet, 1,0,body)
  70. LISPSPECFORM(if, 2,1,nobody)
  71. LISPSPECFORM(when, 1,0,body)
  72. LISPSPECFORM(unless, 1,0,body)
  73. LISPSPECFORM(cond, 0,0,body)
  74. LISPSPECFORM(block, 1,0,body)
  75. LISPSPECFORM(return_from, 1,1,nobody)
  76. LISPSPECFORM(tagbody, 0,0,body)
  77. LISPSPECFORM(go, 1,0,nobody)
  78. LISPSPECFORM(multiple_value_list, 1,0,nobody)
  79. LISPSPECFORM(multiple_value_call, 1,0,body)
  80. LISPSPECFORM(multiple_value_prog1, 1,0,body)
  81. LISPSPECFORM(multiple_value_bind, 2,0,body)
  82. LISPSPECFORM(multiple_value_setq, 2,0,nobody)
  83. LISPSPECFORM(catch, 1,0,body)
  84. LISPSPECFORM(unwind_protect, 1,0,body)
  85. LISPSPECFORM(throw, 2,0,nobody)
  86. LISPSPECFORM(declare, 0,0,body)
  87. LISPSPECFORM(the, 2,0,nobody)
  88. LISPSPECFORM(load_time_value, 1,1,nobody)
  89. LISPSPECFORM(and, 0,0,body)
  90. LISPSPECFORM(or, 0,0,body)
  91. # Weitere FSUBRs auch in INIT.LSP (%EXPAND-...) und im Compiler (c-form)
  92. # vermerken!
  93.  
  94.