-
Notifications
You must be signed in to change notification settings - Fork 2
/
ETTeXScanner.h
51 lines (44 loc) · 1.24 KB
/
ETTeXScanner.h
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
#import <Foundation/NSObject.h>
@protocol ETTeXScannerDelegate
- (void)beginCommand: (NSString*)aCommand;
- (void)beginOptArg;
- (void)endOptArg;
- (void)beginArgument;
- (void)endArgument;
- (void)handleText: (NSString*)aString;
@end
@class ETTeXScanner;
@class ETTextTreeBuilder;
@class ETTextDocument;
@class NSMutableSet;
@class NSMutableDictionary;
@protocol ETTeXParsing <ETTeXScannerDelegate, NSObject>
@property (nonatomic, assign) id<ETTeXParsing> parent;
@property (nonatomic, retain) ETTextTreeBuilder *builder;
@property (nonatomic, retain) ETTextDocument *document;
@property (nonatomic, retain) ETTeXScanner *scanner;
@property (nonatomic, assign) id root;
@end
@class ETTeXParser;
@interface ETTeXHandler : NSObject <ETTeXParsing>
{
ETTeXParser *root;
}
@end
@interface ETTeXParser : NSObject <ETTeXParsing>
{
NSMutableDictionary *commandHandlers;
NSMutableSet *unknownTags;
id paragraphType;
BOOL isInParagraph;
id root;
}
- (void)registerDelegate: (Class)aClass forCommand: (NSString*)command;
- (void)beginParagraph;
- (void)endParagraph;
- (void)addTextToParagraph: (NSString*)aString;
@end
@interface ETTeXScanner : NSObject
@property (assign, nonatomic) id<ETTeXScannerDelegate> delegate;
- (void) parseString: (NSString*)aString;
@end