1 //
2 //  AntlrReaderStream.h
3 //  ANTLR
4 //
5 //  Created by Alan Condit on 2/21/11.
6 //  Copyright 2011 Alan's MachineWorks. All rights reserved.
7 //
8 
9 #import <Cocoa/Cocoa.h>
10 #import "ANTLRStringStream.h"
11 
12 @interface ANTLRReaderStream : ANTLRStringStream {
13     NSFileHandle *fh;
14     NSInteger size;
15     NSInteger rbSize;
16     //NSData *data; /* ANTLRStringStream has NSString *data */
17 }
18 
19 @property (retain) NSFileHandle *fh;
20 @property (assign) NSInteger size;
21 @property (assign) NSInteger rbSize;
22 //@property (retain) NSData *data;
23 
24 + (NSInteger) READ_BUFFER_SIZE;
25 + (NSInteger) INITIAL_BUFFER_SIZE;
26 
27 + (id) newANTLRReaderStream;
28 + (id) newANTLRReaderStream:(NSFileHandle *)r;
29 + (id) newANTLRReaderStream:(NSFileHandle *)r size:(NSInteger)aSize;
30 + (id) newANTLRReaderStream:(NSFileHandle *)r size:(NSInteger)aSize readBufferSize:(NSInteger)aReadChunkSize;
31 - (id) initWithReader:(NSFileHandle *)r size:(NSInteger)aSize readBufferSize:(NSInteger)aReadChunkSize;
32 - (void) load:(NSInteger)aSize readBufferSize:(NSInteger)aReadChunkSize;
33 - (void) close;
34 
35 @end
36