Archived
1

Started to Implement the Parser

This commit is contained in:
Kim Wittenburg
2014-09-06 01:54:15 +02:00
parent 6aafbf9d2e
commit 8df8317413
10 changed files with 570 additions and 16 deletions

View 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