Archived
1

Added Evaluation Context and Math Rules

This commit is contained in:
Kim Wittenburg
2014-09-15 15:58:35 +02:00
parent 6573cd1b5c
commit 3cf2006af7
6 changed files with 191 additions and 41 deletions

View File

@@ -14,15 +14,6 @@
@interface MPElementParser : NSObject
+ (BOOL)isUsingDefaultValuesFromUserDefaults;
+ (void)setUsingDefaultValuesFromUserDefaults:(BOOL)flag;
@property (nonatomic) BOOL allowsImplicitMultiplications; // wether 2 3 is equal to 6 or error
// Default value uses the key "..." in NSUserDefaults or ... if the key does not exist.
@property (nonatomic) NSUInteger maximumOperatorChainLength; // +--++-5 -> Chain length: 6, 2 default (sign of number and operator) (0 is invalid?)
@property (nonatomic) NSUInteger maximumOperatorChainLengthInMultiplication; // Default: 1, 0 means actually 0
@property (nonatomic) NSUInteger maximumOperatorChainLengthInFunction; // For sin, cos, tan. Default: 1
- (NSArray *)parseElement:(NSString *)string
previousProduct:(MPParsedProduct *)previousProduct
nextFactor:(id<MPParsedFactor>)nextFactor