Started to Implement the Parser
This commit is contained in:
30
MathPad/MPExpressionEvaluator.h
Normal file
30
MathPad/MPExpressionEvaluator.h
Normal file
@@ -0,0 +1,30 @@
|
||||
//
|
||||
// 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"
|
||||
|
||||
@class MPExpressionEvaluator, MPExpression, MPParsedElement;
|
||||
|
||||
@interface MPExpressionEvaluator : NSObject
|
||||
|
||||
- (instancetype)initWithExpression:(MPExpression *)expression;
|
||||
|
||||
@property (readonly, nonatomic, strong) MPExpression *expression;
|
||||
|
||||
#pragma mark Lexing
|
||||
- (MPParsedElement *)structuredRepresentationOfElementAtIndex:(NSUInteger)index;
|
||||
|
||||
#pragma mark Evaluating Expressions
|
||||
@property (readonly, nonatomic, strong) NSDictionary *variableBindings;
|
||||
|
||||
- (void)bindValue:(double)value toVariableName:(NSString *)name;
|
||||
|
||||
- (double)evaluateWithError:(NSError *__autoreleasing *)error;
|
||||
|
||||
@end
|
||||
Reference in New Issue
Block a user