Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Move the preprocessor back into JSTalk for now.

  • Loading branch information...
commit b85023130d8c6a17748eb05d7562fb73d16f4684 1 parent 48664c4
August "Gus" Mueller authored
102 jstalk.xcodeproj/project.pbxproj
@@ -68,7 +68,6 @@
68 68 CC1C7E400F48C34D007A2941 /* Play.tiff in Resources */ = {isa = PBXBuildFile; fileRef = CC1C7E3F0F48C34D007A2941 /* Play.tiff */; };
69 69 CC1C7E580F48C76B007A2941 /* Clear.tiff in Resources */ = {isa = PBXBuildFile; fileRef = CC1C7E570F48C76B007A2941 /* Clear.tiff */; };
70 70 CC3A9B0115BC8F070075F377 /* MOFunctionArgument.m in Sources */ = {isa = PBXBuildFile; fileRef = CCEC36D115BA5E44008D8460 /* MOFunctionArgument.m */; };
71   - CC3A9B0315BC8F070075F377 /* MOPreprocessor.m in Sources */ = {isa = PBXBuildFile; fileRef = CCEC36D315BA5E44008D8460 /* MOPreprocessor.m */; };
72 71 CC3A9B0515BC8F070075F377 /* MOUtilities.m in Sources */ = {isa = PBXBuildFile; fileRef = CCEC36D515BA5E44008D8460 /* MOUtilities.m */; };
73 72 CC3A9B0715BC8F0E0075F377 /* MOBox.m in Sources */ = {isa = PBXBuildFile; fileRef = CCEC36B315BA5E44008D8460 /* MOBox.m */; };
74 73 CC3A9B0915BC8F0E0075F377 /* MOClassDescription.m in Sources */ = {isa = PBXBuildFile; fileRef = CCEC36B515BA5E44008D8460 /* MOClassDescription.m */; };
@@ -90,6 +89,51 @@
90 89 CC3A9B2815BC8F390075F377 /* NSDictionary+MochaAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = CCEC36A415BA5E44008D8460 /* NSDictionary+MochaAdditions.m */; };
91 90 CC3A9B2915BC8F390075F377 /* NSObject+MochaAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = CCEC36A615BA5E44008D8460 /* NSObject+MochaAdditions.m */; };
92 91 CC3A9B2A15BC8F390075F377 /* NSOrderedSet+MochaAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = CCEC36A815BA5E44008D8460 /* NSOrderedSet+MochaAdditions.m */; };
  92 + CC3A9B3315BCB2E00075F377 /* TDAlternation.m in Sources */ = {isa = PBXBuildFile; fileRef = CC1C7D220F48BB2C007A2941 /* TDAlternation.m */; };
  93 + CC3A9B3415BCB2E00075F377 /* TDAny.m in Sources */ = {isa = PBXBuildFile; fileRef = CC1C7D240F48BB2C007A2941 /* TDAny.m */; };
  94 + CC3A9B3515BCB2E00075F377 /* TDAssembly.m in Sources */ = {isa = PBXBuildFile; fileRef = CC1C7D260F48BB2C007A2941 /* TDAssembly.m */; };
  95 + CC3A9B3615BCB2E00075F377 /* TDCaseInsensitiveLiteral.m in Sources */ = {isa = PBXBuildFile; fileRef = CC1C7D280F48BB2C007A2941 /* TDCaseInsensitiveLiteral.m */; };
  96 + CC3A9B3715BCB2E00075F377 /* TDChar.m in Sources */ = {isa = PBXBuildFile; fileRef = CC1C7D2A0F48BB2C007A2941 /* TDChar.m */; };
  97 + CC3A9B3815BCB2E00075F377 /* TDCharacterAssembly.m in Sources */ = {isa = PBXBuildFile; fileRef = CC1C7D2C0F48BB2C007A2941 /* TDCharacterAssembly.m */; };
  98 + CC3A9B3915BCB2E00075F377 /* TDCollectionParser.m in Sources */ = {isa = PBXBuildFile; fileRef = CC1C7D2E0F48BB2C007A2941 /* TDCollectionParser.m */; };
  99 + CC3A9B3A15BCB2E00075F377 /* TDComment.m in Sources */ = {isa = PBXBuildFile; fileRef = CC1C7D300F48BB2C007A2941 /* TDComment.m */; };
  100 + CC3A9B3B15BCB2E00075F377 /* TDCommentState.m in Sources */ = {isa = PBXBuildFile; fileRef = CC1C7D320F48BB2C007A2941 /* TDCommentState.m */; };
  101 + CC3A9B3C15BCB2E00075F377 /* TDDigit.m in Sources */ = {isa = PBXBuildFile; fileRef = CC1C7D340F48BB2C007A2941 /* TDDigit.m */; };
  102 + CC3A9B3D15BCB2E00075F377 /* TDEmpty.m in Sources */ = {isa = PBXBuildFile; fileRef = CC1C7D360F48BB2C007A2941 /* TDEmpty.m */; };
  103 + CC3A9B3E15BCB2E00075F377 /* TDLetter.m in Sources */ = {isa = PBXBuildFile; fileRef = CC1C7D380F48BB2C007A2941 /* TDLetter.m */; };
  104 + CC3A9B3F15BCB2E00075F377 /* TDLiteral.m in Sources */ = {isa = PBXBuildFile; fileRef = CC1C7D3A0F48BB2C007A2941 /* TDLiteral.m */; };
  105 + CC3A9B4015BCB2E00075F377 /* TDLowercaseWord.m in Sources */ = {isa = PBXBuildFile; fileRef = CC1C7D3C0F48BB2C007A2941 /* TDLowercaseWord.m */; };
  106 + CC3A9B4115BCB2E00075F377 /* TDMultiLineCommentState.m in Sources */ = {isa = PBXBuildFile; fileRef = CC1C7D3E0F48BB2C007A2941 /* TDMultiLineCommentState.m */; };
  107 + CC3A9B4215BCB2E00075F377 /* TDNonReservedWord.m in Sources */ = {isa = PBXBuildFile; fileRef = CC1C7D400F48BB2C007A2941 /* TDNonReservedWord.m */; };
  108 + CC3A9B4315BCB2E00075F377 /* TDNum.m in Sources */ = {isa = PBXBuildFile; fileRef = CC1C7D420F48BB2C007A2941 /* TDNum.m */; };
  109 + CC3A9B4415BCB2E00075F377 /* TDNumberState.m in Sources */ = {isa = PBXBuildFile; fileRef = CC1C7D440F48BB2C007A2941 /* TDNumberState.m */; };
  110 + CC3A9B4515BCB2E00075F377 /* TDParser.m in Sources */ = {isa = PBXBuildFile; fileRef = CC1C7D470F48BB2C007A2941 /* TDParser.m */; };
  111 + CC3A9B4615BCB2E00075F377 /* TDQuotedString.m in Sources */ = {isa = PBXBuildFile; fileRef = CC1C7D490F48BB2C007A2941 /* TDQuotedString.m */; };
  112 + CC3A9B4715BCB2E00075F377 /* TDQuoteState.m in Sources */ = {isa = PBXBuildFile; fileRef = CC1C7D4B0F48BB2C007A2941 /* TDQuoteState.m */; };
  113 + CC3A9B4815BCB2E00075F377 /* TDReader.m in Sources */ = {isa = PBXBuildFile; fileRef = CC1C7D4D0F48BB2C007A2941 /* TDReader.m */; };
  114 + CC3A9B4915BCB2E00075F377 /* TDRepetition.m in Sources */ = {isa = PBXBuildFile; fileRef = CC1C7D4F0F48BB2C007A2941 /* TDRepetition.m */; };
  115 + CC3A9B4A15BCB2E00075F377 /* TDReservedWord.m in Sources */ = {isa = PBXBuildFile; fileRef = CC1C7D510F48BB2C007A2941 /* TDReservedWord.m */; };
  116 + CC3A9B4B15BCB2E00075F377 /* TDScientificNumberState.m in Sources */ = {isa = PBXBuildFile; fileRef = CC1C7D530F48BB2C007A2941 /* TDScientificNumberState.m */; };
  117 + CC3A9B4C15BCB2E00075F377 /* TDSequence.m in Sources */ = {isa = PBXBuildFile; fileRef = CC1C7D550F48BB2C007A2941 /* TDSequence.m */; };
  118 + CC3A9B4D15BCB2E00075F377 /* TDSingleLineCommentState.m in Sources */ = {isa = PBXBuildFile; fileRef = CC1C7D590F48BB2C007A2941 /* TDSingleLineCommentState.m */; };
  119 + CC3A9B4E15BCB2E00075F377 /* TDSpecificChar.m in Sources */ = {isa = PBXBuildFile; fileRef = CC1C7D5B0F48BB2C007A2941 /* TDSpecificChar.m */; };
  120 + CC3A9B4F15BCB2E00075F377 /* TDSymbol.m in Sources */ = {isa = PBXBuildFile; fileRef = CC1C7D5D0F48BB2C007A2941 /* TDSymbol.m */; };
  121 + CC3A9B5015BCB2E00075F377 /* TDSymbolNode.m in Sources */ = {isa = PBXBuildFile; fileRef = CC1C7D5F0F48BB2C007A2941 /* TDSymbolNode.m */; };
  122 + CC3A9B5115BCB2E00075F377 /* TDSymbolRootNode.m in Sources */ = {isa = PBXBuildFile; fileRef = CC1C7D610F48BB2C007A2941 /* TDSymbolRootNode.m */; };
  123 + CC3A9B5215BCB2E00075F377 /* TDSymbolState.m in Sources */ = {isa = PBXBuildFile; fileRef = CC1C7D630F48BB2C007A2941 /* TDSymbolState.m */; };
  124 + CC3A9B5315BCB2E00075F377 /* TDTerminal.m in Sources */ = {isa = PBXBuildFile; fileRef = CC1C7D650F48BB2C007A2941 /* TDTerminal.m */; };
  125 + CC3A9B5415BCB2E00075F377 /* TDToken.m in Sources */ = {isa = PBXBuildFile; fileRef = CC1C7D670F48BB2C007A2941 /* TDToken.m */; };
  126 + CC3A9B5515BCB2E00075F377 /* TDTokenArraySource.m in Sources */ = {isa = PBXBuildFile; fileRef = CC1C7D690F48BB2C007A2941 /* TDTokenArraySource.m */; };
  127 + CC3A9B5615BCB2E00075F377 /* TDTokenAssembly.m in Sources */ = {isa = PBXBuildFile; fileRef = CC1C7D6B0F48BB2C007A2941 /* TDTokenAssembly.m */; };
  128 + CC3A9B5715BCB2E00075F377 /* TDTokenizer.m in Sources */ = {isa = PBXBuildFile; fileRef = CC1C7D6D0F48BB2C007A2941 /* TDTokenizer.m */; };
  129 + CC3A9B5815BCB2E00075F377 /* TDTokenizerState.m in Sources */ = {isa = PBXBuildFile; fileRef = CC1C7D6F0F48BB2C007A2941 /* TDTokenizerState.m */; };
  130 + CC3A9B5915BCB2E00075F377 /* TDTrack.m in Sources */ = {isa = PBXBuildFile; fileRef = CC1C7D710F48BB2C007A2941 /* TDTrack.m */; };
  131 + CC3A9B5A15BCB2E00075F377 /* TDTrackException.m in Sources */ = {isa = PBXBuildFile; fileRef = CC1C7D730F48BB2C007A2941 /* TDTrackException.m */; };
  132 + CC3A9B5B15BCB2E00075F377 /* TDUppercaseWord.m in Sources */ = {isa = PBXBuildFile; fileRef = CC1C7D750F48BB2C007A2941 /* TDUppercaseWord.m */; };
  133 + CC3A9B5C15BCB2E00075F377 /* TDWhitespaceState.m in Sources */ = {isa = PBXBuildFile; fileRef = CC1C7D770F48BB2C007A2941 /* TDWhitespaceState.m */; };
  134 + CC3A9B5D15BCB2E00075F377 /* TDWord.m in Sources */ = {isa = PBXBuildFile; fileRef = CC1C7D790F48BB2C007A2941 /* TDWord.m */; };
  135 + CC3A9B5E15BCB2E00075F377 /* TDWordOrReservedState.m in Sources */ = {isa = PBXBuildFile; fileRef = CC1C7D7B0F48BB2C007A2941 /* TDWordOrReservedState.m */; };
  136 + CC3A9B5F15BCB2E00075F377 /* TDWordState.m in Sources */ = {isa = PBXBuildFile; fileRef = CC1C7D7D0F48BB2C007A2941 /* TDWordState.m */; };
93 137 CC41432E0F25257C00E46669 /* JSTalk_Prefix.pch in Headers */ = {isa = PBXBuildFile; fileRef = CCC5B8CB0F1EFAAA00126722 /* JSTalk_Prefix.pch */; settings = {ATTRIBUTES = (Private, ); }; };
94 138 CC41433B0F25259400E46669 /* JSTalk.h in Headers */ = {isa = PBXBuildFile; fileRef = CC5FB7D60F1FDDE900F4ECC2 /* JSTalk.h */; settings = {ATTRIBUTES = (Public, ); }; };
95 139 CC41433C0F25259400E46669 /* JSTalk.m in Sources */ = {isa = PBXBuildFile; fileRef = CC5FB7D70F1FDDE900F4ECC2 /* JSTalk.m */; };
@@ -185,8 +229,6 @@
185 229 CCEC370A15BA5E44008D8460 /* MOUndefined.m in Sources */ = {isa = PBXBuildFile; fileRef = CCEC36CE15BA5E44008D8460 /* MOUndefined.m */; };
186 230 CCEC370B15BA5E44008D8460 /* MOFunctionArgument.h in Headers */ = {isa = PBXBuildFile; fileRef = CCEC36D015BA5E44008D8460 /* MOFunctionArgument.h */; };
187 231 CCEC370C15BA5E44008D8460 /* MOFunctionArgument.m in Sources */ = {isa = PBXBuildFile; fileRef = CCEC36D115BA5E44008D8460 /* MOFunctionArgument.m */; };
188   - CCEC370D15BA5E44008D8460 /* MOPreprocessor.h in Headers */ = {isa = PBXBuildFile; fileRef = CCEC36D215BA5E44008D8460 /* MOPreprocessor.h */; };
189   - CCEC370E15BA5E44008D8460 /* MOPreprocessor.m in Sources */ = {isa = PBXBuildFile; fileRef = CCEC36D315BA5E44008D8460 /* MOPreprocessor.m */; };
190 232 CCEC370F15BA5E44008D8460 /* MOUtilities.h in Headers */ = {isa = PBXBuildFile; fileRef = CCEC36D415BA5E44008D8460 /* MOUtilities.h */; };
191 233 CCEC371015BA5E44008D8460 /* MOUtilities.m in Sources */ = {isa = PBXBuildFile; fileRef = CCEC36D515BA5E44008D8460 /* MOUtilities.m */; };
192 234 CCF68F1E0F4E3E4F00925FCA /* JSTalkDocument.icns in Resources */ = {isa = PBXBuildFile; fileRef = CCF68F1D0F4E3E4F00925FCA /* JSTalkDocument.icns */; };
@@ -435,11 +477,8 @@
435 477 CCEC36CE15BA5E44008D8460 /* MOUndefined.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MOUndefined.m; sourceTree = "<group>"; };
436 478 CCEC36D015BA5E44008D8460 /* MOFunctionArgument.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MOFunctionArgument.h; sourceTree = "<group>"; };
437 479 CCEC36D115BA5E44008D8460 /* MOFunctionArgument.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MOFunctionArgument.m; sourceTree = "<group>"; };
438   - CCEC36D215BA5E44008D8460 /* MOPreprocessor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MOPreprocessor.h; sourceTree = "<group>"; };
439   - CCEC36D315BA5E44008D8460 /* MOPreprocessor.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MOPreprocessor.m; sourceTree = "<group>"; };
440 480 CCEC36D415BA5E44008D8460 /* MOUtilities.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MOUtilities.h; sourceTree = "<group>"; };
441 481 CCEC36D515BA5E44008D8460 /* MOUtilities.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MOUtilities.m; sourceTree = "<group>"; };
442   - CCEC36D615BA5E44008D8460 /* TDTokenizerAmalgamation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TDTokenizerAmalgamation.m; sourceTree = "<group>"; };
443 482 CCF68F1D0F4E3E4F00925FCA /* JSTalkDocument.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; name = JSTalkDocument.icns; path = res/images/JSTalkDocument.icns; sourceTree = "<group>"; };
444 483 /* End PBXFileReference section */
445 484
@@ -829,11 +868,8 @@
829 868 children = (
830 869 CCEC36D015BA5E44008D8460 /* MOFunctionArgument.h */,
831 870 CCEC36D115BA5E44008D8460 /* MOFunctionArgument.m */,
832   - CCEC36D215BA5E44008D8460 /* MOPreprocessor.h */,
833   - CCEC36D315BA5E44008D8460 /* MOPreprocessor.m */,
834 871 CCEC36D415BA5E44008D8460 /* MOUtilities.h */,
835 872 CCEC36D515BA5E44008D8460 /* MOUtilities.m */,
836   - CCEC36D615BA5E44008D8460 /* TDTokenizerAmalgamation.m */,
837 873 );
838 874 path = Utilities;
839 875 sourceTree = "<group>";
@@ -885,7 +921,6 @@
885 921 CCEC370715BA5E44008D8460 /* MOStruct.h in Headers */,
886 922 CCEC370915BA5E44008D8460 /* MOUndefined.h in Headers */,
887 923 CCEC370B15BA5E44008D8460 /* MOFunctionArgument.h in Headers */,
888   - CCEC370D15BA5E44008D8460 /* MOPreprocessor.h in Headers */,
889 924 CCEC370F15BA5E44008D8460 /* MOUtilities.h in Headers */,
890 925 );
891 926 runOnlyForDeploymentPostprocessing = 0;
@@ -1059,6 +1094,51 @@
1059 1094 CC0FEEE710867411008FF7DD /* NoodleLineNumberMarker.m in Sources */,
1060 1095 CC0FEEE910867412008FF7DD /* NoodleLineNumberView.m in Sources */,
1061 1096 CC725EBA1238026D00EA83BF /* TETextUtils.m in Sources */,
  1097 + CC3A9B3315BCB2E00075F377 /* TDAlternation.m in Sources */,
  1098 + CC3A9B3415BCB2E00075F377 /* TDAny.m in Sources */,
  1099 + CC3A9B3515BCB2E00075F377 /* TDAssembly.m in Sources */,
  1100 + CC3A9B3615BCB2E00075F377 /* TDCaseInsensitiveLiteral.m in Sources */,
  1101 + CC3A9B3715BCB2E00075F377 /* TDChar.m in Sources */,
  1102 + CC3A9B3815BCB2E00075F377 /* TDCharacterAssembly.m in Sources */,
  1103 + CC3A9B3915BCB2E00075F377 /* TDCollectionParser.m in Sources */,
  1104 + CC3A9B3A15BCB2E00075F377 /* TDComment.m in Sources */,
  1105 + CC3A9B3B15BCB2E00075F377 /* TDCommentState.m in Sources */,
  1106 + CC3A9B3C15BCB2E00075F377 /* TDDigit.m in Sources */,
  1107 + CC3A9B3D15BCB2E00075F377 /* TDEmpty.m in Sources */,
  1108 + CC3A9B3E15BCB2E00075F377 /* TDLetter.m in Sources */,
  1109 + CC3A9B3F15BCB2E00075F377 /* TDLiteral.m in Sources */,
  1110 + CC3A9B4015BCB2E00075F377 /* TDLowercaseWord.m in Sources */,
  1111 + CC3A9B4115BCB2E00075F377 /* TDMultiLineCommentState.m in Sources */,
  1112 + CC3A9B4215BCB2E00075F377 /* TDNonReservedWord.m in Sources */,
  1113 + CC3A9B4315BCB2E00075F377 /* TDNum.m in Sources */,
  1114 + CC3A9B4415BCB2E00075F377 /* TDNumberState.m in Sources */,
  1115 + CC3A9B4515BCB2E00075F377 /* TDParser.m in Sources */,
  1116 + CC3A9B4615BCB2E00075F377 /* TDQuotedString.m in Sources */,
  1117 + CC3A9B4715BCB2E00075F377 /* TDQuoteState.m in Sources */,
  1118 + CC3A9B4815BCB2E00075F377 /* TDReader.m in Sources */,
  1119 + CC3A9B4915BCB2E00075F377 /* TDRepetition.m in Sources */,
  1120 + CC3A9B4A15BCB2E00075F377 /* TDReservedWord.m in Sources */,
  1121 + CC3A9B4B15BCB2E00075F377 /* TDScientificNumberState.m in Sources */,
  1122 + CC3A9B4C15BCB2E00075F377 /* TDSequence.m in Sources */,
  1123 + CC3A9B4D15BCB2E00075F377 /* TDSingleLineCommentState.m in Sources */,
  1124 + CC3A9B4E15BCB2E00075F377 /* TDSpecificChar.m in Sources */,
  1125 + CC3A9B4F15BCB2E00075F377 /* TDSymbol.m in Sources */,
  1126 + CC3A9B5015BCB2E00075F377 /* TDSymbolNode.m in Sources */,
  1127 + CC3A9B5115BCB2E00075F377 /* TDSymbolRootNode.m in Sources */,
  1128 + CC3A9B5215BCB2E00075F377 /* TDSymbolState.m in Sources */,
  1129 + CC3A9B5315BCB2E00075F377 /* TDTerminal.m in Sources */,
  1130 + CC3A9B5415BCB2E00075F377 /* TDToken.m in Sources */,
  1131 + CC3A9B5515BCB2E00075F377 /* TDTokenArraySource.m in Sources */,
  1132 + CC3A9B5615BCB2E00075F377 /* TDTokenAssembly.m in Sources */,
  1133 + CC3A9B5715BCB2E00075F377 /* TDTokenizer.m in Sources */,
  1134 + CC3A9B5815BCB2E00075F377 /* TDTokenizerState.m in Sources */,
  1135 + CC3A9B5915BCB2E00075F377 /* TDTrack.m in Sources */,
  1136 + CC3A9B5A15BCB2E00075F377 /* TDTrackException.m in Sources */,
  1137 + CC3A9B5B15BCB2E00075F377 /* TDUppercaseWord.m in Sources */,
  1138 + CC3A9B5C15BCB2E00075F377 /* TDWhitespaceState.m in Sources */,
  1139 + CC3A9B5D15BCB2E00075F377 /* TDWord.m in Sources */,
  1140 + CC3A9B5E15BCB2E00075F377 /* TDWordOrReservedState.m in Sources */,
  1141 + CC3A9B5F15BCB2E00075F377 /* TDWordState.m in Sources */,
1062 1142 CCEC36D815BA5E44008D8460 /* MOBridgeSupportController.m in Sources */,
1063 1143 CCEC36DA15BA5E44008D8460 /* MOBridgeSupportLibrary.m in Sources */,
1064 1144 CCEC36DC15BA5E44008D8460 /* MOBridgeSupportParser.m in Sources */,
@@ -1082,7 +1162,6 @@
1082 1162 CCEC370815BA5E44008D8460 /* MOStruct.m in Sources */,
1083 1163 CCEC370A15BA5E44008D8460 /* MOUndefined.m in Sources */,
1084 1164 CCEC370C15BA5E44008D8460 /* MOFunctionArgument.m in Sources */,
1085   - CCEC370E15BA5E44008D8460 /* MOPreprocessor.m in Sources */,
1086 1165 CCEC371015BA5E44008D8460 /* MOUtilities.m in Sources */,
1087 1166 );
1088 1167 runOnlyForDeploymentPostprocessing = 0;
@@ -1138,7 +1217,6 @@
1138 1217 CC3A9B2215BC8F0E0075F377 /* MOUndefined.m in Sources */,
1139 1218 CC1C7DE60F48BB2C007A2941 /* TDLetter.m in Sources */,
1140 1219 CC3A9B0115BC8F070075F377 /* MOFunctionArgument.m in Sources */,
1141   - CC3A9B0315BC8F070075F377 /* MOPreprocessor.m in Sources */,
1142 1220 CC3A9B0515BC8F070075F377 /* MOUtilities.m in Sources */,
1143 1221 CC1C7DE70F48BB2C007A2941 /* TDLiteral.m in Sources */,
1144 1222 CC1C7DE80F48BB2C007A2941 /* TDLowercaseWord.m in Sources */,
8 mocha/MochaRuntime.m
@@ -22,8 +22,6 @@
22 22 #import "MOBridgeSupportController.h"
23 23 #import "MOBridgeSupportSymbol.h"
24 24
25   -#import "MOPreprocessor.h"
26   -
27 25 #import "NSObject+MochaAdditions.h"
28 26 #import "NSArray+MochaAdditions.h"
29 27 #import "NSDictionary+MochaAdditions.h"
@@ -535,12 +533,6 @@ - (BOOL)removeObjectWithName:(NSString *)name {
535 533 #pragma mark -
536 534 #pragma mark Evaluation
537 535
538   -- (id)evalObjJSString:(NSString*)string {
539   - #pragma message "FIXME: Gus take this out- it's already in JSTalk."
540   - string = [MOPreprocessor preprocessCode:string];
541   - return [self evalString:string];
542   -}
543   -
544 536 - (id)evalString:(NSString *)string {
545 537 JSValueRef jsValue = [self evalJSString:string];
546 538 return [self objectForJSValue:jsValue];
36 mocha/Utilities/MOPreprocessor.h
... ... @@ -1,36 +0,0 @@
1   -//
2   -// MOPreprocessor.h
3   -// jstalk
4   -//
5   -// Created by August Mueller on 2/14/09.
6   -// Copyright 2009 Flying Meat Inc. All rights reserved.
7   -//
8   -
9   -#import <Cocoa/Cocoa.h>
10   -
11   -
12   -@interface MOPreprocessor : NSObject {
13   -
14   -}
15   -
16   -+ (NSString*)preprocessCode:(NSString*)sourceString;
17   -
18   -@end
19   -
20   -
21   -
22   -@interface MOPSymbolGroup : NSObject {
23   -
24   - unichar _openSymbol;
25   - NSMutableArray *_args;
26   - MOPSymbolGroup *_parent;
27   -}
28   -
29   -@property (retain) NSMutableArray *args;
30   -@property (retain) MOPSymbolGroup *parent;
31   -
32   -- (void)addSymbol:(id)aSymbol;
33   -
34   -@end
35   -
36   -
357 mocha/Utilities/MOPreprocessor.m
... ... @@ -1,357 +0,0 @@
1   -//
2   -// MOPreprocessor.m
3   -// jstalk
4   -//
5   -// Created by August Mueller on 2/14/09.
6   -// Copyright 2009 Flying Meat Inc. All rights reserved.
7   -//
8   -
9   -#import "MOPreprocessor.h"
10   -#import "TDTokenizerAmalgamation.m"
11   -
12   -@implementation MOPreprocessor
13   -
14   -+ (NSString*)processMultilineStrings:(NSString*)sourceString {
15   -
16   - NSString *tok = @"\"\"\"";
17   -
18   - NSScanner *scanner = [NSScanner scannerWithString:sourceString];
19   - NSMutableString *ret = [NSMutableString string];
20   -
21   - while (![scanner isAtEnd]) {
22   -
23   - NSString *into;
24   - NSString *quot;
25   -
26   - if ([scanner scanUpToString:tok intoString:&into]) {
27   - [ret appendString:into];
28   - }
29   -
30   -
31   - if ([scanner scanString:tok intoString:nil]) {
32   - if ([scanner scanString:tok intoString: nil]) {
33   - continue;
34   - }
35   - else if ([scanner scanUpToString:tok intoString:&quot] && [scanner scanString:tok intoString: nil]) {
36   -
37   - quot = [quot stringByReplacingOccurrencesOfString:@"\r\n" withString:@"\n"];
38   - quot = [quot stringByReplacingOccurrencesOfString:@"\r" withString:@"\n"];
39   -
40   - [ret appendString:@"\""];
41   -
42   - NSArray *lines = [quot componentsSeparatedByString:@"\n"];
43   - int i = 0;
44   - while (i < [lines count] - 1) {
45   - NSString *line = [lines objectAtIndex:i];
46   - line = [line stringByReplacingOccurrencesOfString:@"\"" withString:@"\\\""];
47   - [ret appendFormat:@"%@\\n", line];
48   - i++;
49   - }
50   -
51   - NSString *line = [lines objectAtIndex:i];
52   - line = [line stringByReplacingOccurrencesOfString:@"\"" withString:@"\\\""];
53   - [ret appendFormat:@"%@\"", line];
54   - }
55   - }
56   - }
57   -
58   - return ret;
59   -}
60   -
61   -+ (NSString*)preprocessForObjCStrings:(NSString*)sourceString {
62   -
63   - NSMutableString *buffer = [NSMutableString string];
64   - TDTokenizer *tokenizer = [TDTokenizer tokenizerWithString:sourceString];
65   -
66   - tokenizer.whitespaceState.reportsWhitespaceTokens = YES;
67   - tokenizer.commentState.reportsCommentTokens = NO;
68   -
69   - TDToken *eof = [TDToken EOFToken];
70   - TDToken *tok = nil;
71   - TDToken *nextToken = nil;
72   -
73   - while ((tok = [tokenizer nextToken]) != eof) {
74   -
75   - if (tok.isSymbol && [[tok stringValue] isEqualToString:@"@"]) {
76   -
77   - // woo, it's special objc stuff.
78   -
79   - nextToken = [tokenizer nextToken];
80   - if (nextToken.quotedString) {
81   - [buffer appendFormat:@"[NSString stringWithString:%@]", [nextToken stringValue]];
82   - }
83   - else {
84   - [buffer appendString:[tok stringValue]];
85   - [buffer appendString:[nextToken stringValue]];
86   - }
87   - }
88   - else {
89   - [buffer appendString:[tok stringValue]];
90   - }
91   - }
92   -
93   - return buffer;
94   -}
95   -
96   -+ (BOOL)isOpenSymbol:(NSString*)tag {
97   - return [tag isEqualToString:@"["] || [tag isEqualToString:@"("];
98   -}
99   -
100   -+ (BOOL)isCloseSymbol:(NSString*)tag {
101   - return [tag isEqualToString:@"]"] || [tag isEqualToString:@")"];
102   -}
103   -
104   -+ (NSString*)preprocessForObjCMessagesToJS:(NSString*)sourceString {
105   -
106   - NSMutableString *buffer = [NSMutableString string];
107   - TDTokenizer *tokenizer = [TDTokenizer tokenizerWithString:sourceString];
108   -
109   - tokenizer.whitespaceState.reportsWhitespaceTokens = YES;
110   - tokenizer.commentState.reportsCommentTokens = YES;
111   -
112   - TDToken *eof = [TDToken EOFToken];
113   - TDToken *tok = nil;
114   -
115   - MOPSymbolGroup *currentGroup = nil;
116   -
117   - while ((tok = [tokenizer nextToken]) != eof) {
118   -
119   - //debug(@"tok: '%@' %d", [tok description], tok.word);
120   -
121   - if ([tok isSymbol] && [self isOpenSymbol:[tok stringValue]]) {
122   -
123   - MOPSymbolGroup *nextGroup = [[[MOPSymbolGroup alloc] init] autorelease];
124   -
125   - nextGroup.parent = currentGroup;
126   - currentGroup = nextGroup;
127   -
128   - }
129   - else if (tok.isSymbol && [self isCloseSymbol:tok.stringValue]) {
130   -
131   - if (currentGroup.parent) {
132   - [currentGroup.parent addSymbol:currentGroup];
133   - }
134   - else if ([currentGroup description]) {
135   - [buffer appendString:[currentGroup description]];
136   - }
137   -
138   - currentGroup = currentGroup.parent;
139   -
140   - continue;
141   - }
142   -
143   - if (currentGroup) {
144   - [currentGroup addSymbol:tok];
145   - }
146   - else {
147   - [buffer appendString:[tok stringValue]];
148   - }
149   - }
150   -
151   - return buffer;
152   -}
153   -
154   -+ (NSString*)preprocessCode:(NSString*)sourceString {
155   -
156   - sourceString = [self processMultilineStrings:sourceString];
157   - sourceString = [self preprocessForObjCStrings:sourceString];
158   - sourceString = [self preprocessForObjCMessagesToJS:sourceString];
159   -
160   - return sourceString;
161   -}
162   -
163   -@end
164   -
165   -
166   -
167   -@implementation MOPSymbolGroup
168   -@synthesize args=_args;
169   -@synthesize parent=_parent;
170   -
171   -- (id)init {
172   - self = [super init];
173   - if (self != nil) {
174   - _args = [[NSMutableArray array] retain];
175   - }
176   -
177   - return self;
178   -}
179   -
180   -
181   -- (void)dealloc {
182   - [_args release];
183   - [_parent release];
184   - [super dealloc];
185   -}
186   -
187   -- (void)addSymbol:(id)aSymbol {
188   -
189   - if (!_openSymbol && [aSymbol isKindOfClass:[TDToken class]]) {
190   - _openSymbol = [[aSymbol stringValue] characterAtIndex:0];
191   - }
192   - else {
193   - [_args addObject:aSymbol];
194   - }
195   -}
196   -
197   -- (int)nonWhitespaceCountInArray:(NSArray*)ar {
198   -
199   - int count = 0;
200   -
201   - for (id f in ar) {
202   -
203   - f = [[f description] stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]];
204   -
205   - if ([f length]) {
206   - count++;
207   - }
208   - }
209   -
210   - return count;
211   -
212   -}
213   -
214   -- (NSString*)description {
215   -
216   - NSUInteger argsCount = [_args count];
217   -
218   - if (_openSymbol == '(') {
219   - return [NSString stringWithFormat:@"(%@)", [_args componentsJoinedByString:@""]];
220   - }
221   -
222   - if (_openSymbol != '[') {
223   - return [NSString stringWithFormat:@"Bad MOPSymbolGroup! %@", _args];
224   - }
225   -
226   - BOOL firstArgIsWord = [_args count] && ([[_args objectAtIndex:0] isKindOfClass:[TDToken class]] && [[_args objectAtIndex:0] isWord]);
227   - BOOL firstArgIsSymbolGroup = [_args count] && [[_args objectAtIndex:0] isKindOfClass:[MOPSymbolGroup class]];
228   -
229   - // objc messages start with a word. So, if it isn't- then let's just fling things back the way they were.
230   - if (!firstArgIsWord && !firstArgIsSymbolGroup) {
231   - return [NSString stringWithFormat:@"[%@]", [_args componentsJoinedByString:@""]];
232   - }
233   -
234   -
235   - NSMutableString *selector = [NSMutableString string];
236   - NSMutableArray *currentArgs = [NSMutableArray array];
237   - NSMutableArray *methodArgs = [NSMutableArray array];
238   - NSString *target = [_args objectAtIndex:0];
239   - NSString *lastWord = nil;
240   - BOOL hadSymbolAsArg = NO;
241   - NSUInteger idx = 1;
242   -
243   - while (idx < argsCount) {
244   -
245   - id currentPassedArg = [_args objectAtIndex:idx++];
246   -
247   - TDToken *currentToken = [currentPassedArg isKindOfClass:[TDToken class]] ? currentPassedArg : nil;
248   -
249   - NSString *value = currentToken ? [currentToken stringValue] : [currentPassedArg description];
250   -
251   - if ([currentToken isWhitespace]) {
252   -
253   - //if ([value isEqualToString:@" "]) {
254   - [currentArgs addObject:value];
255   - //}
256   -
257   - continue;
258   - }
259   -
260   - if (!hadSymbolAsArg && [currentToken isSymbol]) {
261   - hadSymbolAsArg = YES;
262   - }
263   -
264   -
265   -
266   - if ([@":" isEqualToString:value]) {
267   -
268   - [currentArgs removeLastObject];
269   -
270   - if ([currentArgs count]) {
271   - [methodArgs addObject:[currentArgs componentsJoinedByString:@" "]];
272   - [currentArgs removeAllObjects];
273   - }
274   -
275   - [selector appendString:lastWord];
276   - [selector appendString:value];
277   - }
278   - else {
279   - [currentArgs addObject:[value stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]]];
280   - }
281   -
282   - lastWord = value;
283   - }
284   -
285   -
286   - if ([currentArgs count]) {
287   - [methodArgs addObject:[currentArgs componentsJoinedByString:@""]];
288   - }
289   -
290   -
291   - if (![selector length] && !hadSymbolAsArg && ([methodArgs count] == 1)) {
292   - [selector appendString:[methodArgs lastObject]];
293   - [methodArgs removeAllObjects];
294   - }
295   -
296   - if (![selector length] && [methodArgs count] == 1) {
297   - return [NSString stringWithFormat:@"[%@%@]", target, [methodArgs lastObject]];
298   - }
299   -
300   - if (![methodArgs count] && ![selector length]) {
301   - return [NSString stringWithFormat:@"[%@]", target];
302   - }
303   -
304   - if (![selector length] && lastWord) {
305   - [selector appendString:lastWord];
306   - [methodArgs removeLastObject];
307   - }
308   -
309   -
310   - BOOL useMsgSend = NO;
311   -
312   - if (useMsgSend) {
313   - NSMutableString *ret = [NSMutableString stringWithString:@"jsobjc_msgSend"];
314   -
315   - if ([methodArgs count]) {
316   - [ret appendFormat:@"%d", (int)[methodArgs count]];
317   - }
318   -
319   - [ret appendFormat:@"(%@, \"%@\"", target, selector];
320   -
321   - for (NSString *arg in methodArgs) {
322   - [ret appendFormat:@", %@", arg];
323   - }
324   -
325   - [ret appendString:@")"];
326   -
327   - return ret;
328   - }
329   -
330   - [selector replaceOccurrencesOfString:@":" withString:@"_" options:0 range:NSMakeRange(0, [selector length])];
331   -
332   - NSMutableString *ret = [NSMutableString stringWithFormat:@"%@.%@(", target, selector];
333   -
334   - if ([self nonWhitespaceCountInArray:methodArgs]) {
335   -
336   - for (int i = 0; i < [methodArgs count]; i++) {
337   -
338   - NSString *arg = [methodArgs objectAtIndex:i];
339   - NSString *s = [arg description];
340   - NSString *t = [s stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]];
341   -
342   - [ret appendString:s];
343   -
344   - if ([t length] && i < [methodArgs count] - 1) {
345   - [ret appendString:@","];
346   - }
347   - }
348   - }
349   -
350   - [ret appendString:@")"];
351   -
352   - return ret;
353   -
354   -}
355   -
356   -@end
357   -
2,349 mocha/Utilities/TDTokenizerAmalgamation.m
... ... @@ -1,2349 +0,0 @@
1   -#ifndef debug
2   -#define debug(...)
3   -#endif
4   -#define JSTPrefs [NSUserDefaults standardUserDefaults]
5   -#pragma clang diagnostic push
6   -#pragma clang diagnostic ignored "-Wunused-variable"
7   -#pragma clang diagnostic ignored "-Werror"
8   -#pragma clang diagnostic ignored "-Wmissing-prototypes"
9   -#pragma clang diagnostic ignored "-Wdeprecated-declarations"
10   -#pragma clang diagnostic ignored "-Wunused-function"
11   -#ifndef __clang_analyzer__
12   -//
13   -// TDParseKit.h
14   -// TDParseKit
15   -//
16   -// Created by Todd Ditchendorf on 1/20/06.
17   -// Copyright 2008 Todd Ditchendorf. All rights reserved.
18   -//
19   -
20   -#import <Foundation/Foundation.h>
21   -
22   -@class TDToken;
23   -@class TDTokenizerState;
24   -@class TDNumberState;
25   -@class TDQuoteState;
26   -@class TDSlashState;
27   -@class TDCommentState;
28   -@class TDSymbolState;
29   -@class TDWhitespaceState;
30   -@class TDWordState;
31   -@class TDReader;
32   -
33   -/*!
34   - @class TDTokenizer
35   - @brief A tokenizer divides a string into tokens.
36   - @details <p>This class is highly customizable with regard to exactly how this division occurs, but it also has defaults that are suitable for many languages. This class assumes that the character values read from the string lie in the range <tt>0-MAXINT</tt>. For example, the Unicode value of a capital A is 65, so <tt>NSLog(@"%C", (unichar)65);</tt> prints out a capital A.</p>
37   - <p>The behavior of a tokenizer depends on its character state table. This table is an array of 256 <tt>TDTokenizerState</tt> states. The state table decides which state to enter upon reading a character from the input string.</p>
38   - <p>For example, by default, upon reading an 'A', a tokenizer will enter a "word" state. This means the tokenizer will ask a <tt>TDWordState</tt> object to consume the 'A', along with the characters after the 'A' that form a word. The state's responsibility is to consume characters and return a complete token.</p>
39   - <p>The default table sets a <tt>TDSymbolState</tt> for every character from 0 to 255, and then overrides this with:</p>
40   -@code
41   - From To State
42   - 0 ' ' whitespaceState
43   - 'a' 'z' wordState
44   - 'A' 'Z' wordState
45   - 160 255 wordState
46   - '0' '9' numberState
47   - '-' '-' numberState
48   - '.' '.' numberState
49   - '"' '"' quoteState
50   - '\'' '\'' quoteState
51   - '/' '/' commentState
52   -@endcode
53   - <p>In addition to allowing modification of the state table, this class makes each of the states above available. Some of these states are customizable. For example, wordState allows customization of what characters can be part of a word, after the first character.</p>
54   -*/
55   -@interface TDTokenizer : NSObject {
56   - NSString *string;
57   - TDReader *reader;
58   -
59   - NSMutableArray *tokenizerStates;
60   -
61   - TDNumberState *numberState;
62   - TDQuoteState *quoteState;
63   - TDCommentState *commentState;
64   - TDSymbolState *symbolState;
65   - TDWhitespaceState *whitespaceState;
66   - TDWordState *wordState;
67   -}
68   -
69   -/*!
70   - @brief Convenience factory method. Sets string to read from to <tt>nil</tt>.
71   - @result An initialized tokenizer.
72   -*/
73   -+ (id)tokenizer;
74   -
75   -/*!
76   - @brief Convenience factory method.
77   - @param s string to read from.
78   - @result An autoreleased initialized tokenizer.
79   -*/
80   -+ (id)tokenizerWithString:(NSString *)s;
81   -
82   -/*!
83   - @brief Designated Initializer. Constructs a tokenizer to read from the supplied string.
84   - @param s string to read from.
85   - @result An initialized tokenizer.
86   -*/
87   -- (id)initWithString:(NSString *)s;
88   -
89   -/*!
90   - @brief Returns the next token.
91   - @result the next token.
92   -*/
93   -- (TDToken *)nextToken;
94   -
95   -/*!
96   - @brief Change the state the tokenizer will enter upon reading any character between "start" and "end".
97   - @param state the state for this character range
98   - @param start the "start" character. e.g. <tt>'a'</tt> or <tt>65</tt>.
99   - @param end the "end" character. <tt>'z'</tt> or <tt>90</tt>.
100   -*/
101   -- (void)setTokenizerState:(TDTokenizerState *)state from:(NSInteger)start to:(NSInteger)end;
102   -
103   -/*!
104   - @property string
105   - @brief The string to read from.
106   -*/
107   -@property (nonatomic, retain) NSString *string;
108   -
109   -/*!
110   - @property numberState
111   - @brief The state this tokenizer uses to build numbers.
112   -*/
113   -@property (nonatomic, retain) TDNumberState *numberState;
114   -
115   -/*!
116   - @property quoteState
117   - @brief The state this tokenizer uses to build quoted strings.
118   -*/
119   -@property (nonatomic, retain) TDQuoteState *quoteState;
120   -
121   -/*!
122   - @property commentState
123   - @brief The state this tokenizer uses to recognize (and possibly ignore) comments.
124   -*/
125   -@property (nonatomic, retain) TDCommentState *commentState;
126   -
127   -/*!
128   - @property symbolState
129   - @brief The state this tokenizer uses to recognize symbols.
130   -*/
131   -@property (nonatomic, retain) TDSymbolState *symbolState;
132   -
133   -/*!
134   - @property whitespaceState
135   - @brief The state this tokenizer uses to recognize (and possibly ignore) whitespace.
136   -*/
137   -@property (nonatomic, retain) TDWhitespaceState *whitespaceState;
138   -
139   -/*!
140   - @property wordState
141   - @brief The state this tokenizer uses to build words.
142   -*/
143   -@property (nonatomic, retain) TDWordState *wordState;
144   -@end
145   -
146   -//
147   -// TDReader.h
148   -// TDParseKit
149   -//
150   -// Created by Todd Ditchendorf on 1/21/06.
151   -// Copyright 2008 Todd Ditchendorf. All rights reserved.
152   -//
153   -
154   -#import <Foundation/Foundation.h>
155   -
156   -/*!
157   - @class TDReader
158   - @brief A character-stream reader that allows characters to be pushed back into the stream.
159   -*/
160   -@interface TDReader : NSObject {
161   - NSString *string;
162   - NSUInteger cursor;
163   - NSUInteger length;
164   -}
165   -
166   -/*!
167   - @brief Designated Initializer. Initializes a reader with a given string.
168   - @details Designated Initializer.
169   - @param s string from which to read
170   - @result an initialized reader
171   -*/
172   -- (id)initWithString:(NSString *)s;
173   -
174   -/*!
175   - @brief Read a single character
176   - @result The character read, or -1 if the end of the stream has been reached
177   -*/
178   -- (NSInteger)read;
179   -
180   -/*!
181   - @brief Push back a single character
182   - @details moves the cursor back one position
183   -*/
184   -- (void)unread;
185   -
186   -/*!
187   - @property string
188   - @brief This reader's string.
189   -*/
190   -@property (nonatomic, retain) NSString *string;
191   -@end
192   -
193   -//
194   -// TDParseKitState.h
195   -// TDParseKit
196   -//
197   -// Created by Todd Ditchendorf on 1/20/06.
198   -// Copyright 2008 Todd Ditchendorf. All rights reserved.
199   -//
200   -
201   -#import <Foundation/Foundation.h>
202   -
203   -#define TD_USE_MUTABLE_STRING_BUF 1
204   -
205   -@class TDToken;
206   -@class TDTokenizer;
207   -@class TDReader;
208   -
209   -/*!
210   - @class TDTokenizerState
211   - @brief A <tt>TDTokenizerState</tt> returns a token, given a reader, an initial character read from the reader, and a tokenizer that is conducting an overall tokenization of the reader.
212   - @details The tokenizer will typically have a character state table that decides which state to use, depending on an initial character. If a single character is insufficient, a state such as <tt>TDSlashState</tt> will read a second character, and may delegate to another state, such as <tt>TDSlashStarState</tt>. This prospect of delegation is the reason that the <tt>-nextToken</tt> method has a tokenizer argument.
213   -*/
214   -@interface TDTokenizerState : NSObject {
215   -#if TD_USE_MUTABLE_STRING_BUF
216   - NSMutableString *stringbuf;
217   -#else
218   - unichar *__strong charbuf;
219   - NSUInteger length;
220   - NSUInteger index;
221   -#endif
222   -}
223   -
224   -/*!
225   - @brief Return a token that represents a logical piece of a reader.
226   - @param r the reader from which to read additional characters
227   - @param cin the character that a tokenizer used to determine to use this state
228   - @param t the tokenizer currently powering the tokenization
229   - @result a token that represents a logical piece of the reader
230   -*/
231   -- (TDToken *)nextTokenFromReader:(TDReader *)r startingWith:(NSInteger)cin tokenizer:(TDTokenizer *)t;
232   -@end
233   -
234   -//
235   -// TDQuoteState.h
236   -// TDParseKit
237   -//
238   -// Created by Todd Ditchendorf on 1/20/06.
239   -// Copyright 2008 Todd Ditchendorf. All rights reserved.
240   -//
241   -
242   -#import <Foundation/Foundation.h>
243   -
244   -/*!
245   - @class TDQuoteState
246   - @brief A quote state returns a quoted string token from a reader
247   - @details This state will collect characters until it sees a match to the character that the tokenizer used to switch to this state. For example, if a tokenizer uses a double- quote character to enter this state, then <tt>-nextToken</tt> will search for another double-quote until it finds one or finds the end of the reader.
248   -*/
249   -@interface TDQuoteState : TDTokenizerState {
250   - BOOL balancesEOFTerminatedQuotes;
251   -}
252   -
253   -/*!
254   - @property balancesEOFTerminatedQuotes
255   - @brief if true, this state will append a matching quote char (<tt>'</tt> or <tt>"</tt>) to quotes terminated by EOF. Default is NO.
256   -*/
257   -@property (nonatomic) BOOL balancesEOFTerminatedQuotes;
258   -@end
259   -
260   -//
261   -// TDMultiLineCommentState.h
262   -// TDParseKit
263   -//
264   -// Created by Todd Ditchendorf on 12/28/08.
265   -// Copyright 2008 Todd Ditchendorf. All rights reserved.
266   -//
267   -
268   -#import <Foundation/Foundation.h>
269   -
270   -@interface TDMultiLineCommentState : TDTokenizerState {
271   - NSMutableArray *startSymbols;
272   - NSMutableArray *endSymbols;
273   - NSString *currentStartSymbol;
274   -}
275   -
276   -- (void)addStartSymbol:(NSString *)start endSymbol:(NSString *)end;
277   -- (void)removeStartSymbol:(NSString *)start;
278   -@property (nonatomic, retain) NSMutableArray *startSymbols;
279   -@property (nonatomic, retain) NSMutableArray *endSymbols;
280   -@property (nonatomic, copy) NSString *currentStartSymbol;
281   -@end
282   -
283   -//
284   -// TDCommentState.h
285   -// TDParseKit
286   -//
287   -// Created by Todd Ditchendorf on 12/28/08.
288   -// Copyright 2008 Todd Ditchendorf. All rights reserved.
289   -//
290   -
291   -#import <Foundation/Foundation.h>
292   -
293   -@class TDSymbolRootNode;
294   -@class TDSingleLineCommentState;
295   -@class TDMultiLineCommentState;
296   -
297   -/*!
298   - @class TDCommentState
299   - @brief This state will either delegate to a comment-handling state, or return a <tt>TDSymbol</tt> token with just the first char in it.
300   - @details By default, C and C++ style comments. (<tt>//</tt> to end of line and <tt> &0x002A;/</tt>)
301   -*/
302   -@interface TDCommentState : TDTokenizerState {
303   - TDSymbolRootNode *rootNode;
304   - TDSingleLineCommentState *singleLineState;
305   - TDMultiLineCommentState *multiLineState;
306   - BOOL reportsCommentTokens;
307   - BOOL balancesEOFTerminatedComments;
308   -}
309   -
310   -/*!
311   - @brief Adds the given string as a single-line comment start marker. may be multi-char.
312   - @details single line comments begin with <tt>start</tt> and continue until the next new line character. e.g. C-style comments (<tt>// comment text</tt>)
313   - @param start a single- or multi-character symbol that should be recognized as the start of a single-line comment
314   -*/
315   -- (void)addSingleLineStartSymbol:(NSString *)start;
316   -
317   -/*!
318   - @brief Removes the given string as a single-line comment start marker. may be multi-char.
319   - @details If <tt>start</tt> was never added as a single-line comment start symbol, this has no effect.
320   - @param start a single- or multi-character symbol that should no longer be recognized as the start of a single-line comment
321   -*/
322   -- (void)removeSingleLineStartSymbol:(NSString *)start;
323   -
324   -/*!
325   - @brief Adds the given strings as a multi-line comment start and end markers. both may be multi-char
326   - @details <tt>start</tt> and <tt>end</tt> may be different strings. e.g. <tt></tt> and <tt>&0x002A;/</tt>. Also, the actual comment may or may not be multi-line.
327   - @param start a single- or multi-character symbol that should be recognized as the start of a multi-line comment
328   - @param end a single- or multi-character symbol that should be recognized as the end of a multi-line comment that began with <tt>start</tt>
329   -*/
330   -- (void)addMultiLineStartSymbol:(NSString *)start endSymbol:(NSString *)end;
331   -
332   -/*!
333   - @brief Removes <tt>start</tt> and its orignall <tt>end</tt> counterpart as a multi-line comment start and end markers.
334   - @details If <tt>start</tt> was never added as a multi-line comment start symbol, this has no effect.
335   - @param start a single- or multi-character symbol that should no longer be recognized as the start of a multi-line comment
336   -*/
337   -- (void)removeMultiLineStartSymbol:(NSString *)start;
338   -
339   -/*!
340   - @property reportsCommentTokens
341   - @brief if true, the tokenizer associated with this state will report comment tokens, otherwise it silently consumes comments
342   - @details if true, this state will return <tt>TDToken</tt>s of type <tt>TDTokenTypeComment</tt>.
343   - Otherwise, it will silently consume comment text and return the next token from another of the tokenizer's states
344   -*/
345   -@property (nonatomic) BOOL reportsCommentTokens;
346   -
347   -/*!
348   - @property balancesEOFTerminatedComments
349   - @brief if true, this state will append a matching comment string (<tt>&0x002A;/</tt> [C++] or <tt>:)</tt> [XQuery]) to quotes terminated by EOF. Default is NO.
350   -*/
351   -@property (nonatomic) BOOL balancesEOFTerminatedComments;
352   -@property (nonatomic, retain) TDSymbolRootNode *rootNode;
353   -@property (nonatomic, retain) TDSingleLineCommentState *singleLineState;
354   -@property (nonatomic, retain) TDMultiLineCommentState *multiLineState;
355   -@end
356   -
357   -//
358   -// TDSymbolState.h
359   -// TDParseKit
360   -//
361   -// Created by Todd Ditchendorf on 1/20/06.
362   -// Copyright 2008 Todd Ditchendorf. All rights reserved.
363   -//
364   -
365   -#import <Foundation/Foundation.h>
366   -
367   -@class TDSymbolRootNode;
368   -
369   -/*!
370   - @class TDSymbolState
371   - @brief The idea of a symbol is a character that stands on its own, such as an ampersand or a parenthesis.
372   - @details <p>The idea of a symbol is a character that stands on its own, such as an ampersand or a parenthesis. For example, when tokenizing the expression (isReady)& (isWilling) , a typical tokenizer would return 7 tokens, including one for each parenthesis and one for the ampersand. Thus a series of symbols such as )&( becomes three tokens, while a series of letters such as isReady becomes a single word token.</p>
373   - <p>Multi-character symbols are an exception to the rule that a symbol is a standalone character. For example, a tokenizer may want less-than-or-equals to tokenize as a single token. This class provides a method for establishing which multi-character symbols an object of this class should treat as single symbols. This allows, for example, "cat <= dog" to tokenize as three tokens, rather than splitting the less-than and equals symbols into separate tokens.</p>
374   - <p>By default, this state recognizes the following multi- character symbols: <tt>!=</tt>, <tt>:-</tt>, <tt><=</tt>, <tt>>=</tt></p>
375   -*/
376   -@interface TDSymbolState : TDTokenizerState {
377   - TDSymbolRootNode *rootNode;
378   - NSMutableArray *addedSymbols;
379   -}
380   -
381   -/*!
382   - @brief Adds the given string as a multi-character symbol.
383   - @param s a multi-character symbol that should be recognized as a single symbol token by this state
384   -*/
385   -- (void)add:(NSString *)s;
386   -
387   -/*!
388   - @brief Removes the given string as a multi-character symbol.
389   - @details If <tt>s</tt> was never added as a multi-character symbol, this has no effect.
390   - @param s a multi-character symbol that should no longer be recognized as a single symbol token by this state
391   -*/
392   -- (void)remove:(NSString *)s;
393   -@end
394   -
395   -//
396   -// TDNumberState.h
397   -// TDParseKit
398   -//
399   -// Created by Todd Ditchendorf on 1/20/06.
400   -// Copyright 2008 Todd Ditchendorf. All rights reserved.
401   -//
402   -
403   -#import <Foundation/Foundation.h>
404   -
405   -/*!
406   - @class TDNumberState
407   - @brief A number state returns a number from a reader.
408   - @details This state's idea of a number allows an optional, initial minus sign, followed by one or more digits. A decimal point and another string of digits may follow these digits.
409   -*/
410   -@interface TDNumberState : TDTokenizerState {
411   - BOOL allowsTrailingDot;
412   - BOOL gotADigit;
413   - BOOL negative;
414   - NSInteger c;
415   - CGFloat floatValue;
416   -}
417   -
418   -/*!
419   - @property allowsTrailingDot
420   - @brief If true, numbers are allowed to end with a trialing dot, e.g. <tt>42.<tt>
421   - @details false by default.
422   -*/
423   -@property (nonatomic) BOOL allowsTrailingDot;
424   -@end
425   -
426   -//
427   -// TDWhitespaceState.h
428   -// TDParseKit
429   -//
430   -// Created by Todd Ditchendorf on 1/20/06.
431   -// Copyright 2008 Todd Ditchendorf. All rights reserved.
432   -//
433   -
434   -#import <Foundation/Foundation.h>
435   -
436   -/*!
437   - @class TDWhitespaceState
438   - @brief A whitespace state ignores whitespace (such as blanks and tabs), and returns the tokenizer's next token.
439   - @details By default, all characters from 0 to 32 are whitespace.
440   -*/
441   -@interface TDWhitespaceState : TDTokenizerState {
442   - NSMutableArray *whitespaceChars;
443   - BOOL reportsWhitespaceTokens;
444   -}
445   -
446   -/*!
447   - @brief Informs whether the given character is recognized as whitespace (and therefore ignored) by this state.
448   - @param cin the character to check
449   - @result true if the given chracter is recognized as whitespace
450   -*/
451   -- (BOOL)isWhitespaceChar:(NSInteger)cin;
452   -
453   -/*!
454   - @brief Establish the given character range as whitespace to ignore.
455   - @param yn true if the given character range is whitespace
456   - @param start the "start" character. e.g. <tt>'a'</tt> or <tt>65</tt>.
457   - @param end the "end" character. <tt>'z'</tt> or <tt>90</tt>.
458   -*/
459   -- (void)setWhitespaceChars:(BOOL)yn from:(NSInteger)start to:(NSInteger)end;
460   -
461   -/*!
462   - @property reportsWhitespaceTokens
463   - @brief determines whether a <tt>TDTokenizer</tt> associated with this state reports or silently consumes whitespace tokens. default is <tt>NO</tt> which causes silent consumption of whitespace chars
464   -*/
465   -@property (nonatomic) BOOL reportsWhitespaceTokens;
466   -@end
467   -
468   -//
469   -// TDWordState.h
470   -// TDParseKit
471   -//
472   -// Created by Todd Ditchendorf on 1/20/06.
473   -// Copyright 2008 Todd Ditchendorf. All rights reserved.
474   -//
475   -
476   -#import <Foundation/Foundation.h>
477   -
478   -/*!
479   - @class TDWordState
480   - @brief A word state returns a word from a reader.
481   - @details <p>Like other states, a tokenizer transfers the job of reading to this state, depending on an initial character. Thus, the tokenizer decides which characters may begin a word, and this state determines which characters may appear as a second or later character in a word. These are typically different sets of characters; in particular, it is typical for digits to appear as parts of a word, but not as the initial character of a word.</p>
482   - <p>By default, the following characters may appear in a word. The method setWordChars() allows customizing this.</p>
483   -@code
484   - From To
485   - 'a' 'z'
486   - 'A' 'Z'
487   - '0' '9'
488   -@endcode
489   - <p>as well as: minus sign <tt>-</tt>, underscore <tt>_</tt>, and apostrophe <tt>'</tt>.</p>
490   -*/
491   -@interface TDWordState : TDTokenizerState {
492   - NSMutableArray *wordChars;
493   -}
494   -
495   -/*!
496   - @brief Establish characters in the given range as valid characters for part of a word after the first character. Note that the tokenizer must determine which characters are valid as the beginning character of a word.
497   - @param yn true if characters in the given range are word characters
498   - @param start the "start" character. e.g. <tt>'a'</tt> or <tt>65</tt>.
499   - @param end the "end" character. <tt>'z'</tt> or <tt>90</tt>.
500   -*/
501   -- (void)setWordChars:(BOOL)yn from:(NSInteger)start to:(NSInteger)end;
502   -
503   -/*!
504   - @brief Informs whether the given character is recognized as a word character by this state.
505   - @param cin the character to check
506   - @result true if the given chracter is recognized as a word character
507   -*/
508   -- (BOOL)isWordChar:(NSInteger)c;
509   -@end
510   -
511   -//
512   -// TDSingleLineCommentState.h
513   -// TDParseKit
514   -//
515   -// Created by Todd Ditchendorf on 12/28/08.
516   -// Copyright 2008 Todd Ditchendorf. All rights reserved.
517   -//
518   -
519   -#import <Foundation/Foundation.h>
520   -
521   -@interface TDSingleLineCommentState : TDTokenizerState {
522   - NSMutableArray *startSymbols;
523   - NSString *currentStartSymbol;
524   -}
525   -
526   -@end
527   -
528   -//
529   -// TDToken.h
530   -// TDParseKit
531   -//
532   -// Created by Todd Ditchendorf on 1/20/06.
533   -// Copyright 2008 Todd Ditchendorf. All rights reserved.
534   -//
535   -
536   -#import <Foundation/Foundation.h>
537   -
538   -/*!
539   - @typedef enum TDTokenType
540   - @brief Indicates the type of a <tt>TDToken</tt>
541   - @var TDTokenTypeEOF A constant indicating that the endo fo the stream has been read.
542   - @var TDTokenTypeNumber A constant indicating that a token is a number, like <tt>3.14</tt>.
543   - @var TDTokenTypeQuotedString A constant indicating that a token is a quoted string, like <tt>"Launch Mi"</tt>.
544   - @var TDTokenTypeSymbol A constant indicating that a token is a symbol, like <tt>"&lt;="</tt>.
545   - @var TDTokenTypeWord A constant indicating that a token is a word, like <tt>cat</tt>.
546   -*/
547   -typedef enum {
548   - TDTokenTypeEOF,
549   - TDTokenTypeNumber,
550   - TDTokenTypeQuotedString,
551   - TDTokenTypeSymbol,
552   - TDTokenTypeWord,
553   - TDTokenTypeWhitespace,
554   - TDTokenTypeComment
555   -} TDTokenType;