diff --git a/MathPad/Fonts/CMU Sans Serif Italic.ttf b/MathKit/Fonts/CMU Sans Serif Italic.ttf
similarity index 100%
rename from MathPad/Fonts/CMU Sans Serif Italic.ttf
rename to MathKit/Fonts/CMU Sans Serif Italic.ttf
diff --git a/MathPad/Fonts/CMU Sans Serif.ttf b/MathKit/Fonts/CMU Sans Serif.ttf
similarity index 100%
rename from MathPad/Fonts/CMU Sans Serif.ttf
rename to MathKit/Fonts/CMU Sans Serif.ttf
diff --git a/MathPad/Fonts/CMU Serif Italic.ttf b/MathKit/Fonts/CMU Serif Italic.ttf
similarity index 100%
rename from MathPad/Fonts/CMU Serif Italic.ttf
rename to MathKit/Fonts/CMU Serif Italic.ttf
diff --git a/MathPad/Fonts/CMU Serif.ttf b/MathKit/Fonts/CMU Serif.ttf
similarity index 100%
rename from MathPad/Fonts/CMU Serif.ttf
rename to MathKit/Fonts/CMU Serif.ttf
diff --git a/MathPad/MPElementaryFunctionTerm.h b/MathKit/MPElementaryFunctionTerm.h
similarity index 100%
rename from MathPad/MPElementaryFunctionTerm.h
rename to MathKit/MPElementaryFunctionTerm.h
diff --git a/MathPad/MPElementaryFunctionTerm.m b/MathKit/MPElementaryFunctionTerm.m
similarity index 100%
rename from MathPad/MPElementaryFunctionTerm.m
rename to MathKit/MPElementaryFunctionTerm.m
diff --git a/MathPad/MPEvaluationContext.h b/MathKit/MPEvaluationContext.h
similarity index 100%
rename from MathPad/MPEvaluationContext.h
rename to MathKit/MPEvaluationContext.h
diff --git a/MathPad/MPEvaluationContext.m b/MathKit/MPEvaluationContext.m
similarity index 100%
rename from MathPad/MPEvaluationContext.m
rename to MathKit/MPEvaluationContext.m
diff --git a/MathKit/MPExpression.h b/MathKit/MPExpression.h
new file mode 100644
index 0000000..459c200
--- /dev/null
+++ b/MathKit/MPExpression.h
@@ -0,0 +1,910 @@
+//
+// MPExpression.h
+// MathPad
+//
+// Created by Kim Wittenburg on 10.08.14.
+// Copyright (c) 2014 Kim Wittenburg. All rights reserved.
+//
+
+
+/*!
+ @header
+ The MPExpression class is used to represent a mathematical
+ expression. It is used in the storage layer of the MathKit Expression System. An
+ instance of the MPExpression class stores all contents related to
+ an expression and can manipulate them. However it is not able to evaluate the
+ represented expression by itself.
+
+
NSString class.
+ In a valid expression string elements can only contain ASCII valid characters.
+ (and some other special characters) that make sense in a mathematical context.
+ Functions are represented by the MPFunction class. Functions
+ represent everything beyond simple text (such as powers, parenthesis and roots).
+
+ An expression should be pictured as a sequence of symbols that can either be
+ characters or functions. For the purposes of easier processing of expressions
+ it is possible to access complete string or function elements. Also there is a
+ third way of accessing an expression's contents: You can query individual tokens
+ of an expression. Tokens represent logical units inside an expression. For more
+ information on tokens see the MPToken class.
+
+ MPFunction for
+ details.
+
+ NSString or
+ MPFunction class. String elements can be multiple characters long. For
+ example the expression 4+2² consists of one string element
+ ("4+2") and one function element (the square function). All
+ elements conform to the MPExpressionElement protocol.
+
+ Token:4+2² consists of 4 tokens: A number token (4), a plus
+ sign token (+), another number (2) and a power token
+ (the square function). All tokens conform to the MPToken protocol.
+
+ Symbol:4+2² consists of 4 symbols: The characters "4",
+ "+" and "2" and the square function.
+
+ Item:
+ The term item is used to describe any of the previous. When the term
+ item is used in the name of a function or method it necessary to specify
+ what exactly an item is supposed to be. Usually this is done through reference
+ frames.
+
+ Reference Frame:MPReferenceFrame.
+
+ Children:+ @textblock +- convertIndexFromReferenceFrame:toReferenceFrame: +- convertIndexFromReferenceFrame:toReferenceFrame:offset: + @/textblock ++ +
MPExpression instance can not evaluate itself. There are however
+ the -parse: and
+ -parseExpectingVariableDefinition:errors: methods. These parse and
+ thereby convert a MPExpression instance into a
+ MPParsedExpression instance that can be evaluated. For more
+ information on evaluation see the MPParsedExpression and
+ MPTerm class as well as the previously mentioned methods.
+*/
+
+
+/*!
+ @const MPIllegalElementException
+ @brief Name for an exception that is raised if an invalid element is
+ added to an expression.
+
+ @discussion This exception may be raised during initialization of an
+ expression or when the expression is mutated. This exception
+ contains the invalid element in its userInfo
+ dictionary. You can query it using the
+ MPIllegalElementExceptionElementKey key.
+ */
+FOUNDATION_EXPORT NSString *const MPIllegalElementException;
+
+
+/*!
+ @const MPIllegalElementExceptionElementKey
+ @brief Predefined key for an invalid element that caused a
+ MPIllegalElementException to be raised.
+
+ @discussion The invalid element can be of any type. Numbers and structs are
+ wrapped in an NSNumber or NSValue
+ instance respectively.
+ */
+FOUNDATION_EXPORT NSString *const MPIllegalElementExceptionElementKey;
+
+
+/*!
+ @typedef MPReferenceFrame
+ @brief A reference frame specifies the way an item is to be
+ interpreted.
+
+ @constant MPElementReferenceFrame
+ Specifies that items should be interpreted as elements.
+
+ @constant MPSymbolReferenceFrame
+ Specifies that items should be interpreted as symbols.
+
+ @constant MPTokenReferenceFrame
+ Specifies that items should be interpreted as tokens.
+ */
+typedef enum {
+ MPElementReferenceFrame,
+ MPSymbolReferenceFrame,
+ MPTokenReferenceFrame
+} MPReferenceFrame;
+
+
+
+@class MPExpression, MPFunction, MPRangePath, MPParsedExpression;
+@protocol MPExpressionElement, MPToken;
+
+
+/*!
+ @class MPExpression
+ @brief A MPExpression instance represents a mathematical
+ expression.
+
+ @discussion Every expression consists of string elements (represented by the
+ NSString class) and function elements (represented
+ by the MPFunction class). Functions and expressions
+ make up the expression tree.
+ */
+@interface MPExpression : NSObject 0 elements.
+
+ @return An empty expression.
+ */
+- (instancetype)init;
+
+
+/*!
+ @method initWithElement:
+ @brief Initializes a new expression with the specified
+ element.
+
+ @discussion This method is a convenience initializer to initialize an
+ expression with a single element.
+
+ @param element
+ The element to be added to the expression. The
+ element will be copied.
+
+ @return An expression initialized with element.
+ */
+- (instancetype)initWithElement:(idelements.
+
+ @discussion All elements must conform to the MPExpressionElement
+ protocol. If one or more objects do not conform to that protocol
+ a MPIllegalElementException is raised.
+
+ This method is the designated initializer for the
+ MPExpression class.
+
+ @param elements
+ The elements that should be added to the expression. Every
+ element must conform to the MPExpressionElement
+ protocol. Each element is copied and the copy is then added to
+ the expression. The object in the elements array is
+ not modified.
+
+ @return An expression containing elements.
+ */
+- (instancetype)initWithElements:(NSArray *)elements; /* designated initializer */
+
+
+#pragma mark Querying Expressions
+/*!
+ @methodgroup Querying Expressions
+ */
+
+
+/*!
+ @property parent
+ @brief The receiver's parent.
+
+ @discussion The receiver's parent is the function in the expression tree that
+ contains the receiver.
+ @warning You should never set this property manually. If you are
+ implementing a custom subclass of MPFunction use the
+ MPFunctionAccessorImplementation macro.
+
+ @return The parent of the receiver or nil if the receiver is
+ the root expression.
+ */
+@property (nonatomic, weak) MPFunction *parent;
+
+
+/*!
+ @method rootExpression
+ @brief Returns the root expression from the receiver's expression tree.
+
+ @discussion The root expression is the ultimate parent of all expressions and
+ functions in the expression tree. A root expression does not have
+ a parent.
+
+ @return The root expression from the receiver's expression tree.
+ */
+- (MPExpression *)rootExpression;
+
+
+/*!
+ @method indexPath
+ @brief Returns the index path of the receiver in the expression tree.
+
+ @discussion The index path contains the indexes (starting from the root
+ expression of the receiver's expression tree) that lead to the
+ receiver. The indexes are expressed in the element reference
+ frame.
+
+ @return The index path of the receiver in the expression tree.
+ */
+- (NSIndexPath *)indexPath;
+
+
+/*!
+ @method countItemsInReferenceFrame:
+ @brief Returns the number of items in the receiver in the specified
+ referenceFrame.
+
+ @param referenceFrame
+ The reference frame that should be used to count the items.
+
+ @return The current number of items in the receiver counted in the
+ specified referenceFrame.
+ */
+- (NSUInteger)countItemsInReferenceFrame:(MPReferenceFrame)referenceFrame;
+
+
+/*!
+ @method itemAtIndex:referenceFrame:
+ @brief Returns the item at anIndex.
+
+ @discussion The item is not copied before it is returned. So be aware that
+ if you mutate a MPFunction instance returned from
+ this function the receiver's expression tree will be updated to
+ reflect the change.
+
+ @param anIndex
+ The index of the item. If the index is greater than the number of
+ items for the respective reference frame a
+ NSRangeException is raised.
+
+ @param referenceFrame
+ The reference frame that should be used to identify the item at
+ anIndex.
+
+ @return The item at anIndex.
+ */
+- (id)itemAtIndex:(NSUInteger)anIndex
+ referenceFrame:(MPReferenceFrame)referenceFrame;
+
+
+/*!
+ @method elementAtIndex:referenceFrame:
+ @brief Returns the element at the specified index.
+
+ @discussion An element is either a string or a function. If
+ anIndex identifies a position inside a string
+ element the complete element is returned.
+
+ This method always returns elements. To query items in the
+ specified reference frame use
+ -itemAtIndex:referenceFrame:.
+
+ @param anIndex
+ The index of the element.
+
+ @param referenceFrame
+ The reference frame anIndex is specified in.
+
+ @return The element at anIndex.
+ */
+- (idelement or
+ NSNotFound if it was not found.
+
+ @param element
+ The element to find.
+
+ @return The index of element expressed in the element
+ reference frame.
+ */
+- (NSUInteger)indexOfElement:(idrange exceeds the receiver's bounds a
+ NSRangeException is raised.
+
+ @param aRange
+ The requested range within the receiver's bounds.
+
+ @param referenceFrame
+ The referenceFrame aRange is expressed in.
+
+ @return An array containing all elements in the specified range. The type
+ of the objects depends on the specified
+ referenceFrame.
+ */
+- (NSArray *)itemsInRange:(NSRange)aRange
+ referenceFrame:(MPReferenceFrame)referenceFrame;
+
+
+/*!
+ @method allItemsInReferenceFrame:
+ @brief Returns an array of all items in the receiver for the specified
+ reference frame.
+
+ @discussion The elements in the returned array are not copied before they are
+ returned so be aware that mutations to any of the returned
+ objects will update the receiver's expression tree to reflect the
+ change.
+
+ @return An array of all items in the receiver.
+ */
+- (NSArray *)allItemsInReferenceFrame:(MPReferenceFrame)referenceFrame;
+
+
+/*!
+ @method elementAtIndexPath:
+ @brief Returns the element at the specified index path.
+
+ @discussion This method finds the elements at the respective indexes starting
+ at the root expression from the receiver's expression tree.
+ The returned object can be a NSString, a
+ MPFunction or an MPExpression instance
+ depending on the specified indexPath. If any of the
+ indexes exceed the bounds of the respective receiver a
+ NSRangeException is raised.
+
+ If the index path does not contain any indexes the receiver
+ itself is returned.
+
+ @param indexPath
+ The index path the required object is located at. The indexes are
+ expressed in the element reference frame.
+
+ @return The element located at indexPath. The element is not
+ copied before it is returned. Be aware of the fact that any
+ mutations made to the returned object will update the receiver's
+ expression tree to reflect the change.
+ */
+- (id)elementAtIndexPath:(NSIndexPath *)indexPath;
+
+
+/*!
+ @method convertIndex:fromReferenceFrame:toReferenceFrame:
+ @brief Converts an index from one reference frame to another.
+
+ @discussion This method ignores any offsets into items the conversion between
+ reference frames can cause. If you are interested in the offset
+ use -convertIndex:fromReferenceFrame:toReferenceFrame:offset:
+ instead.
+
+ @param anIndex
+ The index to be converted.
+
+ @param fromReferenceFrame
+ The reference frame anIndex is specified in.
+
+ @param toReferenceFrame
+ The reference frame anIndex should be converted to.
+
+ @return An index specified in the toReferenceFrame. If
+ anIndex identifies a location inside an item in the
+ toReferenceFrame the index of the corresponding item
+ is returned.
+ */
+- (NSUInteger)convertIndex:(NSUInteger)anIndex
+ fromReferenceFrame:(MPReferenceFrame)fromReferenceFrame
+ toReferenceFrame:(MPReferenceFrame)toReferenceFrame;
+
+
+/*!
+ @method convertIndex:fromReferenceFrame:toReferenceFrame:offset:
+ @brief Converts an index from one reference frame to another.
+
+ @discussion If anIndex identifies a location inside an item in
+ the toReferenceFrame the index of the corresponding
+ item is returned. In that case the offset parameter
+ will be set to the number of symbols the offset goes into the
+ item at the returned index.
+
+ @param anIndex
+ The index to be converted.
+
+ @param fromReferenceFrame
+ The reference frame anIndex is specified in.
+
+ @param toReferenceFrame
+ The reference frame anIndex should be converted to.
+
+ @param offset
+ This output parameter will be set to the number of symbols that
+ are between the location identified by anIndex and
+ the index that is actually returned. The offset is specified in
+ the symbol reference frame. If you are not interested in the
+ offset pass NULL.
+
+ @return An index specified in the toReferenceFrame
+ corresponding to anIndex.
+ */
+- (NSUInteger)convertIndex:(NSUInteger)anIndex
+ fromReferenceFrame:(MPReferenceFrame)fromReferenceFrame
+ toReferenceFrame:(MPReferenceFrame)toReferenceFrame
+ offset:(NSUInteger *)offset;
+
+
+/*!
+ @method convertRange:fromReferenceFrame:toReferenceFrame:
+ @brief Converts a range from one reference frame to another.
+
+ @discussion This method just converts the location and target of the range
+ separately using
+ -convertIndex:fromReferenceFrame:toReferenceFrame:.
+ It ensures that the returned range definitely includes all items
+ that were specified by aRange.
+
+ The possibility that the returned range may
+ include more symbols than aRange is ignored. If you
+ need that information use
+ -convertRange:fromReferenceFrame:toReferenceFrame:leadingOffset:trailingOffset:.
+
+ @param aRange
+ The range to be converted.
+
+ @param fromReferenceFrame
+ The reference frame aRange is specified in.
+
+ @param toReferenceFrame
+ The reference frame aRange is to be converted to.
+
+ @return A range in the toReferenceFrame that includes the
+ the items identified by aRange.
+ */
+- (NSRange)convertRange:(NSRange)aRange
+ fromReferenceFrame:(MPReferenceFrame)fromReferenceFrame
+ toReferenceFrame:(MPReferenceFrame)toReferenceFrame;
+
+
+/*!
+ @method convertRange:fromReferenceFrame:toReferenceFrame:leadingOffset:trailingOffset:
+ @brief Converts a range from one reference frame to another.
+
+ @discussion This method just converts the location and target of the range
+ separately using
+ -convertIndex:fromReferenceFrame:toReferenceFrame:.
+ It ensures that the returned range definitely includes all items
+ that were specified by aRange.
+
+ @param aRange
+ The range to be converted.
+
+ @param fromReferenceFrame
+ The reference frame aRange is specified in.
+
+ @param toReferenceFrame
+ The reference frame aRange is to be converted to.
+
+ @param leadingOffset
+ The offset of the location of the returned range in respect to
+ the location of aRange.
+
+ @param trailingOffset
+ The offset of the last index in the range in respect to the last
+ index of aRange.
+
+ @return A range in the toReferenceFrame that includes the the items
+ specified by aRange.
+ */
+- (NSRange)convertRange:(NSRange)aRange
+ fromReferenceFrame:(MPReferenceFrame)fromReferenceFrame
+ toReferenceFrame:(MPReferenceFrame)toReferenceFrame
+ leadingOffset:(NSUInteger *)leadingOffset
+ trailingOffset:(NSUInteger *)trailingOffset;
+
+
+#pragma mark Mutating Expressions
+/*!
+ @methodgroup Mutating Expressions
+ */
+
+
+/*!
+ @method replaceItemsInRange:referenceFrame:withElements:
+ @brief Replaces the elements in the specified range with the contents of
+ the elements array.
+
+ @discussion This is the most primitive mutation method of
+ MPExpression. Every other mutating method must
+ ultimately call this method.
+
+ After the receiver has been mutated the integrety of the receiver
+ is restored. That basically means that subsequent strings are
+ joined and empty strings removed. After restoring integrity the
+ receiver sends a
+ -changedElementsInIndexedRangePath:replacementLength:
+ to itself. For more information see the documentation on that
+ method.
+
+ @param aRange
+ The range of symbols (including functions) to replace.
+
+ @param referenceFrame
+ The reference frame aRange is specified in.
+
+ @param elements
+ The elements that should replace the symbols specified by
+ range.
+ */
+- (void)replaceItemsInRange:(NSRange)aRange
+ referenceFrame:(MPReferenceFrame)referenceFrame
+ withElements:(NSArray *)elements;
+
+
+/*!
+ @method changedElementsInRangePath:replacementLength:
+ @brief This is a notification message that is sent from the receiver to
+ itself after it has been mutated.
+
+ @discussion This method does nothing more than notify it's parent that it has
+ been mutated at the respective range path. If you want to get
+ notified about changes in an expression you should override this
+ method instead of
+ -replaceSymbolsInRange:withElements: because this
+ method gives you information about the elements that changed
+ during the mutation.
+
+ @param rangePath
+ The range path at which the receiver was changed starting at the
+ receiver. The range addressed by rangePath is
+ expressed in the element reference frame.
+
+ @param replacementLength
+ The number of elements replacing the elements specified by
+ rangePath (also specified in the element reference
+ frame).
+ */
+- (void)changedElementsInRangePath:(MPRangePath *)rangePath
+ replacementLength:(NSUInteger)replacementLength;
+
+
+/*!
+ @method subexpressionFromIndex:referenceFrame:
+ @brief Creates an expression from the items in the receiver from the
+ specified index to the end.
+
+ @discussion The items from the receiver are copied. Mutations to the returned
+ expression will not change the receiver's expression tree.
+
+ @param from
+ The index from which to start constructing the subexpression.
+
+ @param referenceFrame
+ The reference frame from is specified in.
+
+ @return An expression containing the items from the specified index to
+ the end of the receiver.
+ */
+- (MPExpression *)subexpressionFromIndex:(NSUInteger)from
+ referenceFrame:(MPReferenceFrame)referenceFrame;
+
+
+/*!
+ @method subexpressionToIndex:referenceFrame:
+ @brief Creates an expression from the items in the receiver from the
+ first to the specified item.
+
+ @discussion The items from the receiver are copied. Mutations to the returned
+ expression will not change the receiver's expression tree.
+
+ @param to
+ The index of the first element not to include in the newly
+ constructed subexpression.
+
+ @param referenceFrame
+ The reference frame to is specified in.
+
+ @return An expression containing the items from the first item to the one
+ at the specified index.
+ */
+- (MPExpression *)subexpressionToIndex:(NSUInteger)to
+ referenceFrame:(MPReferenceFrame)referenceFrame;
+
+
+/*!
+ @method subexpressionWithRange:referenceFrame:
+ @brief Creates an expression from the items in the receiver within the
+ specified range.
+
+ @discussion The items from the receiver are copied. Mutations to the returned
+ expression will not change the receiver's expression tree.
+
+ @param aRange
+ Specifies the items to be included in the newly created
+ subexpression.
+
+ @param referenceFrame
+ The reference frame aRange is specified in.
+
+ @return An expression containing the items in aRange.
+ */
+- (MPExpression *)subexpressionWithRange:(NSRange)aRange
+ referenceFrame:(MPReferenceFrame)referenceFrame;
+
+
+#pragma mark Evaluating Expressions
+/*!
+ @methodgroup Evaluating Expressions
+ */
+
+
+/*!
+ @method parse:
+ @brief Parses the receiver.
+
+ @discussion This is a convenience method that calls
+ -parseExpectingVariable:errors: with NO
+ as the first argument.
+
+ @param errors
+ If the receiver (or any of its elements) contain syntax errors
+ this parameter is set to an appropriate value. All items in the
+ array are NSError instances. This parameter is never
+ set to an empty array. Pass NULL if you are not
+ interested in any errors that might occur.
+
+ @return A MPParsedExpression instance that represents the
+ receiver and can be evaluated or nil if an error
+ occurs. In that case the errors parameter is set to
+ an array containing at least one NSError instance.
+ */
+- (MPParsedExpression *)parse:(NSArray *__autoreleasing *)errors;
+
+
+/*!
+ @method parseExpectingVariable:errors:
+ @brief Parses the receiver.
+
+ @param flag
+ If YES the receiver must (exept for whitespaces)
+ begin with a single letter followed by an equals sign. If it
+ doesn't the expression is considered invalid. Specify
+ NO If the expression should be evaluatable by itself.
+
+ @param errors
+ If the receiver (or any of its elements) contain syntax errors
+ this parameter is set to an appropriate value. All items in the
+ array are NSError instances. This parameter is never
+ set to an empty array. Pass NULL if you are not
+ interested in any errors that might occur.
+
+ @return A MPParsedExpression instance that represents the
+ receiver and can be evaluated or nil if an error
+ occurs. In that case the errors parameter is set to
+ an array containing at least one NSError instance.
+ */
+- (MPParsedExpression *)parseExpectingVariable:(BOOL)flag
+ errors:(NSArray *__autoreleasing *)errors;
+
+@end
+
+
+
+/*!
+ @category MPExpression (MPExpressionConvenience)
+ @brief This category defines convenience methods for the
+ MPExpression class.
+
+ @discussion All convenience methods are completely defined in terms of other
+ methods of the MPExpression class.
+ */
+@interface MPExpression (MPExpressionConvenience)
+
+#pragma mark Querying Expressions
+/*!
+ @methodgroup Querying Expressions
+ */
+
+
+/*!
+ @method countElements
+ @brief Returns the number of elements in the receiver.
+
+ @return The number of elements in the receiver expressed in the element
+ reference frame.
+ */
+- (NSUInteger)countElements;
+
+
+/*!
+ @method countSymbols
+ @brief Returns the number of symbols in the receiver.
+
+ @return The number of symbols in the receiver expressed in the symbol
+ reference frame.
+ */
+- (NSUInteger)countSymbols;
+
+
+/*!
+ @method countTokens
+ @brief Returns the number of tokens in the receiver.
+
+ @return The number of tokens in the receiver expressed in the token
+ reference frame.
+ */
+- (NSUInteger)countTokens;
+
+
+/*!
+ @method elementAtIndex:
+ @brief Returns the element at the specified index.
+
+ @param anIndex
+ The index of the element specified in the element reference
+ frame.
+
+ @return The element at anIndex.
+ */
+- (idanIndex.
+ */
+- (idanIndex.
+ */
+- (idanElement to the receiver.
+
+ @param anElement
+ The element to append to the receiver.
+ */
+- (void)appendElement:(idelements to the receiver.
+
+ @discussion All objects in the elements array must conform to
+ the MPExpressionElement protocol. If at least one
+ element does not conform to that protocol a
+ MPIllegalElementException is raised.
+
+ @param elements
+ The elements to append to the receiver.
+ */
+- (void)appendElements:(NSArray *)elements;
+
+
+/*!
+ @method insertElement:atIndex:referenceFrame:
+ @brief Inserts anElement at the specified index.
+
+ @param anElement
+ The element to be inserted.
+
+ @param index
+ The index where to insert anElement.
+
+ @param referenceFrame
+ The reference frame index is specified in.
+ */
+- (void)insertElement:(idelements at the specified index.
+
+ @discussion All objects in the elements array must conform to
+ the MPExpressionElement protocol. If at least one
+ element does not conform to that protocol a
+ MPIllegalElementException is raised.
+
+ @param elements
+ The elements to be inserted.
+
+ @param index
+ The index where to insert elements.
+
+ @param referenceFrame
+ The reference frame index is specified in.
+ */
+- (void)insertElements:(NSArray *)elements
+ atIndex:(NSUInteger)index
+ referenceFrame:(MPReferenceFrame)referenceFrame;
+
+
+/*!
+ @method deleteElementsInRange:
+ @brief Removes the elements identified by range from the
+ receiver.
+
+ @discussion If range exceeds the receiver's bounds a
+ NSRangeException is raised.
+
+ @param range
+ The range of items to remove from the receiver.
+
+ @param referenceFrame
+ The reference frame range is specified in.
+ */
+- (void)deleteElementsInRange:(NSRange)range
+ referenceFrame:(MPReferenceFrame)referenceFrame;
+
+@end
diff --git a/MathPad/MPExpression.m b/MathKit/MPExpression.m
similarity index 94%
rename from MathPad/MPExpression.m
rename to MathKit/MPExpression.m
index 2e33ba0..e91f6a2 100644
--- a/MathPad/MPExpression.m
+++ b/MathKit/MPExpression.m
@@ -35,7 +35,7 @@ NSString *const MPIllegalElementExceptionElementKey = @"MPIllegalElementExceptio
@brief Private method. Returns an array containing all tokens from the
receiver.
- @return All items in the @c MPTokenReferenceFrame.
+ @return All items in the MPTokenReferenceFrame.
*/
- (NSArray *)tokens;
@@ -45,8 +45,8 @@ NSString *const MPIllegalElementExceptionElementKey = @"MPIllegalElementExceptio
@brief Private method. Checks whether all objects in the specified array
are valid expression elements.
- @discussion If an object is not valid a @c MPIllegalElementException is
- raised.
+ @discussion If an object is not valid a
+ MPIllegalElementException is raised.
@param elements
The array of objects to be validated.
@@ -65,7 +65,7 @@ NSString *const MPIllegalElementExceptionElementKey = @"MPIllegalElementExceptio
/*!
@method _replaceSymbolsInRange:withElements:
@brief Private method. Replaces the symbols in the specified range with
- the elements from the @c elements array.
+ the elements from the elements array.
@discussion This is the most primitive mutation method of the @c MPExpression
class.
@@ -73,7 +73,7 @@ NSString *const MPIllegalElementExceptionElementKey = @"MPIllegalElementExceptio
@param range
The range of symbols to be replaced. The range is specified in
the symbol reference frame. If the range exceeds the receiver's
- bounds a @c NSRangeException is raised.
+ bounds a NSRangeException is raised.
@param elements
The elements that should replace the symbols in the specified
@@ -85,14 +85,15 @@ NSString *const MPIllegalElementExceptionElementKey = @"MPIllegalElementExceptio
/*!
@method _splitElementsAtLocation:insertionIndex:
- @brief Splits the receiver's elements at the specified @c location.
+ @brief Splits the receiver's elements at the specified
+ location.
@discussion The split location can be inside a string element. In that case
the string is replaced with two other smaller strings.
Splitting the elements destroys the receiver's integrity. The
- receiver of this message must also receive a @c -fixElements
- message soon afterwards.
+ receiver of this message must also receive a
+ -fixElements message soon afterwards.
@param location
The index where to split the elements. Specified in the symbol
@@ -105,9 +106,9 @@ NSString *const MPIllegalElementExceptionElementKey = @"MPIllegalElementExceptio
element at the location where the elements were previously
splitted.
- @return @c YES if a string element was split into two smaller strings, @c
- NO if the split @c location corresponds to a location between two
- elements.
+ @return @c YES if a string element was split into two smaller strings,
+ NO if the split location corresponds to
+ a location between two elements.
*/
- (BOOL)_splitElementsAtLocation:(NSUInteger)location
insertionIndex:(NSUInteger *)insertionIndex;
@@ -635,26 +636,6 @@ NSString *const MPIllegalElementExceptionElementKey = @"MPIllegalElementExceptio
#pragma mark Evaluating Expressions
-- (NSDecimalNumber *)evaluateWithErrors:(NSArray *__autoreleasing *)errors
-{
- NSArray *parsingErrors;
- MPParsedExpression *parsedExpression = [self parse:&parsingErrors];
- NSError *evaluationError;
- NSDecimalNumber *result = parsedExpression ? [parsedExpression evaluate:&evaluationError] : nil;
- if (errors && (parsedExpression || evaluationError)) {
- NSMutableArray *localErrors = [[NSMutableArray alloc] initWithCapacity:parsingErrors.count+1];
- if (parsingErrors) {
- [localErrors addObjectsFromArray:parsingErrors];
- }
- if (evaluationError) {
- [localErrors addObject:evaluationError];
- }
- *errors = localErrors;
- }
- return result;
-}
-
-
- (MPParsedExpression *)parse:(NSArray *__autoreleasing *)errors
{
return [self parseExpectingVariable:NO
diff --git a/MathPad/MPExpressionElement.h b/MathKit/MPExpressionElement.h
similarity index 100%
rename from MathPad/MPExpressionElement.h
rename to MathKit/MPExpressionElement.h
diff --git a/MathPad/MPExpressionLayout.h b/MathKit/MPExpressionLayout.h
similarity index 100%
rename from MathPad/MPExpressionLayout.h
rename to MathKit/MPExpressionLayout.h
diff --git a/MathPad/MPExpressionLayout.m b/MathKit/MPExpressionLayout.m
similarity index 100%
rename from MathPad/MPExpressionLayout.m
rename to MathKit/MPExpressionLayout.m
diff --git a/MathPad/MPExpressionParser.h b/MathKit/MPExpressionParser.h
similarity index 100%
rename from MathPad/MPExpressionParser.h
rename to MathKit/MPExpressionParser.h
diff --git a/MathPad/MPExpressionParser.m b/MathKit/MPExpressionParser.m
similarity index 100%
rename from MathPad/MPExpressionParser.m
rename to MathKit/MPExpressionParser.m
diff --git a/MathPad/MPExpressionStorage.h b/MathKit/MPExpressionStorage.h
similarity index 100%
rename from MathPad/MPExpressionStorage.h
rename to MathKit/MPExpressionStorage.h
diff --git a/MathPad/MPExpressionStorage.m b/MathKit/MPExpressionStorage.m
similarity index 100%
rename from MathPad/MPExpressionStorage.m
rename to MathKit/MPExpressionStorage.m
diff --git a/MathPad/MPExpressionTokenizer.h b/MathKit/MPExpressionTokenizer.h
similarity index 100%
rename from MathPad/MPExpressionTokenizer.h
rename to MathKit/MPExpressionTokenizer.h
diff --git a/MathPad/MPExpressionTokenizer.m b/MathKit/MPExpressionTokenizer.m
similarity index 100%
rename from MathPad/MPExpressionTokenizer.m
rename to MathKit/MPExpressionTokenizer.m
diff --git a/MathPad/MPExpressionView.h b/MathKit/MPExpressionView.h
similarity index 100%
rename from MathPad/MPExpressionView.h
rename to MathKit/MPExpressionView.h
diff --git a/MathPad/MPExpressionView.m b/MathKit/MPExpressionView.m
similarity index 100%
rename from MathPad/MPExpressionView.m
rename to MathKit/MPExpressionView.m
diff --git a/MathPad/MPFactorialTerm.h b/MathKit/MPFactorialTerm.h
similarity index 100%
rename from MathPad/MPFactorialTerm.h
rename to MathKit/MPFactorialTerm.h
diff --git a/MathPad/MPFactorialTerm.m b/MathKit/MPFactorialTerm.m
similarity index 100%
rename from MathPad/MPFactorialTerm.m
rename to MathKit/MPFactorialTerm.m
diff --git a/MathPad/MPFractionFunction.h b/MathKit/MPFractionFunction.h
similarity index 100%
rename from MathPad/MPFractionFunction.h
rename to MathKit/MPFractionFunction.h
diff --git a/MathPad/MPFractionFunction.m b/MathKit/MPFractionFunction.m
similarity index 100%
rename from MathPad/MPFractionFunction.m
rename to MathKit/MPFractionFunction.m
diff --git a/MathPad/MPFractionFunctionLayout.h b/MathKit/MPFractionFunctionLayout.h
similarity index 100%
rename from MathPad/MPFractionFunctionLayout.h
rename to MathKit/MPFractionFunctionLayout.h
diff --git a/MathPad/MPFractionFunctionLayout.m b/MathKit/MPFractionFunctionLayout.m
similarity index 100%
rename from MathPad/MPFractionFunctionLayout.m
rename to MathKit/MPFractionFunctionLayout.m
diff --git a/MathPad/MPFractionTerm.h b/MathKit/MPFractionTerm.h
similarity index 100%
rename from MathPad/MPFractionTerm.h
rename to MathKit/MPFractionTerm.h
diff --git a/MathPad/MPFractionTerm.m b/MathKit/MPFractionTerm.m
similarity index 100%
rename from MathPad/MPFractionTerm.m
rename to MathKit/MPFractionTerm.m
diff --git a/MathPad/MPFunction+MPToken.h b/MathKit/MPFunction+MPToken.h
similarity index 100%
rename from MathPad/MPFunction+MPToken.h
rename to MathKit/MPFunction+MPToken.h
diff --git a/MathPad/MPFunction+MPToken.m b/MathKit/MPFunction+MPToken.m
similarity index 100%
rename from MathPad/MPFunction+MPToken.m
rename to MathKit/MPFunction+MPToken.m
diff --git a/MathPad/MPFunction.h b/MathKit/MPFunction.h
similarity index 100%
rename from MathPad/MPFunction.h
rename to MathKit/MPFunction.h
diff --git a/MathPad/MPFunction.m b/MathKit/MPFunction.m
similarity index 100%
rename from MathPad/MPFunction.m
rename to MathKit/MPFunction.m
diff --git a/MathPad/MPFunctionLayout.h b/MathKit/MPFunctionLayout.h
similarity index 100%
rename from MathPad/MPFunctionLayout.h
rename to MathKit/MPFunctionLayout.h
diff --git a/MathPad/MPFunctionLayout.m b/MathKit/MPFunctionLayout.m
similarity index 100%
rename from MathPad/MPFunctionLayout.m
rename to MathKit/MPFunctionLayout.m
diff --git a/MathPad/MPFunctionTerm.h b/MathKit/MPFunctionTerm.h
similarity index 100%
rename from MathPad/MPFunctionTerm.h
rename to MathKit/MPFunctionTerm.h
diff --git a/MathPad/MPFunctionTerm.m b/MathKit/MPFunctionTerm.m
similarity index 100%
rename from MathPad/MPFunctionTerm.m
rename to MathKit/MPFunctionTerm.m
diff --git a/MathPad/MPFunctionsViewController.h b/MathKit/MPFunctionsViewController.h
similarity index 100%
rename from MathPad/MPFunctionsViewController.h
rename to MathKit/MPFunctionsViewController.h
diff --git a/MathPad/MPFunctionsViewController.m b/MathKit/MPFunctionsViewController.m
similarity index 100%
rename from MathPad/MPFunctionsViewController.m
rename to MathKit/MPFunctionsViewController.m
diff --git a/MathPad/MPFunctionsViewController.xib b/MathKit/MPFunctionsViewController.xib
similarity index 100%
rename from MathPad/MPFunctionsViewController.xib
rename to MathKit/MPFunctionsViewController.xib
diff --git a/MathPad/MPLayout.h b/MathKit/MPLayout.h
similarity index 100%
rename from MathPad/MPLayout.h
rename to MathKit/MPLayout.h
diff --git a/MathPad/MPLayout.m b/MathKit/MPLayout.m
similarity index 100%
rename from MathPad/MPLayout.m
rename to MathKit/MPLayout.m
diff --git a/MathPad/MPMathRules.h b/MathKit/MPMathRules.h
similarity index 100%
rename from MathPad/MPMathRules.h
rename to MathKit/MPMathRules.h
diff --git a/MathPad/MPMathRules.m b/MathKit/MPMathRules.m
similarity index 100%
rename from MathPad/MPMathRules.m
rename to MathKit/MPMathRules.m
diff --git a/MathPad/MPNegatedTerm.h b/MathKit/MPNegatedTerm.h
similarity index 100%
rename from MathPad/MPNegatedTerm.h
rename to MathKit/MPNegatedTerm.h
diff --git a/MathPad/MPNegatedTerm.m b/MathKit/MPNegatedTerm.m
similarity index 100%
rename from MathPad/MPNegatedTerm.m
rename to MathKit/MPNegatedTerm.m
diff --git a/MathPad/MPNumber.h b/MathKit/MPNumber.h
similarity index 100%
rename from MathPad/MPNumber.h
rename to MathKit/MPNumber.h
diff --git a/MathPad/MPNumber.m b/MathKit/MPNumber.m
similarity index 100%
rename from MathPad/MPNumber.m
rename to MathKit/MPNumber.m
diff --git a/MathPad/MPParenthesisFunction.h b/MathKit/MPParenthesisFunction.h
similarity index 100%
rename from MathPad/MPParenthesisFunction.h
rename to MathKit/MPParenthesisFunction.h
diff --git a/MathPad/MPParenthesisFunction.m b/MathKit/MPParenthesisFunction.m
similarity index 100%
rename from MathPad/MPParenthesisFunction.m
rename to MathKit/MPParenthesisFunction.m
diff --git a/MathPad/MPParenthesisFunctionLayout.h b/MathKit/MPParenthesisFunctionLayout.h
similarity index 100%
rename from MathPad/MPParenthesisFunctionLayout.h
rename to MathKit/MPParenthesisFunctionLayout.h
diff --git a/MathPad/MPParenthesisFunctionLayout.m b/MathKit/MPParenthesisFunctionLayout.m
similarity index 100%
rename from MathPad/MPParenthesisFunctionLayout.m
rename to MathKit/MPParenthesisFunctionLayout.m
diff --git a/MathPad/MPParenthesisTerm.h b/MathKit/MPParenthesisTerm.h
similarity index 100%
rename from MathPad/MPParenthesisTerm.h
rename to MathKit/MPParenthesisTerm.h
diff --git a/MathPad/MPParenthesisTerm.m b/MathKit/MPParenthesisTerm.m
similarity index 100%
rename from MathPad/MPParenthesisTerm.m
rename to MathKit/MPParenthesisTerm.m
diff --git a/MathPad/MPParsedExpression.h b/MathKit/MPParsedExpression.h
similarity index 100%
rename from MathPad/MPParsedExpression.h
rename to MathKit/MPParsedExpression.h
diff --git a/MathPad/MPParsedExpression.m b/MathKit/MPParsedExpression.m
similarity index 100%
rename from MathPad/MPParsedExpression.m
rename to MathKit/MPParsedExpression.m
diff --git a/MathPad/MPPowerFunction.h b/MathKit/MPPowerFunction.h
similarity index 100%
rename from MathPad/MPPowerFunction.h
rename to MathKit/MPPowerFunction.h
diff --git a/MathPad/MPPowerFunction.m b/MathKit/MPPowerFunction.m
similarity index 100%
rename from MathPad/MPPowerFunction.m
rename to MathKit/MPPowerFunction.m
diff --git a/MathPad/MPPowerFunctionLayout.h b/MathKit/MPPowerFunctionLayout.h
similarity index 100%
rename from MathPad/MPPowerFunctionLayout.h
rename to MathKit/MPPowerFunctionLayout.h
diff --git a/MathPad/MPPowerFunctionLayout.m b/MathKit/MPPowerFunctionLayout.m
similarity index 77%
rename from MathPad/MPPowerFunctionLayout.m
rename to MathKit/MPPowerFunctionLayout.m
index ca5ed13..e8c955d 100644
--- a/MathPad/MPPowerFunctionLayout.m
+++ b/MathKit/MPPowerFunctionLayout.m
@@ -33,9 +33,11 @@
return [NSIndexSet indexSetWithIndex:0];
}
+#warning Broken Power Layout
- (NSPoint)offsetOfChildLayoutAtIndex:(NSUInteger)index
{
- CGFloat y = (self.baseBounds.size.height + self.baseBounds.origin.y) / 2;
+ NSRect exponentBounds = [self childLayoutAtIndex:0].bounds;
+ CGFloat y = (self.baseBounds.size.height + self.baseBounds.origin.y) - ((exponentBounds.size.height + exponentBounds.origin.y) / 2);
return NSMakePoint(kPowerFunctionExponentXOffset, y);
}
@@ -52,13 +54,14 @@
- (NSRect)generateBounds
{
NSRect exponentBounds = [self childLayoutAtIndex:0].bounds;
- CGFloat y = self.baseBounds.origin.y;
- CGFloat height = -y + [self offsetOfChildLayoutAtIndex:0].y + exponentBounds.size.height + exponentBounds.origin.y;
+ CGFloat height = [self offsetOfChildLayoutAtIndex:0].y + exponentBounds.size.height + exponentBounds.origin.y;
CGFloat width = kPowerFunctionExponentXOffset + exponentBounds.size.width + kPowerFunctionTrailingOffset;
- return NSMakeRect(0, y, width, height);
+ return NSMakeRect(0, 0, width, height);
}
- (void)draw
-{}
+{
+ [[NSBezierPath bezierPathWithRect:self.bounds] stroke];
+}
@end
diff --git a/MathPad/MPPowerTerm.h b/MathKit/MPPowerTerm.h
similarity index 100%
rename from MathPad/MPPowerTerm.h
rename to MathKit/MPPowerTerm.h
diff --git a/MathPad/MPPowerTerm.m b/MathKit/MPPowerTerm.m
similarity index 100%
rename from MathPad/MPPowerTerm.m
rename to MathKit/MPPowerTerm.m
diff --git a/MathPad/MPProductTerm.h b/MathKit/MPProductTerm.h
similarity index 100%
rename from MathPad/MPProductTerm.h
rename to MathKit/MPProductTerm.h
diff --git a/MathPad/MPProductTerm.m b/MathKit/MPProductTerm.m
similarity index 100%
rename from MathPad/MPProductTerm.m
rename to MathKit/MPProductTerm.m
diff --git a/MathPad/MPRangePath.h b/MathKit/MPRangePath.h
similarity index 100%
rename from MathPad/MPRangePath.h
rename to MathKit/MPRangePath.h
diff --git a/MathPad/MPRangePath.m b/MathKit/MPRangePath.m
similarity index 100%
rename from MathPad/MPRangePath.m
rename to MathKit/MPRangePath.m
diff --git a/MathPad/MPSumFunction.h b/MathKit/MPSumFunction.h
similarity index 100%
rename from MathPad/MPSumFunction.h
rename to MathKit/MPSumFunction.h
diff --git a/MathPad/MPSumFunction.m b/MathKit/MPSumFunction.m
similarity index 100%
rename from MathPad/MPSumFunction.m
rename to MathKit/MPSumFunction.m
diff --git a/MathPad/MPSumFunctionLayout.h b/MathKit/MPSumFunctionLayout.h
similarity index 100%
rename from MathPad/MPSumFunctionLayout.h
rename to MathKit/MPSumFunctionLayout.h
diff --git a/MathPad/MPSumFunctionLayout.m b/MathKit/MPSumFunctionLayout.m
similarity index 100%
rename from MathPad/MPSumFunctionLayout.m
rename to MathKit/MPSumFunctionLayout.m
diff --git a/MathPad/MPSumFunctionTerm.h b/MathKit/MPSumFunctionTerm.h
similarity index 100%
rename from MathPad/MPSumFunctionTerm.h
rename to MathKit/MPSumFunctionTerm.h
diff --git a/MathPad/MPSumFunctionTerm.m b/MathKit/MPSumFunctionTerm.m
similarity index 100%
rename from MathPad/MPSumFunctionTerm.m
rename to MathKit/MPSumFunctionTerm.m
diff --git a/MathPad/MPSumTerm.h b/MathKit/MPSumTerm.h
similarity index 100%
rename from MathPad/MPSumTerm.h
rename to MathKit/MPSumTerm.h
diff --git a/MathPad/MPSumTerm.m b/MathKit/MPSumTerm.m
similarity index 100%
rename from MathPad/MPSumTerm.m
rename to MathKit/MPSumTerm.m
diff --git a/MathPad/MPTerm.h b/MathKit/MPTerm.h
similarity index 100%
rename from MathPad/MPTerm.h
rename to MathKit/MPTerm.h
diff --git a/MathPad/MPTerm.m b/MathKit/MPTerm.m
similarity index 100%
rename from MathPad/MPTerm.m
rename to MathKit/MPTerm.m
diff --git a/MathPad/MPToken.h b/MathKit/MPToken.h
similarity index 100%
rename from MathPad/MPToken.h
rename to MathKit/MPToken.h
diff --git a/MathPad/MPToken.m b/MathKit/MPToken.m
similarity index 100%
rename from MathPad/MPToken.m
rename to MathKit/MPToken.m
diff --git a/MathPad/MPVariable.h b/MathKit/MPVariable.h
similarity index 100%
rename from MathPad/MPVariable.h
rename to MathKit/MPVariable.h
diff --git a/MathPad/MPVariable.m b/MathKit/MPVariable.m
similarity index 100%
rename from MathPad/MPVariable.m
rename to MathKit/MPVariable.m
diff --git a/MathPad/MPWhiteView.h b/MathKit/MPWhiteView.h
similarity index 100%
rename from MathPad/MPWhiteView.h
rename to MathKit/MPWhiteView.h
diff --git a/MathPad/MPWhiteView.m b/MathKit/MPWhiteView.m
similarity index 100%
rename from MathPad/MPWhiteView.m
rename to MathKit/MPWhiteView.m
diff --git a/MathPad/NSIndexPath+MPAdditions.h b/MathKit/NSIndexPath+MPAdditions.h
similarity index 100%
rename from MathPad/NSIndexPath+MPAdditions.h
rename to MathKit/NSIndexPath+MPAdditions.h
diff --git a/MathPad/NSIndexPath+MPAdditions.m b/MathKit/NSIndexPath+MPAdditions.m
similarity index 100%
rename from MathPad/NSIndexPath+MPAdditions.m
rename to MathKit/NSIndexPath+MPAdditions.m
diff --git a/MathPad/NSRegularExpression+MPParsingAdditions.h b/MathKit/NSRegularExpression+MPParsingAdditions.h
similarity index 100%
rename from MathPad/NSRegularExpression+MPParsingAdditions.h
rename to MathKit/NSRegularExpression+MPParsingAdditions.h
diff --git a/MathPad/NSRegularExpression+MPParsingAdditions.m b/MathKit/NSRegularExpression+MPParsingAdditions.m
similarity index 100%
rename from MathPad/NSRegularExpression+MPParsingAdditions.m
rename to MathKit/NSRegularExpression+MPParsingAdditions.m
diff --git a/MathPad/NSString+MPExpressionElement.h b/MathKit/NSString+MPExpressionElement.h
similarity index 100%
rename from MathPad/NSString+MPExpressionElement.h
rename to MathKit/NSString+MPExpressionElement.h
diff --git a/MathPad/NSString+MPExpressionElement.m b/MathKit/NSString+MPExpressionElement.m
similarity index 100%
rename from MathPad/NSString+MPExpressionElement.m
rename to MathKit/NSString+MPExpressionElement.m
diff --git a/MathPad.xcodeproj/project.pbxproj b/MathPad.xcodeproj/project.pbxproj
index e7cc05b..d544b93 100644
--- a/MathPad.xcodeproj/project.pbxproj
+++ b/MathPad.xcodeproj/project.pbxproj
@@ -8,105 +8,105 @@
/* Begin PBXBuildFile section */
3B52CEC119BB9FA900CEDCFC /* MathKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B85830D19BB5E5500D76A8D /* MathKit.framework */; };
- 3B52CEDC19BEE63000CEDCFC /* NSRegularExpression+MPParsingAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 3B52CEDA19BEE63000CEDCFC /* NSRegularExpression+MPParsingAdditions.h */; };
- 3B52CEDD19BEE63000CEDCFC /* NSRegularExpression+MPParsingAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 3B52CEDB19BEE63000CEDCFC /* NSRegularExpression+MPParsingAdditions.m */; };
- 3B591BBB19C58D000061D86B /* MPMathRules.h in Headers */ = {isa = PBXBuildFile; fileRef = 3B591BB919C58D000061D86B /* MPMathRules.h */; };
- 3B591BBC19C58D000061D86B /* MPMathRules.m in Sources */ = {isa = PBXBuildFile; fileRef = 3B591BBA19C58D000061D86B /* MPMathRules.m */; };
- 3B5FF73B19DB2FF500C8348A /* MPPowerFunction.h in Headers */ = {isa = PBXBuildFile; fileRef = 3B5FF73919DB2FF500C8348A /* MPPowerFunction.h */; };
- 3B5FF73C19DB2FF500C8348A /* MPPowerFunction.m in Sources */ = {isa = PBXBuildFile; fileRef = 3B5FF73A19DB2FF500C8348A /* MPPowerFunction.m */; };
- 3B69B66C19DB41B90028E608 /* MPPowerFunctionLayout.h in Headers */ = {isa = PBXBuildFile; fileRef = 3B69B66A19DB41B90028E608 /* MPPowerFunctionLayout.h */; };
- 3B69B66D19DB41B90028E608 /* MPPowerFunctionLayout.m in Sources */ = {isa = PBXBuildFile; fileRef = 3B69B66B19DB41B90028E608 /* MPPowerFunctionLayout.m */; };
- 3B69B67C19E4915E0028E608 /* MPFractionFunction.h in Headers */ = {isa = PBXBuildFile; fileRef = 3B69B67A19E4915E0028E608 /* MPFractionFunction.h */; };
- 3B69B67D19E4915E0028E608 /* MPFractionFunction.m in Sources */ = {isa = PBXBuildFile; fileRef = 3B69B67B19E4915E0028E608 /* MPFractionFunction.m */; };
- 3B69B68019E493630028E608 /* MPFractionFunctionLayout.h in Headers */ = {isa = PBXBuildFile; fileRef = 3B69B67E19E493630028E608 /* MPFractionFunctionLayout.h */; };
- 3B69B68119E493630028E608 /* MPFractionFunctionLayout.m in Sources */ = {isa = PBXBuildFile; fileRef = 3B69B67F19E493630028E608 /* MPFractionFunctionLayout.m */; };
- 3B69B69D19E6F2110028E608 /* MPNumber.h in Headers */ = {isa = PBXBuildFile; fileRef = 3B69B69B19E6F2110028E608 /* MPNumber.h */; };
- 3B69B69E19E6F2110028E608 /* MPNumber.m in Sources */ = {isa = PBXBuildFile; fileRef = 3B69B69C19E6F2110028E608 /* MPNumber.m */; };
- 3B69B6A119E6F2420028E608 /* MPVariable.h in Headers */ = {isa = PBXBuildFile; fileRef = 3B69B69F19E6F2420028E608 /* MPVariable.h */; };
- 3B69B6A219E6F2420028E608 /* MPVariable.m in Sources */ = {isa = PBXBuildFile; fileRef = 3B69B6A019E6F2420028E608 /* MPVariable.m */; };
- 3B69B6BD19E948740028E608 /* MPElementaryFunctionTerm.h in Headers */ = {isa = PBXBuildFile; fileRef = 3B69B6BB19E948740028E608 /* MPElementaryFunctionTerm.h */; };
- 3B69B6BE19E948740028E608 /* MPElementaryFunctionTerm.m in Sources */ = {isa = PBXBuildFile; fileRef = 3B69B6BC19E948740028E608 /* MPElementaryFunctionTerm.m */; };
+ 3B6338351A3A4B5800698BFB /* MPExpression.h in Headers */ = {isa = PBXBuildFile; fileRef = 3B6338321A3A4B5800698BFB /* MPExpression.h */; };
+ 3B6338361A3A4B5800698BFB /* MPExpression.m in Sources */ = {isa = PBXBuildFile; fileRef = 3B6338331A3A4B5800698BFB /* MPExpression.m */; };
+ 3B6338371A3A4B5800698BFB /* MPExpressionElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 3B6338341A3A4B5800698BFB /* MPExpressionElement.h */; };
+ 3B63383A1A3A4B7600698BFB /* NSString+MPExpressionElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 3B6338381A3A4B7600698BFB /* NSString+MPExpressionElement.h */; };
+ 3B63383B1A3A4B7600698BFB /* NSString+MPExpressionElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 3B6338391A3A4B7600698BFB /* NSString+MPExpressionElement.m */; };
+ 3B63383E1A3A4B8500698BFB /* MPToken.h in Headers */ = {isa = PBXBuildFile; fileRef = 3B63383C1A3A4B8500698BFB /* MPToken.h */; };
+ 3B63383F1A3A4B8500698BFB /* MPToken.m in Sources */ = {isa = PBXBuildFile; fileRef = 3B63383D1A3A4B8500698BFB /* MPToken.m */; };
+ 3B6338421A3A4B9500698BFB /* MPFunction.h in Headers */ = {isa = PBXBuildFile; fileRef = 3B6338401A3A4B9500698BFB /* MPFunction.h */; };
+ 3B6338431A3A4B9500698BFB /* MPFunction.m in Sources */ = {isa = PBXBuildFile; fileRef = 3B6338411A3A4B9500698BFB /* MPFunction.m */; };
+ 3B6338461A3A4BA500698BFB /* MPExpressionTokenizer.h in Headers */ = {isa = PBXBuildFile; fileRef = 3B6338441A3A4BA500698BFB /* MPExpressionTokenizer.h */; };
+ 3B6338471A3A4BA500698BFB /* MPExpressionTokenizer.m in Sources */ = {isa = PBXBuildFile; fileRef = 3B6338451A3A4BA500698BFB /* MPExpressionTokenizer.m */; };
+ 3B63384A1A3A4BB300698BFB /* MPFunction+MPToken.h in Headers */ = {isa = PBXBuildFile; fileRef = 3B6338481A3A4BB300698BFB /* MPFunction+MPToken.h */; };
+ 3B63384B1A3A4BB300698BFB /* MPFunction+MPToken.m in Sources */ = {isa = PBXBuildFile; fileRef = 3B6338491A3A4BB300698BFB /* MPFunction+MPToken.m */; };
+ 3B6338501A3A4BD100698BFB /* MPParenthesisFunction.h in Headers */ = {isa = PBXBuildFile; fileRef = 3B63384C1A3A4BD100698BFB /* MPParenthesisFunction.h */; };
+ 3B6338511A3A4BD100698BFB /* MPParenthesisFunction.m in Sources */ = {isa = PBXBuildFile; fileRef = 3B63384D1A3A4BD100698BFB /* MPParenthesisFunction.m */; };
+ 3B6338521A3A4BD100698BFB /* MPSumFunction.h in Headers */ = {isa = PBXBuildFile; fileRef = 3B63384E1A3A4BD100698BFB /* MPSumFunction.h */; };
+ 3B6338531A3A4BD100698BFB /* MPSumFunction.m in Sources */ = {isa = PBXBuildFile; fileRef = 3B63384F1A3A4BD100698BFB /* MPSumFunction.m */; };
+ 3B6338581A3A4BE800698BFB /* MPFractionFunction.h in Headers */ = {isa = PBXBuildFile; fileRef = 3B6338541A3A4BE800698BFB /* MPFractionFunction.h */; };
+ 3B6338591A3A4BE800698BFB /* MPFractionFunction.m in Sources */ = {isa = PBXBuildFile; fileRef = 3B6338551A3A4BE800698BFB /* MPFractionFunction.m */; };
+ 3B63385A1A3A4BE800698BFB /* MPPowerFunction.h in Headers */ = {isa = PBXBuildFile; fileRef = 3B6338561A3A4BE800698BFB /* MPPowerFunction.h */; };
+ 3B63385B1A3A4BE800698BFB /* MPPowerFunction.m in Sources */ = {isa = PBXBuildFile; fileRef = 3B6338571A3A4BE800698BFB /* MPPowerFunction.m */; };
+ 3B63385E1A3A4C0700698BFB /* MPExpressionParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 3B63385C1A3A4C0700698BFB /* MPExpressionParser.h */; };
+ 3B63385F1A3A4C0700698BFB /* MPExpressionParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 3B63385D1A3A4C0700698BFB /* MPExpressionParser.m */; };
+ 3B63386C1A3A4C2B00698BFB /* MPNegatedTerm.h in Headers */ = {isa = PBXBuildFile; fileRef = 3B6338601A3A4C2B00698BFB /* MPNegatedTerm.h */; };
+ 3B63386D1A3A4C2B00698BFB /* MPNegatedTerm.m in Sources */ = {isa = PBXBuildFile; fileRef = 3B6338611A3A4C2B00698BFB /* MPNegatedTerm.m */; };
+ 3B63386E1A3A4C2B00698BFB /* MPNumber.h in Headers */ = {isa = PBXBuildFile; fileRef = 3B6338621A3A4C2B00698BFB /* MPNumber.h */; };
+ 3B63386F1A3A4C2B00698BFB /* MPNumber.m in Sources */ = {isa = PBXBuildFile; fileRef = 3B6338631A3A4C2B00698BFB /* MPNumber.m */; };
+ 3B6338701A3A4C2B00698BFB /* MPParenthesisTerm.h in Headers */ = {isa = PBXBuildFile; fileRef = 3B6338641A3A4C2B00698BFB /* MPParenthesisTerm.h */; };
+ 3B6338711A3A4C2B00698BFB /* MPParenthesisTerm.m in Sources */ = {isa = PBXBuildFile; fileRef = 3B6338651A3A4C2B00698BFB /* MPParenthesisTerm.m */; };
+ 3B6338721A3A4C2B00698BFB /* MPParsedExpression.h in Headers */ = {isa = PBXBuildFile; fileRef = 3B6338661A3A4C2B00698BFB /* MPParsedExpression.h */; };
+ 3B6338731A3A4C2B00698BFB /* MPParsedExpression.m in Sources */ = {isa = PBXBuildFile; fileRef = 3B6338671A3A4C2B00698BFB /* MPParsedExpression.m */; };
+ 3B6338741A3A4C2B00698BFB /* MPPowerTerm.h in Headers */ = {isa = PBXBuildFile; fileRef = 3B6338681A3A4C2B00698BFB /* MPPowerTerm.h */; };
+ 3B6338751A3A4C2B00698BFB /* MPPowerTerm.m in Sources */ = {isa = PBXBuildFile; fileRef = 3B6338691A3A4C2B00698BFB /* MPPowerTerm.m */; };
+ 3B6338761A3A4C2B00698BFB /* MPProductTerm.h in Headers */ = {isa = PBXBuildFile; fileRef = 3B63386A1A3A4C2B00698BFB /* MPProductTerm.h */; };
+ 3B6338771A3A4C2B00698BFB /* MPProductTerm.m in Sources */ = {isa = PBXBuildFile; fileRef = 3B63386B1A3A4C2B00698BFB /* MPProductTerm.m */; };
+ 3B63387E1A3A4C7E00698BFB /* MPSumTerm.h in Headers */ = {isa = PBXBuildFile; fileRef = 3B6338781A3A4C7E00698BFB /* MPSumTerm.h */; };
+ 3B63387F1A3A4C7E00698BFB /* MPSumTerm.m in Sources */ = {isa = PBXBuildFile; fileRef = 3B6338791A3A4C7E00698BFB /* MPSumTerm.m */; };
+ 3B6338801A3A4C7E00698BFB /* MPTerm.h in Headers */ = {isa = PBXBuildFile; fileRef = 3B63387A1A3A4C7E00698BFB /* MPTerm.h */; };
+ 3B6338811A3A4C7E00698BFB /* MPTerm.m in Sources */ = {isa = PBXBuildFile; fileRef = 3B63387B1A3A4C7E00698BFB /* MPTerm.m */; };
+ 3B6338821A3A4C7E00698BFB /* MPVariable.h in Headers */ = {isa = PBXBuildFile; fileRef = 3B63387C1A3A4C7E00698BFB /* MPVariable.h */; };
+ 3B6338831A3A4C7E00698BFB /* MPVariable.m in Sources */ = {isa = PBXBuildFile; fileRef = 3B63387D1A3A4C7E00698BFB /* MPVariable.m */; };
+ 3B6338861A3A4CA500698BFB /* MPFactorialTerm.h in Headers */ = {isa = PBXBuildFile; fileRef = 3B6338841A3A4CA500698BFB /* MPFactorialTerm.h */; };
+ 3B6338871A3A4CA500698BFB /* MPFactorialTerm.m in Sources */ = {isa = PBXBuildFile; fileRef = 3B6338851A3A4CA500698BFB /* MPFactorialTerm.m */; };
+ 3B63388A1A3A4CAF00698BFB /* MPElementaryFunctionTerm.h in Headers */ = {isa = PBXBuildFile; fileRef = 3B6338881A3A4CAF00698BFB /* MPElementaryFunctionTerm.h */; };
+ 3B63388B1A3A4CAF00698BFB /* MPElementaryFunctionTerm.m in Sources */ = {isa = PBXBuildFile; fileRef = 3B6338891A3A4CAF00698BFB /* MPElementaryFunctionTerm.m */; };
+ 3B63388E1A3A4CBE00698BFB /* MPFunctionTerm.h in Headers */ = {isa = PBXBuildFile; fileRef = 3B63388C1A3A4CBE00698BFB /* MPFunctionTerm.h */; };
+ 3B63388F1A3A4CBE00698BFB /* MPFunctionTerm.m in Sources */ = {isa = PBXBuildFile; fileRef = 3B63388D1A3A4CBE00698BFB /* MPFunctionTerm.m */; };
+ 3B6338921A3A4CCA00698BFB /* MPEvaluationContext.h in Headers */ = {isa = PBXBuildFile; fileRef = 3B6338901A3A4CCA00698BFB /* MPEvaluationContext.h */; };
+ 3B6338931A3A4CCA00698BFB /* MPEvaluationContext.m in Sources */ = {isa = PBXBuildFile; fileRef = 3B6338911A3A4CCA00698BFB /* MPEvaluationContext.m */; };
+ 3B6338961A3A4CD100698BFB /* MPMathRules.h in Headers */ = {isa = PBXBuildFile; fileRef = 3B6338941A3A4CD100698BFB /* MPMathRules.h */; };
+ 3B6338971A3A4CD100698BFB /* MPMathRules.m in Sources */ = {isa = PBXBuildFile; fileRef = 3B6338951A3A4CD100698BFB /* MPMathRules.m */; };
+ 3B63389A1A3A4CE100698BFB /* MPSumFunctionTerm.h in Headers */ = {isa = PBXBuildFile; fileRef = 3B6338981A3A4CE100698BFB /* MPSumFunctionTerm.h */; };
+ 3B63389B1A3A4CE100698BFB /* MPSumFunctionTerm.m in Sources */ = {isa = PBXBuildFile; fileRef = 3B6338991A3A4CE100698BFB /* MPSumFunctionTerm.m */; };
+ 3B63389E1A3A4CEF00698BFB /* MPFractionTerm.h in Headers */ = {isa = PBXBuildFile; fileRef = 3B63389C1A3A4CEF00698BFB /* MPFractionTerm.h */; };
+ 3B63389F1A3A4CEF00698BFB /* MPFractionTerm.m in Sources */ = {isa = PBXBuildFile; fileRef = 3B63389D1A3A4CEF00698BFB /* MPFractionTerm.m */; };
+ 3B6338A21A3A4CFC00698BFB /* MPRangePath.h in Headers */ = {isa = PBXBuildFile; fileRef = 3B6338A01A3A4CFC00698BFB /* MPRangePath.h */; };
+ 3B6338A31A3A4CFC00698BFB /* MPRangePath.m in Sources */ = {isa = PBXBuildFile; fileRef = 3B6338A11A3A4CFC00698BFB /* MPRangePath.m */; };
+ 3B6338A51A3A4D1200698BFB /* Fonts in Resources */ = {isa = PBXBuildFile; fileRef = 3B6338A41A3A4D1200698BFB /* Fonts */; };
+ 3B6338A81A3A4D2600698BFB /* NSIndexPath+MPAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 3B6338A61A3A4D2600698BFB /* NSIndexPath+MPAdditions.h */; };
+ 3B6338A91A3A4D2600698BFB /* NSIndexPath+MPAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 3B6338A71A3A4D2600698BFB /* NSIndexPath+MPAdditions.m */; };
+ 3B6338AC1A3A4D3000698BFB /* NSRegularExpression+MPParsingAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 3B6338AA1A3A4D3000698BFB /* NSRegularExpression+MPParsingAdditions.h */; };
+ 3B6338AD1A3A4D3000698BFB /* NSRegularExpression+MPParsingAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 3B6338AB1A3A4D3000698BFB /* NSRegularExpression+MPParsingAdditions.m */; };
+ 3B6338B01A3A4D6A00698BFB /* MPExpressionView.h in Headers */ = {isa = PBXBuildFile; fileRef = 3B6338AE1A3A4D6A00698BFB /* MPExpressionView.h */; };
+ 3B6338B11A3A4D6A00698BFB /* MPExpressionView.m in Sources */ = {isa = PBXBuildFile; fileRef = 3B6338AF1A3A4D6A00698BFB /* MPExpressionView.m */; };
+ 3B6338B41A3A4D7900698BFB /* MPExpressionStorage.h in Headers */ = {isa = PBXBuildFile; fileRef = 3B6338B21A3A4D7900698BFB /* MPExpressionStorage.h */; };
+ 3B6338B51A3A4D7900698BFB /* MPExpressionStorage.m in Sources */ = {isa = PBXBuildFile; fileRef = 3B6338B31A3A4D7900698BFB /* MPExpressionStorage.m */; };
+ 3B6338BB1A3A4D9400698BFB /* MPFunctionsViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = 3B6338B61A3A4D9400698BFB /* MPFunctionsViewController.h */; };
+ 3B6338BC1A3A4D9400698BFB /* MPFunctionsViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 3B6338B71A3A4D9400698BFB /* MPFunctionsViewController.m */; };
+ 3B6338BD1A3A4D9400698BFB /* MPFunctionsViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 3B6338B81A3A4D9400698BFB /* MPFunctionsViewController.xib */; };
+ 3B6338BE1A3A4D9400698BFB /* MPWhiteView.h in Headers */ = {isa = PBXBuildFile; fileRef = 3B6338B91A3A4D9400698BFB /* MPWhiteView.h */; };
+ 3B6338BF1A3A4D9400698BFB /* MPWhiteView.m in Sources */ = {isa = PBXBuildFile; fileRef = 3B6338BA1A3A4D9400698BFB /* MPWhiteView.m */; };
+ 3B6338C21A3A4DA500698BFB /* MPLayout.h in Headers */ = {isa = PBXBuildFile; fileRef = 3B6338C01A3A4DA500698BFB /* MPLayout.h */; };
+ 3B6338C31A3A4DA500698BFB /* MPLayout.m in Sources */ = {isa = PBXBuildFile; fileRef = 3B6338C11A3A4DA500698BFB /* MPLayout.m */; };
+ 3B6338C61A3A4DB600698BFB /* MPExpressionLayout.h in Headers */ = {isa = PBXBuildFile; fileRef = 3B6338C41A3A4DB600698BFB /* MPExpressionLayout.h */; };
+ 3B6338C71A3A4DB600698BFB /* MPExpressionLayout.m in Sources */ = {isa = PBXBuildFile; fileRef = 3B6338C51A3A4DB600698BFB /* MPExpressionLayout.m */; };
+ 3B6338CA1A3A4DC400698BFB /* MPFunctionLayout.h in Headers */ = {isa = PBXBuildFile; fileRef = 3B6338C81A3A4DC400698BFB /* MPFunctionLayout.h */; };
+ 3B6338CB1A3A4DC400698BFB /* MPFunctionLayout.m in Sources */ = {isa = PBXBuildFile; fileRef = 3B6338C91A3A4DC400698BFB /* MPFunctionLayout.m */; };
+ 3B6338D41A3A4DE100698BFB /* MPFractionFunctionLayout.h in Headers */ = {isa = PBXBuildFile; fileRef = 3B6338CC1A3A4DE100698BFB /* MPFractionFunctionLayout.h */; };
+ 3B6338D51A3A4DE100698BFB /* MPFractionFunctionLayout.m in Sources */ = {isa = PBXBuildFile; fileRef = 3B6338CD1A3A4DE100698BFB /* MPFractionFunctionLayout.m */; };
+ 3B6338D61A3A4DE100698BFB /* MPParenthesisFunctionLayout.h in Headers */ = {isa = PBXBuildFile; fileRef = 3B6338CE1A3A4DE100698BFB /* MPParenthesisFunctionLayout.h */; };
+ 3B6338D71A3A4DE100698BFB /* MPParenthesisFunctionLayout.m in Sources */ = {isa = PBXBuildFile; fileRef = 3B6338CF1A3A4DE100698BFB /* MPParenthesisFunctionLayout.m */; };
+ 3B6338D81A3A4DE100698BFB /* MPPowerFunctionLayout.h in Headers */ = {isa = PBXBuildFile; fileRef = 3B6338D01A3A4DE100698BFB /* MPPowerFunctionLayout.h */; };
+ 3B6338D91A3A4DE100698BFB /* MPPowerFunctionLayout.m in Sources */ = {isa = PBXBuildFile; fileRef = 3B6338D11A3A4DE100698BFB /* MPPowerFunctionLayout.m */; };
+ 3B6338DA1A3A4DE100698BFB /* MPSumFunctionLayout.h in Headers */ = {isa = PBXBuildFile; fileRef = 3B6338D21A3A4DE100698BFB /* MPSumFunctionLayout.h */; };
+ 3B6338DB1A3A4DE100698BFB /* MPSumFunctionLayout.m in Sources */ = {isa = PBXBuildFile; fileRef = 3B6338D31A3A4DE100698BFB /* MPSumFunctionLayout.m */; };
3B7172EA19C7147000FEAA5B /* FunctionsButtonDisclosure@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 3B7172E819C7147000FEAA5B /* FunctionsButtonDisclosure@2x.png */; };
3B7172EB19C7147000FEAA5B /* FunctionsButtonDisclosure.png in Resources */ = {isa = PBXBuildFile; fileRef = 3B7172E919C7147000FEAA5B /* FunctionsButtonDisclosure.png */; };
- 3B7172EE19C9FA8E00FEAA5B /* MPParenthesisFunction.h in Headers */ = {isa = PBXBuildFile; fileRef = 3B7172EC19C9FA8E00FEAA5B /* MPParenthesisFunction.h */; };
- 3B7172EF19C9FA8E00FEAA5B /* MPParenthesisFunction.m in Sources */ = {isa = PBXBuildFile; fileRef = 3B7172ED19C9FA8E00FEAA5B /* MPParenthesisFunction.m */; };
- 3B7172F219C9FC6700FEAA5B /* MPParenthesisFunctionLayout.h in Headers */ = {isa = PBXBuildFile; fileRef = 3B7172F019C9FC6700FEAA5B /* MPParenthesisFunctionLayout.h */; };
- 3B7172F319C9FC6700FEAA5B /* MPParenthesisFunctionLayout.m in Sources */ = {isa = PBXBuildFile; fileRef = 3B7172F119C9FC6700FEAA5B /* MPParenthesisFunctionLayout.m */; };
3B74BFB319A4C51800E5B5DE /* CoreText.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B74BFB219A4C51800E5B5DE /* CoreText.framework */; };
- 3B78C85419C2DA5300516335 /* MPEvaluationContext.h in Headers */ = {isa = PBXBuildFile; fileRef = 3B78C85219C2DA5300516335 /* MPEvaluationContext.h */; };
- 3B78C85519C2DA5300516335 /* MPEvaluationContext.m in Sources */ = {isa = PBXBuildFile; fileRef = 3B78C85319C2DA5300516335 /* MPEvaluationContext.m */; };
- 3B7B3A1819CC44E4005849E5 /* MPExpressionTokenizer.h in Headers */ = {isa = PBXBuildFile; fileRef = 3B7B3A1619CC44E4005849E5 /* MPExpressionTokenizer.h */; settings = {ATTRIBUTES = (Private, ); }; };
- 3B7B3A1919CC44E4005849E5 /* MPExpressionTokenizer.m in Sources */ = {isa = PBXBuildFile; fileRef = 3B7B3A1719CC44E4005849E5 /* MPExpressionTokenizer.m */; };
- 3B7B3A2C19CC467E005849E5 /* MPToken.h in Headers */ = {isa = PBXBuildFile; fileRef = 3B7B3A2A19CC467E005849E5 /* MPToken.h */; };
- 3B7B3A2D19CC467E005849E5 /* MPToken.m in Sources */ = {isa = PBXBuildFile; fileRef = 3B7B3A2B19CC467E005849E5 /* MPToken.m */; };
- 3B7B3A5419CC50B1005849E5 /* MPFunction+MPToken.h in Headers */ = {isa = PBXBuildFile; fileRef = 3B7B3A5219CC50B1005849E5 /* MPFunction+MPToken.h */; };
- 3B7B3A5519CC50B1005849E5 /* MPFunction+MPToken.m in Sources */ = {isa = PBXBuildFile; fileRef = 3B7B3A5319CC50B1005849E5 /* MPFunction+MPToken.m */; };
3B85830E19BB5E5500D76A8D /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3BF9976E18DE623E009CF6C4 /* Cocoa.framework */; };
3B85831419BB5E5500D76A8D /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 3B85831219BB5E5500D76A8D /* InfoPlist.strings */; };
3B85831E19BB5E5500D76A8D /* XCTest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3BF9979018DE623E009CF6C4 /* XCTest.framework */; };
3B85831F19BB5E5500D76A8D /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3BF9976E18DE623E009CF6C4 /* Cocoa.framework */; };
3B85832219BB5E5500D76A8D /* MathKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B85830D19BB5E5500D76A8D /* MathKit.framework */; };
3B85832819BB5E5500D76A8D /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 3B85832619BB5E5500D76A8D /* InfoPlist.strings */; };
- 3B85833819BB63BD00D76A8D /* MPExpression.h in Headers */ = {isa = PBXBuildFile; fileRef = 3BFAC38D1997B61300B3EF67 /* MPExpression.h */; settings = {ATTRIBUTES = (Public, ); }; };
- 3B85833919BB63C500D76A8D /* MPExpressionElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 3BFAC3961997B67400B3EF67 /* MPExpressionElement.h */; settings = {ATTRIBUTES = (Public, ); }; };
- 3B85833A19BB63D400D76A8D /* MPFunction.h in Headers */ = {isa = PBXBuildFile; fileRef = 3B87E35E19009D5F00259938 /* MPFunction.h */; settings = {ATTRIBUTES = (Public, ); }; };
- 3B85834119BB651E00D76A8D /* MPRangePath.h in Headers */ = {isa = PBXBuildFile; fileRef = 3B87E35B1900933200259938 /* MPRangePath.h */; settings = {ATTRIBUTES = (Public, ); }; };
- 3B85834319BB653700D76A8D /* MPSumFunction.h in Headers */ = {isa = PBXBuildFile; fileRef = 3BB09EC71906FD830080A5ED /* MPSumFunction.h */; settings = {ATTRIBUTES = (Public, ); }; };
- 3B85834419BB654D00D76A8D /* NSString+MPExpressionElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 3BFAC39A1997BC7600B3EF67 /* NSString+MPExpressionElement.h */; settings = {ATTRIBUTES = (Public, ); }; };
- 3B85834519BB655200D76A8D /* NSIndexPath+MPAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 3BB09EDC190728220080A5ED /* NSIndexPath+MPAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; };
- 3B85834619BB655C00D76A8D /* MPExpressionView.h in Headers */ = {isa = PBXBuildFile; fileRef = 3B87E3541900856F00259938 /* MPExpressionView.h */; settings = {ATTRIBUTES = (Public, ); }; };
- 3B85834719BB655F00D76A8D /* MPExpressionStorage.h in Headers */ = {isa = PBXBuildFile; fileRef = 3BB09EB01905DE500080A5ED /* MPExpressionStorage.h */; settings = {ATTRIBUTES = (Public, ); }; };
- 3B85834819BB65B600D76A8D /* MPLayout.h in Headers */ = {isa = PBXBuildFile; fileRef = 3B528D0D199417740054DB5F /* MPLayout.h */; };
- 3B85834919BB65B600D76A8D /* MPExpressionLayout.h in Headers */ = {isa = PBXBuildFile; fileRef = 3B528D0E199417E10054DB5F /* MPExpressionLayout.h */; };
- 3B85834A19BB65B600D76A8D /* MPFunctionLayout.h in Headers */ = {isa = PBXBuildFile; fileRef = 3B528D11199417E90054DB5F /* MPFunctionLayout.h */; };
- 3B85834B19BB65B600D76A8D /* MPSumFunctionLayout.h in Headers */ = {isa = PBXBuildFile; fileRef = 3BB09EDF190736160080A5ED /* MPSumFunctionLayout.h */; };
3B85834C19BB661100D76A8D /* MathKit.h in Headers */ = {isa = PBXBuildFile; fileRef = 3B85833219BB5F2D00D76A8D /* MathKit.h */; settings = {ATTRIBUTES = (Public, ); }; };
- 3B9265C71A2147DF00AD2809 /* MPNegatedTerm.h in Headers */ = {isa = PBXBuildFile; fileRef = 3B9265C51A2147DF00AD2809 /* MPNegatedTerm.h */; };
- 3B9265C81A2147DF00AD2809 /* MPNegatedTerm.m in Sources */ = {isa = PBXBuildFile; fileRef = 3B9265C61A2147DF00AD2809 /* MPNegatedTerm.m */; };
3BBEA92C19BB680B00133766 /* MathKit.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 3B85830D19BB5E5500D76A8D /* MathKit.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; };
- 3BBEA93519BB79A700133766 /* MPExpression.m in Sources */ = {isa = PBXBuildFile; fileRef = 3BFAC38E1997B61300B3EF67 /* MPExpression.m */; };
- 3BBEA93619BB79A700133766 /* MPFunction.m in Sources */ = {isa = PBXBuildFile; fileRef = 3B87E35F19009D5F00259938 /* MPFunction.m */; };
- 3BBEA93A19BB79A700133766 /* MPSumFunction.m in Sources */ = {isa = PBXBuildFile; fileRef = 3BB09EC81906FD830080A5ED /* MPSumFunction.m */; };
- 3BBEA93B19BB79A700133766 /* MPRangePath.m in Sources */ = {isa = PBXBuildFile; fileRef = 3B87E35C1900933200259938 /* MPRangePath.m */; };
- 3BBEA93D19BB79A700133766 /* NSString+MPExpressionElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 3BFAC39B1997BC7600B3EF67 /* NSString+MPExpressionElement.m */; };
- 3BBEA93E19BB79A700133766 /* NSIndexPath+MPAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 3BB09EDD190728220080A5ED /* NSIndexPath+MPAdditions.m */; };
- 3BBEA93F19BB79A700133766 /* MPExpressionView.m in Sources */ = {isa = PBXBuildFile; fileRef = 3B87E3551900856F00259938 /* MPExpressionView.m */; };
- 3BBEA94019BB79A700133766 /* MPExpressionStorage.m in Sources */ = {isa = PBXBuildFile; fileRef = 3BB09EB11905DE500080A5ED /* MPExpressionStorage.m */; };
- 3BBEA94119BB79A700133766 /* MPLayout.m in Sources */ = {isa = PBXBuildFile; fileRef = 3B688D9819982DF50006B4AB /* MPLayout.m */; };
- 3BBEA94219BB79A700133766 /* MPExpressionLayout.m in Sources */ = {isa = PBXBuildFile; fileRef = 3B528D0F199417E10054DB5F /* MPExpressionLayout.m */; };
- 3BBEA94319BB79A700133766 /* MPFunctionLayout.m in Sources */ = {isa = PBXBuildFile; fileRef = 3B528D12199417E90054DB5F /* MPFunctionLayout.m */; };
- 3BBEA94419BB79A700133766 /* MPSumFunctionLayout.m in Sources */ = {isa = PBXBuildFile; fileRef = 3BB09EE0190736160080A5ED /* MPSumFunctionLayout.m */; };
3BBEA94F19BB79EF00133766 /* MPExpressionTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 3B0F69AB1902A82C00817707 /* MPExpressionTests.m */; };
3BBEA95019BB79EF00133766 /* MPRangeTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 3BBBA3941905704200824E74 /* MPRangeTests.m */; };
3BC4660B19B2425A0033F13A /* MPDocument.xib in Resources */ = {isa = PBXBuildFile; fileRef = 3BF9978318DE623E009CF6C4 /* MPDocument.xib */; };
- 3BC4661419B245C60033F13A /* Fonts in Resources */ = {isa = PBXBuildFile; fileRef = 3BC4661319B245C60033F13A /* Fonts */; };
- 3BCA0C801A12619500C9E3E0 /* MPTerm.h in Headers */ = {isa = PBXBuildFile; fileRef = 3BCA0C7E1A12619500C9E3E0 /* MPTerm.h */; };
- 3BCA0C811A12619500C9E3E0 /* MPTerm.m in Sources */ = {isa = PBXBuildFile; fileRef = 3BCA0C7F1A12619500C9E3E0 /* MPTerm.m */; };
- 3BCA0C851A1405C000C9E3E0 /* MPFunctionTerm.h in Headers */ = {isa = PBXBuildFile; fileRef = 3BCA0C831A1405C000C9E3E0 /* MPFunctionTerm.h */; };
- 3BCA0C861A1405C000C9E3E0 /* MPFunctionTerm.m in Sources */ = {isa = PBXBuildFile; fileRef = 3BCA0C841A1405C000C9E3E0 /* MPFunctionTerm.m */; };
- 3BEFF74D1A16A4DA00301C0C /* MPSumTerm.h in Headers */ = {isa = PBXBuildFile; fileRef = 3BEFF74B1A16A4DA00301C0C /* MPSumTerm.h */; };
- 3BEFF74E1A16A4DA00301C0C /* MPSumTerm.m in Sources */ = {isa = PBXBuildFile; fileRef = 3BEFF74C1A16A4DA00301C0C /* MPSumTerm.m */; };
- 3BEFF7511A16B06600301C0C /* MPParsedExpression.h in Headers */ = {isa = PBXBuildFile; fileRef = 3BEFF74F1A16B06600301C0C /* MPParsedExpression.h */; };
- 3BEFF7521A16B06600301C0C /* MPParsedExpression.m in Sources */ = {isa = PBXBuildFile; fileRef = 3BEFF7501A16B06600301C0C /* MPParsedExpression.m */; };
- 3BEFF7551A17AA3200301C0C /* MPProductTerm.h in Headers */ = {isa = PBXBuildFile; fileRef = 3BEFF7531A17AA3200301C0C /* MPProductTerm.h */; };
- 3BEFF7561A17AA3200301C0C /* MPProductTerm.m in Sources */ = {isa = PBXBuildFile; fileRef = 3BEFF7541A17AA3200301C0C /* MPProductTerm.m */; };
- 3BEFF7621A1804AF00301C0C /* MPFactorialTerm.h in Headers */ = {isa = PBXBuildFile; fileRef = 3BEFF7601A1804AF00301C0C /* MPFactorialTerm.h */; };
- 3BEFF7631A1804AF00301C0C /* MPFactorialTerm.m in Sources */ = {isa = PBXBuildFile; fileRef = 3BEFF7611A1804AF00301C0C /* MPFactorialTerm.m */; };
- 3BEFF7661A18066300301C0C /* MPSumFunctionTerm.h in Headers */ = {isa = PBXBuildFile; fileRef = 3BEFF7641A18066300301C0C /* MPSumFunctionTerm.h */; };
- 3BEFF7671A18066300301C0C /* MPSumFunctionTerm.m in Sources */ = {isa = PBXBuildFile; fileRef = 3BEFF7651A18066300301C0C /* MPSumFunctionTerm.m */; };
- 3BEFF76A1A1807B000301C0C /* MPParenthesisTerm.h in Headers */ = {isa = PBXBuildFile; fileRef = 3BEFF7681A1807B000301C0C /* MPParenthesisTerm.h */; };
- 3BEFF76B1A1807B000301C0C /* MPParenthesisTerm.m in Sources */ = {isa = PBXBuildFile; fileRef = 3BEFF7691A1807B000301C0C /* MPParenthesisTerm.m */; };
- 3BEFF76E1A18083C00301C0C /* MPPowerTerm.h in Headers */ = {isa = PBXBuildFile; fileRef = 3BEFF76C1A18083C00301C0C /* MPPowerTerm.h */; };
- 3BEFF76F1A18083C00301C0C /* MPPowerTerm.m in Sources */ = {isa = PBXBuildFile; fileRef = 3BEFF76D1A18083C00301C0C /* MPPowerTerm.m */; };
- 3BEFF7721A180C8800301C0C /* MPFractionTerm.h in Headers */ = {isa = PBXBuildFile; fileRef = 3BEFF7701A180C8800301C0C /* MPFractionTerm.h */; };
- 3BEFF7731A180C8800301C0C /* MPFractionTerm.m in Sources */ = {isa = PBXBuildFile; fileRef = 3BEFF7711A180C8800301C0C /* MPFractionTerm.m */; };
- 3BF54BB91A18D08400883BFA /* MPExpressionParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 3BF54BB71A18D08400883BFA /* MPExpressionParser.h */; };
- 3BF54BBA1A18D08400883BFA /* MPExpressionParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 3BF54BB81A18D08400883BFA /* MPExpressionParser.m */; };
- 3BF59AFE19D80ECC00E54292 /* MPFunctionsViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = 3BF59AFB19D80ECC00E54292 /* MPFunctionsViewController.h */; };
- 3BF59AFF19D80ECC00E54292 /* MPFunctionsViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 3BF59AFC19D80ECC00E54292 /* MPFunctionsViewController.m */; };
- 3BF59B0019D80ECC00E54292 /* MPFunctionsViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 3BF59AFD19D80ECC00E54292 /* MPFunctionsViewController.xib */; };
- 3BF59B0319D81EE600E54292 /* MPWhiteView.h in Headers */ = {isa = PBXBuildFile; fileRef = 3BF59B0119D81EE600E54292 /* MPWhiteView.h */; };
- 3BF59B0419D81EE600E54292 /* MPWhiteView.m in Sources */ = {isa = PBXBuildFile; fileRef = 3BF59B0219D81EE600E54292 /* MPWhiteView.m */; };
3BF9976F18DE623E009CF6C4 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3BF9976E18DE623E009CF6C4 /* Cocoa.framework */; };
3BF9977918DE623E009CF6C4 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 3BF9977718DE623E009CF6C4 /* InfoPlist.strings */; };
3BF9977B18DE623E009CF6C4 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 3BF9977A18DE623E009CF6C4 /* main.m */; };
@@ -158,45 +158,94 @@
/* Begin PBXFileReference section */
3B0F69AB1902A82C00817707 /* MPExpressionTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = MPExpressionTests.m; path = ../MathPadTests/MPExpressionTests.m; sourceTree = "- @textblock -- convertIndexFromReferenceFrame:toReferenceFrame: - - convertIndexFromReferenceFrame:toReferenceFrame:offset: - @/textblock -- - There are three different types of items (reference frames): - symbols, tokens and elements. A symbol is the smalles possible - unit in an expression. Thus a token consists of one or more - symbols. Similarly an element consists of one or more tokens. - - @constant MPElementReferenceFrame - Specifies that items should be interpreted as elements. An - element is either a @c NSString object or a @c MPFunction object. - - @constant MPSymbolReferenceFrame - Specifies that items should be interpreted as symbols. A symbol - can be a single character (represented by the @c NSString class) - or a @c MPFunction object. - - @constant MPTokenReferenceFrame - Specifies that items should be interpreted as tokens. A token is - a logical unit of content in an expression. This can be a single - character (e.g. '+'), an arbitrary number of characters (e.g. a - number) or a @c MPFunction object. - - All tokens conform to the @c MPToken protocol. - */ -typedef NS_ENUM(NSUInteger, MPReferenceFrame) { - MPElementReferenceFrame, - MPSymbolReferenceFrame, - MPTokenReferenceFrame -}; - - - -@class MPExpression, MPFunction, MPRangePath, MPParsedExpression; -@protocol MPExpressionElement, MPToken; - - -/*! - @class MPExpression - @brief An @c MPExpression object is the base object for any mathematical - expression. - - @discussion Every expression consists of string elements (represented by the - @c NSString class) and function elements (represented by the @c - MPFunction class). Functions likewise can have expressions as - elements (also called children in this context). Both - expressions and functions are mutable. Through this organization - expression are organized in a tree-like structure called the - 'expression tree'. - - An expression can evaluate itself giving you either a - result or possibly an error if the expression was not constructed - correctly or could not be evaluated. - */ -@interface MPExpression : NSObject