2005-05-01 11:48:36 +00:00
|
|
|
#ifndef __Compiler_h
|
|
|
|
#define __Compiler_h
|
|
|
|
#include "SchemeObject.h"
|
|
|
|
#include "CompiledCode.h"
|
|
|
|
#include "Symbol.h"
|
|
|
|
#include "Scope.h"
|
2005-05-02 04:58:22 +00:00
|
|
|
#include "Error.h"
|
2005-05-01 11:48:36 +00:00
|
|
|
|
2005-05-08 03:44:18 +00:00
|
|
|
#define TAIL 1
|
|
|
|
|
2005-05-01 11:48:36 +00:00
|
|
|
@interface Compiler: SchemeObject
|
|
|
|
{
|
2011-01-09 10:41:24 +00:00
|
|
|
CompiledCode []code;
|
|
|
|
SchemeObject []sexpr;
|
|
|
|
Scope []scope;
|
|
|
|
Error []err;
|
2005-05-01 11:48:36 +00:00
|
|
|
}
|
|
|
|
|
2011-01-09 10:41:24 +00:00
|
|
|
+ (id) newWithLambda: (SchemeObject []) xp scope: (Scope []) sc;
|
|
|
|
- (id) initWithLambda: (SchemeObject []) xp scope: (Scope []) sc;
|
|
|
|
- (SchemeObject[]) compile;
|
2005-05-01 11:48:36 +00:00
|
|
|
|
2011-01-09 10:41:24 +00:00
|
|
|
- (void) emitExpression: (SchemeObject []) expression flags: (integer) fl;
|
|
|
|
- (void) emitLambda: (SchemeObject []) expression;
|
|
|
|
- (void) emitConstant: (SchemeObject []) expression;
|
|
|
|
- (void) emitApply: (SchemeObject []) expression flags: (integer) fl;
|
2005-05-01 11:48:36 +00:00
|
|
|
@end
|
|
|
|
|
|
|
|
#endif //__Compiler_h
|