translation app for iOS, replicating some of the functionality of the Android app. Compiles and works on iPad retina but may crash and has known issues.

This commit is contained in:
joel.hinz
2015-02-20 07:47:43 +00:00
parent f848857519
commit 2394763daa
23 changed files with 1919 additions and 0 deletions

View File

@@ -0,0 +1,811 @@
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 46;
objects = {
/* Begin PBXBuildFile section */
B62B413D1A5F513D00296901 /* Languages.swift in Sources */ = {isa = PBXBuildFile; fileRef = B62B413C1A5F513D00296901 /* Languages.swift */; };
B62B413F1A61CCF700296901 /* Colors.swift in Sources */ = {isa = PBXBuildFile; fileRef = B62B413E1A61CCF700296901 /* Colors.swift */; };
B62B41411A63241700296901 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B62B41401A63241700296901 /* UIKit.framework */; };
B62C44F11A37A7DA003613DD /* grammars in Resources */ = {isa = PBXBuildFile; fileRef = B62C44F01A37A7DA003613DD /* grammars */; };
B62E50921A3A628900805DD8 /* assert.c in Sources */ = {isa = PBXBuildFile; fileRef = B62E502F1A3A628900805DD8 /* assert.c */; };
B62E50931A3A628900805DD8 /* bits.c in Sources */ = {isa = PBXBuildFile; fileRef = B62E50311A3A628900805DD8 /* bits.c */; };
B62E50941A3A628900805DD8 /* choice.c in Sources */ = {isa = PBXBuildFile; fileRef = B62E50331A3A628900805DD8 /* choice.c */; };
B62E50951A3A628900805DD8 /* defs.c in Sources */ = {isa = PBXBuildFile; fileRef = B62E50351A3A628900805DD8 /* defs.c */; };
B62E50961A3A628900805DD8 /* enum.c in Sources */ = {isa = PBXBuildFile; fileRef = B62E50371A3A628900805DD8 /* enum.c */; };
B62E50971A3A628900805DD8 /* exn.c in Sources */ = {isa = PBXBuildFile; fileRef = B62E50391A3A628900805DD8 /* exn.c */; };
B62E50981A3A628900805DD8 /* file.c in Sources */ = {isa = PBXBuildFile; fileRef = B62E503B1A3A628900805DD8 /* file.c */; };
B62E50991A3A628900805DD8 /* fun.c in Sources */ = {isa = PBXBuildFile; fileRef = B62E503D1A3A628900805DD8 /* fun.c */; };
B62E509A1A3A628900805DD8 /* hash.c in Sources */ = {isa = PBXBuildFile; fileRef = B62E503F1A3A628900805DD8 /* hash.c */; };
B62E509B1A3A628900805DD8 /* in.c in Sources */ = {isa = PBXBuildFile; fileRef = B62E50411A3A628900805DD8 /* in.c */; };
B62E509C1A3A628900805DD8 /* map.c in Sources */ = {isa = PBXBuildFile; fileRef = B62E50431A3A628900805DD8 /* map.c */; };
B62E509D1A3A628900805DD8 /* mem.c in Sources */ = {isa = PBXBuildFile; fileRef = B62E50451A3A628900805DD8 /* mem.c */; };
B62E509E1A3A628900805DD8 /* out.c in Sources */ = {isa = PBXBuildFile; fileRef = B62E50471A3A628900805DD8 /* out.c */; };
B62E509F1A3A628900805DD8 /* prime.c in Sources */ = {isa = PBXBuildFile; fileRef = B62E50491A3A628900805DD8 /* prime.c */; };
B62E50A01A3A628900805DD8 /* seq.c in Sources */ = {isa = PBXBuildFile; fileRef = B62E504B1A3A628900805DD8 /* seq.c */; };
B62E50A11A3A628900805DD8 /* string.c in Sources */ = {isa = PBXBuildFile; fileRef = B62E504D1A3A628900805DD8 /* string.c */; };
B62E50A21A3A628900805DD8 /* ucs.c in Sources */ = {isa = PBXBuildFile; fileRef = B62E50501A3A628900805DD8 /* ucs.c */; };
B62E50A31A3A628900805DD8 /* utf8.c in Sources */ = {isa = PBXBuildFile; fileRef = B62E50521A3A628900805DD8 /* utf8.c */; };
B62E50A41A3A628900805DD8 /* variant.c in Sources */ = {isa = PBXBuildFile; fileRef = B62E50541A3A628900805DD8 /* variant.c */; };
B62E50A51A3A628900805DD8 /* data.c in Sources */ = {isa = PBXBuildFile; fileRef = B62E50571A3A628900805DD8 /* data.c */; };
B62E50A61A3A628900805DD8 /* evaluator.c in Sources */ = {isa = PBXBuildFile; fileRef = B62E50591A3A628900805DD8 /* evaluator.c */; };
B62E50A71A3A628900805DD8 /* expr.c in Sources */ = {isa = PBXBuildFile; fileRef = B62E505B1A3A628900805DD8 /* expr.c */; };
B62E50A81A3A628900805DD8 /* graphviz.c in Sources */ = {isa = PBXBuildFile; fileRef = B62E505D1A3A628900805DD8 /* graphviz.c */; };
B62E50A91A3A628900805DD8 /* hopu.c in Sources */ = {isa = PBXBuildFile; fileRef = B62E505F1A3A628900805DD8 /* hopu.c */; };
B62E50AA1A3A628900805DD8 /* jit.c in Sources */ = {isa = PBXBuildFile; fileRef = B62E50611A3A628900805DD8 /* jit.c */; };
B62E50AB1A3A628900805DD8 /* linearizer.c in Sources */ = {isa = PBXBuildFile; fileRef = B62E50841A3A628900805DD8 /* linearizer.c */; };
B62E50AC1A3A628900805DD8 /* literals.c in Sources */ = {isa = PBXBuildFile; fileRef = B62E50861A3A628900805DD8 /* literals.c */; };
B62E50AD1A3A628900805DD8 /* parser.c in Sources */ = {isa = PBXBuildFile; fileRef = B62E50881A3A628900805DD8 /* parser.c */; };
B62E50AE1A3A628900805DD8 /* parseval.c in Sources */ = {isa = PBXBuildFile; fileRef = B62E50891A3A628900805DD8 /* parseval.c */; };
B62E50AF1A3A628900805DD8 /* pgf.c in Sources */ = {isa = PBXBuildFile; fileRef = B62E508A1A3A628900805DD8 /* pgf.c */; };
B62E50B01A3A628900805DD8 /* printer.c in Sources */ = {isa = PBXBuildFile; fileRef = B62E508C1A3A628900805DD8 /* printer.c */; };
B62E50B11A3A628900805DD8 /* reader.c in Sources */ = {isa = PBXBuildFile; fileRef = B62E508D1A3A628900805DD8 /* reader.c */; };
B62E50B21A3A628900805DD8 /* reasoner.c in Sources */ = {isa = PBXBuildFile; fileRef = B62E508F1A3A628900805DD8 /* reasoner.c */; };
B62E50B31A3A628900805DD8 /* typechecker.c in Sources */ = {isa = PBXBuildFile; fileRef = B62E50911A3A628900805DD8 /* typechecker.c */; };
B63010911A54C78400AD56A3 /* Translator.swift in Sources */ = {isa = PBXBuildFile; fileRef = B63010901A54C78400AD56A3 /* Translator.swift */; };
B63010971A5716BF00AD56A3 /* ic_action_switch.png in Resources */ = {isa = PBXBuildFile; fileRef = B63010931A5716BF00AD56A3 /* ic_action_switch.png */; };
B63010981A5716BF00AD56A3 /* ic_app.png in Resources */ = {isa = PBXBuildFile; fileRef = B63010941A5716BF00AD56A3 /* ic_app.png */; };
B63010991A5716BF00AD56A3 /* ic_keyboard.png in Resources */ = {isa = PBXBuildFile; fileRef = B63010951A5716BF00AD56A3 /* ic_keyboard.png */; };
B630109A1A5716BF00AD56A3 /* ic_mic.png in Resources */ = {isa = PBXBuildFile; fileRef = B63010961A5716BF00AD56A3 /* ic_mic.png */; };
B630109C1A5764A700AD56A3 /* HelpViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = B630109B1A5764A700AD56A3 /* HelpViewController.swift */; };
B65248331A36598400C8BD53 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = B65248321A36598400C8BD53 /* AppDelegate.swift */; };
B65248351A36598400C8BD53 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = B65248341A36598400C8BD53 /* ViewController.swift */; };
B65248381A36598400C8BD53 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = B65248361A36598400C8BD53 /* Main.storyboard */; };
B652483A1A36598400C8BD53 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = B65248391A36598400C8BD53 /* Images.xcassets */; };
B652483D1A36598400C8BD53 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = B652483B1A36598400C8BD53 /* LaunchScreen.xib */; };
B65248491A36598400C8BD53 /* gf_ios_swiftTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = B65248481A36598400C8BD53 /* gf_ios_swiftTests.swift */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
B65248431A36598400C8BD53 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = B65248251A36598400C8BD53 /* Project object */;
proxyType = 1;
remoteGlobalIDString = B652482C1A36598400C8BD53;
remoteInfo = "gf-ios-swift";
};
/* End PBXContainerItemProxy section */
/* Begin PBXFileReference section */
B62B413C1A5F513D00296901 /* Languages.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Languages.swift; sourceTree = "<group>"; };
B62B413E1A61CCF700296901 /* Colors.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Colors.swift; sourceTree = "<group>"; };
B62B41401A63241700296901 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
B62C44F01A37A7DA003613DD /* grammars */ = {isa = PBXFileReference; lastKnownFileType = folder; path = grammars; sourceTree = "<group>"; };
B62C44F21A37AA7F003613DD /* gf-ios-swift-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "gf-ios-swift-Bridging-Header.h"; sourceTree = "<group>"; };
B62E502F1A3A628900805DD8 /* assert.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = assert.c; sourceTree = "<group>"; };
B62E50301A3A628900805DD8 /* assert.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = assert.h; sourceTree = "<group>"; };
B62E50311A3A628900805DD8 /* bits.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bits.c; sourceTree = "<group>"; };
B62E50321A3A628900805DD8 /* bits.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = bits.h; sourceTree = "<group>"; };
B62E50331A3A628900805DD8 /* choice.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = choice.c; sourceTree = "<group>"; };
B62E50341A3A628900805DD8 /* choice.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = choice.h; sourceTree = "<group>"; };
B62E50351A3A628900805DD8 /* defs.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = defs.c; sourceTree = "<group>"; };
B62E50361A3A628900805DD8 /* defs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = defs.h; sourceTree = "<group>"; };
B62E50371A3A628900805DD8 /* enum.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = enum.c; sourceTree = "<group>"; };
B62E50381A3A628900805DD8 /* enum.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = enum.h; sourceTree = "<group>"; };
B62E50391A3A628900805DD8 /* exn.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = exn.c; sourceTree = "<group>"; };
B62E503A1A3A628900805DD8 /* exn.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = exn.h; sourceTree = "<group>"; };
B62E503B1A3A628900805DD8 /* file.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = file.c; sourceTree = "<group>"; };
B62E503C1A3A628900805DD8 /* file.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = file.h; sourceTree = "<group>"; };
B62E503D1A3A628900805DD8 /* fun.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = fun.c; sourceTree = "<group>"; };
B62E503E1A3A628900805DD8 /* fun.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = fun.h; sourceTree = "<group>"; };
B62E503F1A3A628900805DD8 /* hash.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = hash.c; sourceTree = "<group>"; };
B62E50401A3A628900805DD8 /* hash.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = hash.h; sourceTree = "<group>"; };
B62E50411A3A628900805DD8 /* in.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = in.c; sourceTree = "<group>"; };
B62E50421A3A628900805DD8 /* in.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = in.h; sourceTree = "<group>"; };
B62E50431A3A628900805DD8 /* map.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = map.c; sourceTree = "<group>"; };
B62E50441A3A628900805DD8 /* map.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = map.h; sourceTree = "<group>"; };
B62E50451A3A628900805DD8 /* mem.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = mem.c; sourceTree = "<group>"; };
B62E50461A3A628900805DD8 /* mem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = mem.h; sourceTree = "<group>"; };
B62E50471A3A628900805DD8 /* out.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = out.c; sourceTree = "<group>"; };
B62E50481A3A628900805DD8 /* out.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = out.h; sourceTree = "<group>"; };
B62E50491A3A628900805DD8 /* prime.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = prime.c; sourceTree = "<group>"; };
B62E504A1A3A628900805DD8 /* prime.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = prime.h; sourceTree = "<group>"; };
B62E504B1A3A628900805DD8 /* seq.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = seq.c; sourceTree = "<group>"; };
B62E504C1A3A628900805DD8 /* seq.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = seq.h; sourceTree = "<group>"; };
B62E504D1A3A628900805DD8 /* string.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = string.c; sourceTree = "<group>"; };
B62E504E1A3A628900805DD8 /* string.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = string.h; sourceTree = "<group>"; };
B62E504F1A3A628900805DD8 /* sysdeps.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sysdeps.h; sourceTree = "<group>"; };
B62E50501A3A628900805DD8 /* ucs.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ucs.c; sourceTree = "<group>"; };
B62E50511A3A628900805DD8 /* ucs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ucs.h; sourceTree = "<group>"; };
B62E50521A3A628900805DD8 /* utf8.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = utf8.c; sourceTree = "<group>"; };
B62E50531A3A628900805DD8 /* utf8.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = utf8.h; sourceTree = "<group>"; };
B62E50541A3A628900805DD8 /* variant.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = variant.c; sourceTree = "<group>"; };
B62E50551A3A628900805DD8 /* variant.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = variant.h; sourceTree = "<group>"; };
B62E50571A3A628900805DD8 /* data.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = data.c; sourceTree = "<group>"; };
B62E50581A3A628900805DD8 /* data.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = data.h; sourceTree = "<group>"; };
B62E50591A3A628900805DD8 /* evaluator.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = evaluator.c; sourceTree = "<group>"; };
B62E505A1A3A628900805DD8 /* evaluator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = evaluator.h; sourceTree = "<group>"; };
B62E505B1A3A628900805DD8 /* expr.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = expr.c; sourceTree = "<group>"; };
B62E505C1A3A628900805DD8 /* expr.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = expr.h; sourceTree = "<group>"; };
B62E505D1A3A628900805DD8 /* graphviz.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = graphviz.c; sourceTree = "<group>"; };
B62E505E1A3A628900805DD8 /* graphviz.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = graphviz.h; sourceTree = "<group>"; };
B62E505F1A3A628900805DD8 /* hopu.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = hopu.c; sourceTree = "<group>"; };
B62E50601A3A628900805DD8 /* hopu.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = hopu.h; sourceTree = "<group>"; };
B62E50611A3A628900805DD8 /* jit.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = jit.c; sourceTree = "<group>"; };
B62E50641A3A628900805DD8 /* asm.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = asm.h; sourceTree = "<group>"; };
B62E50651A3A628900805DD8 /* core.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = core.h; sourceTree = "<group>"; };
B62E50661A3A628900805DD8 /* fp-swf.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "fp-swf.h"; sourceTree = "<group>"; };
B62E50671A3A628900805DD8 /* fp-vfp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "fp-vfp.h"; sourceTree = "<group>"; };
B62E50681A3A628900805DD8 /* fp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = fp.h; sourceTree = "<group>"; };
B62E50691A3A628900805DD8 /* funcs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = funcs.h; sourceTree = "<group>"; };
B62E506A1A3A628900805DD8 /* asm-common.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "asm-common.h"; sourceTree = "<group>"; };
B62E506B1A3A628900805DD8 /* core-common.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "core-common.h"; sourceTree = "<group>"; };
B62E506C1A3A628900805DD8 /* fp-common.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "fp-common.h"; sourceTree = "<group>"; };
B62E506D1A3A628900805DD8 /* funcs-common.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "funcs-common.h"; sourceTree = "<group>"; };
B62E506F1A3A628900805DD8 /* asm-32.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "asm-32.h"; sourceTree = "<group>"; };
B62E50701A3A628900805DD8 /* asm-64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "asm-64.h"; sourceTree = "<group>"; };
B62E50711A3A628900805DD8 /* asm.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = asm.h; sourceTree = "<group>"; };
B62E50721A3A628900805DD8 /* core-32.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "core-32.h"; sourceTree = "<group>"; };
B62E50731A3A628900805DD8 /* core-64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "core-64.h"; sourceTree = "<group>"; };
B62E50741A3A628900805DD8 /* core.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = core.h; sourceTree = "<group>"; };
B62E50751A3A628900805DD8 /* fp-32.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "fp-32.h"; sourceTree = "<group>"; };
B62E50761A3A628900805DD8 /* fp-64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "fp-64.h"; sourceTree = "<group>"; };
B62E50771A3A628900805DD8 /* fp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = fp.h; sourceTree = "<group>"; };
B62E50781A3A628900805DD8 /* funcs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = funcs.h; sourceTree = "<group>"; };
B62E507A1A3A628900805DD8 /* asm.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = asm.h; sourceTree = "<group>"; };
B62E507B1A3A628900805DD8 /* core.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = core.h; sourceTree = "<group>"; };
B62E507C1A3A628900805DD8 /* fp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = fp.h; sourceTree = "<group>"; };
B62E507D1A3A628900805DD8 /* funcs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = funcs.h; sourceTree = "<group>"; };
B62E507F1A3A628900805DD8 /* asm.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = asm.h; sourceTree = "<group>"; };
B62E50801A3A628900805DD8 /* core.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = core.h; sourceTree = "<group>"; };
B62E50811A3A628900805DD8 /* fp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = fp.h; sourceTree = "<group>"; };
B62E50821A3A628900805DD8 /* funcs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = funcs.h; sourceTree = "<group>"; };
B62E50831A3A628900805DD8 /* lightning.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = lightning.h; sourceTree = "<group>"; };
B62E50841A3A628900805DD8 /* linearizer.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = linearizer.c; sourceTree = "<group>"; };
B62E50851A3A628900805DD8 /* linearizer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = linearizer.h; sourceTree = "<group>"; };
B62E50861A3A628900805DD8 /* literals.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = literals.c; sourceTree = "<group>"; };
B62E50871A3A628900805DD8 /* literals.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = literals.h; sourceTree = "<group>"; };
B62E50881A3A628900805DD8 /* parser.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = parser.c; sourceTree = "<group>"; };
B62E50891A3A628900805DD8 /* parseval.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = parseval.c; sourceTree = "<group>"; };
B62E508A1A3A628900805DD8 /* pgf.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = pgf.c; sourceTree = "<group>"; };
B62E508B1A3A628900805DD8 /* pgf.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = pgf.h; sourceTree = "<group>"; };
B62E508C1A3A628900805DD8 /* printer.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = printer.c; sourceTree = "<group>"; };
B62E508D1A3A628900805DD8 /* reader.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = reader.c; sourceTree = "<group>"; };
B62E508E1A3A628900805DD8 /* reader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = reader.h; sourceTree = "<group>"; };
B62E508F1A3A628900805DD8 /* reasoner.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = reasoner.c; sourceTree = "<group>"; };
B62E50901A3A628900805DD8 /* reasoner.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = reasoner.h; sourceTree = "<group>"; };
B62E50911A3A628900805DD8 /* typechecker.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = typechecker.c; sourceTree = "<group>"; };
B63010901A54C78400AD56A3 /* Translator.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Translator.swift; sourceTree = "<group>"; };
B63010931A5716BF00AD56A3 /* ic_action_switch.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = ic_action_switch.png; sourceTree = "<group>"; };
B63010941A5716BF00AD56A3 /* ic_app.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = ic_app.png; sourceTree = "<group>"; };
B63010951A5716BF00AD56A3 /* ic_keyboard.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = ic_keyboard.png; sourceTree = "<group>"; };
B63010961A5716BF00AD56A3 /* ic_mic.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = ic_mic.png; sourceTree = "<group>"; };
B630109B1A5764A700AD56A3 /* HelpViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = HelpViewController.swift; path = "gf-ios-swift/HelpViewController.swift"; sourceTree = SOURCE_ROOT; };
B652482D1A36598400C8BD53 /* gf-ios-swift.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "gf-ios-swift.app"; sourceTree = BUILT_PRODUCTS_DIR; };
B65248311A36598400C8BD53 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
B65248321A36598400C8BD53 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
B65248341A36598400C8BD53 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = "<group>"; };
B65248371A36598400C8BD53 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
B65248391A36598400C8BD53 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = "<group>"; };
B652483C1A36598400C8BD53 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = "<group>"; };
B65248421A36598400C8BD53 /* gf-ios-swiftTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "gf-ios-swiftTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
B65248471A36598400C8BD53 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
B65248481A36598400C8BD53 /* gf_ios_swiftTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = gf_ios_swiftTests.swift; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
B652482A1A36598400C8BD53 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
B62B41411A63241700296901 /* UIKit.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
B652483F1A36598400C8BD53 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
B62E502E1A3A628900805DD8 /* gu */ = {
isa = PBXGroup;
children = (
B62E502F1A3A628900805DD8 /* assert.c */,
B62E50301A3A628900805DD8 /* assert.h */,
B62E50311A3A628900805DD8 /* bits.c */,
B62E50321A3A628900805DD8 /* bits.h */,
B62E50331A3A628900805DD8 /* choice.c */,
B62E50341A3A628900805DD8 /* choice.h */,
B62E50351A3A628900805DD8 /* defs.c */,
B62E50361A3A628900805DD8 /* defs.h */,
B62E50371A3A628900805DD8 /* enum.c */,
B62E50381A3A628900805DD8 /* enum.h */,
B62E50391A3A628900805DD8 /* exn.c */,
B62E503A1A3A628900805DD8 /* exn.h */,
B62E503B1A3A628900805DD8 /* file.c */,
B62E503C1A3A628900805DD8 /* file.h */,
B62E503D1A3A628900805DD8 /* fun.c */,
B62E503E1A3A628900805DD8 /* fun.h */,
B62E503F1A3A628900805DD8 /* hash.c */,
B62E50401A3A628900805DD8 /* hash.h */,
B62E50411A3A628900805DD8 /* in.c */,
B62E50421A3A628900805DD8 /* in.h */,
B62E50431A3A628900805DD8 /* map.c */,
B62E50441A3A628900805DD8 /* map.h */,
B62E50451A3A628900805DD8 /* mem.c */,
B62E50461A3A628900805DD8 /* mem.h */,
B62E50471A3A628900805DD8 /* out.c */,
B62E50481A3A628900805DD8 /* out.h */,
B62E50491A3A628900805DD8 /* prime.c */,
B62E504A1A3A628900805DD8 /* prime.h */,
B62E504B1A3A628900805DD8 /* seq.c */,
B62E504C1A3A628900805DD8 /* seq.h */,
B62E504D1A3A628900805DD8 /* string.c */,
B62E504E1A3A628900805DD8 /* string.h */,
B62E504F1A3A628900805DD8 /* sysdeps.h */,
B62E50501A3A628900805DD8 /* ucs.c */,
B62E50511A3A628900805DD8 /* ucs.h */,
B62E50521A3A628900805DD8 /* utf8.c */,
B62E50531A3A628900805DD8 /* utf8.h */,
B62E50541A3A628900805DD8 /* variant.c */,
B62E50551A3A628900805DD8 /* variant.h */,
);
path = gu;
sourceTree = "<group>";
};
B62E50561A3A628900805DD8 /* pgf */ = {
isa = PBXGroup;
children = (
B62E50571A3A628900805DD8 /* data.c */,
B62E50581A3A628900805DD8 /* data.h */,
B62E50591A3A628900805DD8 /* evaluator.c */,
B62E505A1A3A628900805DD8 /* evaluator.h */,
B62E505B1A3A628900805DD8 /* expr.c */,
B62E505C1A3A628900805DD8 /* expr.h */,
B62E505D1A3A628900805DD8 /* graphviz.c */,
B62E505E1A3A628900805DD8 /* graphviz.h */,
B62E505F1A3A628900805DD8 /* hopu.c */,
B62E50601A3A628900805DD8 /* hopu.h */,
B62E50611A3A628900805DD8 /* jit.c */,
B62E50621A3A628900805DD8 /* lightning */,
B62E50831A3A628900805DD8 /* lightning.h */,
B62E50841A3A628900805DD8 /* linearizer.c */,
B62E50851A3A628900805DD8 /* linearizer.h */,
B62E50861A3A628900805DD8 /* literals.c */,
B62E50871A3A628900805DD8 /* literals.h */,
B62E50881A3A628900805DD8 /* parser.c */,
B62E50891A3A628900805DD8 /* parseval.c */,
B62E508A1A3A628900805DD8 /* pgf.c */,
B62E508B1A3A628900805DD8 /* pgf.h */,
B62E508C1A3A628900805DD8 /* printer.c */,
B62E508D1A3A628900805DD8 /* reader.c */,
B62E508E1A3A628900805DD8 /* reader.h */,
B62E508F1A3A628900805DD8 /* reasoner.c */,
B62E50901A3A628900805DD8 /* reasoner.h */,
B62E50911A3A628900805DD8 /* typechecker.c */,
);
path = pgf;
sourceTree = "<group>";
};
B62E50621A3A628900805DD8 /* lightning */ = {
isa = PBXGroup;
children = (
B62E50631A3A628900805DD8 /* arm */,
B62E506A1A3A628900805DD8 /* asm-common.h */,
B62E506B1A3A628900805DD8 /* core-common.h */,
B62E506C1A3A628900805DD8 /* fp-common.h */,
B62E506D1A3A628900805DD8 /* funcs-common.h */,
B62E506E1A3A628900805DD8 /* i386 */,
B62E50791A3A628900805DD8 /* ppc */,
B62E507E1A3A628900805DD8 /* sparc */,
);
path = lightning;
sourceTree = "<group>";
};
B62E50631A3A628900805DD8 /* arm */ = {
isa = PBXGroup;
children = (
B62E50641A3A628900805DD8 /* asm.h */,
B62E50651A3A628900805DD8 /* core.h */,
B62E50661A3A628900805DD8 /* fp-swf.h */,
B62E50671A3A628900805DD8 /* fp-vfp.h */,
B62E50681A3A628900805DD8 /* fp.h */,
B62E50691A3A628900805DD8 /* funcs.h */,
);
path = arm;
sourceTree = "<group>";
};
B62E506E1A3A628900805DD8 /* i386 */ = {
isa = PBXGroup;
children = (
B62E506F1A3A628900805DD8 /* asm-32.h */,
B62E50701A3A628900805DD8 /* asm-64.h */,
B62E50711A3A628900805DD8 /* asm.h */,
B62E50721A3A628900805DD8 /* core-32.h */,
B62E50731A3A628900805DD8 /* core-64.h */,
B62E50741A3A628900805DD8 /* core.h */,
B62E50751A3A628900805DD8 /* fp-32.h */,
B62E50761A3A628900805DD8 /* fp-64.h */,
B62E50771A3A628900805DD8 /* fp.h */,
B62E50781A3A628900805DD8 /* funcs.h */,
);
path = i386;
sourceTree = "<group>";
};
B62E50791A3A628900805DD8 /* ppc */ = {
isa = PBXGroup;
children = (
B62E507A1A3A628900805DD8 /* asm.h */,
B62E507B1A3A628900805DD8 /* core.h */,
B62E507C1A3A628900805DD8 /* fp.h */,
B62E507D1A3A628900805DD8 /* funcs.h */,
);
path = ppc;
sourceTree = "<group>";
};
B62E507E1A3A628900805DD8 /* sparc */ = {
isa = PBXGroup;
children = (
B62E507F1A3A628900805DD8 /* asm.h */,
B62E50801A3A628900805DD8 /* core.h */,
B62E50811A3A628900805DD8 /* fp.h */,
B62E50821A3A628900805DD8 /* funcs.h */,
);
path = sparc;
sourceTree = "<group>";
};
B63010921A5716BF00AD56A3 /* images */ = {
isa = PBXGroup;
children = (
B63010931A5716BF00AD56A3 /* ic_action_switch.png */,
B63010941A5716BF00AD56A3 /* ic_app.png */,
B63010951A5716BF00AD56A3 /* ic_keyboard.png */,
B63010961A5716BF00AD56A3 /* ic_mic.png */,
);
path = images;
sourceTree = "<group>";
};
B65248241A36598400C8BD53 = {
isa = PBXGroup;
children = (
B62B41401A63241700296901 /* UIKit.framework */,
B62E502E1A3A628900805DD8 /* gu */,
B62E50561A3A628900805DD8 /* pgf */,
B62C44F01A37A7DA003613DD /* grammars */,
B652482F1A36598400C8BD53 /* gf-ios-swift */,
B65248451A36598400C8BD53 /* gf-ios-swiftTests */,
B652482E1A36598400C8BD53 /* Products */,
);
sourceTree = "<group>";
};
B652482E1A36598400C8BD53 /* Products */ = {
isa = PBXGroup;
children = (
B652482D1A36598400C8BD53 /* gf-ios-swift.app */,
B65248421A36598400C8BD53 /* gf-ios-swiftTests.xctest */,
);
name = Products;
sourceTree = "<group>";
};
B652482F1A36598400C8BD53 /* gf-ios-swift */ = {
isa = PBXGroup;
children = (
B65248321A36598400C8BD53 /* AppDelegate.swift */,
B630109B1A5764A700AD56A3 /* HelpViewController.swift */,
B65248341A36598400C8BD53 /* ViewController.swift */,
B62B413C1A5F513D00296901 /* Languages.swift */,
B65248361A36598400C8BD53 /* Main.storyboard */,
B65248391A36598400C8BD53 /* Images.xcassets */,
B652483B1A36598400C8BD53 /* LaunchScreen.xib */,
B65248301A36598400C8BD53 /* Supporting Files */,
B62C44F21A37AA7F003613DD /* gf-ios-swift-Bridging-Header.h */,
B63010901A54C78400AD56A3 /* Translator.swift */,
B62B413E1A61CCF700296901 /* Colors.swift */,
);
path = "gf-ios-swift";
sourceTree = "<group>";
};
B65248301A36598400C8BD53 /* Supporting Files */ = {
isa = PBXGroup;
children = (
B63010921A5716BF00AD56A3 /* images */,
B65248311A36598400C8BD53 /* Info.plist */,
);
name = "Supporting Files";
sourceTree = "<group>";
};
B65248451A36598400C8BD53 /* gf-ios-swiftTests */ = {
isa = PBXGroup;
children = (
B65248481A36598400C8BD53 /* gf_ios_swiftTests.swift */,
B65248461A36598400C8BD53 /* Supporting Files */,
);
path = "gf-ios-swiftTests";
sourceTree = "<group>";
};
B65248461A36598400C8BD53 /* Supporting Files */ = {
isa = PBXGroup;
children = (
B65248471A36598400C8BD53 /* Info.plist */,
);
name = "Supporting Files";
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
B652482C1A36598400C8BD53 /* gf-ios-swift */ = {
isa = PBXNativeTarget;
buildConfigurationList = B652484C1A36598400C8BD53 /* Build configuration list for PBXNativeTarget "gf-ios-swift" */;
buildPhases = (
B65248291A36598400C8BD53 /* Sources */,
B652482A1A36598400C8BD53 /* Frameworks */,
B652482B1A36598400C8BD53 /* Resources */,
);
buildRules = (
);
dependencies = (
);
name = "gf-ios-swift";
productName = "gf-ios-swift";
productReference = B652482D1A36598400C8BD53 /* gf-ios-swift.app */;
productType = "com.apple.product-type.application";
};
B65248411A36598400C8BD53 /* gf-ios-swiftTests */ = {
isa = PBXNativeTarget;
buildConfigurationList = B652484F1A36598400C8BD53 /* Build configuration list for PBXNativeTarget "gf-ios-swiftTests" */;
buildPhases = (
B652483E1A36598400C8BD53 /* Sources */,
B652483F1A36598400C8BD53 /* Frameworks */,
B65248401A36598400C8BD53 /* Resources */,
);
buildRules = (
);
dependencies = (
B65248441A36598400C8BD53 /* PBXTargetDependency */,
);
name = "gf-ios-swiftTests";
productName = "gf-ios-swiftTests";
productReference = B65248421A36598400C8BD53 /* gf-ios-swiftTests.xctest */;
productType = "com.apple.product-type.bundle.unit-test";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
B65248251A36598400C8BD53 /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0610;
ORGANIZATIONNAME = Vyvyan;
TargetAttributes = {
B652482C1A36598400C8BD53 = {
CreatedOnToolsVersion = 6.1.1;
DevelopmentTeam = D6DRLEKR8M;
};
B65248411A36598400C8BD53 = {
CreatedOnToolsVersion = 6.1.1;
TestTargetID = B652482C1A36598400C8BD53;
};
};
};
buildConfigurationList = B65248281A36598400C8BD53 /* Build configuration list for PBXProject "gf-ios-swift" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
en,
Base,
);
mainGroup = B65248241A36598400C8BD53;
productRefGroup = B652482E1A36598400C8BD53 /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
B652482C1A36598400C8BD53 /* gf-ios-swift */,
B65248411A36598400C8BD53 /* gf-ios-swiftTests */,
);
};
/* End PBXProject section */
/* Begin PBXResourcesBuildPhase section */
B652482B1A36598400C8BD53 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
B63010971A5716BF00AD56A3 /* ic_action_switch.png in Resources */,
B630109A1A5716BF00AD56A3 /* ic_mic.png in Resources */,
B63010981A5716BF00AD56A3 /* ic_app.png in Resources */,
B63010991A5716BF00AD56A3 /* ic_keyboard.png in Resources */,
B65248381A36598400C8BD53 /* Main.storyboard in Resources */,
B652483D1A36598400C8BD53 /* LaunchScreen.xib in Resources */,
B62C44F11A37A7DA003613DD /* grammars in Resources */,
B652483A1A36598400C8BD53 /* Images.xcassets in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
B65248401A36598400C8BD53 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
B65248291A36598400C8BD53 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
B62E50B11A3A628900805DD8 /* reader.c in Sources */,
B62E50921A3A628900805DD8 /* assert.c in Sources */,
B62E509C1A3A628900805DD8 /* map.c in Sources */,
B62E50971A3A628900805DD8 /* exn.c in Sources */,
B62E50931A3A628900805DD8 /* bits.c in Sources */,
B62E50A21A3A628900805DD8 /* ucs.c in Sources */,
B62E50B01A3A628900805DD8 /* printer.c in Sources */,
B62E50A81A3A628900805DD8 /* graphviz.c in Sources */,
B62E50A51A3A628900805DD8 /* data.c in Sources */,
B62E50941A3A628900805DD8 /* choice.c in Sources */,
B62E509F1A3A628900805DD8 /* prime.c in Sources */,
B63010911A54C78400AD56A3 /* Translator.swift in Sources */,
B62E50A11A3A628900805DD8 /* string.c in Sources */,
B62E50AC1A3A628900805DD8 /* literals.c in Sources */,
B62E50AB1A3A628900805DD8 /* linearizer.c in Sources */,
B65248351A36598400C8BD53 /* ViewController.swift in Sources */,
B62E509E1A3A628900805DD8 /* out.c in Sources */,
B62E50AA1A3A628900805DD8 /* jit.c in Sources */,
B62E50A41A3A628900805DD8 /* variant.c in Sources */,
B62E50A91A3A628900805DD8 /* hopu.c in Sources */,
B62E50A31A3A628900805DD8 /* utf8.c in Sources */,
B65248331A36598400C8BD53 /* AppDelegate.swift in Sources */,
B62E50AF1A3A628900805DD8 /* pgf.c in Sources */,
B62B413D1A5F513D00296901 /* Languages.swift in Sources */,
B62E50951A3A628900805DD8 /* defs.c in Sources */,
B62E50A01A3A628900805DD8 /* seq.c in Sources */,
B62E50991A3A628900805DD8 /* fun.c in Sources */,
B62E50B21A3A628900805DD8 /* reasoner.c in Sources */,
B62E509D1A3A628900805DD8 /* mem.c in Sources */,
B62E509B1A3A628900805DD8 /* in.c in Sources */,
B62E509A1A3A628900805DD8 /* hash.c in Sources */,
B62B413F1A61CCF700296901 /* Colors.swift in Sources */,
B62E50B31A3A628900805DD8 /* typechecker.c in Sources */,
B630109C1A5764A700AD56A3 /* HelpViewController.swift in Sources */,
B62E50961A3A628900805DD8 /* enum.c in Sources */,
B62E50981A3A628900805DD8 /* file.c in Sources */,
B62E50A71A3A628900805DD8 /* expr.c in Sources */,
B62E50AD1A3A628900805DD8 /* parser.c in Sources */,
B62E50A61A3A628900805DD8 /* evaluator.c in Sources */,
B62E50AE1A3A628900805DD8 /* parseval.c in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
B652483E1A36598400C8BD53 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
B65248491A36598400C8BD53 /* gf_ios_swiftTests.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin PBXTargetDependency section */
B65248441A36598400C8BD53 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = B652482C1A36598400C8BD53 /* gf-ios-swift */;
targetProxy = B65248431A36598400C8BD53 /* PBXContainerItemProxy */;
};
/* End PBXTargetDependency section */
/* Begin PBXVariantGroup section */
B65248361A36598400C8BD53 /* Main.storyboard */ = {
isa = PBXVariantGroup;
children = (
B65248371A36598400C8BD53 /* Base */,
);
name = Main.storyboard;
sourceTree = "<group>";
};
B652483B1A36598400C8BD53 /* LaunchScreen.xib */ = {
isa = PBXVariantGroup;
children = (
B652483C1A36598400C8BD53 /* Base */,
);
name = LaunchScreen.xib;
sourceTree = "<group>";
};
/* End PBXVariantGroup section */
/* Begin XCBuildConfiguration section */
B652484A1A36598400C8BD53 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 8.1;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
};
B652484B1A36598400C8BD53 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = YES;
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 8.1;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES;
};
name = Release;
};
B652484D1A36598400C8BD53 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_IDENTITY = "iPhone Developer";
HEADER_SEARCH_PATHS = (
"$(inherited)",
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
"$(PROJECT_DIR)",
);
INFOPLIST_FILE = "gf-ios-swift/Info.plist";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)",
"$(PROJECT_DIR)/gf-ios-swift",
);
OTHER_CFLAGS = "";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "$(PROJECT_DIR)/gf-ios-swift/gf-ios-swift-Bridging-Header.h";
};
name = Debug;
};
B652484E1A36598400C8BD53 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_IDENTITY = "iPhone Developer";
HEADER_SEARCH_PATHS = (
"$(inherited)",
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
"$(PROJECT_DIR)",
);
INFOPLIST_FILE = "gf-ios-swift/Info.plist";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)",
"$(PROJECT_DIR)/gf-ios-swift",
);
OTHER_CFLAGS = "";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "$(PROJECT_DIR)/gf-ios-swift/gf-ios-swift-Bridging-Header.h";
};
name = Release;
};
B65248501A36598400C8BD53 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
FRAMEWORK_SEARCH_PATHS = (
"$(SDKROOT)/Developer/Library/Frameworks",
"$(inherited)",
);
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
INFOPLIST_FILE = "gf-ios-swiftTests/Info.plist";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_NAME = "$(TARGET_NAME)";
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/gf-ios-swift.app/gf-ios-swift";
};
name = Debug;
};
B65248511A36598400C8BD53 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
FRAMEWORK_SEARCH_PATHS = (
"$(SDKROOT)/Developer/Library/Frameworks",
"$(inherited)",
);
INFOPLIST_FILE = "gf-ios-swiftTests/Info.plist";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_NAME = "$(TARGET_NAME)";
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/gf-ios-swift.app/gf-ios-swift";
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
B65248281A36598400C8BD53 /* Build configuration list for PBXProject "gf-ios-swift" */ = {
isa = XCConfigurationList;
buildConfigurations = (
B652484A1A36598400C8BD53 /* Debug */,
B652484B1A36598400C8BD53 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
B652484C1A36598400C8BD53 /* Build configuration list for PBXNativeTarget "gf-ios-swift" */ = {
isa = XCConfigurationList;
buildConfigurations = (
B652484D1A36598400C8BD53 /* Debug */,
B652484E1A36598400C8BD53 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
B652484F1A36598400C8BD53 /* Build configuration list for PBXNativeTarget "gf-ios-swiftTests" */ = {
isa = XCConfigurationList;
buildConfigurations = (
B65248501A36598400C8BD53 /* Debug */,
B65248511A36598400C8BD53 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = B65248251A36598400C8BD53 /* Project object */;
}

View File

@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "self:gf-ios-swift.xcodeproj">
</FileRef>
</Workspace>

View File

@@ -0,0 +1,41 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDESourceControlProjectFavoriteDictionaryKey</key>
<false/>
<key>IDESourceControlProjectIdentifier</key>
<string>5CFAFFCD-97BB-4806-823D-973AFB2DB882</string>
<key>IDESourceControlProjectName</key>
<string>gf-ios-swift</string>
<key>IDESourceControlProjectOriginsDictionary</key>
<dict>
<key>716509F1F37F996016FEDF093BF5C7F801D32B1E</key>
<string>bitbucket.org:devalanteriel/gf-swift.git</string>
</dict>
<key>IDESourceControlProjectPath</key>
<string>gf-ios-swift/gf-ios-swift.xcodeproj</string>
<key>IDESourceControlProjectRelativeInstallPathDictionary</key>
<dict>
<key>716509F1F37F996016FEDF093BF5C7F801D32B1E</key>
<string>../../..</string>
</dict>
<key>IDESourceControlProjectURL</key>
<string>bitbucket.org:devalanteriel/gf-swift.git</string>
<key>IDESourceControlProjectVersion</key>
<integer>111</integer>
<key>IDESourceControlProjectWCCIdentifier</key>
<string>716509F1F37F996016FEDF093BF5C7F801D32B1E</string>
<key>IDESourceControlProjectWCConfigurations</key>
<array>
<dict>
<key>IDESourceControlRepositoryExtensionIdentifierKey</key>
<string>public.vcs.git</string>
<key>IDESourceControlWCCIdentifierKey</key>
<string>716509F1F37F996016FEDF093BF5C7F801D32B1E</string>
<key>IDESourceControlWCCName</key>
<string>gf-ios-swift</string>
</dict>
</array>
</dict>
</plist>

View File

@@ -0,0 +1,38 @@
import UIKit
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
// Override point for customization after application launch.
return true
}
func applicationWillResignActive(application: UIApplication) {
// 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.
// 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.
}
func applicationDidEnterBackground(application: UIApplication) {
// 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.
// If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
}
func applicationWillEnterForeground(application: UIApplication) {
// 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.
}
func applicationDidBecomeActive(application: UIApplication) {
// 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.
}
func applicationWillTerminate(application: UIApplication) {
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
}
}

View File

@@ -0,0 +1,32 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="6254" systemVersion="14B25" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6247"/>
<capability name="Constraints with non-1.0 multipliers" minToolsVersion="5.1"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<view contentMode="scaleToFill" id="iN0-l3-epB">
<rect key="frame" x="0.0" y="0.0" width="480" height="480"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="gf-ios-swift" textAlignment="center" lineBreakMode="middleTruncation" baselineAdjustment="alignBaselines" minimumFontSize="18" translatesAutoresizingMaskIntoConstraints="NO" id="kId-c2-rCX">
<rect key="frame" x="20" y="140" width="441" height="43"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="36"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
<constraints>
<constraint firstItem="kId-c2-rCX" firstAttribute="centerY" secondItem="iN0-l3-epB" secondAttribute="bottom" multiplier="1/3" constant="1" id="5cJ-9S-tgC"/>
<constraint firstAttribute="centerX" secondItem="kId-c2-rCX" secondAttribute="centerX" id="Koa-jz-hwk"/>
<constraint firstItem="kId-c2-rCX" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="20" symbolic="YES" id="fvb-Df-36g"/>
</constraints>
<nil key="simulatedStatusBarMetrics"/>
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
<point key="canvasLocation" x="548" y="455"/>
</view>
</objects>
</document>

View File

@@ -0,0 +1,242 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="6254" systemVersion="14B25" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="BYZ-38-t0r">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6247"/>
<capability name="Alignment constraints to the first baseline" minToolsVersion="6.0"/>
<capability name="Alignment constraints with different attributes" minToolsVersion="5.1"/>
<capability name="Constraints to layout margins" minToolsVersion="6.0"/>
</dependencies>
<scenes>
<!--Main view controller-->
<scene sceneID="tne-QT-ifu">
<objects>
<viewController title="Main view controller" id="BYZ-38-t0r" customClass="ViewController" customModule="gf_ios_swift" customModuleProvider="target" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="l7I-EE-PVz"/>
<viewControllerLayoutGuide type="bottom" id="2id-YU-Gsq"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="wae-JL-Lho">
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="jLE-dy-saG">
<rect key="frame" x="0.0" y="20" width="600" height="54"/>
<subviews>
<imageView opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" image="ic_app.png" translatesAutoresizingMaskIntoConstraints="NO" id="uee-Kw-8PE">
<rect key="frame" x="8" y="9" width="36" height="36"/>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="GF Offline Translator" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="mPU-2n-FFA">
<rect key="frame" x="52" y="16" width="157" height="21"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="3n3-Sf-P9J">
<rect key="frame" x="557" y="12" width="35" height="30"/>
<constraints>
<constraint firstAttribute="width" constant="35" id="qUL-Aa-ctK"/>
</constraints>
<state key="normal" title="Help">
<color key="titleColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
</state>
<connections>
<segue destination="hV5-UM-8hP" kind="show" id="Wbx-xn-VFi"/>
</connections>
</button>
</subviews>
<color key="backgroundColor" red="0.2265625" green="0.2265625" blue="0.2265625" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstAttribute="bottom" secondItem="mPU-2n-FFA" secondAttribute="bottom" constant="17" id="1y1-Dl-MV6"/>
<constraint firstItem="mPU-2n-FFA" firstAttribute="baseline" secondItem="3n3-Sf-P9J" secondAttribute="baseline" id="5g0-IW-7M5"/>
<constraint firstItem="uee-Kw-8PE" firstAttribute="leading" secondItem="jLE-dy-saG" secondAttribute="leadingMargin" id="CqM-xw-M6e"/>
<constraint firstItem="uee-Kw-8PE" firstAttribute="centerY" secondItem="3n3-Sf-P9J" secondAttribute="centerY" id="J2z-8G-1d5"/>
<constraint firstItem="mPU-2n-FFA" firstAttribute="leading" secondItem="uee-Kw-8PE" secondAttribute="trailing" constant="8" symbolic="YES" id="N02-lW-stz"/>
<constraint firstItem="3n3-Sf-P9J" firstAttribute="trailing" secondItem="jLE-dy-saG" secondAttribute="trailingMargin" id="Ydq-87-ZdY"/>
<constraint firstItem="mPU-2n-FFA" firstAttribute="top" secondItem="jLE-dy-saG" secondAttribute="top" constant="16" id="afL-yS-6ju"/>
<constraint firstItem="mPU-2n-FFA" firstAttribute="baseline" secondItem="3n3-Sf-P9J" secondAttribute="firstBaseline" id="ffK-JY-sh8"/>
<constraint firstItem="uee-Kw-8PE" firstAttribute="centerY" secondItem="jLE-dy-saG" secondAttribute="centerY" id="h0F-TI-Xbk"/>
</constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="wH0-0y-PJl">
<rect key="frame" x="0.0" y="74" width="600" height="90"/>
<subviews>
<textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" text="English" borderStyle="roundedRect" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="g1E-VP-f78">
<rect key="frame" x="8" y="8" width="180" height="30"/>
<constraints>
<constraint firstAttribute="width" constant="180" id="KtT-7A-FcQ"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="12"/>
<textInputTraits key="textInputTraits"/>
</textField>
<textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" text="Swedish" borderStyle="roundedRect" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="31S-0q-S0M">
<rect key="frame" x="8" y="52" width="180" height="30"/>
<fontDescription key="fontDescription" type="system" pointSize="12"/>
<textInputTraits key="textInputTraits" enablesReturnKeyAutomatically="YES"/>
</textField>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="q8W-YQ-yVf">
<rect key="frame" x="546" y="22" width="46" height="46"/>
<constraints>
<constraint firstAttribute="width" constant="46" id="wA6-fY-6Yn"/>
</constraints>
<state key="normal" backgroundImage="ic_mic.png">
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
</state>
<connections>
<action selector="openMicrophone:" destination="BYZ-38-t0r" eventType="touchUpInside" id="Sxu-s0-KiU"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Fcg-Gz-VL8">
<rect key="frame" x="492" y="12" width="46" height="46"/>
<constraints>
<constraint firstAttribute="width" constant="46" id="2Iu-eu-EEi"/>
</constraints>
<state key="normal" backgroundImage="ic_keyboard.png">
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
</state>
<connections>
<action selector="openKeyboard:" destination="BYZ-38-t0r" eventType="touchUpInside" id="mXc-7v-Gym"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="lZ6-Um-4nv">
<rect key="frame" x="438" y="22" width="46" height="46"/>
<constraints>
<constraint firstAttribute="width" constant="46" id="skb-99-Z93"/>
</constraints>
<state key="normal" backgroundImage="ic_action_switch.png">
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
</state>
<connections>
<action selector="switchLanguages:" destination="BYZ-38-t0r" eventType="touchUpInside" id="gxh-Mn-swH"/>
</connections>
</button>
</subviews>
<color key="backgroundColor" red="0.83405991020000003" green="0.83405991020000003" blue="0.83405991020000003" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstItem="g1E-VP-f78" firstAttribute="leading" secondItem="31S-0q-S0M" secondAttribute="leading" id="Axm-A7-AW5"/>
<constraint firstItem="31S-0q-S0M" firstAttribute="bottom" secondItem="wH0-0y-PJl" secondAttribute="bottomMargin" id="D3J-OI-cOp"/>
<constraint firstItem="g1E-VP-f78" firstAttribute="leading" secondItem="wH0-0y-PJl" secondAttribute="leadingMargin" id="Gb3-Nd-JYg"/>
<constraint firstItem="Fcg-Gz-VL8" firstAttribute="leading" secondItem="lZ6-Um-4nv" secondAttribute="trailing" constant="8" symbolic="YES" id="H09-XK-pR5"/>
<constraint firstAttribute="bottom" secondItem="Fcg-Gz-VL8" secondAttribute="bottom" constant="32" id="Jdk-k5-zmU"/>
<constraint firstItem="lZ6-Um-4nv" firstAttribute="baseline" secondItem="q8W-YQ-yVf" secondAttribute="baseline" id="R1m-B4-uTV"/>
<constraint firstItem="q8W-YQ-yVf" firstAttribute="trailing" secondItem="wH0-0y-PJl" secondAttribute="trailingMargin" id="SoL-3l-uQ3"/>
<constraint firstItem="q8W-YQ-yVf" firstAttribute="firstBaseline" secondItem="lZ6-Um-4nv" secondAttribute="firstBaseline" id="T7u-nU-sjg"/>
<constraint firstItem="g1E-VP-f78" firstAttribute="top" secondItem="wH0-0y-PJl" secondAttribute="topMargin" id="Why-mX-52K"/>
<constraint firstItem="Fcg-Gz-VL8" firstAttribute="top" secondItem="wH0-0y-PJl" secondAttribute="top" constant="12" id="ahZ-rS-wDW"/>
<constraint firstItem="lZ6-Um-4nv" firstAttribute="top" secondItem="q8W-YQ-yVf" secondAttribute="top" id="eGp-Dy-lng"/>
<constraint firstItem="lZ6-Um-4nv" firstAttribute="top" secondItem="wH0-0y-PJl" secondAttribute="top" constant="22" id="flR-i8-Tx1"/>
<constraint firstItem="q8W-YQ-yVf" firstAttribute="bottom" secondItem="lZ6-Um-4nv" secondAttribute="bottom" id="iqb-lC-ww8"/>
<constraint firstItem="q8W-YQ-yVf" firstAttribute="centerY" secondItem="wH0-0y-PJl" secondAttribute="centerY" id="mjJ-gt-CuI"/>
<constraint firstItem="g1E-VP-f78" firstAttribute="trailing" secondItem="31S-0q-S0M" secondAttribute="trailing" id="oUn-Pm-i8j"/>
<constraint firstItem="q8W-YQ-yVf" firstAttribute="leading" secondItem="Fcg-Gz-VL8" secondAttribute="trailing" constant="8" symbolic="YES" id="xwg-yQ-qaP"/>
</constraints>
</view>
<scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" misplaced="YES" translatesAutoresizingMaskIntoConstraints="NO" id="g83-TI-wJI">
<rect key="frame" x="0.0" y="172" width="600" height="428"/>
</scrollView>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstItem="g83-TI-wJI" firstAttribute="top" secondItem="wae-JL-Lho" secondAttribute="top" constant="180" id="0cO-n9-ttA"/>
<constraint firstItem="wH0-0y-PJl" firstAttribute="trailing" secondItem="jLE-dy-saG" secondAttribute="trailing" id="DXh-P8-F7d"/>
<constraint firstItem="jLE-dy-saG" firstAttribute="leading" secondItem="wH0-0y-PJl" secondAttribute="leading" id="Di9-vy-kd0"/>
<constraint firstItem="wH0-0y-PJl" firstAttribute="top" secondItem="jLE-dy-saG" secondAttribute="bottom" id="FNh-FO-Vt1"/>
<constraint firstItem="wH0-0y-PJl" firstAttribute="leading" secondItem="g83-TI-wJI" secondAttribute="leading" id="J9k-62-AZR"/>
<constraint firstItem="wH0-0y-PJl" firstAttribute="trailing" secondItem="g83-TI-wJI" secondAttribute="trailing" id="JwC-oH-gH3"/>
<constraint firstItem="g83-TI-wJI" firstAttribute="bottom" secondItem="2id-YU-Gsq" secondAttribute="top" id="NeO-Dx-ijg"/>
<constraint firstItem="wH0-0y-PJl" firstAttribute="leading" secondItem="wae-JL-Lho" secondAttribute="leading" id="Tdu-cl-vkb"/>
<constraint firstItem="jLE-dy-saG" firstAttribute="top" secondItem="l7I-EE-PVz" secondAttribute="bottom" id="l44-L7-DvW"/>
<constraint firstItem="g83-TI-wJI" firstAttribute="top" secondItem="wH0-0y-PJl" secondAttribute="bottom" constant="16" id="qEh-li-kCJ"/>
<constraint firstAttribute="trailing" secondItem="wH0-0y-PJl" secondAttribute="trailing" id="z8B-qQ-x9h"/>
</constraints>
</view>
<connections>
<outlet property="inLanguageField" destination="g1E-VP-f78" id="mYE-F2-WDr"/>
<outlet property="outLanguageField" destination="31S-0q-S0M" id="MtL-xd-MTp"/>
<outlet property="translationsView" destination="g83-TI-wJI" id="BQG-2F-M7R"/>
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="441" y="260"/>
</scene>
<!--Help View Controller-->
<scene sceneID="B4j-Du-kfE">
<objects>
<viewController id="hV5-UM-8hP" customClass="HelpViewController" customModule="gf_ios_swift" customModuleProvider="target" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="R7u-gU-P1Q"/>
<viewControllerLayoutGuide type="bottom" id="Rse-F6-hEW"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="bOe-jW-W6L">
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Uq7-9l-AXI">
<rect key="frame" x="0.0" y="20" width="600" height="54"/>
<subviews>
<imageView opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" image="ic_app.png" translatesAutoresizingMaskIntoConstraints="NO" id="FGK-rl-cxy">
<rect key="frame" x="8" y="9" width="36" height="36"/>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="GF Offline Translator" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Fhs-5e-tT6">
<rect key="frame" x="52" y="16" width="157" height="21"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="rcA-bk-D0U">
<rect key="frame" x="557" y="12" width="35" height="30"/>
<state key="normal" title="Back">
<color key="titleColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
</state>
<connections>
<action selector="backToMain:" destination="hV5-UM-8hP" eventType="touchUpInside" id="gbz-vX-zeX"/>
</connections>
</button>
</subviews>
<color key="backgroundColor" red="0.2265625" green="0.2265625" blue="0.2265625" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstItem="FGK-rl-cxy" firstAttribute="centerY" secondItem="Uq7-9l-AXI" secondAttribute="centerY" id="8jw-J3-DrQ"/>
<constraint firstItem="Fhs-5e-tT6" firstAttribute="top" secondItem="Uq7-9l-AXI" secondAttribute="top" constant="16" id="H3f-Ty-IXp"/>
<constraint firstItem="Fhs-5e-tT6" firstAttribute="leading" secondItem="FGK-rl-cxy" secondAttribute="trailing" constant="8" symbolic="YES" id="QiZ-YR-hv3"/>
<constraint firstItem="FGK-rl-cxy" firstAttribute="centerY" secondItem="rcA-bk-D0U" secondAttribute="centerY" id="WhQ-TP-XF6"/>
<constraint firstItem="rcA-bk-D0U" firstAttribute="trailing" secondItem="Uq7-9l-AXI" secondAttribute="trailingMargin" id="nK2-Dy-kAb"/>
<constraint firstItem="Fhs-5e-tT6" firstAttribute="baseline" secondItem="rcA-bk-D0U" secondAttribute="firstBaseline" id="nPm-M8-phv"/>
<constraint firstItem="rcA-bk-D0U" firstAttribute="baseline" secondItem="Fhs-5e-tT6" secondAttribute="baseline" id="rMp-YH-284"/>
<constraint firstItem="FGK-rl-cxy" firstAttribute="leading" secondItem="Uq7-9l-AXI" secondAttribute="leadingMargin" id="yKh-eI-L5b"/>
<constraint firstItem="FGK-rl-cxy" firstAttribute="top" secondItem="Uq7-9l-AXI" secondAttribute="top" constant="9" id="ynj-zV-Yd5"/>
</constraints>
</view>
<webView contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="bgm-Yn-C8w">
<rect key="frame" x="0.0" y="74" width="600" height="526"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
</webView>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstItem="Uq7-9l-AXI" firstAttribute="leading" secondItem="bOe-jW-W6L" secondAttribute="leading" id="Mom-vU-jac"/>
<constraint firstItem="bgm-Yn-C8w" firstAttribute="trailing" secondItem="Uq7-9l-AXI" secondAttribute="trailing" id="fc7-8r-ipb"/>
<constraint firstAttribute="trailing" secondItem="Uq7-9l-AXI" secondAttribute="trailing" id="pg0-uu-87C"/>
<constraint firstItem="bgm-Yn-C8w" firstAttribute="bottom" secondItem="Rse-F6-hEW" secondAttribute="top" id="ske-sI-SW3"/>
<constraint firstItem="bgm-Yn-C8w" firstAttribute="top" secondItem="Uq7-9l-AXI" secondAttribute="bottom" id="tLc-we-gBp"/>
<constraint firstItem="bgm-Yn-C8w" firstAttribute="leading" secondItem="Uq7-9l-AXI" secondAttribute="leading" id="wvo-y4-aJm"/>
<constraint firstItem="Uq7-9l-AXI" firstAttribute="top" secondItem="bOe-jW-W6L" secondAttribute="top" constant="20" id="x73-hi-CDW"/>
</constraints>
</view>
<connections>
<outlet property="helpView" destination="bgm-Yn-C8w" id="cm9-Jg-J95"/>
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="qSQ-Y9-ECH" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="1056" y="260"/>
</scene>
</scenes>
<resources>
<image name="ic_action_switch.png" width="48" height="48"/>
<image name="ic_app.png" width="36" height="36"/>
<image name="ic_keyboard.png" width="48" height="48"/>
<image name="ic_mic.png" width="48" height="48"/>
</resources>
</document>

View File

@@ -0,0 +1,72 @@
import UIKit
import Foundation
// An extension to UIColor which allows the use of hex initialisation
extension UIColor {
convenience init(hex: Int) {
let components = (
red: CGFloat((hex >> 16) & 0xff) / 255,
green: CGFloat((hex >> 08) & 0xff) / 255,
blue: CGFloat((hex >> 00) & 0xff) / 255
)
self.init(red: components.red, green: components.green, blue: components.blue, alpha: 1.0)
}
}
class Colors {
// Set the background colours to use by the view controller
let backgroundColors = [
"worst": UIColor(hex: 0xff303e),
"best": UIColor(hex: 0x75cd75),
"chunks": UIColor(hex: 0xffb2a5),
"default": UIColor(hex: 0xffff99),
"source": UIColor(hex: 0xcdcded)
]
// Checks a given translated string to see how good it is and hence which background colour it should have
func translationToUIColor(translation: String) -> UIColor {
if (translation.isEmpty) {
return self.backgroundColors["default"]!
}
var firstChar = String(Array(translation)[0])
// Parse by words, marked by %, darkest red color
if (firstChar == "%") {
return self.backgroundColors["worst"]!
}
// Parse by chunks, marked by *, red color
if (firstChar == "*") {
return self.backgroundColors["chunks"]!
}
// Parse error: darkest red color
if (translation.rangeOfString("parse error:") != nil) {
return self.backgroundColors["worst"]!
}
// Unknown linearizations in output
if (translation.rangeOfString("[") != nil) {
return self.backgroundColors["worst"]!
}
// Parse by domain grammar, marked by +, green color
if (firstChar == "+") {
return self.backgroundColors["best"]!
}
// Otherwise, use the default colour
return self.backgroundColors["default"]!
}
}

View File

@@ -0,0 +1,24 @@
import UIKit
// The HelpViewController only contains static text and a back button
class HelpViewController: UIViewController {
@IBOutlet weak var helpView: UIWebView!
// Closes the view when the back button is blicked
@IBAction func backToMain(sender: UIButton) {
dismissViewControllerAnimated(true, completion: nil)
}
override func viewDidLoad() {
super.viewDidLoad()
// Sets the HTML for the UIWebView
self.helpView.loadHTMLString("<html><body><h1>HTML goes here</h1></body></html>", baseURL: nil)
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
}
}

View File

@@ -0,0 +1,68 @@
{
"images" : [
{
"idiom" : "iphone",
"size" : "29x29",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "29x29",
"scale" : "3x"
},
{
"idiom" : "iphone",
"size" : "40x40",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "40x40",
"scale" : "3x"
},
{
"idiom" : "iphone",
"size" : "60x60",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "60x60",
"scale" : "3x"
},
{
"idiom" : "ipad",
"size" : "29x29",
"scale" : "1x"
},
{
"idiom" : "ipad",
"size" : "29x29",
"scale" : "2x"
},
{
"idiom" : "ipad",
"size" : "40x40",
"scale" : "1x"
},
{
"idiom" : "ipad",
"size" : "40x40",
"scale" : "2x"
},
{
"idiom" : "ipad",
"size" : "76x76",
"scale" : "1x"
},
{
"idiom" : "ipad",
"size" : "76x76",
"scale" : "2x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}

View File

@@ -0,0 +1,47 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>GF.$(PRODUCT_NAME:rfc1034identifier)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIMainStoryboardFile</key>
<string>Main</string>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>armv7</string>
</array>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
</dict>
</plist>

View File

@@ -0,0 +1,39 @@
import Foundation
// A simple class for a language, mostly just containing its name etc.
class Language {
let name: String
let abbreviation: String
let bcp: String
init(name: String, abbreviation: String, bcp: String) {
self.name = name
self.abbreviation = abbreviation
self.bcp = bcp
}
}
// If we need to set more languages in the app, this is the place to do it!
// Don't forget to also update the grammars folder :)
let allLanguages: Array<Language> = [
Language(name: "Bulgarian", abbreviation: "Bul", bcp: "en-GB"), // lacks bcp-47 code in iOS, would be bg-BG
Language(name: "Chinese", abbreviation: "Chi", bcp: "zh-CN"),
Language(name: "Dutch", abbreviation: "Dut", bcp: "nl-NL"),
Language(name: "English", abbreviation: "Eng", bcp: "en-GB"),
Language(name: "Finnish", abbreviation: "Fin", bcp: "fi-FI"),
Language(name: "French", abbreviation: "Fre", bcp: "fr-FR"),
Language(name: "German", abbreviation: "Ger", bcp: "de-DE"),
Language(name: "Hindi", abbreviation: "Hin", bcp: "hi-IN"),
Language(name: "Italian", abbreviation: "Ita", bcp: "it-IT"),
Language(name: "Japanese", abbreviation: "Jpn", bcp: "ja-JP"),
Language(name: "Spanish", abbreviation: "Spa", bcp: "es-ES"),
Language(name: "Swedish", abbreviation: "Swe", bcp: "sv-SE"),
Language(name: "Thai", abbreviation: "Tha", bcp: "th-TH")
]
// Callback for morphological analysis - if it turns out this isn't needed, it could be removed
func morphoCallback(callback: UnsafeMutablePointer<PgfMorphoCallback>, lemma: PgfCId, analysis: GuString, prob: prob_t, err: UnsafeMutablePointer<GuExn>) -> Void {
}

View File

@@ -0,0 +1,210 @@
import UIKit
import Foundation
class Translator {
// Create allocation pool, exception frame, and pgf grammar
var pool: COpaquePointer
var err: UnsafeMutablePointer<GuExn>
var out: UnsafeMutablePointer<GuOut>
let pgf: UnsafeMutablePointer<PgfPGF>
init() {
self.pool = gu_new_pool()
self.err = gu_new_exn(self.pool)
self.out = gu_file_out(stdout, self.pool)
// Read the PGF grammar.
var pgfBundle = NSBundle .mainBundle()
var pgfStr = pgfBundle .pathForResource("App", ofType: "pgf", inDirectory: "grammars")
self.pgf = pgf_read(pgfStr!, self.pool, self.err)
}
// Variable to hold concrete grammars
var grammars: [String: (name: String, concr: UnsafeMutablePointer<PgfConcr>)] = [
"to": ("", UnsafeMutablePointer<PgfConcr>()),
"from": ("", UnsafeMutablePointer<PgfConcr>()),
"previous": ("", UnsafeMutablePointer<PgfConcr>())
]
// Loads a grammar (but returns it, doesn't save it)
func loadGrammar(language: String, destination: String) -> Void {
// Switch with the previously used language if applicable
if (language == self.grammars["previous"]!.name) {
return self.switchLanguages(destination, to: "third")
}
// Load the file
var pgfBundle = NSBundle .mainBundle()
var concr = pgf_get_language(self.pgf, "App\(language)")
var fileStr = pgfBundle.pathForResource("App\(language)", ofType: "pgf_c", inDirectory: "grammars")
var file = fopen(fileStr!, "r")
// Load the grammar
pgf_concrete_load(concr, gu_file_in(file, self.pool), self.err)
if (self.grammars[destination]!.concr != UnsafeMutablePointer<PgfConcr>()) {
pgf_concrete_unload(self.grammars[destination]!.concr)
}
self.grammars[destination]!.concr = nil
self.grammars[destination]!.concr = concr
}
// Switches place of from and to concrete grammars
func switchLanguages(from: String, to: String) -> Void {
let tmp = self.grammars[from]!
self.grammars[from] = self.grammars[to]!
self.grammars[to] = tmp
}
// Translate a string
func translate(phrase: String) -> String {
// Intialise temporary pools
var tmpPool = gu_new_pool()
var tmpErr = gu_new_exn(tmpPool)
// Try to parse it fully
var parse = self.parse(phrase, startCat: "Phr", tmpPool: tmpPool, tmpErr: tmpErr)
var translation = ""
if (parse != nil) {
translation = self.linearize(parse, tmpPool: tmpPool, tmpErr: tmpErr)
} else {
translation = self.translateByLookup(phrase)
}
// Clear up resources
gu_exn_clear(tmpErr)
gu_pool_free(tmpPool)
tmpPool = nil
tmpErr = nil
return translation
}
// Translates by lookup - that is, each word by itself
func translateByLookup(phrase: String) -> String {
var translation = "%"
var words = phrase.componentsSeparatedByString(" ")
for word in words {
translation += self.translateWord(word) + " "
}
return translation
}
// Translates a single word - differs from phrase translation as it does morphological analysis
func translateWord(word: String) -> String {
// Intialise temporary pools
var tmpPool = gu_new_pool()
var tmpErr = gu_new_exn(tmpPool)
// Try to parse it fully
var parse = self.parse(word, startCat: "Chunk", tmpPool: tmpPool, tmpErr: tmpErr)
var translation = ""
if (parse != nil) {
translation = self.linearize(parse, tmpPool: tmpPool, tmpErr: tmpErr)
} else {
// Full parse didn't work; try to make a morphological analysis
// This functionality is currently missing due to pointer hell in Swift.
// The full temporary code is commented out below. For now, we just return the uppercased translation instead.
translation = word.uppercaseString
// var lcWord = word.lowercaseString
// var p = UnsafeMutablePointer<(UnsafeMutablePointer<PgfMorphoCallback>, PgfCId, GuString, prob_t, UnsafeMutablePointer<GuExn>) -> ()>.alloc(1)
// p.initialize(morphoCallback)
// var cp = COpaquePointer(p)
// var fp = CFunctionPointer<(UnsafeMutablePointer<PgfMorphoCallback>, PgfCId, GuString, prob_t, UnsafeMutablePointer<GuExn>) -> ()>(cp)
// var callback = PgfMorphoCallback(callback: fp)
// pgf_lookup_morpho(self.grammars["from"]!.concr, word, &callback, tmpErr)
// if (gu_ok(tmpErr)) {
// var analyses = []
// for analysis in analyses {
// var lemma = ???
// if (self.hasLinearization(lemma)) {
// var sbuf = gu_string_buf(tmpPool)
// var sbufstr = gu_string_buf_freeze(sbuf, tmpPool)
// var tmpIn = gu_data_in(String(UTF8String: sbufstr)!, strlen(sbufstr), tmpPool)
// var expr = pgf_read_expr(tmpIn, tmpPool, tmpErr)
// var ep = PgfExprProb(prob: 0, expr: expr)
// translation = self.linearize(ep, tmpPool: tmpPool, tmpErr: tmpErr)
// break
// }
// }
// } else {
// Morphological analysis failed as well - just use the uppercased version of the word
// translation = word.uppercaseString
// }
}
// Clear up resources
gu_exn_clear(tmpErr)
gu_pool_free(tmpPool)
tmpPool = nil
tmpErr = nil
return translation
}
// Checks whether a linearization exists for a given analysis
func hasLinearization(analysis: PgfCId) -> Bool {
var tmpPool = gu_new_pool()
var result = pgf_has_linearization(self.grammars["to"]!.concr, analysis)
gu_pool_free(tmpPool)
tmpPool = nil
return result
}
// Wrapper to perform a parse and return either the parse or
func parse(phrase: String, startCat: String, tmpPool: COpaquePointer, tmpErr: UnsafeMutablePointer<GuExn>) -> UnsafeMutablePointer<PgfExprEnum> {
var result = pgf_parse(self.grammars["from"]!.concr, startCat, phrase, tmpErr, tmpPool, tmpPool)
if (!gu_ok(tmpErr)) {
return nil
}
return result
}
// Takes a parse result and linearizes its first result
func linearize(result: UnsafeMutablePointer<PgfExprEnum>, tmpPool: COpaquePointer, tmpErr: UnsafeMutablePointer<GuExn>) -> String {
// Get the first result
var ep = UnsafeMutablePointer<PgfExprProb>()
gu_enum_next(result, &ep, tmpPool)
var parse = ep[0]
// Linearise it and convert it to a String literal
var sbuf = gu_string_buf(tmpPool)
var tmpOut = gu_string_buf_out(sbuf)
pgf_linearize(self.grammars["to"]!.concr, parse.expr, tmpOut, tmpErr)
var translation = String(UTF8String: gu_string_buf_freeze(sbuf, tmpPool))!
// Clear up and return
gu_out_flush(tmpOut, tmpErr)
tmpOut = nil
return translation
}
// Removes characters that shouldn't be in the translated string
func formatTranslation(translation: String) -> String {
if (translation.isEmpty) {
return translation
}
var copy = translation
var firstChar = String(Array(translation)[0])
if (firstChar == "%" || firstChar == "*" || firstChar == "+") {
copy = copy.substringFromIndex(advance(copy.startIndex, 1))
}
for char in ["[", "]", "_"] {
copy = copy.stringByReplacingOccurrencesOfString(char, withString: " ")
}
return copy
}
}

View File

@@ -0,0 +1,223 @@
import UIKit
import AVFoundation
class ViewController: UIViewController {
// Set sizes used within the controller
let maxBoxWidth: CGFloat = 150
let boxOffset: CGFloat = 10
var scrollViewHeight: CGFloat = 0
var scrollViewWidth: CGFloat = 0
// Translation properties
let translator = Translator()
let colors = Colors()
let synthesizer = AVSpeechSynthesizer()
let languages = allLanguages
var inLanguage: Language!
var outLanguage: Language!
// Initiate picker views
let inPicker: UIPickerView = UIPickerView()
let outPicker: UIPickerView = UIPickerView()
// UI connections
@IBOutlet weak var translationsView: UIScrollView!
@IBOutlet weak var inLanguageField: UITextField!
@IBOutlet weak var outLanguageField: UITextField!
// Reverses to and from languages
@IBAction func switchLanguages(sender: UIButton) {
self.inLanguageField.text = self.outLanguage.name
self.outLanguageField.text = self.inLanguage.name
let tmpLanguage = self.inLanguage
self.inLanguage = self.outLanguage
self.outLanguage = tmpLanguage
self.translator.switchLanguages("from", to: "to") // to also switch concrete grammars
}
// Creates a new translation field when the user clicks the keyboard icon
@IBAction func openKeyboard(sender: UIButton) {
let field = createFromView()
field.becomeFirstResponder()
}
// Starts the speech recognition process when the user clicks the microphone icon
@IBAction func openMicrophone(sender: UIButton) {
self.createToView("microphone support is on its way")
}
// Sums the heights of all translation boxes + margins
func calculateTranslationHeights() -> CGFloat {
var height = CGFloat(-29.5) // compensate for invisible scrollbars
for view in self.translationsView.subviews {
height += view.frame.height + self.boxOffset
}
height += self.boxOffset
return height
}
// Creates a new "to translate" view and returns it for placement
func createFromView() -> UITextView {
let view = UITextView(frame: CGRect(
x: self.boxOffset,
y: self.calculateTranslationHeights(),
width: 20,
height: 30
))
view.backgroundColor = self.colors.backgroundColors["source"]
view.layer.cornerRadius = 5
view.returnKeyType = UIReturnKeyType.Done
view.delegate = self
self.translationsView.addSubview(view)
self.resizeTranslationsView()
return view
}
// A UIScrollView doesn't know its own height; use this method to resize it
func resizeTranslationsView() -> Void {
var subviewHeights = self.calculateTranslationHeights()
if (subviewHeights > self.scrollViewHeight) {
self.translationsView.contentSize = CGSizeMake(
self.translationsView.frame.width, subviewHeights)
// Also scroll to bottom
let offset = self.translationsView.contentSize.height - self.translationsView.bounds.size.height
let point = CGPointMake(0, offset)
self.translationsView.setContentOffset(point, animated: true)
}
}
// Creates and places a new "translated" view given the translated text
func createToView(translation: String) -> Void {
let view = UITextView(frame: CGRect(
x: 0, // we set the real value later a few lines down below
y: self.calculateTranslationHeights(),
width: self.maxBoxWidth,
height: 30
))
view.backgroundColor = self.colors.translationToUIColor(translation)
view.text = self.translator.formatTranslation(translation)
view.layer.cornerRadius = 5
view.sizeToFit()
// The view has been set, so we can now move it further to the right
view.frame.origin.x = self.scrollViewWidth - 10 - view.frame.width
self.translationsView.addSubview(view)
self.resizeTranslationsView()
}
// Perform translation
func translate(phrase: String) -> Void {
var translation = self.translator.translate(phrase)
self.createToView(translation)
// Run TTS except in simulator (because the simulator doesn't support it)
#if !arch(i386) && !arch(x86_64)
var utterance = AVSpeechUtterance(string: translation)
utterance.voice = AVSpeechSynthesisVoice(language: self.outLanguage.bcp)
self.synthesizer.speakUtterance(utterance)
#endif
}
override func viewDidLoad() {
super.viewDidLoad()
// Set size variables (-162 for the height to compensate for the views above the scrollview)
self.scrollViewHeight = UIScreen.mainScreen().bounds.height - 162
self.scrollViewWidth = UIScreen.mainScreen().bounds.width
// Load view pickers
self.inPicker.delegate = self
self.inPicker.dataSource = self
self.outPicker.delegate = self
self.outPicker.dataSource = self
self.inLanguageField.inputView = inPicker
self.outLanguageField.inputView = outPicker
// Load initial languages
self.inLanguage = self.languages[3] // English
self.outLanguage = self.languages[10] // Swedish
self.translator.loadGrammar("Eng", destination: "from")
self.translator.loadGrammar("Swe", destination: "to")
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
}
}
// On selection functionality for the view pickers
extension ViewController: UIPickerViewDelegate {
// Makes the picker views return a language rather than text
func pickerView(pickerView: UIPickerView!, titleForRow row: Int, forComponent component: Int) -> String
{
return self.languages[row].name
}
// Row was selected: update buttons, load new grammar
func pickerView(pickerView: UIPickerView, didSelectRow row: Int, inComponent component: Int) {
var language = self.languages[row]
var fromTo: String
var textField = UITextField()
if (pickerView == self.inPicker) {
self.inLanguage = language
fromTo = "from"
textField = self.inLanguageField
} else {
self.outLanguage = language
fromTo = "to"
textField = self.outLanguageField
}
self.translator.loadGrammar(language.abbreviation, destination: fromTo)
textField.text = language.name
textField.resignFirstResponder()
}
}
// View picker layout functionality
extension ViewController: UIPickerViewDataSource {
func numberOfComponentsInPickerView(pickerView: UIPickerView) -> Int {
return 1
}
func pickerView(pickerView: UIPickerView, numberOfRowsInComponent component: Int) -> Int {
return self.languages.count
}
}
// Keyboard input functionality
extension ViewController: UITextViewDelegate {
// Method is called on keypress
func textView(textView: UITextView, shouldChangeTextInRange range: NSRange, replacementText text: String) -> Bool {
// UITextViews lack a method to close keyboard on enter, so we use this slight hack
if (text == "\n") {
textView.resignFirstResponder()
self.translate(textView.text)
return false
}
// But if it wasn't the enter key, we resize the UITextView dynamically
textView.sizeToFit()
if (textView.frame.size.width < self.maxBoxWidth) {
textView.frame.size.width += 10
}
return true
}
}

View File

@@ -0,0 +1,13 @@
#ifndef gf_ios_swift_gf_ios_swift_Bridging_Header_h
#define gf_ios_swift_gf_ios_swift_Bridging_Header_h
#import "pgf/pgf.h"
#import "gu/file.h"
#import "gu/variant.h"
#import "gu/map.h"
#import "gu/enum.h"
#import "gu/exn.h"
#import "pgf/literals.h"
#import "pgf/linearizer.h"
#endif

Binary file not shown.

After

Width:  |  Height:  |  Size: 436 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 695 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 665 B

View File

@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>GF.$(PRODUCT_NAME:rfc1034identifier)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1</string>
</dict>
</plist>

View File

@@ -0,0 +1,28 @@
import UIKit
import XCTest
class gf_ios_swiftTests: XCTestCase {
override func setUp() {
super.setUp()
// Put setup code here. This method is called before the invocation of each test method in the class.
}
override func tearDown() {
// Put teardown code here. This method is called after the invocation of each test method in the class.
super.tearDown()
}
func testExample() {
// This is an example of a functional test case.
XCTAssert(true, "Pass")
}
func testPerformanceExample() {
// This is an example of a performance test case.
self.measureBlock() {
// Put the code you want to measure the time of here.
}
}
}