• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 //
2 //  ANTLRPtrStack.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 <Cocoa/Cocoa.h>
10 #import "ANTLRBaseStack.h"
11 #import "ANTLRRuleMemo.h"
12 
13 //#define GLOBAL_SCOPE       0
14 //#define LOCAL_SCOPE        1
15 #define HASHSIZE         101
16 #define HBUFSIZE      0x2000
17 
18 @interface ANTLRPtrStack : ANTLRBaseStack {
19 	//ANTLRPtrStack *fNext;
20     // TStringPool *fPool;
21 }
22 
23 //@property (copy) ANTLRPtrStack *fNext;
24 //@property (copy) TStringPool *fPool;
25 
26 // Contruction/Destruction
27 + (ANTLRPtrStack *)newANTLRPtrStack;
28 + (ANTLRPtrStack *)newANTLRPtrStack:(NSInteger)cnt;
29 - (id)init;
30 - (id)initWithLen:(NSInteger)aLen;
31 - (void)dealloc;
32 
33 // Instance Methods
34 - (id) copyWithZone:(NSZone *)aZone;
35 /* clear -- reinitialize the maplist array */
36 
37 #ifdef DONTUSENOMO
38 /* form hash value for string s */
39 - (NSInteger)hash:(NSString *)s;
40 /*   look for s in ptrBuffer  */
41 - (id)lookup:(NSString *)s;
42 /* look for s in ptrBuffer  */
43 - (id)install:(id)sym;
44 #endif
45 
46 #ifdef DONTUSENOMO
47 - (id)getTType:(NSString *)name;
48 - (id)getName:(NSInteger)ttype;
49 #endif
50 
51 @end
52