├── Parser Test ├── en.lproj │ ├── InfoPlist.strings │ └── ViewController.xib ├── Parser Test-Prefix.pch ├── ViewController.h ├── main.m ├── AppDelegate.h ├── Parser Test-Info.plist ├── ViewController.m └── AppDelegate.m ├── .gitignore ├── MessageBlocks.m ├── MessageBlocks.h ├── tokenizer.lm ├── parser.ym ├── README.md └── Parser Test.xcodeproj └── project.pbxproj /Parser Test/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Generic 2 | .DS_Store 3 | *.o 4 | *.a 5 | *.dylib 6 | *.gz 7 | *.tar 8 | *.tgz 9 | *~ 10 | 11 | # XCode 12 | build/* 13 | *.pbxuser 14 | *.mode?v3 15 | *.perspectivev3 16 | *.xcworkspace 17 | xcuserdata 18 | *.moved-aside 19 | -------------------------------------------------------------------------------- /MessageBlocks.m: -------------------------------------------------------------------------------- 1 | // 2 | // MessageBlocks.h 3 | // Parser Test 4 | // 5 | // Created by Edward Patel on 2012-03-28. 6 | // Copyright (c) 2012 Memention AB. All rights reserved. 7 | // 8 | 9 | void (^ParseTestSuccessBlock)(float value); 10 | void (^ParseTestFailBlock)(NSString *msg); 11 | -------------------------------------------------------------------------------- /Parser Test/Parser Test-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'Parser Test' target in the 'Parser Test' project 3 | // 4 | 5 | #import 6 | 7 | #ifndef __IPHONE_4_0 8 | #warning "This project uses features only available in iOS SDK 4.0 and later." 9 | #endif 10 | 11 | #ifdef __OBJC__ 12 | #import 13 | #import 14 | #endif 15 | -------------------------------------------------------------------------------- /Parser Test/ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.h 3 | // Parser Test 4 | // 5 | // Created by Edward Patel on 2012-03-28. 6 | // Copyright (c) 2012 Memention AB. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ViewController : UIViewController 12 | 13 | @property (retain, nonatomic) IBOutlet UITextView *textView; 14 | 15 | - (IBAction)parseTextView:(id)sender; 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /Parser Test/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // Parser Test 4 | // 5 | // Created by Edward Patel on 2012-03-28. 6 | // Copyright (c) 2012 Memention AB. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import "AppDelegate.h" 12 | 13 | int main(int argc, char *argv[]) 14 | { 15 | @autoreleasepool { 16 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /Parser Test/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // Parser Test 4 | // 5 | // Created by Edward Patel on 2012-03-28. 6 | // Copyright (c) 2012 Memention AB. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class ViewController; 12 | 13 | @interface AppDelegate : UIResponder 14 | 15 | @property (strong, nonatomic) UIWindow *window; 16 | @property (strong, nonatomic) ViewController *viewController; 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /MessageBlocks.h: -------------------------------------------------------------------------------- 1 | // 2 | // MessageBlocks.h 3 | // Parser Test 4 | // 5 | // Created by Edward Patel on 2012-03-28. 6 | // Copyright (c) 2012 Memention AB. All rights reserved. 7 | // 8 | 9 | extern void (^ParseTestSuccessBlock)(float value); 10 | extern void (^ParseTestFailBlock)(NSString *msg); 11 | 12 | // Added some extras to suppress warnings... 13 | #ifndef FLEXINT_H 14 | 15 | typedef struct yy_buffer_state *YY_BUFFER_STATE; 16 | YY_BUFFER_STATE yy_scan_string(const char *s); 17 | 18 | int yyparse(); 19 | void yy_delete_buffer(YY_BUFFER_STATE buf); 20 | 21 | #endif 22 | -------------------------------------------------------------------------------- /tokenizer.lm: -------------------------------------------------------------------------------- 1 | %{ 2 | 3 | #import "y.tab.h" 4 | #import "MessageBlocks.h" 5 | 6 | void yyerror(char *s); 7 | 8 | %} 9 | 10 | %% 11 | 12 | [0-9]+\.[0-9]* { yylval.value = atof(yytext); return FLOAT; } 13 | 14 | [0-9]+ { yylval.value = atof(yytext); return INTEGER; } 15 | 16 | [a-zA-Z]+ { yylval.identifier = [ [NSString stringWithFormat:@"%s", yytext] retain]; return IDENTIFIER; } 17 | 18 | [\n\t ] { } 19 | 20 | . { return yytext[0]; }; 21 | 22 | %% 23 | 24 | int yywrap() 25 | { 26 | // This is a place where one can append more text if it would be needed, quit for now 27 | return 1; 28 | } 29 | 30 | void yyerror(char *s) 31 | { 32 | if (ParseTestFailBlock) 33 | ParseTestFailBlock([NSString stringWithFormat:@"%s", s]); 34 | } 35 | -------------------------------------------------------------------------------- /parser.ym: -------------------------------------------------------------------------------- 1 | %{ 2 | 3 | #import "MessageBlocks.h" 4 | 5 | int yylex(void); 6 | void yyerror(char *s); 7 | 8 | %} 9 | 10 | %union { 11 | float value; 12 | NSString *identifier; 13 | } 14 | 15 | %token INTEGER 16 | %token FLOAT 17 | 18 | %token IDENTIFIER 19 | 20 | %type expr 21 | %type number 22 | 23 | %destructor { [$$ release]; } IDENTIFIER 24 | 25 | %left '+' '-' 26 | %left '*' '/' 27 | 28 | %% 29 | 30 | calc : expr { if (ParseTestSuccessBlock) ParseTestSuccessBlock($1); } 31 | 32 | expr : number { $$ = $1; } 33 | | expr '*' expr { $$ = $1 * $3; } 34 | | expr '/' expr { $$ = $1 / $3; } 35 | | expr '+' expr { $$ = $1 + $3; } 36 | | expr '-' expr { $$ = $1 - $3; } 37 | 38 | number : INTEGER { $$ = $1; } 39 | | FLOAT { $$ = $1; } 40 | | IDENTIFIER { if ([$1 isEqualToString:@"pi"]) $$ = M_PI; else $$ = 0.0; [$1 release]; } 41 | 42 | %% 43 | -------------------------------------------------------------------------------- /Parser Test/Parser Test-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | ${PRODUCT_NAME} 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | ${PRODUCT_NAME} 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1.0 25 | LSRequiresIPhoneOS 26 | 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UISupportedInterfaceOrientations~ipad 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationPortraitUpsideDown 35 | UIInterfaceOrientationLandscapeLeft 36 | UIInterfaceOrientationLandscapeRight 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /Parser Test/ViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.m 3 | // Parser Test 4 | // 5 | // Created by Edward Patel on 2012-03-28. 6 | // Copyright (c) 2012 Memention AB. All rights reserved. 7 | // 8 | 9 | #import "ViewController.h" 10 | 11 | #import "y.tab.h" 12 | #import "MessageBlocks.h" 13 | 14 | @interface ViewController () 15 | 16 | @end 17 | 18 | @implementation ViewController 19 | @synthesize textView; 20 | 21 | - (void)viewDidLoad 22 | { 23 | [super viewDidLoad]; 24 | // Do any additional setup after loading the view, typically from a nib. 25 | } 26 | 27 | - (void)viewDidUnload 28 | { 29 | [self setTextView:nil]; 30 | [super viewDidUnload]; 31 | // Release any retained subviews of the main view. 32 | } 33 | 34 | - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation 35 | { 36 | return YES; 37 | } 38 | 39 | - (void)dealloc 40 | { 41 | [textView release]; 42 | [super dealloc]; 43 | } 44 | 45 | - (IBAction)parseTextView:(id)sender 46 | { 47 | YY_BUFFER_STATE buf; 48 | 49 | buf = yy_scan_string([self.textView.text cStringUsingEncoding:NSUTF8StringEncoding]); 50 | 51 | ParseTestSuccessBlock = ^(float value) { 52 | textView.text = [NSString stringWithFormat:@"%f", value]; 53 | }; 54 | 55 | ParseTestFailBlock = ^(NSString *msg) { 56 | textView.text = msg; 57 | }; 58 | 59 | yyparse(); 60 | 61 | yy_delete_buffer(buf); 62 | } 63 | 64 | @end 65 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## Parser Test with Xcode 2 | 3 | Xcode can handle bison and flex definition files. Xcode can even compile the generated files as Objective-C making it easier to bridge a parser into Objective-C. Pretty nice I think. 4 | 5 | This demo shows a simple calculator. `tokenizer.lm` contain the parts for divinding the character stream into parts for the parser which is in the `parser.ym` file. The added `m` on the extension is that detail that makes Xcode compile the generated files as Objective-C files. 6 | 7 | To make it a little bit more interesting I added identifiers that is dynamically handled between the tokenizer and parser. In the tokenizer you can see that it will be set as a `retained` string. The parser only knows about `pi` at the moment and everything else will have the value `0.0` 8 | 9 | There are two possible places for a identifier string to be `released`, either in the last part of this rule 10 | 11 | number : INTEGER { $$ = $1; } 12 | | FLOAT { $$ = $1; } 13 | | IDENTIFIER { if ([$1 isEqualToString:@"pi"]) $$ = M_PI; else $$ = 0.0; [$1 release]; } 14 | 15 | or the defined destructor 16 | 17 | %destructor { [$$ release]; } IDENTIFIER 18 | 19 | The defined destructor is used if the parser need to clean up some intermediate handling, by error or not. 20 | 21 | One *caveat* I stumbled upon was that I couldn't get "`[[`" to work in the tokenizer, which seem to use that for some internal marker. So instead I use "`[ [`" which may look strange. The line in the tokenizer is this 22 | 23 | [a-zA-Z]+ { yylval.identifier = [ [NSString stringWithFormat:@"%s", yytext] retain]; return IDENTIFIER; } 24 | 25 | Now I wish I had a task to solve with my own language... 26 | -------------------------------------------------------------------------------- /Parser Test/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // Parser Test 4 | // 5 | // Created by Edward Patel on 2012-03-28. 6 | // Copyright (c) 2012 Memention AB. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | 11 | #import "ViewController.h" 12 | 13 | @implementation AppDelegate 14 | 15 | @synthesize window = _window; 16 | @synthesize viewController = _viewController; 17 | 18 | - (void)dealloc 19 | { 20 | [_window release]; 21 | [_viewController release]; 22 | [super dealloc]; 23 | } 24 | 25 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 26 | { 27 | self.window = [[[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]] autorelease]; 28 | // Override point for customization after application launch. 29 | self.viewController = [[[ViewController alloc] initWithNibName:@"ViewController" bundle:nil] autorelease]; 30 | self.window.rootViewController = self.viewController; 31 | [self.window makeKeyAndVisible]; 32 | return YES; 33 | } 34 | 35 | - (void)applicationWillResignActive:(UIApplication *)application 36 | { 37 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 38 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. 39 | } 40 | 41 | - (void)applicationDidEnterBackground:(UIApplication *)application 42 | { 43 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 44 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 45 | } 46 | 47 | - (void)applicationWillEnterForeground:(UIApplication *)application 48 | { 49 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. 50 | } 51 | 52 | - (void)applicationDidBecomeActive:(UIApplication *)application 53 | { 54 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 55 | } 56 | 57 | - (void)applicationWillTerminate:(UIApplication *)application 58 | { 59 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 60 | } 61 | 62 | @end 63 | -------------------------------------------------------------------------------- /Parser Test/en.lproj/ViewController.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 1296 5 | 11D50b 6 | 2182 7 | 1138.32 8 | 568.00 9 | 10 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 11 | 1181 12 | 13 | 14 | IBUITextView 15 | IBUIButton 16 | IBUIView 17 | IBProxyObject 18 | 19 | 20 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 21 | 22 | 23 | PluginDependencyRecalculationVersion 24 | 25 | 26 | 27 | 28 | IBFilesOwner 29 | IBIPadFramework 30 | 31 | 32 | IBFirstResponder 33 | IBIPadFramework 34 | 35 | 36 | 37 | 274 38 | 39 | 40 | 41 | 274 42 | {{20, 65}, {728, 919}} 43 | 44 | 45 | 46 | _NS:9 47 | 48 | 1 49 | MSAxIDEAA 50 | 51 | YES 52 | YES 53 | IBIPadFramework 54 | NO 55 | 56 | 57 | 2 58 | IBCocoaTouchFramework 59 | 60 | 61 | CourierNewPSMT 62 | Courier New 63 | 0 64 | 24 65 | 66 | 67 | CourierNewPSMT 68 | 24 69 | 16 70 | 71 | 72 | 73 | 74 | 257 75 | {{676, 20}, {72, 37}} 76 | 77 | 78 | 79 | _NS:9 80 | NO 81 | IBIPadFramework 82 | 0 83 | 0 84 | 1 85 | Parse 86 | 87 | 3 88 | MQA 89 | 90 | 91 | 1 92 | MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA 93 | 94 | 95 | 3 96 | MC41AA 97 | 98 | 99 | 2 100 | 15 101 | 102 | 103 | Helvetica-Bold 104 | 15 105 | 16 106 | 107 | 108 | 109 | {{0, 20}, {768, 1004}} 110 | 111 | 112 | 113 | 114 | 3 115 | MC45MDQ0NTQzODUxAA 116 | 117 | 118 | 2 119 | 120 | IBIPadFramework 121 | 122 | 123 | 124 | 125 | 126 | 127 | view 128 | 129 | 130 | 131 | 3 132 | 133 | 134 | 135 | textView 136 | 137 | 138 | 139 | 6 140 | 141 | 142 | 143 | parseTextView: 144 | 145 | 146 | 7 147 | 148 | 7 149 | 150 | 151 | 152 | 153 | 154 | 0 155 | 156 | 157 | 158 | 159 | 160 | -1 161 | 162 | 163 | File's Owner 164 | 165 | 166 | -2 167 | 168 | 169 | 170 | 171 | 2 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 4 181 | 182 | 183 | 184 | 185 | 5 186 | 187 | 188 | 189 | 190 | 191 | 192 | ViewController 193 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 194 | UIResponder 195 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 196 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 197 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 198 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 199 | 200 | 201 | 202 | 203 | 204 | 7 205 | 206 | 207 | 208 | 209 | ViewController 210 | UIViewController 211 | 212 | parseTextView: 213 | id 214 | 215 | 216 | parseTextView: 217 | 218 | parseTextView: 219 | id 220 | 221 | 222 | 223 | textView 224 | UITextView 225 | 226 | 227 | textView 228 | 229 | textView 230 | UITextView 231 | 232 | 233 | 234 | IBProjectSource 235 | ./Classes/ViewController.h 236 | 237 | 238 | 239 | 240 | 0 241 | IBIPadFramework 242 | 243 | com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS 244 | 245 | 246 | YES 247 | 3 248 | 1181 249 | 250 | 251 | -------------------------------------------------------------------------------- /Parser Test.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 3AAA64931523A0E30059AE67 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3AAA64921523A0E30059AE67 /* UIKit.framework */; }; 11 | 3AAA64951523A0E30059AE67 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3AAA64941523A0E30059AE67 /* Foundation.framework */; }; 12 | 3AAA64971523A0E30059AE67 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3AAA64961523A0E30059AE67 /* CoreGraphics.framework */; }; 13 | 3AAA649D1523A0E30059AE67 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 3AAA649B1523A0E30059AE67 /* InfoPlist.strings */; }; 14 | 3AAA649F1523A0E30059AE67 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 3AAA649E1523A0E30059AE67 /* main.m */; }; 15 | 3AAA64A31523A0E30059AE67 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 3AAA64A21523A0E30059AE67 /* AppDelegate.m */; }; 16 | 3AAA64A61523A0E30059AE67 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 3AAA64A51523A0E30059AE67 /* ViewController.m */; }; 17 | 3AAA64A91523A0E30059AE67 /* ViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 3AAA64A71523A0E30059AE67 /* ViewController.xib */; }; 18 | 3AAA64B11523A2A00059AE67 /* parser.ym in Sources */ = {isa = PBXBuildFile; fileRef = 3AAA64B01523A2A00059AE67 /* parser.ym */; }; 19 | 3AAA64B31523A2B40059AE67 /* tokenizer.lm in Sources */ = {isa = PBXBuildFile; fileRef = 3AAA64B21523A2B40059AE67 /* tokenizer.lm */; }; 20 | 3AAA64BF1523B4D80059AE67 /* MessageBlocks.m in Sources */ = {isa = PBXBuildFile; fileRef = 3AAA64BE1523B4D80059AE67 /* MessageBlocks.m */; }; 21 | /* End PBXBuildFile section */ 22 | 23 | /* Begin PBXFileReference section */ 24 | 3AAA648E1523A0E30059AE67 /* Parser Test.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Parser Test.app"; sourceTree = BUILT_PRODUCTS_DIR; }; 25 | 3AAA64921523A0E30059AE67 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; 26 | 3AAA64941523A0E30059AE67 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 27 | 3AAA64961523A0E30059AE67 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; 28 | 3AAA649A1523A0E30059AE67 /* Parser Test-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "Parser Test-Info.plist"; sourceTree = ""; }; 29 | 3AAA649C1523A0E30059AE67 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; 30 | 3AAA649E1523A0E30059AE67 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 31 | 3AAA64A01523A0E30059AE67 /* Parser Test-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Parser Test-Prefix.pch"; sourceTree = ""; }; 32 | 3AAA64A11523A0E30059AE67 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 33 | 3AAA64A21523A0E30059AE67 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 34 | 3AAA64A41523A0E30059AE67 /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; 35 | 3AAA64A51523A0E30059AE67 /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; 36 | 3AAA64A81523A0E30059AE67 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/ViewController.xib; sourceTree = ""; }; 37 | 3AAA64B01523A2A00059AE67 /* parser.ym */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.yacc; path = parser.ym; sourceTree = ""; }; 38 | 3AAA64B21523A2B40059AE67 /* tokenizer.lm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.lex; path = tokenizer.lm; sourceTree = ""; }; 39 | 3AAA64BC1523B4390059AE67 /* MessageBlocks.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MessageBlocks.h; sourceTree = ""; }; 40 | 3AAA64BE1523B4D80059AE67 /* MessageBlocks.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MessageBlocks.m; sourceTree = ""; }; 41 | /* End PBXFileReference section */ 42 | 43 | /* Begin PBXFrameworksBuildPhase section */ 44 | 3AAA648B1523A0E30059AE67 /* Frameworks */ = { 45 | isa = PBXFrameworksBuildPhase; 46 | buildActionMask = 2147483647; 47 | files = ( 48 | 3AAA64931523A0E30059AE67 /* UIKit.framework in Frameworks */, 49 | 3AAA64951523A0E30059AE67 /* Foundation.framework in Frameworks */, 50 | 3AAA64971523A0E30059AE67 /* CoreGraphics.framework in Frameworks */, 51 | ); 52 | runOnlyForDeploymentPostprocessing = 0; 53 | }; 54 | /* End PBXFrameworksBuildPhase section */ 55 | 56 | /* Begin PBXGroup section */ 57 | 3AAA64831523A0E30059AE67 = { 58 | isa = PBXGroup; 59 | children = ( 60 | 3AAA64AF1523A2810059AE67 /* Parser */, 61 | 3AAA64981523A0E30059AE67 /* Parser Test */, 62 | 3AAA64911523A0E30059AE67 /* Frameworks */, 63 | 3AAA648F1523A0E30059AE67 /* Products */, 64 | ); 65 | sourceTree = ""; 66 | }; 67 | 3AAA648F1523A0E30059AE67 /* Products */ = { 68 | isa = PBXGroup; 69 | children = ( 70 | 3AAA648E1523A0E30059AE67 /* Parser Test.app */, 71 | ); 72 | name = Products; 73 | sourceTree = ""; 74 | }; 75 | 3AAA64911523A0E30059AE67 /* Frameworks */ = { 76 | isa = PBXGroup; 77 | children = ( 78 | 3AAA64921523A0E30059AE67 /* UIKit.framework */, 79 | 3AAA64941523A0E30059AE67 /* Foundation.framework */, 80 | 3AAA64961523A0E30059AE67 /* CoreGraphics.framework */, 81 | ); 82 | name = Frameworks; 83 | sourceTree = ""; 84 | }; 85 | 3AAA64981523A0E30059AE67 /* Parser Test */ = { 86 | isa = PBXGroup; 87 | children = ( 88 | 3AAA64A11523A0E30059AE67 /* AppDelegate.h */, 89 | 3AAA64A21523A0E30059AE67 /* AppDelegate.m */, 90 | 3AAA64A41523A0E30059AE67 /* ViewController.h */, 91 | 3AAA64A51523A0E30059AE67 /* ViewController.m */, 92 | 3AAA64A71523A0E30059AE67 /* ViewController.xib */, 93 | 3AAA64991523A0E30059AE67 /* Supporting Files */, 94 | ); 95 | path = "Parser Test"; 96 | sourceTree = ""; 97 | }; 98 | 3AAA64991523A0E30059AE67 /* Supporting Files */ = { 99 | isa = PBXGroup; 100 | children = ( 101 | 3AAA649A1523A0E30059AE67 /* Parser Test-Info.plist */, 102 | 3AAA649B1523A0E30059AE67 /* InfoPlist.strings */, 103 | 3AAA649E1523A0E30059AE67 /* main.m */, 104 | 3AAA64A01523A0E30059AE67 /* Parser Test-Prefix.pch */, 105 | ); 106 | name = "Supporting Files"; 107 | sourceTree = ""; 108 | }; 109 | 3AAA64AF1523A2810059AE67 /* Parser */ = { 110 | isa = PBXGroup; 111 | children = ( 112 | 3AAA64B01523A2A00059AE67 /* parser.ym */, 113 | 3AAA64B21523A2B40059AE67 /* tokenizer.lm */, 114 | 3AAA64BC1523B4390059AE67 /* MessageBlocks.h */, 115 | 3AAA64BE1523B4D80059AE67 /* MessageBlocks.m */, 116 | ); 117 | name = Parser; 118 | sourceTree = ""; 119 | }; 120 | /* End PBXGroup section */ 121 | 122 | /* Begin PBXNativeTarget section */ 123 | 3AAA648D1523A0E30059AE67 /* Parser Test */ = { 124 | isa = PBXNativeTarget; 125 | buildConfigurationList = 3AAA64AC1523A0E30059AE67 /* Build configuration list for PBXNativeTarget "Parser Test" */; 126 | buildPhases = ( 127 | 3AAA648A1523A0E30059AE67 /* Sources */, 128 | 3AAA648B1523A0E30059AE67 /* Frameworks */, 129 | 3AAA648C1523A0E30059AE67 /* Resources */, 130 | ); 131 | buildRules = ( 132 | ); 133 | dependencies = ( 134 | ); 135 | name = "Parser Test"; 136 | productName = "Parser Test"; 137 | productReference = 3AAA648E1523A0E30059AE67 /* Parser Test.app */; 138 | productType = "com.apple.product-type.application"; 139 | }; 140 | /* End PBXNativeTarget section */ 141 | 142 | /* Begin PBXProject section */ 143 | 3AAA64851523A0E30059AE67 /* Project object */ = { 144 | isa = PBXProject; 145 | attributes = { 146 | LastUpgradeCheck = 0800; 147 | ORGANIZATIONNAME = "Memention AB"; 148 | }; 149 | buildConfigurationList = 3AAA64881523A0E30059AE67 /* Build configuration list for PBXProject "Parser Test" */; 150 | compatibilityVersion = "Xcode 3.2"; 151 | developmentRegion = English; 152 | hasScannedForEncodings = 0; 153 | knownRegions = ( 154 | en, 155 | ); 156 | mainGroup = 3AAA64831523A0E30059AE67; 157 | productRefGroup = 3AAA648F1523A0E30059AE67 /* Products */; 158 | projectDirPath = ""; 159 | projectRoot = ""; 160 | targets = ( 161 | 3AAA648D1523A0E30059AE67 /* Parser Test */, 162 | ); 163 | }; 164 | /* End PBXProject section */ 165 | 166 | /* Begin PBXResourcesBuildPhase section */ 167 | 3AAA648C1523A0E30059AE67 /* Resources */ = { 168 | isa = PBXResourcesBuildPhase; 169 | buildActionMask = 2147483647; 170 | files = ( 171 | 3AAA649D1523A0E30059AE67 /* InfoPlist.strings in Resources */, 172 | 3AAA64A91523A0E30059AE67 /* ViewController.xib in Resources */, 173 | ); 174 | runOnlyForDeploymentPostprocessing = 0; 175 | }; 176 | /* End PBXResourcesBuildPhase section */ 177 | 178 | /* Begin PBXSourcesBuildPhase section */ 179 | 3AAA648A1523A0E30059AE67 /* Sources */ = { 180 | isa = PBXSourcesBuildPhase; 181 | buildActionMask = 2147483647; 182 | files = ( 183 | 3AAA649F1523A0E30059AE67 /* main.m in Sources */, 184 | 3AAA64A31523A0E30059AE67 /* AppDelegate.m in Sources */, 185 | 3AAA64A61523A0E30059AE67 /* ViewController.m in Sources */, 186 | 3AAA64B11523A2A00059AE67 /* parser.ym in Sources */, 187 | 3AAA64B31523A2B40059AE67 /* tokenizer.lm in Sources */, 188 | 3AAA64BF1523B4D80059AE67 /* MessageBlocks.m in Sources */, 189 | ); 190 | runOnlyForDeploymentPostprocessing = 0; 191 | }; 192 | /* End PBXSourcesBuildPhase section */ 193 | 194 | /* Begin PBXVariantGroup section */ 195 | 3AAA649B1523A0E30059AE67 /* InfoPlist.strings */ = { 196 | isa = PBXVariantGroup; 197 | children = ( 198 | 3AAA649C1523A0E30059AE67 /* en */, 199 | ); 200 | name = InfoPlist.strings; 201 | sourceTree = ""; 202 | }; 203 | 3AAA64A71523A0E30059AE67 /* ViewController.xib */ = { 204 | isa = PBXVariantGroup; 205 | children = ( 206 | 3AAA64A81523A0E30059AE67 /* en */, 207 | ); 208 | name = ViewController.xib; 209 | sourceTree = ""; 210 | }; 211 | /* End PBXVariantGroup section */ 212 | 213 | /* Begin XCBuildConfiguration section */ 214 | 3AAA64AA1523A0E30059AE67 /* Debug */ = { 215 | isa = XCBuildConfiguration; 216 | buildSettings = { 217 | ALWAYS_SEARCH_USER_PATHS = NO; 218 | CLANG_WARN_BOOL_CONVERSION = YES; 219 | CLANG_WARN_CONSTANT_CONVERSION = YES; 220 | CLANG_WARN_EMPTY_BODY = YES; 221 | CLANG_WARN_ENUM_CONVERSION = YES; 222 | CLANG_WARN_INFINITE_RECURSION = YES; 223 | CLANG_WARN_INT_CONVERSION = YES; 224 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 225 | CLANG_WARN_UNREACHABLE_CODE = YES; 226 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 227 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 228 | COPY_PHASE_STRIP = NO; 229 | ENABLE_STRICT_OBJC_MSGSEND = YES; 230 | ENABLE_TESTABILITY = YES; 231 | GCC_C_LANGUAGE_STANDARD = gnu99; 232 | GCC_DYNAMIC_NO_PIC = NO; 233 | GCC_NO_COMMON_BLOCKS = YES; 234 | GCC_OPTIMIZATION_LEVEL = 0; 235 | GCC_PREPROCESSOR_DEFINITIONS = ( 236 | "DEBUG=1", 237 | "$(inherited)", 238 | ); 239 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 240 | GCC_VERSION = com.apple.compilers.llvm.clang.1_0; 241 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 242 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 243 | GCC_WARN_UNDECLARED_SELECTOR = YES; 244 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 245 | GCC_WARN_UNUSED_FUNCTION = YES; 246 | GCC_WARN_UNUSED_VARIABLE = YES; 247 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 248 | ONLY_ACTIVE_ARCH = YES; 249 | SDKROOT = iphoneos; 250 | TARGETED_DEVICE_FAMILY = 2; 251 | }; 252 | name = Debug; 253 | }; 254 | 3AAA64AB1523A0E30059AE67 /* Release */ = { 255 | isa = XCBuildConfiguration; 256 | buildSettings = { 257 | ALWAYS_SEARCH_USER_PATHS = NO; 258 | CLANG_WARN_BOOL_CONVERSION = YES; 259 | CLANG_WARN_CONSTANT_CONVERSION = YES; 260 | CLANG_WARN_EMPTY_BODY = YES; 261 | CLANG_WARN_ENUM_CONVERSION = YES; 262 | CLANG_WARN_INFINITE_RECURSION = YES; 263 | CLANG_WARN_INT_CONVERSION = YES; 264 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 265 | CLANG_WARN_UNREACHABLE_CODE = YES; 266 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 267 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 268 | COPY_PHASE_STRIP = YES; 269 | ENABLE_STRICT_OBJC_MSGSEND = YES; 270 | GCC_C_LANGUAGE_STANDARD = gnu99; 271 | GCC_NO_COMMON_BLOCKS = YES; 272 | GCC_VERSION = com.apple.compilers.llvm.clang.1_0; 273 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 274 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 275 | GCC_WARN_UNDECLARED_SELECTOR = YES; 276 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 277 | GCC_WARN_UNUSED_FUNCTION = YES; 278 | GCC_WARN_UNUSED_VARIABLE = YES; 279 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 280 | OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1"; 281 | SDKROOT = iphoneos; 282 | TARGETED_DEVICE_FAMILY = 2; 283 | VALIDATE_PRODUCT = YES; 284 | }; 285 | name = Release; 286 | }; 287 | 3AAA64AD1523A0E30059AE67 /* Debug */ = { 288 | isa = XCBuildConfiguration; 289 | buildSettings = { 290 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 291 | GCC_PREFIX_HEADER = "Parser Test/Parser Test-Prefix.pch"; 292 | INFOPLIST_FILE = "Parser Test/Parser Test-Info.plist"; 293 | PRODUCT_BUNDLE_IDENTIFIER = "com.memention.Parser-Test"; 294 | PRODUCT_NAME = "$(TARGET_NAME)"; 295 | WRAPPER_EXTENSION = app; 296 | }; 297 | name = Debug; 298 | }; 299 | 3AAA64AE1523A0E30059AE67 /* Release */ = { 300 | isa = XCBuildConfiguration; 301 | buildSettings = { 302 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 303 | GCC_PREFIX_HEADER = "Parser Test/Parser Test-Prefix.pch"; 304 | INFOPLIST_FILE = "Parser Test/Parser Test-Info.plist"; 305 | PRODUCT_BUNDLE_IDENTIFIER = "com.memention.Parser-Test"; 306 | PRODUCT_NAME = "$(TARGET_NAME)"; 307 | WRAPPER_EXTENSION = app; 308 | }; 309 | name = Release; 310 | }; 311 | /* End XCBuildConfiguration section */ 312 | 313 | /* Begin XCConfigurationList section */ 314 | 3AAA64881523A0E30059AE67 /* Build configuration list for PBXProject "Parser Test" */ = { 315 | isa = XCConfigurationList; 316 | buildConfigurations = ( 317 | 3AAA64AA1523A0E30059AE67 /* Debug */, 318 | 3AAA64AB1523A0E30059AE67 /* Release */, 319 | ); 320 | defaultConfigurationIsVisible = 0; 321 | defaultConfigurationName = Release; 322 | }; 323 | 3AAA64AC1523A0E30059AE67 /* Build configuration list for PBXNativeTarget "Parser Test" */ = { 324 | isa = XCConfigurationList; 325 | buildConfigurations = ( 326 | 3AAA64AD1523A0E30059AE67 /* Debug */, 327 | 3AAA64AE1523A0E30059AE67 /* Release */, 328 | ); 329 | defaultConfigurationIsVisible = 0; 330 | defaultConfigurationName = Release; 331 | }; 332 | /* End XCConfigurationList section */ 333 | }; 334 | rootObject = 3AAA64851523A0E30059AE67 /* Project object */; 335 | } 336 | --------------------------------------------------------------------------------