33 lines
961 B
Objective-C
33 lines
961 B
Objective-C
//
|
|
// MPExpressionEvaluator.h
|
|
// MathPad
|
|
//
|
|
// Created by Kim Wittenburg on 31.08.14.
|
|
// Copyright (c) 2014 Kim Wittenburg. All rights reserved.
|
|
//
|
|
|
|
#import <Foundation/Foundation.h>
|
|
#import "MPExpression.h"
|
|
#import "MPExpressionTokenizer.h"
|
|
#import "MPTerm.h"
|
|
|
|
@class MPExpressionEvaluator, MPExpression, MPParsedElementOld;
|
|
|
|
@interface MPExpressionEvaluator : NSObject
|
|
|
|
// Do not instanciate yourself, use evaluator property of MPExpression instead
|
|
- (instancetype)initWithExpression:(MPExpression *)expression;
|
|
@property (readonly, nonatomic, weak) MPExpression *expression;
|
|
|
|
@property (nonatomic, strong) MPExpressionTokenizer *lexer;
|
|
|
|
- (void)expressionDidChangeInRange:(NSRange)range
|
|
replacementLength:(NSUInteger)replacementLength;
|
|
|
|
#pragma mark Evaluating Expressions
|
|
@property (readonly, nonatomic, copy) NSString *definedVariable;
|
|
|
|
- (MPTerm *)parseExpectingVariable:(BOOL)flag error:(MPParseError *__autoreleasing *)error;
|
|
|
|
@end
|