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

@@ -29,6 +29,10 @@
3BBBA3951905704200824E74 /* 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 */; };
3BC46B4919B38C980033F13A /* MPExpressionEvaluator.m in Sources */ = {isa = PBXBuildFile; fileRef = 3BC46B4819B38C980033F13A /* MPExpressionEvaluator.m */; };
3BC46B5E19B8BE760033F13A /* MPMath.lm in Sources */ = {isa = PBXBuildFile; fileRef = 3BC46B5D19B8BE760033F13A /* MPMath.lm */; };
3BD98B2519B8F0670035852A /* MPMath.ym in Sources */ = {isa = PBXBuildFile; fileRef = 3BD98B2419B8F0670035852A /* MPMath.ym */; };
3BE9C4B319B9CC70002CC508 /* MPParsedElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 3BE9C4B219B9CC70002CC508 /* MPParsedElement.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 */; };
@@ -43,6 +47,33 @@
3BFAC39C1997BC7600B3EF67 /* NSString+MPExpressionElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 3BFAC39B1997BC7600B3EF67 /* NSString+MPExpressionElement.m */; };
/* End PBXBuildFile section */
/* Begin PBXBuildRule section */
3B225D2F19B9105E00520A4D /* PBXBuildRule */ = {
isa = PBXBuildRule;
compilerSpec = com.apple.compilers.proxy.script;
filePatterns = "*.lm";
fileType = pattern.proxy;
isEditable = 1;
outputFiles = (
"$(DERIVED_FILE_DIR)/$(INPUT_FILE_BASE).yy.h",
"$(DERIVED_FILE_DIR)/$(INPUT_FILE_BASE).yy.m",
);
script = "cd \"$INPUT_FILE_DIR\"\nflex -o \"$DERIVED_SOURCES_DIR/$INPUT_FILE_BASE.yy.m\" --header-file=\"$DERIVED_SOURCES_DIR/$INPUT_FILE_BASE.yy.h\" \"$INPUT_FILE_NAME\"";
};
3B225D3019B9154A00520A4D /* PBXBuildRule */ = {
isa = PBXBuildRule;
compilerSpec = com.apple.compilers.proxy.script;
filePatterns = "*.ym";
fileType = pattern.proxy;
isEditable = 1;
outputFiles = (
"$(DERIVED_FILE_DIR)/$(INPUT_FILE_BASE).tab.h",
"$(DERIVED_FILE_DIR)/$(INPUT_FILE_BASE).tab.m",
);
script = "cd \"$INPUT_FILE_DIR\"\nbison -o \"$DERIVED_SOURCES_DIR/$INPUT_FILE_BASE.tab.m\" --defines=\"$DERIVED_SOURCES_DIR/$INPUT_FILE_BASE.tab.h\" \"$INPUT_FILE_NAME\"";
};
/* End PBXBuildRule section */
/* Begin PBXContainerItemProxy section */
3BF9979318DE623E009CF6C4 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
@@ -57,6 +88,10 @@
3B0F69A719028BC600817707 /* MPException.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MPException.h; sourceTree = "<group>"; };
3B0F69A819028C6000817707 /* MPException.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPException.m; sourceTree = "<group>"; };
3B0F69AB1902A82C00817707 /* MPExpressionTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPExpressionTests.m; sourceTree = "<group>"; };
3B225D2C19B90F6A00520A4D /* MPMath.yy.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = MPMath.yy.m; path = "../../../../Library/Developer/Xcode/DerivedData/MathPad-egifwdrtxebksadhtzugiovuvzcy/Build/Intermediates/MathPad.build/Debug/MathPad.build/DerivedSources/MPMath.yy.m"; sourceTree = "<group>"; };
3B225D3119B9162E00520A4D /* MPMath.yy.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = MPMath.yy.h; path = "../../../../Library/Developer/Xcode/DerivedData/MathPad-egifwdrtxebksadhtzugiovuvzcy/Build/Intermediates/MathPad.build/Debug/MathPad.build/DerivedSources/MPMath.yy.h"; sourceTree = "<group>"; };
3B225D3219B9168600520A4D /* MPMath.tab.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = MPMath.tab.m; path = "../../../../Library/Developer/Xcode/DerivedData/MathPad-egifwdrtxebksadhtzugiovuvzcy/Build/Intermediates/MathPad.build/Debug/MathPad.build/DerivedSources/MPMath.tab.m"; sourceTree = "<group>"; };
3B225D3419B916D000520A4D /* MPMath.tab.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = MPMath.tab.h; path = "../../../../Library/Developer/Xcode/DerivedData/MathPad-egifwdrtxebksadhtzugiovuvzcy/Build/Intermediates/MathPad.build/Debug/MathPad.build/DerivedSources/MPMath.tab.h"; sourceTree = "<group>"; };
3B528D0D199417740054DB5F /* MPLayout.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPLayout.h; sourceTree = "<group>"; };
3B528D0E199417E10054DB5F /* MPExpressionLayout.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPExpressionLayout.h; sourceTree = "<group>"; };
3B528D0F199417E10054DB5F /* MPExpressionLayout.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPExpressionLayout.m; sourceTree = "<group>"; };
@@ -78,10 +113,19 @@
3BB09EDD190728220080A5ED /* NSIndexPath+MPAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSIndexPath+MPAdditions.m"; sourceTree = "<group>"; };
3BB09EDF190736160080A5ED /* MPSumFunctionLayout.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPSumFunctionLayout.h; sourceTree = "<group>"; };
3BB09EE0190736160080A5ED /* MPSumFunctionLayout.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPSumFunctionLayout.m; sourceTree = "<group>"; };
3BBBA3591903EA9B00824E74 /* MPModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MPModel.h; sourceTree = "<group>"; };
3BBBA38419047FC900824E74 /* MPView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MPView.h; sourceTree = "<group>"; };
3BBBA3941905704200824E74 /* MPRangeTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPRangeTests.m; sourceTree = "<group>"; };
3BC4661319B245C60033F13A /* Fonts */ = {isa = PBXFileReference; lastKnownFileType = folder; path = Fonts; sourceTree = "<group>"; };
3BC4661519B365070033F13A /* MPArrayCache.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPArrayCache.h; sourceTree = "<group>"; };
3BC4661619B365070033F13A /* MPArrayCache.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPArrayCache.m; sourceTree = "<group>"; };
3BC46B4719B38C980033F13A /* MPExpressionEvaluator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPExpressionEvaluator.h; sourceTree = "<group>"; };
3BC46B4819B38C980033F13A /* MPExpressionEvaluator.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPExpressionEvaluator.m; sourceTree = "<group>"; };
3BC46B5D19B8BE760033F13A /* MPMath.lm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.lex; path = MPMath.lm; sourceTree = "<group>"; };
3BD98B1E19B8CE490035852A /* libl.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libl.a; path = ../../../../../usr/lib/libl.a; sourceTree = "<group>"; };
3BD98B2419B8F0670035852A /* MPMath.ym */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.yacc; path = MPMath.ym; sourceTree = "<group>"; };
3BE9C4B019B91978002CC508 /* MPMath.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MPMath.h; sourceTree = "<group>"; };
3BE9C4B119B9CC70002CC508 /* MPParsedElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPParsedElement.h; sourceTree = "<group>"; };
3BE9C4B219B9CC70002CC508 /* MPParsedElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPParsedElement.m; sourceTree = "<group>"; };
3BF9976B18DE623E009CF6C4 /* MathPad.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = MathPad.app; sourceTree = BUILT_PRODUCTS_DIR; };
3BF9976E18DE623E009CF6C4 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; };
3BF9977118DE623E009CF6C4 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = System/Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; };
@@ -113,8 +157,8 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
3B74BFB319A4C51800E5B5DE /* CoreText.framework in Frameworks */,
3BF9976F18DE623E009CF6C4 /* Cocoa.framework in Frameworks */,
3B74BFB319A4C51800E5B5DE /* CoreText.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -133,21 +177,10 @@
3B87E350190082B300259938 /* Model */ = {
isa = PBXGroup;
children = (
3BBBA3591903EA9B00824E74 /* MPModel.h */,
3BFAC38D1997B61300B3EF67 /* MPExpression.h */,
3BFAC38E1997B61300B3EF67 /* MPExpression.m */,
3BFAC3961997B67400B3EF67 /* MPExpressionElement.h */,
3B87E35E19009D5F00259938 /* MPFunction.h */,
3B87E35F19009D5F00259938 /* MPFunction.m */,
3BFAC39A1997BC7600B3EF67 /* NSString+MPExpressionElement.h */,
3BFAC39B1997BC7600B3EF67 /* NSString+MPExpressionElement.m */,
3B87E35B1900933200259938 /* MPRangePath.h */,
3B87E35C1900933200259938 /* MPRangePath.m */,
3BB09EDC190728220080A5ED /* NSIndexPath+MPAdditions.h */,
3BB09EDD190728220080A5ED /* NSIndexPath+MPAdditions.m */,
3B0F69A719028BC600817707 /* MPException.h */,
3B0F69A819028C6000817707 /* MPException.m */,
3BC46B4B19B38CB60033F13A /* Base Expression Classes */,
3BC46B4C19B38CD20033F13A /* Independant Classes */,
3BB09EBC1905EF210080A5ED /* Functions */,
3BC46B4D19B38CFB0033F13A /* Helpers */,
);
name = Model;
sourceTree = "<group>";
@@ -225,6 +258,76 @@
name = "Function Layouts";
sourceTree = "<group>";
};
3BC4661819B3692A0033F13A /* Temp */ = {
isa = PBXGroup;
children = (
3BC4661519B365070033F13A /* MPArrayCache.h */,
3BC4661619B365070033F13A /* MPArrayCache.m */,
);
name = Temp;
sourceTree = "<group>";
};
3BC46B4B19B38CB60033F13A /* Base Expression Classes */ = {
isa = PBXGroup;
children = (
3BFAC38D1997B61300B3EF67 /* MPExpression.h */,
3BFAC38E1997B61300B3EF67 /* MPExpression.m */,
3BFAC3961997B67400B3EF67 /* MPExpressionElement.h */,
3B87E35E19009D5F00259938 /* MPFunction.h */,
3B87E35F19009D5F00259938 /* MPFunction.m */,
3BC46B4F19B506F20033F13A /* Evaluation */,
);
name = "Base Expression Classes";
sourceTree = "<group>";
};
3BC46B4C19B38CD20033F13A /* Independant Classes */ = {
isa = PBXGroup;
children = (
3B87E35B1900933200259938 /* MPRangePath.h */,
3B87E35C1900933200259938 /* MPRangePath.m */,
3B0F69A719028BC600817707 /* MPException.h */,
3B0F69A819028C6000817707 /* MPException.m */,
);
name = "Independant Classes";
sourceTree = "<group>";
};
3BC46B4D19B38CFB0033F13A /* Helpers */ = {
isa = PBXGroup;
children = (
3BFAC39A1997BC7600B3EF67 /* NSString+MPExpressionElement.h */,
3BFAC39B1997BC7600B3EF67 /* NSString+MPExpressionElement.m */,
3BB09EDC190728220080A5ED /* NSIndexPath+MPAdditions.h */,
3BB09EDD190728220080A5ED /* NSIndexPath+MPAdditions.m */,
);
name = Helpers;
sourceTree = "<group>";
};
3BC46B4F19B506F20033F13A /* Evaluation */ = {
isa = PBXGroup;
children = (
3BC46B5D19B8BE760033F13A /* MPMath.lm */,
3BD98B2419B8F0670035852A /* MPMath.ym */,
3BE9C4B019B91978002CC508 /* MPMath.h */,
3BD98B2619B8F3F10035852A /* Generated */,
3BC46B4719B38C980033F13A /* MPExpressionEvaluator.h */,
3BC46B4819B38C980033F13A /* MPExpressionEvaluator.m */,
3BE9C4B119B9CC70002CC508 /* MPParsedElement.h */,
3BE9C4B219B9CC70002CC508 /* MPParsedElement.m */,
);
name = Evaluation;
sourceTree = "<group>";
};
3BD98B2619B8F3F10035852A /* Generated */ = {
isa = PBXGroup;
children = (
3B225D3119B9162E00520A4D /* MPMath.yy.h */,
3B225D2C19B90F6A00520A4D /* MPMath.yy.m */,
3B225D3419B916D000520A4D /* MPMath.tab.h */,
3B225D3219B9168600520A4D /* MPMath.tab.m */,
);
name = Generated;
sourceTree = "<group>";
};
3BF9976218DE623E009CF6C4 = {
isa = PBXGroup;
children = (
@@ -247,6 +350,7 @@
3BF9976D18DE623E009CF6C4 /* Frameworks */ = {
isa = PBXGroup;
children = (
3BD98B1E19B8CE490035852A /* libl.a */,
3B74BFB219A4C51800E5B5DE /* CoreText.framework */,
3BF9976E18DE623E009CF6C4 /* Cocoa.framework */,
3BF9979018DE623E009CF6C4 /* XCTest.framework */,
@@ -268,6 +372,7 @@
3BF9977418DE623E009CF6C4 /* MathPad */ = {
isa = PBXGroup;
children = (
3BC4661819B3692A0033F13A /* Temp */,
3B87E350190082B300259938 /* Model */,
3B87E351190082BB00259938 /* View */,
3B87E352190082C000259938 /* Controller */,
@@ -320,6 +425,8 @@
3BF9976918DE623E009CF6C4 /* Resources */,
);
buildRules = (
3B225D3019B9154A00520A4D /* PBXBuildRule */,
3B225D2F19B9105E00520A4D /* PBXBuildRule */,
);
dependencies = (
);
@@ -368,6 +475,7 @@
knownRegions = (
en,
Base,
English,
);
mainGroup = 3BF9976218DE623E009CF6C4;
productRefGroup = 3BF9976C18DE623E009CF6C4 /* Products */;
@@ -409,8 +517,12 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
3BE9C4B319B9CC70002CC508 /* MPParsedElement.m in Sources */,
3B688D9919982DF50006B4AB /* MPLayout.m in Sources */,
3BD98B2519B8F0670035852A /* MPMath.ym in Sources */,
3BC46B5E19B8BE760033F13A /* MPMath.lm in Sources */,
3BB09EE1190736160080A5ED /* MPSumFunctionLayout.m in Sources */,
3BC46B4919B38C980033F13A /* MPExpressionEvaluator.m in Sources */,
3B87E3561900856F00259938 /* MPExpressionView.m in Sources */,
3BB09EC91906FD830080A5ED /* MPSumFunction.m in Sources */,
3BB09EB21905DE500080A5ED /* MPExpressionStorage.m in Sources */,
@@ -571,6 +683,7 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
COMBINE_HIDPI_IMAGES = YES;
FRAMEWORK_SEARCH_PATHS = "$(inherited)";
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "MathPad/MathPad-Prefix.pch";
INFOPLIST_FILE = "MathPad/MathPad-Info.plist";
@@ -584,6 +697,7 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
COMBINE_HIDPI_IMAGES = YES;
FRAMEWORK_SEARCH_PATHS = "$(inherited)";
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "MathPad/MathPad-Prefix.pch";
INFOPLIST_FILE = "MathPad/MathPad-Info.plist";