forked from davedelong/DDMathParser
-
Notifications
You must be signed in to change notification settings - Fork 0
/
DDParser.h
76 lines (57 loc) · 3.01 KB
/
DDParser.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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
//
// DDParser.h
// DDMathParser
//
// Created by Dave DeLong on 11/24/10.
// Copyright 2010 Home. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "DDParserTypes.h"
@class DDMathStringTokenizer;
@class DDExpression;
@interface DDParser : NSObject {
DDMathStringTokenizer * tokenizer;
DDOperatorAssociativity bitwiseOrAssociativity;
DDOperatorAssociativity bitwiseXorAssociativity;
DDOperatorAssociativity bitwiseAndAssociativity;
DDOperatorAssociativity bitwiseLeftShiftAssociativity;
DDOperatorAssociativity bitwiseRightShiftAssociativity;
DDOperatorAssociativity additionAssociativity;
DDOperatorAssociativity multiplicationAssociativity;
DDOperatorAssociativity modAssociativity;
DDOperatorAssociativity powerAssociativity;
}
@property DDOperatorAssociativity bitwiseOrAssociativity;
@property DDOperatorAssociativity bitwiseXorAssociativity;
@property DDOperatorAssociativity bitwiseAndAssociativity;
@property DDOperatorAssociativity bitwiseLeftShiftAssociativity;
@property DDOperatorAssociativity bitwiseRightShiftAssociativity;
@property DDOperatorAssociativity additionAssociativity;
@property DDOperatorAssociativity multiplicationAssociativity;
@property DDOperatorAssociativity modAssociativity;
@property DDOperatorAssociativity powerAssociativity;
+ (DDOperatorAssociativity) defaultBitwiseOrAssociativity;
+ (void) setDefaultBitwiseOrAssociativity:(DDOperatorAssociativity)newAssociativity;
+ (DDOperatorAssociativity) defaultBitwiseXorAssociativity;
+ (void) setDefaultBitwiseXorAssociativity:(DDOperatorAssociativity)newAssociativity;
+ (DDOperatorAssociativity) defaultBitwiseAndAssociativity;
+ (void) setDefaultBitwiseAndAssociativity:(DDOperatorAssociativity)newAssociativity;
+ (DDOperatorAssociativity) defaultBitwiseLeftShiftAssociativity;
+ (void) setDefaultBitwiseLeftShiftAssociativity:(DDOperatorAssociativity)newAssociativity;
+ (DDOperatorAssociativity) defaultBitwiseRightShiftAssociativity;
+ (void) setDefaultBitwiseRightShiftAssociativity:(DDOperatorAssociativity)newAssociativity;
+ (DDOperatorAssociativity) defaultAdditionAssociativity;
+ (void) setDefaultAdditionAssociativity:(DDOperatorAssociativity)newAssociativity;
+ (DDOperatorAssociativity) defaultMultiplicationAssociativity;
+ (void) setDefaultMultiplicationAssociativity:(DDOperatorAssociativity)newAssociativity;
+ (DDOperatorAssociativity) defaultModAssociativity;
+ (void) setDefaultModAssociativity:(DDOperatorAssociativity)newAssociativity;
+ (DDOperatorAssociativity) defaultPowerAssociativity;
+ (void) setDefaultPowerAssociativity:(DDOperatorAssociativity)newAssociativity;
+ (id)parserWithTokenizer:(DDMathStringTokenizer *)tokenizer error:(NSError **)error;
- (id)initWithTokenizer:(DDMathStringTokenizer *)tokenizer error:(NSError **)error;
+ (id) parserWithString:(NSString *)string error:(NSError **)error;
- (id) initWithString:(NSString *)string error:(NSError **)error;
- (DDExpression *) parsedExpressionWithError:(NSError **)error;
- (DDOperatorAssociativity) associativityForOperator:(NSString *)operator;
@end