1 // 2 // PtrStack.h 3 // ANTLR 4 // 5 // Created by Alan Condit on 6/9/10. 6 // Copyright 2010 Alan's MachineWorks. All rights reserved. 7 //ptrBuffer 8 9 #import <Foundation/Foundation.h> 10 #import "ACNumber.h" 11 #import "BaseStack.h" 12 #import "RuleMemo.h" 13 14 //#define GLOBAL_SCOPE 0 15 //#define LOCAL_SCOPE 1 16 #define HASHSIZE 101 17 #define HBUFSIZE 0x2000 18 19 @interface PtrStack : BaseStack { 20 //PtrStack *fNext; 21 // TStringPool *fPool; 22 } 23 24 //@property (copy) PtrStack *fNext; 25 //@property (copy) TStringPool *fPool; 26 27 // Contruction/Destruction 28 + (PtrStack *)newPtrStack; 29 + (PtrStack *)newPtrStack:(NSInteger)cnt; 30 - (id)init; 31 - (id)initWithLen:(NSInteger)aLen; 32 - (void)dealloc; 33 34 // Instance Methods 35 - (id) copyWithZone:(NSZone *)aZone; 36 /* clear -- reinitialize the maplist array */ 37 38 #ifdef DONTUSENOMO 39 /* form hash value for string s */ 40 - (NSInteger)hash:(NSString *)s; 41 /* look for s in ptrBuffer */ 42 - (id)lookup:(NSString *)s; 43 /* look for s in ptrBuffer */ 44 - (id)install:(id)sym; 45 #endif 46 47 #ifdef DONTUSENOMO 48 - (id)getTType:(NSString *)name; 49 - (id)getName:(NSInteger)ttype; 50 #endif 51 52 @end 53