aboutsummaryrefslogtreecommitdiff
path: root/antlr-3.4/runtime/ObjC/Framework/ANTLRPtrStack.h
blob: 7aa65a977a37a2cdee3c4c4a3c1a9b373490504e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
//
//  ANTLRPtrStack.h
//  ANTLR
//
//  Created by Alan Condit on 6/9/10.
//  Copyright 2010 Alan's MachineWorks. All rights reserved.
//ptrBuffer

#import <Cocoa/Cocoa.h>
#import "ANTLRBaseStack.h"
#import "ANTLRRuleMemo.h"

//#define GLOBAL_SCOPE       0
//#define LOCAL_SCOPE        1
#define HASHSIZE         101
#define HBUFSIZE      0x2000

@interface ANTLRPtrStack : ANTLRBaseStack {
	//ANTLRPtrStack *fNext;
    // TStringPool *fPool;
}

//@property (copy) ANTLRPtrStack *fNext;
//@property (copy) TStringPool *fPool;

// Contruction/Destruction
+ (ANTLRPtrStack *)newANTLRPtrStack;
+ (ANTLRPtrStack *)newANTLRPtrStack:(NSInteger)cnt;
- (id)init;
- (id)initWithLen:(NSInteger)aLen;
- (void)dealloc;

// Instance Methods
- (id) copyWithZone:(NSZone *)aZone;
/* clear -- reinitialize the maplist array */

#ifdef DONTUSENOMO
/* form hash value for string s */
- (NSInteger)hash:(NSString *)s;
/*   look for s in ptrBuffer  */
- (id)lookup:(NSString *)s;
/* look for s in ptrBuffer  */
- (id)install:(id)sym;
#endif

#ifdef DONTUSENOMO
- (id)getTType:(NSString *)name;
- (id)getName:(NSInteger)ttype;
#endif

@end