From ab10720260e2c184b319026da89f4dfd338500bb Mon Sep 17 00:00:00 2001 From: Brian Cully Date: Wed, 2 Apr 2008 19:20:20 -0400 Subject: Initial commit --- LispREPL.h | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 LispREPL.h (limited to 'LispREPL.h') diff --git a/LispREPL.h b/LispREPL.h new file mode 100644 index 0000000..73e53c0 --- /dev/null +++ b/LispREPL.h @@ -0,0 +1,47 @@ +// +// LispREPL.h +// Moxie +// +// Created by Brian Cully on Sat Aug 14 2004. +// Copyright (c) 2004 Brian Cully. All rights reserved. +// + +#define LispFinishedLoadingNotification @"LispFinishedLoadingNotification" + +@interface LispREPL : NSObject +{ + NSFileHandle *theStdinWriter; + NSFileHandle *theStdoutReader; + NSFileHandle *theResultReader; + + NSMutableDictionary *theCommandHandlers; + + NSMutableArray *theREPLResults; + NSTimer *theDispatcherTimer; + NSLock *theDispatcherLock; + + BOOL theLispIsLoaded; +} ++ (LispREPL *)sharedREPL; + +- (BOOL)isLoaded; + +- (void)addCommand: (NSString *)command + handler: (id)object + selector: (SEL)handler; +- (void)removeCommand: (NSString *)command; +- (void)runCommand: (NSString *)command withObjects: (id)objects; +- (BOOL)commandHasHandler: (NSString *)command; +- (id)handlerForCommand: (NSString *)command; +- (SEL)selectorForCommand: (NSString *)command; + +- (void)eval: (id)aForm; +@end + +@interface LispREPL (Accessors) +- (NSMutableDictionary *)commandHandlers; + +- (NSFileHandle *)stdinWriter; +- (NSFileHandle *)stdoutReader; +- (NSFileHandle *)resultReader; +@end \ No newline at end of file -- cgit v1.2.3