Skip to content

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also .

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also .
...
  • 2 commits
  • 82 files changed
  • 0 commit comments
  • 1 contributor
Showing with 60 additions and 5,133 deletions.
  1. +13 −0 .gitignore
  2. +3 −3 ParseKit.xcodeproj/project.pbxproj
  3. +5 −1 ParseKitMobile_Prefix.pch
  4. +2 −1 ParseKit_Prefix.pch
  5. +0 −5 include/.svn/all-wcprops
  6. +0 −31 include/.svn/entries
  7. +0 −335 include/ParseKit/.svn/all-wcprops
  8. +0 −1,898 include/ParseKit/.svn/entries
  9. +0 −33 include/ParseKit/.svn/text-base/PKAlternation.h.svn-base
  10. +0 −31 include/ParseKit/.svn/text-base/PKAny.h.svn-base
  11. +0 −86 include/ParseKit/.svn/text-base/PKAssembly.h.svn-base
  12. +0 −26 include/ParseKit/.svn/text-base/PKCaseInsensitiveLiteral.h.svn-base
  13. +0 −31 include/ParseKit/.svn/text-base/PKChar.h.svn-base
  14. +0 −26 include/ParseKit/.svn/text-base/PKCharacterAssembly.h.svn-base
  15. +0 −44 include/ParseKit/.svn/text-base/PKCollectionParser.h.svn-base
  16. +0 −31 include/ParseKit/.svn/text-base/PKComment.h.svn-base
  17. +0 −77 include/ParseKit/.svn/text-base/PKCommentState.h.svn-base
  18. +0 −58 include/ParseKit/.svn/text-base/PKDelimitState.h.svn-base
  19. +0 −36 include/ParseKit/.svn/text-base/PKDelimitedString.h.svn-base
  20. +0 −63 include/ParseKit/.svn/text-base/PKDifference.h.svn-base
  21. +0 −31 include/ParseKit/.svn/text-base/PKDigit.h.svn-base
  22. +0 −22 include/ParseKit/.svn/text-base/PKEmailState.h.svn-base
  23. +0 −32 include/ParseKit/.svn/text-base/PKEmpty.h.svn-base
  24. +0 −23 include/ParseKit/.svn/text-base/PKHashtagState.h.svn-base
  25. +0 −41 include/ParseKit/.svn/text-base/PKIntersection.h.svn-base
  26. +0 −31 include/ParseKit/.svn/text-base/PKLetter.h.svn-base
  27. +0 −34 include/ParseKit/.svn/text-base/PKLiteral.h.svn-base
  28. +0 −22 include/ParseKit/.svn/text-base/PKLowercaseWord.h.svn-base
  29. +0 −24 include/ParseKit/.svn/text-base/PKMultiLineCommentState.h.svn-base
  30. +0 −52 include/ParseKit/.svn/text-base/PKNegation.h.svn-base
  31. +0 −31 include/ParseKit/.svn/text-base/PKNumber.h.svn-base
  32. +0 −98 include/ParseKit/.svn/text-base/PKNumberState.h.svn-base
  33. +0 −172 include/ParseKit/.svn/text-base/PKParser.h.svn-base
  34. +0 −48 include/ParseKit/.svn/text-base/PKParserFactory.h.svn-base
  35. +0 −39 include/ParseKit/.svn/text-base/PKPattern.h.svn-base
  36. +0 −46 include/ParseKit/.svn/text-base/PKQuoteState.h.svn-base
  37. +0 −31 include/ParseKit/.svn/text-base/PKQuotedString.h.svn-base
  38. +0 −67 include/ParseKit/.svn/text-base/PKReader.h.svn-base
  39. +0 −46 include/ParseKit/.svn/text-base/PKRepetition.h.svn-base
  40. +0 −33 include/ParseKit/.svn/text-base/PKSequence.h.svn-base
  41. +0 −23 include/ParseKit/.svn/text-base/PKSingleLineCommentState.h.svn-base
  42. +0 −40 include/ParseKit/.svn/text-base/PKSpecificChar.h.svn-base
  43. +0 −40 include/ParseKit/.svn/text-base/PKSymbol.h.svn-base
  44. +0 −44 include/ParseKit/.svn/text-base/PKSymbolNode.h.svn-base
  45. +0 −48 include/ParseKit/.svn/text-base/PKSymbolRootNode.h.svn-base
  46. +0 −44 include/ParseKit/.svn/text-base/PKSymbolState.h.svn-base
  47. +0 −49 include/ParseKit/.svn/text-base/PKTerminal.h.svn-base
  48. +0 −217 include/ParseKit/.svn/text-base/PKToken.h.svn-base
  49. +0 −68 include/ParseKit/.svn/text-base/PKTokenArraySource.h.svn-base
  50. +0 −65 include/ParseKit/.svn/text-base/PKTokenAssembly.h.svn-base
  51. +0 −181 include/ParseKit/.svn/text-base/PKTokenizer.h.svn-base
  52. +0 −56 include/ParseKit/.svn/text-base/PKTokenizerState.h.svn-base
  53. +0 −34 include/ParseKit/.svn/text-base/PKTrack.h.svn-base
  54. +0 −31 include/ParseKit/.svn/text-base/PKTrackException.h.svn-base
  55. +0 −23 include/ParseKit/.svn/text-base/PKTwitterState.h.svn-base
  56. +0 −20 include/ParseKit/.svn/text-base/PKTypes.h.svn-base
  57. +0 −24 include/ParseKit/.svn/text-base/PKURLState.h.svn-base
  58. +0 −22 include/ParseKit/.svn/text-base/PKUppercaseWord.h.svn-base
  59. +0 −31 include/ParseKit/.svn/text-base/PKWhitespace.h.svn-base
  60. +0 −48 include/ParseKit/.svn/text-base/PKWhitespaceState.h.svn-base
  61. +0 −31 include/ParseKit/.svn/text-base/PKWord.h.svn-base
  62. +0 −49 include/ParseKit/.svn/text-base/PKWordState.h.svn-base
  63. +0 −94 include/ParseKit/.svn/text-base/ParseKit.h.svn-base
  64. +1 −1 include/ParseKit/PKHashtagState.h
  65. +3 −3 include/ParseKit/PKToken.h
  66. +6 −6 include/ParseKit/PKTokenizer.h
  67. +1 −1 include/ParseKit/PKTwitterState.h
  68. +1 −1 include/ParseKit/ParseKit.h
  69. +1 −1 src/PKHashtagState.m
  70. +4 −4 src/PKToken.m
  71. +9 −9 src/PKTokenizer.m
  72. +1 −1 src/PKTwitterState.m
  73. +3 −3 test/SRGSParserTest.m
  74. +2 −2 test/TDDelimitStateTest.m
  75. +1 −1 test/TDEmailStateTest.m
  76. +1 −1 test/TDTwitterStateTest.h
  77. +1 −1 test/TDTwitterStateTest.m
  78. +1 −1 test/XPathParserGrammarTest.m
  79. +1 −1 test/XPathParserTest.m
  80. +0 −11 test/en.lproj/.svn/all-wcprops
  81. +0 −62 test/en.lproj/.svn/entries
  82. +0 −2 test/en.lproj/.svn/text-base/InfoPlist.strings.svn-base
View
13 .gitignore
@@ -25,4 +25,17 @@ build/
#SVN
.svn/
+.svn/*
+*.svn-base
+
+include/.svn/all-wcprops
+
+include/.svn/entries
+
+include/ParseKit/.svn/all-wcprops
+
+include/ParseKit/.svn/entries
+
+*.svn-base
+
*.svn-base
View
6 ParseKit.xcodeproj/project.pbxproj
@@ -1321,6 +1321,7 @@
isa = PBXGroup;
children = (
D34BAD630FF9C6AE00D7773A /* ParseKit_Prefix.pch */,
+ D3FDC8DB0FFC51F200F1F797 /* ParseKitMobile_Prefix.pch */,
D3C221900FFE8B8C004514FE /* ParseKit.h */,
D3C221910FFE8B8C004514FE /* PKTypes.h */,
D3C7D8710A411F6B005DD154 /* io */,
@@ -1750,7 +1751,6 @@
D380BA950F0F1C450009EC13 /* JSParseKit Framework */ = {
isa = PBXGroup;
children = (
- D3FDC8DB0FFC51F200F1F797 /* ParseKitMobile_Prefix.pch */,
D34BB04E0FF9EC4E00D7773A /* JSParseKit-Info.plist */,
D34BB0660FF9EDDF00D7773A /* JSParseKit.h */,
D34BB0670FF9EDDF00D7773A /* JSParseKit.m */,
@@ -3541,7 +3541,7 @@
GCC_MODEL_TUNING = G5;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
- GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/AppKit.framework/Headers/AppKit.h";
+ GCC_PREFIX_HEADER = ParseKit_Prefix.pch;
GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
INFOPLIST_FILE = "JSParseKit-Info.plist";
INSTALL_PATH = "$(HOME)/Library/Frameworks";
@@ -3569,7 +3569,7 @@
GCC_ENABLE_OBJC_GC = supported;
GCC_MODEL_TUNING = G5;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
- GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/AppKit.framework/Headers/AppKit.h";
+ GCC_PREFIX_HEADER = ParseKit_Prefix.pch;
GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
INFOPLIST_FILE = "JSParseKit-Info.plist";
INSTALL_PATH = "$(HOME)/Library/Frameworks";
View
6 ParseKitMobile_Prefix.pch
@@ -4,4 +4,8 @@
#import <CoreGraphics/CoreGraphics.h>
#endif
-#define PLATFORM(TWITTER_STATE) 0
+//#define PLATFORM(PK_FEATURE) (defined PK_PLATFORM_##PK_FEATURE && PK_PLATFORM_##PK_FEATURE)
+
+#define PK_PLATFORM_EMAIL_STATE 0
+#define PK_PLATFORM_TWITTER_STATE 0
+
View
3 ParseKit_Prefix.pch
@@ -6,7 +6,8 @@
#import <Foundation/Foundation.h>
#endif
-#define PLATFORM(PK_FEATURE) (defined PK_PLATFORM_##PK_FEATURE && PK_PLATFORM_##PK_FEATURE)
+//#define PLATFORM(PK_FEATURE) (defined PK_PLATFORM_##PK_FEATURE && PK_PLATFORM_##PK_FEATURE)
#define PK_PLATFORM_EMAIL_STATE 0
#define PK_PLATFORM_TWITTER_STATE 0
+
View
5 include/.svn/all-wcprops
@@ -1,5 +0,0 @@
-K 25
-svn:wc:ra_dav:version-url
-V 30
-/svn/!svn/ver/68/trunk/include
-END
View
31 include/.svn/entries
@@ -1,31 +0,0 @@
-10
-
-dir
-105
-https://todd.ditchendorf@parsekit.googlecode.com/svn/trunk/include
-https://todd.ditchendorf@parsekit.googlecode.com/svn
-
-
-
-2012-03-18T20:10:59.455761Z
-68
-todd.ditchendorf
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-47a69902-6c80-45e3-bb3b-c8207f6fa097
-
-ParseKit
-dir
-
View
335 include/ParseKit/.svn/all-wcprops
@@ -1,335 +0,0 @@
-K 25
-svn:wc:ra_dav:version-url
-V 39
-/svn/!svn/ver/68/trunk/include/ParseKit
-END
-PKEmpty.h
-K 25
-svn:wc:ra_dav:version-url
-V 48
-/svn/!svn/ver/2/trunk/include/ParseKit/PKEmpty.h
-END
-PKLetter.h
-K 25
-svn:wc:ra_dav:version-url
-V 49
-/svn/!svn/ver/2/trunk/include/ParseKit/PKLetter.h
-END
-PKDigit.h
-K 25
-svn:wc:ra_dav:version-url
-V 48
-/svn/!svn/ver/2/trunk/include/ParseKit/PKDigit.h
-END
-PKTokenArraySource.h
-K 25
-svn:wc:ra_dav:version-url
-V 59
-/svn/!svn/ver/2/trunk/include/ParseKit/PKTokenArraySource.h
-END
-PKReader.h
-K 25
-svn:wc:ra_dav:version-url
-V 50
-/svn/!svn/ver/52/trunk/include/ParseKit/PKReader.h
-END
-PKTwitterState.h
-K 25
-svn:wc:ra_dav:version-url
-V 57
-/svn/!svn/ver/129/trunk/include/ParseKit/PKTwitterState.h
-END
-PKURLState.h
-K 25
-svn:wc:ra_dav:version-url
-V 51
-/svn/!svn/ver/2/trunk/include/ParseKit/PKURLState.h
-END
-PKSymbol.h
-K 25
-svn:wc:ra_dav:version-url
-V 49
-/svn/!svn/ver/2/trunk/include/ParseKit/PKSymbol.h
-END
-PKIntersection.h
-K 25
-svn:wc:ra_dav:version-url
-V 55
-/svn/!svn/ver/2/trunk/include/ParseKit/PKIntersection.h
-END
-PKCaseInsensitiveLiteral.h
-K 25
-svn:wc:ra_dav:version-url
-V 65
-/svn/!svn/ver/2/trunk/include/ParseKit/PKCaseInsensitiveLiteral.h
-END
-PKTokenizer.h
-K 25
-svn:wc:ra_dav:version-url
-V 54
-/svn/!svn/ver/129/trunk/include/ParseKit/PKTokenizer.h
-END
-PKSymbolNode.h
-K 25
-svn:wc:ra_dav:version-url
-V 53
-/svn/!svn/ver/2/trunk/include/ParseKit/PKSymbolNode.h
-END
-PKTokenizerState.h
-K 25
-svn:wc:ra_dav:version-url
-V 57
-/svn/!svn/ver/2/trunk/include/ParseKit/PKTokenizerState.h
-END
-PKWordState.h
-K 25
-svn:wc:ra_dav:version-url
-V 52
-/svn/!svn/ver/2/trunk/include/ParseKit/PKWordState.h
-END
-PKPattern.h
-K 25
-svn:wc:ra_dav:version-url
-V 50
-/svn/!svn/ver/2/trunk/include/ParseKit/PKPattern.h
-END
-PKAssembly.h
-K 25
-svn:wc:ra_dav:version-url
-V 51
-/svn/!svn/ver/2/trunk/include/ParseKit/PKAssembly.h
-END
-PKSymbolRootNode.h
-K 25
-svn:wc:ra_dav:version-url
-V 57
-/svn/!svn/ver/2/trunk/include/ParseKit/PKSymbolRootNode.h
-END
-PKAlternation.h
-K 25
-svn:wc:ra_dav:version-url
-V 54
-/svn/!svn/ver/2/trunk/include/ParseKit/PKAlternation.h
-END
-PKToken.h
-K 25
-svn:wc:ra_dav:version-url
-V 50
-/svn/!svn/ver/129/trunk/include/ParseKit/PKToken.h
-END
-PKTrackException.h
-K 25
-svn:wc:ra_dav:version-url
-V 57
-/svn/!svn/ver/2/trunk/include/ParseKit/PKTrackException.h
-END
-PKUppercaseWord.h
-K 25
-svn:wc:ra_dav:version-url
-V 56
-/svn/!svn/ver/2/trunk/include/ParseKit/PKUppercaseWord.h
-END
-PKSpecificChar.h
-K 25
-svn:wc:ra_dav:version-url
-V 55
-/svn/!svn/ver/2/trunk/include/ParseKit/PKSpecificChar.h
-END
-PKEmailState.h
-K 25
-svn:wc:ra_dav:version-url
-V 53
-/svn/!svn/ver/2/trunk/include/ParseKit/PKEmailState.h
-END
-PKQuotedString.h
-K 25
-svn:wc:ra_dav:version-url
-V 55
-/svn/!svn/ver/2/trunk/include/ParseKit/PKQuotedString.h
-END
-PKDelimitState.h
-K 25
-svn:wc:ra_dav:version-url
-V 55
-/svn/!svn/ver/2/trunk/include/ParseKit/PKDelimitState.h
-END
-PKNumber.h
-K 25
-svn:wc:ra_dav:version-url
-V 49
-/svn/!svn/ver/2/trunk/include/ParseKit/PKNumber.h
-END
-PKNumberState.h
-K 25
-svn:wc:ra_dav:version-url
-V 56
-/svn/!svn/ver/109/trunk/include/ParseKit/PKNumberState.h
-END
-PKQuoteState.h
-K 25
-svn:wc:ra_dav:version-url
-V 54
-/svn/!svn/ver/41/trunk/include/ParseKit/PKQuoteState.h
-END
-PKComment.h
-K 25
-svn:wc:ra_dav:version-url
-V 50
-/svn/!svn/ver/2/trunk/include/ParseKit/PKComment.h
-END
-PKCommentState.h
-K 25
-svn:wc:ra_dav:version-url
-V 55
-/svn/!svn/ver/2/trunk/include/ParseKit/PKCommentState.h
-END
-PKTypes.h
-K 25
-svn:wc:ra_dav:version-url
-V 50
-/svn/!svn/ver/123/trunk/include/ParseKit/PKTypes.h
-END
-PKNegation.h
-K 25
-svn:wc:ra_dav:version-url
-V 51
-/svn/!svn/ver/2/trunk/include/ParseKit/PKNegation.h
-END
-PKTrack.h
-K 25
-svn:wc:ra_dav:version-url
-V 48
-/svn/!svn/ver/2/trunk/include/ParseKit/PKTrack.h
-END
-PKSymbolState.h
-K 25
-svn:wc:ra_dav:version-url
-V 54
-/svn/!svn/ver/2/trunk/include/ParseKit/PKSymbolState.h
-END
-PKSequence.h
-K 25
-svn:wc:ra_dav:version-url
-V 51
-/svn/!svn/ver/2/trunk/include/ParseKit/PKSequence.h
-END
-PKCollectionParser.h
-K 25
-svn:wc:ra_dav:version-url
-V 59
-/svn/!svn/ver/2/trunk/include/ParseKit/PKCollectionParser.h
-END
-PKTerminal.h
-K 25
-svn:wc:ra_dav:version-url
-V 51
-/svn/!svn/ver/2/trunk/include/ParseKit/PKTerminal.h
-END
-PKWord.h
-K 25
-svn:wc:ra_dav:version-url
-V 47
-/svn/!svn/ver/2/trunk/include/ParseKit/PKWord.h
-END
-PKChar.h
-K 25
-svn:wc:ra_dav:version-url
-V 47
-/svn/!svn/ver/2/trunk/include/ParseKit/PKChar.h
-END
-PKSingleLineCommentState.h
-K 25
-svn:wc:ra_dav:version-url
-V 65
-/svn/!svn/ver/2/trunk/include/ParseKit/PKSingleLineCommentState.h
-END
-PKLowercaseWord.h
-K 25
-svn:wc:ra_dav:version-url
-V 56
-/svn/!svn/ver/2/trunk/include/ParseKit/PKLowercaseWord.h
-END
-PKTokenAssembly.h
-K 25
-svn:wc:ra_dav:version-url
-V 56
-/svn/!svn/ver/2/trunk/include/ParseKit/PKTokenAssembly.h
-END
-PKHashtagState.h
-K 25
-svn:wc:ra_dav:version-url
-V 57
-/svn/!svn/ver/129/trunk/include/ParseKit/PKHashtagState.h
-END
-PKRepetition.h
-K 25
-svn:wc:ra_dav:version-url
-V 53
-/svn/!svn/ver/2/trunk/include/ParseKit/PKRepetition.h
-END
-PKParserFactory.h
-K 25
-svn:wc:ra_dav:version-url
-V 58
-/svn/!svn/ver/119/trunk/include/ParseKit/PKParserFactory.h
-END
-PKMultiLineCommentState.h
-K 25
-svn:wc:ra_dav:version-url
-V 64
-/svn/!svn/ver/2/trunk/include/ParseKit/PKMultiLineCommentState.h
-END
-PKDelimitedString.h
-K 25
-svn:wc:ra_dav:version-url
-V 58
-/svn/!svn/ver/2/trunk/include/ParseKit/PKDelimitedString.h
-END
-ParseKit.h
-K 25
-svn:wc:ra_dav:version-url
-V 51
-/svn/!svn/ver/129/trunk/include/ParseKit/ParseKit.h
-END
-PKAny.h
-K 25
-svn:wc:ra_dav:version-url
-V 46
-/svn/!svn/ver/2/trunk/include/ParseKit/PKAny.h
-END
-PKDifference.h
-K 25
-svn:wc:ra_dav:version-url
-V 53
-/svn/!svn/ver/2/trunk/include/ParseKit/PKDifference.h
-END
-PKLiteral.h
-K 25
-svn:wc:ra_dav:version-url
-V 50
-/svn/!svn/ver/2/trunk/include/ParseKit/PKLiteral.h
-END
-PKParser.h
-K 25
-svn:wc:ra_dav:version-url
-V 51
-/svn/!svn/ver/127/trunk/include/ParseKit/PKParser.h
-END
-PKCharacterAssembly.h
-K 25
-svn:wc:ra_dav:version-url
-V 60
-/svn/!svn/ver/2/trunk/include/ParseKit/PKCharacterAssembly.h
-END
-PKWhitespace.h
-K 25
-svn:wc:ra_dav:version-url
-V 53
-/svn/!svn/ver/2/trunk/include/ParseKit/PKWhitespace.h
-END
-PKWhitespaceState.h
-K 25
-svn:wc:ra_dav:version-url
-V 58
-/svn/!svn/ver/2/trunk/include/ParseKit/PKWhitespaceState.h
-END
View
1,898 include/ParseKit/.svn/entries
0 additions, 1,898 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
View
33 include/ParseKit/.svn/text-base/PKAlternation.h.svn-base
@@ -1,33 +0,0 @@
-// Copyright 2010 Todd Ditchendorf
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-#import <Foundation/Foundation.h>
-#import <ParseKit/PKCollectionParser.h>
-
-/*!
- @class PKAlternation
- @brief A <tt>PKAlternation</tt> object is a collection of parsers, any one of which can successfully match against an assembly. It is basically a representation of "Logical Or" or "|".
-*/
-@interface PKAlternation : PKCollectionParser {
-
-}
-
-/*!
- @brief Convenience factory method for initializing an autoreleased <tt>PKAlternation</tt> parser.
- @result an initialized autoreleased <tt>PKAlternation</tt> parser.
-*/
-+ (PKAlternation *)alternation;
-
-+ (PKAlternation *)alternationWithSubparsers:(PKParser *)p1, ...;
-@end
View
31 include/ParseKit/.svn/text-base/PKAny.h.svn-base
@@ -1,31 +0,0 @@
-// Copyright 2010 Todd Ditchendorf
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-#import <Foundation/Foundation.h>
-#import <ParseKit/PKTerminal.h>
-
-/*!
- @class PKAny
- @brief A <tt>PKAny</tt> matches any token from a token assembly.
-*/
-@interface PKAny : PKTerminal {
-
-}
-
-/*!
- @brief Convenience factory method for initializing an autoreleased <tt>PKAny</tt> object.
- @result an initialized autoreleased <tt>PKAny</tt> object
-*/
-+ (PKAny *)any;
-@end
View
86 include/ParseKit/.svn/text-base/PKAssembly.h.svn-base
@@ -1,86 +0,0 @@
-// Copyright 2010 Todd Ditchendorf
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-#import <Foundation/Foundation.h>
-
-/*!
- @class PKAssembly
- @brief An Abstract class. A <tt>PKAssembly</tt> maintains a stream of language elements along with stack and target objects.
- @details <p>Parsers use assemblers to record progress at recognizing language elements from assembly's string.</p>
- <p>Note that <tt>PKAssembly</tt> is an abstract class and may not be instantiated directly. Subclasses include <tt>PKTokenAssembly</tt> and <tt>PKCharAssembly</tt>.</p>
-*/
-@interface PKAssembly : NSObject <NSCopying> {
- NSMutableArray *stack;
- id target;
- NSUInteger index;
- NSString *string;
- NSString *defaultDelimiter;
-}
-
-/*!
- @brief Convenience factory method for initializing an autoreleased assembly.
- @param s string to be worked on
- @result an initialized autoreleased assembly
-*/
-+ (PKAssembly *)assemblyWithString:(NSString *)s;
-
-/*!
- @brief Designated Initializer. Initializes an assembly with a given string.
- @details Designated Initializer.
- @param s string to be worked on
- @result an initialized assembly
-*/
-- (id)initWithString:(NSString *)s;
-
-/*!
- @brief Removes the object at the top of this assembly's stack and returns it.
- @details Note this returns an object from this assembly's stack, not from its stream of elements (tokens or chars depending on the type of concrete <tt>PKAssembly</tt> subclass of this object).
- @result the object at the top of this assembly's stack
-*/
-- (id)pop;
-
-/*!
- @brief Pushes an object onto the top of this assembly's stack.
- @param object object to push
-*/
-- (void)push:(id)object;
-
-/*!
- @brief Returns true if this assembly's stack is empty.
- @result true, if this assembly's stack is empty
-*/
-- (BOOL)isStackEmpty;
-
-/*!
- @brief Returns a vector of the elements on this assembly's stack that appear before a specified fence.
- @details <p>Returns a vector of the elements on this assembly's stack that appear before a specified fence.</p>
- <p>Sometimes a parser will recognize a list from within a pair of parentheses or brackets. The parser can mark the beginning of the list with a fence, and then retrieve all the items that come after the fence with this method.</p>
- @param fence object that indicates the limit of elements returned from this assembly's stack
- @result Array of the elements above the specified fence
-*/
-- (NSArray *)objectsAbove:(id)fence;
-
-/*!
- @property stack
- @brief This assembly's stack.
-*/
-@property (nonatomic, readonly, retain) NSMutableArray *stack;
-
-/*!
- @property target
- @brief This assembly's target.
- @details The object identified as this assembly's "target". Clients can set and retrieve a target, which can be a convenient supplement as a place to work, in addition to the assembly's stack. For example, a parser for an HTML file might use a web page object as its "target". As the parser recognizes markup commands like &lt;head>, it could apply its findings to the target.
-*/
-@property (nonatomic, retain) id target;
-@end
View
26 include/ParseKit/.svn/text-base/PKCaseInsensitiveLiteral.h.svn-base
@@ -1,26 +0,0 @@
-// Copyright 2010 Todd Ditchendorf
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-#import <Foundation/Foundation.h>
-#import <ParseKit/PKLiteral.h>
-
-/*!
- @class PKCaseInsensitiveLiteral
- @brief A <tt>PKCaselessLiteral</tt> matches a specified <tt>NSString</tt> from an assembly, disregarding case.
-*/
-@interface PKCaseInsensitiveLiteral : PKLiteral {
-
-}
-
-@end
View
31 include/ParseKit/.svn/text-base/PKChar.h.svn-base
@@ -1,31 +0,0 @@
-// Copyright 2010 Todd Ditchendorf
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-#import <ParseKit/PKTerminal.h>
-
-/*!
- @class PKChar
- @brief A <tt>PKChar</tt> matches a character from a character assembly.
- @details <tt>-[PKChar qualifies:]</tt> returns true every time, since this class assumes it is working against a <tt>PKCharacterAssembly</tt>.
-*/
-@interface PKChar : PKTerminal {
-
-}
-
-/*!
- @brief Convenience factory method for initializing an autoreleased <tt>PKChar</tt> parser.
- @result an initialized autoreleased <tt>PKChar</tt> parser.
-*/
-+ (PKChar *)char;
-@end
View
26 include/ParseKit/.svn/text-base/PKCharacterAssembly.h.svn-base
@@ -1,26 +0,0 @@
-// Copyright 2010 Todd Ditchendorf
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-#import <ParseKit/PKAssembly.h>
-
-/*!
- @class PKCharacterAssembly
- @brief A <tt>PKCharacterAssembly</tt> is a <tt>PKAssembly</tt> whose elements are characters.
-*/
-@interface PKCharacterAssembly : PKAssembly {
-
-}
-
-+ (PKCharacterAssembly *)assemblyWithString:(NSString *)s;
-@end
View
44 include/ParseKit/.svn/text-base/PKCollectionParser.h.svn-base
@@ -1,44 +0,0 @@
-// Copyright 2010 Todd Ditchendorf
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-#import <Foundation/Foundation.h>
-#import <ParseKit/PKParser.h>
-
-/*!
- @class PKCollectionParser
- @brief An Abstract class. This class abstracts the behavior common to parsers that consist of a series of other parsers.
-*/
-@interface PKCollectionParser : PKParser {
- NSMutableArray *subparsers;
-}
-
-/*!
- @brief Designated Initializer. Initialize an instance of a <tt>PKCollectionParser</tt> subclass.
- @param p1, ... A comma-separated list of parser objects ending with <tt>nil</tt>
- @result an initialized instance of a <tt>PKCollectionParser</tt> subclass.
-*/
-- (id)initWithSubparsers:(PKParser *)p1, ...;
-
-/*!
- @brief Adds a parser to the collection.
- @param p parser to add
-*/
-- (void)add:(PKParser *)p;
-
-/*!
- @property subparsers
- @brief This parser's subparsers.
-*/
-@property (nonatomic, readonly, retain) NSMutableArray *subparsers;
-@end
View
31 include/ParseKit/.svn/text-base/PKComment.h.svn-base
@@ -1,31 +0,0 @@
-// Copyright 2010 Todd Ditchendorf
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-#import <Foundation/Foundation.h>
-#import <ParseKit/PKTerminal.h>
-
-/*!
- @class PKComment
- @brief A <tt>PKComment</tt> matches a comment from a token assembly.
-*/
-@interface PKComment : PKTerminal {
-
-}
-
-/*!
- @brief Convenience factory method for initializing an autoreleased <tt>PKComment</tt> object.
- @result an initialized autoreleased <tt>PKComment</tt> object
-*/
-+ (PKComment *)comment;
-@end
View
77 include/ParseKit/.svn/text-base/PKCommentState.h.svn-base
@@ -1,77 +0,0 @@
-// Copyright 2010 Todd Ditchendorf
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-#import <Foundation/Foundation.h>
-#import <ParseKit/PKTokenizerState.h>
-
-@class PKSymbolRootNode;
-@class PKSingleLineCommentState;
-@class PKMultiLineCommentState;
-
-/*!
- @class PKCommentState
- @brief This state will either delegate to a comment-handling state, or return a <tt>PKSymbol</tt> token with just the first char in it.
- @details By default, C and C++ style comments. (<tt>//</tt> to end of line and <tt>/&0x002A; &0x002A;/</tt>)
-*/
-@interface PKCommentState : PKTokenizerState {
- PKSymbolRootNode *rootNode;
- PKSingleLineCommentState *singleLineState;
- PKMultiLineCommentState *multiLineState;
- BOOL reportsCommentTokens;
- BOOL balancesEOFTerminatedComments;
-}
-
-/*!
- @brief Adds the given string as a single-line comment start marker. may be multi-char.
- @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>)
- @param start a single- or multi-character marker that should be recognized as the start of a single-line comment
-*/
-- (void)addSingleLineStartMarker:(NSString *)start;
-
-/*!
- @brief Removes the given string as a single-line comment start marker. may be multi-char.
- @details If <tt>start</tt> was never added as a single-line comment start marker, this has no effect.
- @param start a single- or multi-character marker that should no longer be recognized as the start of a single-line comment
-*/
-- (void)removeSingleLineStartMarker:(NSString *)start;
-
-/*!
- @brief Adds the given strings as a multi-line comment start and end markers. both may be multi-char
- @details <tt>start</tt> and <tt>end</tt> may be different strings. e.g. <tt>/&0x002A;</tt> and <tt>&0x002A;/</tt>. Also, the actual comment may or may not be multi-line.
- @param start a single- or multi-character marker that should be recognized as the start of a multi-line comment
- @param end a single- or multi-character marker that should be recognized as the end of a multi-line comment that began with <tt>start</tt>
-*/
-- (void)addMultiLineStartMarker:(NSString *)start endMarker:(NSString *)end;
-
-/*!
- @brief Removes <tt>start</tt> and its orignal <tt>end</tt> counterpart as a multi-line comment start and end markers.
- @details If <tt>start</tt> was never added as a multi-line comment start marker, this has no effect.
- @param start a single- or multi-character marker that should no longer be recognized as the start of a multi-line comment
-*/
-- (void)removeMultiLineStartMarker:(NSString *)start;
-
-/*!
- @property reportsCommentTokens
- @brief if true, the tokenizer associated with this state will report comment tokens, otherwise it silently consumes comments
- @details if true, this state will return <tt>PKToken</tt>s of type <tt>PKTokenTypeComment</tt>.
- Otherwise, it will silently consume comment text and return the next token from another of the tokenizer's states
-*/
-@property (nonatomic) BOOL reportsCommentTokens;
-
-/*!
- @property balancesEOFTerminatedComments
- @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.
-*/
-@property (nonatomic) BOOL balancesEOFTerminatedComments;
-@end
View
58 include/ParseKit/.svn/text-base/PKDelimitState.h.svn-base
@@ -1,58 +0,0 @@
-// Copyright 2010 Todd Ditchendorf
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-#import <ParseKit/PKTokenizerState.h>
-
-@class PKSymbolRootNode;
-
-/*!
- @class PKDelimitState
- @brief A delimit state returns a delimited string token from a reader
- @details This state will collect characters until it sees a match to the end marker that corresponds to the start marker the tokenizer used to switch to this state.
-*/
-@interface PKDelimitState : PKTokenizerState {
- PKSymbolRootNode *rootNode;
- BOOL balancesEOFTerminatedStrings;
- BOOL allowsUnbalancedStrings;
-
- NSMutableArray *startMarkers;
- NSMutableArray *endMarkers;
- NSMutableArray *characterSets;
-}
-
-/*!
- @brief Adds the given strings as a delimited string start and end markers. both may be multi-char
- @details <tt>start</tt> and <tt>end</tt> may be different strings. e.g. <tt>&lt;#</tt> and <tt>#&gt;</tt>.
- @param start a single- or multi-character marker that should be recognized as the start of a multi-line comment
- @param end a single- or multi-character marker that should be recognized as the end of a multi-line comment that began with <tt>start</tt>
- @param set of characters allowed to appear within the delimited string or <tt>nil</tt> to allow any non-newline characters
-*/
-- (void)addStartMarker:(NSString *)start endMarker:(NSString *)end allowedCharacterSet:(NSCharacterSet *)set;
-
-/*!
- @brief Removes <tt>start</tt> and its orignal <tt>end</tt> counterpart as a delimited string start and end markers.
- @details If <tt>start</tt> was never added as a delimited string start marker, this has no effect.
- @param start a single- or multi-character marker that should no longer be recognized as the start of a delimited string
-*/
-- (void)removeStartMarker:(NSString *)start;
-
-/*!
- @property balancesEOFTerminatedStrings
- @brief if YES, this state will append a matching end delimiter marker (e.g. <tt>--></tt> or <tt>%></tt>) to strings terminated by EOF.
- @details Default is NO.
-*/
-@property (nonatomic) BOOL balancesEOFTerminatedStrings;
-
-@property (nonatomic) BOOL allowsUnbalancedStrings;
-@end
View
36 include/ParseKit/.svn/text-base/PKDelimitedString.h.svn-base
@@ -1,36 +0,0 @@
-// Copyright 2010 Todd Ditchendorf
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-#import <Foundation/Foundation.h>
-#import <ParseKit/PKTerminal.h>
-
-/*!
- @class PKDelimitedString
- @brief A <tt>PKDelimitedString</tt> matches a delimited string from a token assembly.
-*/
-@interface PKDelimitedString : PKTerminal {
- NSString *startMarker;
- NSString *endMarker;
-}
-
-/*!
- @brief Convenience factory method for initializing an autoreleased <tt>PKDelimitedString</tt> object.
- @result an initialized autoreleased <tt>PKDelimitedString</tt> object
-*/
-+ (PKDelimitedString *)delimitedString;
-
-+ (PKDelimitedString *)delimitedStringWithStartMarker:(NSString *)start;
-
-+ (PKDelimitedString *)delimitedStringWithStartMarker:(NSString *)start endMarker:(NSString *)end;
-@end
View
63 include/ParseKit/.svn/text-base/PKDifference.h.svn-base
@@ -1,63 +0,0 @@
-// Copyright 2010 Todd Ditchendorf
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-#import <Foundation/Foundation.h>
-#import <ParseKit/PKParser.h>
-
-/*!
- @class PKDifference
- @brief A <tt>PKDifference</tt> matches anything its <tt>subparser</tt> would match except for anything its <tt>minus</tt> parser would match.
- @details The example below would match any <tt>Word</tt> token except for <tt>true</tt> or <tt>false</tt>.
-
-@code
- PKParser *trueParser = [PKLiteral literalWithString:@"true"];
- PKParser *falseParser = [PKLiteral literalWithString:@"false"];
- PKAlternation *reservedWords = [PKAlternation alternationWithSubparsers:trueParser, falseParser, nil];
-
- PKDifference *diff = [PKDifference differenceWithSubparser:[PKWord word] minus:reservedWords];
-@endcode
-*/
-@interface PKDifference : PKParser {
- PKParser *subparser;
- PKParser *minus;
-}
-
-/*!
- @brief Convenience factory method for initializing an autoreleased <tt>PKDifference</tt> parser.
- @param subparser the parser this parser uses for matching
- @param minus the parser whose matches will be exluded
- @result an initialized autoreleased <tt>PKDifference</tt> parser.
-*/
-+ (PKDifference *)differenceWithSubparser:(PKParser *)s minus:(PKParser *)m;
-
-/*!
- @brief Designated initializer
- @param subparser the parser this parser uses for matching
- @param minus the parser whose matches will be exluded
- @result an initialized <tt>PKDifference</tt> parser.
-*/
-- (id)initWithSubparser:(PKParser *)s minus:(PKParser *)m;
-
-/*!
- @property subparser
- @brief this parser's subparser which it will initially match against
-*/
-@property (nonatomic, retain, readonly) PKParser *subparser;
-
-/*!
- @property minus
- @brief after a successful match against <tt>subparser</tt>, matches against <tt>minus</tt> will not be matched by this parser
-*/
-@property (nonatomic, retain, readonly) PKParser *minus;
-@end
View
31 include/ParseKit/.svn/text-base/PKDigit.h.svn-base
@@ -1,31 +0,0 @@
-// Copyright 2010 Todd Ditchendorf
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-#import <ParseKit/PKTerminal.h>
-
-/*!
- @class PKDigit
- @brief A <tt>PKDigit</tt> matches a digit from a character assembly.
- @details <tt>-[PKDitgit qualifies:] returns true if an assembly's next element is a digit.
-*/
-@interface PKDigit : PKTerminal {
-
-}
-
-/*!
- @brief Convenience factory method for initializing an autoreleased <tt>PKDigit</tt> parser.
- @result an initialized autoreleased <tt>PKDigit</tt> parser.
-*/
-+ (PKDigit *)digit;
-@end
View
22 include/ParseKit/.svn/text-base/PKEmailState.h.svn-base
@@ -1,22 +0,0 @@
-//
-// PKEmailState.h
-// ParseKit
-//
-// Created by Todd Ditchendorf on 3/31/10.
-// Copyright 2010 Todd Ditchendorf. All rights reserved.
-//
-
-#import <Foundation/Foundation.h>
-#import <ParseKit/PKTokenizerState.h>
-
-/*!
- @class PKEmailState
- @brief An email state returns an email address from a reader.
- @details
-*/
-@interface PKEmailState : PKTokenizerState {
- PKUniChar c;
- PKUniChar lastChar;
-}
-
-@end
View
32 include/ParseKit/.svn/text-base/PKEmpty.h.svn-base
@@ -1,32 +0,0 @@
-// Copyright 2010 Todd Ditchendorf
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-#import <Foundation/Foundation.h>
-#import <ParseKit/PKParser.h>
-
-/*!
- @class PKEmpty
- @brief A <tt>PKEmpty</tt> parser matches any assembly once, and applies its assembler that one time.
- @details <p>Language elements often contain empty parts. For example, a language may at some point allow a list of parameters in parentheses, and may allow an empty list. An empty parser makes it easy to match, within the parenthesis, either a list of parameters or "empty".</p>
-*/
-@interface PKEmpty : PKParser {
-
-}
-
-/*!
- @brief Convenience factory method for initializing an autoreleased <tt>PKEmpty</tt> parser.
- @result an initialized autoreleased <tt>PKEmpty</tt> parser.
-*/
-+ (PKEmpty *)empty;
-@end
View
23 include/ParseKit/.svn/text-base/PKHashtagState.h.svn-base
@@ -1,23 +0,0 @@
-//
-// PKHashtagState.h
-// ParseKit
-//
-// Created by Todd Ditchendorf on 10/22/11.
-// Copyright 2011 Todd Ditchendorf. All rights reserved.
-//
-
-#if PLATFORM(TWITTER_STATE)
-#import <Foundation/Foundation.h>
-#import <ParseKit/PKTokenizerState.h>
-
-/*!
- @class PKHashtagState
- @brief A hashtag state returns a hashtag from a reader.
- @details
- */
-@interface PKHashtagState : PKTokenizerState {
-
-}
-
-@end
-#endif
View
41 include/ParseKit/.svn/text-base/PKIntersection.h.svn-base
@@ -1,41 +0,0 @@
-// Copyright 2010 Todd Ditchendorf
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-#import <Foundation/Foundation.h>
-#import <ParseKit/PKCollectionParser.h>
-
-/*!
- @class PKIntersection
- @brief A <tt>PKIntersection</tt> matches input that matches all of its subparsers. It is basically a representation of "Logical And" or "&".
- @details The example below would match any token which is both a word and matches the given regular expression pattern.
- Using a <tt>PKIntersection</tt> in this case would improve performance over using just a <tt>PKPattern</tt> parser as the regular expression would be evaluated fewer times.
-
-@code
- PKParser *pattern = [PKPattern patternWithString:@"_.+"];
-
- PKIntersection *wordStartingWithUnderscore = [PKIntersection intersectionWithSubparsers:[PKWord word], pattern, nil];
-@endcode
-*/
-@interface PKIntersection : PKCollectionParser {
-
-}
-
-/*!
- @brief Convenience factory method for initializing an autoreleased <tt>PKIntersection</tt> parser.
- @result an initialized autoreleased <tt>PKIntersection</tt> parser.
-*/
-+ (PKIntersection *)intersection;
-
-+ (PKIntersection *)intersectionWithSubparsers:(PKParser *)p1, ...;
-@end
View
31 include/ParseKit/.svn/text-base/PKLetter.h.svn-base
@@ -1,31 +0,0 @@
-// Copyright 2010 Todd Ditchendorf
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-#import <ParseKit/PKTerminal.h>
-
-/*!
- @class PKLetter
- @brief A <tt>PKLetter</tt> matches any letter from a character assembly.
- @details <tt>-[PKLetter qualifies:]</tt> returns true if an assembly's next element is a letter.
-*/
-@interface PKLetter : PKTerminal {
-
-}
-
-/*!
- @brief Convenience factory method for initializing an autoreleased <tt>PKLetter</tt> parser.
- @result an initialized autoreleased <tt>PKLetter</tt> parser.
-*/
-+ (PKLetter *)letter;
-@end
View
34 include/ParseKit/.svn/text-base/PKLiteral.h.svn-base
@@ -1,34 +0,0 @@
-// Copyright 2010 Todd Ditchendorf
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-#import <Foundation/Foundation.h>
-#import <ParseKit/PKTerminal.h>
-
-@class PKToken;
-
-/*!
- @class PKLiteral
- @brief A <tt>PKLiteral</tt> matches a specific word from an assembly.
-*/
-@interface PKLiteral : PKTerminal {
- PKToken *literal;
-}
-
-/*!
- @brief Convenience factory method for initializing an autoreleased <tt>PKLiteral</tt> object with a given string.
- @param s the word represented by this literal
- @result an initialized autoreleased <tt>PKLiteral</tt> object representing <tt>s</tt>
-*/
-+ (PKLiteral *)literalWithString:(NSString *)s;
-@end
View
22 include/ParseKit/.svn/text-base/PKLowercaseWord.h.svn-base
@@ -1,22 +0,0 @@
-// Copyright 2010 Todd Ditchendorf
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-#import <Foundation/Foundation.h>
-#import <ParseKit/PKWord.h>
-
-@interface PKLowercaseWord : PKWord {
-
-}
-
-@end
View
24 include/ParseKit/.svn/text-base/PKMultiLineCommentState.h.svn-base
@@ -1,24 +0,0 @@
-// Copyright 2010 Todd Ditchendorf
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-#import <Foundation/Foundation.h>
-#import <ParseKit/PKTokenizerState.h>
-
-@interface PKMultiLineCommentState : PKTokenizerState {
- NSMutableArray *startMarkers;
- NSMutableArray *endMarkers;
- NSString *currentStartMarker;
-}
-
-@end
View
52 include/ParseKit/.svn/text-base/PKNegation.h.svn-base
@@ -1,52 +0,0 @@
-// Copyright 2010 Todd Ditchendorf
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-#import <ParseKit/PKParser.h>
-
-/*!
- @class PKNegation
- @brief A <tt>PKNegation</tt> negates the matching logic of its subparser. It matches anything its subparser would not.
- @details The example below would match any token except for a <tt>?></tt> symbol token. This could be useful for matching all tokens until an end marker (in this case a PHP end marker) is found.
-
-@code
- PKParser *question = [PKSymbol symbolWithString:@"?>"];
-
- PKNegation *n = [PKNegation negationWithSubparser:question];
-@endcode
-*/
-@interface PKNegation : PKParser {
- PKParser *subparser;
- PKParser *difference;
-}
-
-/*!
- @brief Convenience factory method for initializing an autoreleased <tt>PKNegation</tt> parser.
- @param subparser the parser whose matching logic is negated
- @result an initialized autoreleased <tt>PKNegation</tt> parser.
-*/
-+ (PKNegation *)negationWithSubparser:(PKParser *)s;
-
-/*!
- @brief Designated initializer
- @param subparser the parser whose matching logic is negated
- @result an initialized <tt>PKNegation</tt> parser.
-*/
-- (id)initWithSubparser:(PKParser *)s;
-
-/*!
- @property subparser
- @brief this parser's subparser whose matching logic is negated
-*/
-@property (nonatomic, retain, readonly) PKParser *subparser;
-@end
View
31 include/ParseKit/.svn/text-base/PKNumber.h.svn-base
@@ -1,31 +0,0 @@
-// Copyright 2010 Todd Ditchendorf
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-#import <Foundation/Foundation.h>
-#import <ParseKit/PKTerminal.h>
-
-/*!
- @class PKNumber
- @brief A <tt>PKNumber</tt> matches a number from a token assembly.
-*/
-@interface PKNumber : PKTerminal {
-
-}
-
-/*!
- @brief Convenience factory method for initializing an autoreleased <tt>PKNumber</tt> object.
- @result an initialized autoreleased <tt>PKNumber</tt> object
-*/
-+ (PKNumber *)number;
-@end
View
98 include/ParseKit/.svn/text-base/PKNumberState.h.svn-base
@@ -1,98 +0,0 @@
-// Copyright 2010 Todd Ditchendorf
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-#import <Foundation/Foundation.h>
-#import <ParseKit/PKTokenizerState.h>
-
-/*!
- @class PKNumberState
- @brief A number state returns a number from a reader.
- @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.
- If <tt>allowsScientificNotation</tt> is YES (default is NO) this state allows 'e' or 'E' followed by an (optionally explicityly positive or negative) integer to represent 10 to the indicated power. For example, this state will recognize <tt>1e2</tt> as equaling <tt>100</tt>.</p>
-*/
-@interface PKNumberState : PKTokenizerState {
- BOOL allowsTrailingDecimalSeparator;
- BOOL allowsScientificNotation;
- BOOL allowsOctalNotation;
- BOOL allowsHexadecimalNotation;
- BOOL allowsFloatingPoint;
- BOOL allowsGroupingSeparator;
-
- PKUniChar positivePrefix;
- PKUniChar negativePrefix;
- PKUniChar groupingSeparator;
- PKUniChar decimalSeparator;
-
- BOOL isDecimal;
- BOOL isFraction;
- BOOL isNegative;
- BOOL isHex;
- BOOL gotADigit;
- NSUInteger len;
- PKFloat base;
- PKUniChar originalCin;
- PKUniChar firstNum;
- PKUniChar c;
- PKFloat floatValue;
- PKFloat exp;
- BOOL isNegativeExp;
-}
-
-/*!
- @property allowsTrailingDecimalSeparator
- @brief If YES, numbers are allowed to end with a trialing decimal separator, e.g. <tt>42.<tt>
- @details default is NO
-*/
-@property (nonatomic) BOOL allowsTrailingDecimalSeparator;
-
-/*!
- @property allowsScientificNotation
- @brief If YES, supports exponential numbers like <tt>42.0e2<tt>, <tt>2E+6<tt>, or <tt>5.1e-6<tt>
- @details default is NO
-*/
-@property (nonatomic) BOOL allowsScientificNotation;
-
-/*!
- @property allowsOctalNotation
- @brief If YES, supports octal numbers like <tt>020<tt> (16), or <tt>0102<tt> (66)
- @details default is NO
-*/
-@property (nonatomic) BOOL allowsOctalNotation;
-
-/*!
- @property allowsHexidecimalNotation
- @brief If YES, supports hex numbers like <tt>0x20<tt> (32), or <tt>0xB7<tt> (183)
- @details default is NO
-*/
-@property (nonatomic) BOOL allowsHexadecimalNotation;
-
-/*!
- @property allowsFloatingPoint
- @brief If YES, supports floating point numbers like <tt>1.0<tt> or <tt>3.14<tt>. If NO, only whole numbers are allowed.
- @details default is YES
-*/
-@property (nonatomic) BOOL allowsFloatingPoint;
-
-/*!
- @property allowsGroupingSeparator
- @brief If YES, supports numbers with internal grouping separators like <tt>2,001</tt>.
- @details default is NO
-*/
-@property (nonatomic) BOOL allowsGroupingSeparator;
-
-@property (nonatomic) PKUniChar positivePrefix;
-@property (nonatomic) PKUniChar negativePrefix;
-@property (nonatomic) PKUniChar groupingSeparator;
-@property (nonatomic) PKUniChar decimalSeparator;
-@end
View
172 include/ParseKit/.svn/text-base/PKParser.h.svn-base
@@ -1,172 +0,0 @@
-// Copyright 2010 Todd Ditchendorf
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-#import <Foundation/Foundation.h>
-
-@class PKAssembly;
-@class PKTokenizer;
-@class PKParser;
-
-typedef void (^PKAssemblerBlock)(PKParser *, PKAssembly *);
-
-/*!
- @class PKParser
- @brief An Abstract class. A <tt>PKParser</tt> is an object that recognizes the elements of a language.
- @details <p>Each <tt>PKParser</tt> object is either a <tt>PKTerminal</tt> or a composition of other parsers. The <tt>PKTerminal</tt> class is a subclass of Parser, and is itself a hierarchy of parsers that recognize specific patterns of text. For example, a <tt>PKWord</tt> recognizes any word, and a <tt>PKLiteral</tt> matches a specific string.</p>
- <p>In addition to <tt>PKTerminal</tt>, other subclasses of <tt>PKParser</tt> provide composite parsers, describing sequences, alternations, and repetitions of other parsers. For example, the following <tt>PKParser</tt> objects culminate in a good parser that recognizes a description of good coffee.</p>
-@code
- PKAlternation *adjective = [PKAlternation alternation];
- [adjective add:[PKLiteral literalWithString:@"steaming"]];
- [adjective add:[PKLiteral literalWithString:@"hot"]];
- PKSequence *good = [PKSequence sequence];
- [good add:[PKRepetition repetitionWithSubparser:adjective]];
- [good add:[PKLiteral literalWithString:@"coffee"]];
- NSString *s = @"hot hot steaming hot coffee";
- PKAssembly *a = [PKTokenAssembly assemblyWithString:s];
- NSLog([good bestMatchFor:a]);
-@endcode
- <p>This prints out:</p>
-@code
- [hot, hot, steaming, hot, coffee]
- hot/hot/steaming/hot/coffee^
-@endcode
- <p>The parser does not match directly against a string, it matches against a <tt>PKAssembly</tt>. The resulting assembly shows its stack, with four words on it, along with its sequence of tokens, and the index at the end of these. In practice, parsers will do some work on an assembly, based on the text they recognize.</p>
-*/
-@interface PKParser : NSObject {
- PKAssemblerBlock assemblerBlock;
- PKAssemblerBlock preassemblerBlock;
- id assembler;
- SEL assemblerSelector;
- id preassembler;
- SEL preassemblerSelector;
- NSString *name;
- PKTokenizer *tokenizer; // PKParserFactoryAdditions ivar
-}
-
-/*!
- @brief Convenience factory method for initializing an autoreleased parser.
- @result an initialized autoreleased parser.
-*/
-+ (PKParser *)parser;
-
-/*!
- @brief Sets the object and method that will work on an assembly whenever this parser successfully matches against the assembly.
- @details The method represented by <tt>sel</tt> must accept a single <tt>PKAssembly</tt> argument. The signature of <tt>sel</tt> should be similar to: <tt>- (void)parser:(PKParser *)p didMatchAssembly:(PKAssembly *)a</tt>.
- @param a the assembler this parser will use to work on an assembly
- @param sel a selector that assembler <tt>a</tt> responds to which will work on an assembly
-*/
-- (void)setAssembler:(id)a selector:(SEL)sel;
-
-/*!
- @brief Sets the object that will work on every assembly before matching against it.
- @details Setting a preassembler is entirely optional, but sometimes useful for repetition parsers to do work on an assembly before matching against it.
- @param a the assembler this parser will use to work on an assembly before matching against it.
- @param sel a selector that assembler <tt>a</tt> responds to which will work on an assembly
-*/
-- (void)setPreassembler:(id)a selector:(SEL)sel;
-
-/*!
- @brief Returns the most-matched assembly in a collection.
- @param inAssembly the assembly for which to find the best match
- @result an assembly with the greatest possible number of elements consumed by this parser
-*/
-- (PKAssembly *)bestMatchFor:(PKAssembly *)inAssembly;
-
-/*!
- @brief Returns either <tt>nil</tt>, or a completely matched version of the supplied assembly.
- @param inAssembly the assembly for which to find the complete match
- @result either <tt>nil</tt>, or a completely matched version of the supplied assembly
-*/
-- (PKAssembly *)completeMatchFor:(PKAssembly *)inAssembly;
-
-/*!
- @brief Given a set of assemblies, this method matches this parser against all of them, and returns a new set of the assemblies that result from the matches.
- @details <p>Given a set of assemblies, this method matches this parser against all of them, and returns a new set of the assemblies that result from the matches.</p>
- <p>For example, consider matching the regular expression <tt>a*</tt> against the string <tt>aaab</tt>. The initial set of states is <tt>{^aaab}</tt>, where the <tt>^</tt> indicates how far along the assembly is. When <tt>a*</tt> matches against this initial state, it creates a new set <tt>{^aaab, a^aab, aa^ab, aaa^b}</tt>.</p>
- @param inAssemblies set of assemblies to match against
- @result a set of assemblies that result from matching against a beginning set of assemblies
-*/
-- (NSSet *)allMatchesFor:(NSSet *)inAssemblies;
-
-/*!
- @brief Find a parser with the given name
- @details Performs a depth-first recursive search (starting with this parser) for a parser or subparser with the given name. If this parser's name is name, it will be returned.
- @param name of the parser to be found
- @result the parser with the given name or <tt>nil</tt> if not found
- */
-- (PKParser *)parserNamed:(NSString *)name;
-
-/*!
- @property assemblerBlock
- @brief Set a block which should be executed after this parser is matched
- @details <p>This is an alternative to calling <tt>-setAssembler:selector:</tt>.</p>
- <p>Passing a block to this method will cause this parser to execute the given block after it is matched (rather than sending <tt>assembler</tt> the <tt>assemblerSelector</tt> message.</p>
- <p>Using a block as the assembler will sometimes be more convient than setting an assembler object.</p>
- @param block of code to be executed after a parser is matched.
-*/
-@property (nonatomic, copy) PKAssemblerBlock assemblerBlock;
-
-/*!
- @property preassemblerBlock
- @brief Set a block which should be executed before this parser is matched
- @details <p>This is an alternative to calling <tt>-setPreassembler:selector:</tt>.</p>
- <p>Passing a block to this method will cause this parser to execute the given block before it is matched (rather than sending <tt>preassembler</tt> the <tt>preassemblerSelector</tt> message.</p>
- <p>Using a block as the preassembler will sometimes be more convient than setting an preassembler object.</p>
- @param block of code to be executed before a parser is matched.
- */
-@property (nonatomic, copy) PKAssemblerBlock preassemblerBlock;
-
-/*!
- @property assembler
- @brief The assembler this parser will use to work on a matched assembly.
- @details <tt>assembler</tt> should respond to the selector held by this parser's <tt>selector</tt> property.
-*/
-@property (nonatomic, assign) id assembler;
-
-/*!
- @property assemblerSelector
- @brief The method of <tt>assembler</tt> this parser will call to work on a matched assembly.
- @details The method represented by <tt>assemblerSelector</tt> must accept a single <tt>PKAssembly</tt> argument. The signature of <tt>assemblerSelector</tt> should be similar to: <tt>- (void)parser:(PKParser *)p didMatchFoo:(PKAssembly *)a</tt>.
-*/
-@property (nonatomic, assign) SEL assemblerSelector;
-
-/*!
- @property preassembler
- @brief The assembler this parser will use to work on an assembly before matching against it.
- @discussion <tt>preassembler</tt> should respond to the selector held by this parser's <tt>preassemblerSelector</tt> property.
-*/
-@property (nonatomic, assign) id preassembler;
-
-/*!
- @property preAssemlerSelector
- @brief The method of <tt>preassembler</tt> this parser will call to work on an assembly.
- @details The method represented by <tt>preassemblerSelector</tt> must accept a single <tt>PKAssembly</tt> argument. The signature of <tt>preassemblerSelector</tt> should be similar to: <tt>- (void)parser:(PKParser *)p didMatchAssembly:(PKAssembly *)a</tt>.
-*/
-@property (nonatomic, assign) SEL preassemblerSelector;
-
-/*!
- @property name
- @brief The name of this parser.
- @discussion Use this property to help in identifying a parser or for debugging purposes.
-*/
-@property (nonatomic, copy) NSString *name;
-@end
-
-@interface PKParser (PKParserFactoryAdditions)
-
-- (id)parse:(NSString *)s error:(NSError **)outError;
-
-- (PKTokenizer *)tokenizer;
-@end
-
View
48 include/ParseKit/.svn/text-base/PKParserFactory.h.svn-base
@@ -1,48 +0,0 @@
-//
-// PKParserFactory.h
-// ParseKit
-//
-// Created by Todd Ditchendorf on 12/12/08.
-// Copyright 2009 Todd Ditchendorf All rights reserved.
-//
-
-#import <Foundation/Foundation.h>
-
-@class PKGrammarParser;
-@class PKToken;
-@class PKTokenizer;
-@class PKParser;
-@class PKCollectionParser;
-
-void PKReleaseSubparserTree(PKParser *p);
-
-typedef enum {
- PKParserFactoryAssemblerSettingBehaviorOnAll = 1 << 1, // Default
- PKParserFactoryAssemblerSettingBehaviorOnTerminals = 1 << 2,
- PKParserFactoryAssemblerSettingBehaviorOnExplicit = 1 << 3,
- PKParserFactoryAssemblerSettingBehaviorOnNone = 1 << 4
-} PKParserFactoryAssemblerSettingBehavior;
-
-@interface PKParserFactory : NSObject {
- PKParserFactoryAssemblerSettingBehavior assemblerSettingBehavior;
- PKGrammarParser *grammarParser;
- id assembler;
- id preassembler;
- NSMutableDictionary *parserTokensTable;
- NSMutableDictionary *parserClassTable;
- NSMutableDictionary *selectorTable;
- PKToken *equals;
- PKToken *curly;
- PKToken *paren;
- BOOL isGatheringClasses;
-}
-
-+ (PKParserFactory *)factory;
-
-- (PKParser *)parserFromGrammar:(NSString *)s assembler:(id)a error:(NSError **)outError;
-- (PKParser *)parserFromGrammar:(NSString *)s assembler:(id)a preassembler:(id)pa error:(NSError **)outError;
-
-- (PKCollectionParser *)exprParser;
-
-@property (nonatomic) PKParserFactoryAssemblerSettingBehavior assemblerSettingBehavior;
-@end
View
39 include/ParseKit/.svn/text-base/PKPattern.h.svn-base
@@ -1,39 +0,0 @@
-// Copyright 2010 Todd Ditchendorf
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-#import <Foundation/Foundation.h>
-#import <ParseKit/PKTerminal.h>
-#import <ParseKit/PKToken.h>
-
-typedef enum {
- PKPatternOptionsNone = 0,
- PKPatternOptionsIgnoreCase = 2,
- PKPatternOptionsComments = 4,
- PKPatternOptionsMultiline = 8,
- PKPatternOptionsDotAll = 32,
- PKPatternOptionsUnicodeWordBoundaries = 256
-} PKPatternOptions;
-
-@interface PKPattern : PKTerminal {
- PKPatternOptions options;
-}
-
-+ (PKPattern *)patternWithString:(NSString *)s;
-
-+ (PKPattern *)patternWithString:(NSString *)s options:(PKPatternOptions)opts;
-
-- (id)initWithString:(NSString *)s;
-
-- (id)initWithString:(NSString *)s options:(PKPatternOptions)opts;
-@end
View
46 include/ParseKit/.svn/text-base/PKQuoteState.h.svn-base
@@ -1,46 +0,0 @@
-// Copyright 2010 Todd Ditchendorf
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-#import <Foundation/Foundation.h>
-#import <ParseKit/PKTokenizerState.h>
-
-/*!
- @class PKQuoteState
- @brief A quote state returns a quoted string token from a reader
- @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.
-*/
-@interface PKQuoteState : PKTokenizerState {
- BOOL allowsEOFTerminatedQuotes;
- BOOL balancesEOFTerminatedQuotes;
- BOOL usesCSVStyleEscaping;
-}
-
-/*!
- @property allowsEOFTerminatedQuotes
- @brief if YES, this state will consider unbalanced quoted strings (quoted strings terminated by EOF) as a quoted string rather than a <tt>'</tt> or <tt>"</tt> symbol token followed by zero or more tokens. Default is YES.
-*/
-@property (nonatomic) BOOL allowsEOFTerminatedQuotes;
-
-/*!
- @property balancesEOFTerminatedQuotes
- @brief if YES, this state will append a matching quote char (<tt>'</tt> or <tt>"</tt>) to strings terminated by EOF. Default is NO.
-*/
-@property (nonatomic) BOOL balancesEOFTerminatedQuotes;
-
-/*!
- @property usesCSVStyleEscaping
- @brief if NO, this state will use slash-style escaping (<tt>\'</tt> or <tt>\"</tt>). If YES, it will use CSV-style escaping, by doubling the quote character (<tt>''</tt> or <tt>""</tt>). The default behaviour is NO (slash-style).
-*/
-@property (nonatomic) BOOL usesCSVStyleEscaping;
-@end
View
31 include/ParseKit/.svn/text-base/PKQuotedString.h.svn-base
@@ -1,31 +0,0 @@
-// Copyright 2010 Todd Ditchendorf
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-#import <Foundation/Foundation.h>
-#import <ParseKit/PKTerminal.h>
-
-/*!
- @class PKQuotedString
- @brief A <tt>PKQuotedString</tt> matches a quoted string, like "this one" from a token assembly.
-*/
-@interface PKQuotedString : PKTerminal {
-
-}
-
-/*!
- @brief Convenience factory method for initializing an autoreleased <tt>PKQuotedString</tt> object.
- @result an initialized autoreleased <tt>PKQuotedString</tt> object
-*/
-+ (PKQuotedString *)quotedString;
-@end
View
67 include/ParseKit/.svn/text-base/PKReader.h.svn-base
@@ -1,67 +0,0 @@
-// Copyright 2010 Todd Ditchendorf
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-#import <Foundation/Foundation.h>
-#import <ParseKit/PKTypes.h>
-
-/*!
- @class PKReader
- @brief A character-stream reader that allows characters to be pushed back into the stream.
-*/
-@interface PKReader : NSObject {
- NSString *string;
- //unichar *buff;
- NSUInteger offset;
- NSUInteger length;
-}
-
-/*!
- @brief Designated Initializer. Initializes a reader with a given string.
- @details Designated Initializer.
- @param s string from which to read
- @result an initialized reader
-*/
-- (id)initWithString:(NSString *)s;
-
-/*!
- @brief Read a single UTF-16 unicode character
- @result The character read, or <tt>PKEOF</tt> (-1) if the end of the stream has been reached
-*/
-- (PKUniChar)read;
-
-/*!
- @brief Push back a single character
- @details moves the offset back one position
-*/
-- (void)unread;
-
-/*!
- @brief Push back count characters
- @param count of characters to push back
- @details moves the offset back count positions
-*/
-- (void)unread:(NSUInteger)count;
-
-/*!
- @property string
- @brief This reader's string.
-*/
-@property (nonatomic, copy) NSString *string;
-
-/*!
- @property offset
- @brief This reader's current offset in string
-*/
-@property (nonatomic, readonly) NSUInteger offset;
-@end
View
46 include/ParseKit/.svn/text-base/PKRepetition.h.svn-base
@@ -1,46 +0,0 @@
-// Copyright 2010 Todd Ditchendorf
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-#import <Foundation/Foundation.h>
-#import <ParseKit/PKParser.h>
-
-/*!
- @class PKRepetition
- @brief A <tt>PKRepetition</tt> matches its underlying parser repeatedly against a assembly.
-*/
-@interface PKRepetition : PKParser {
- PKParser *subparser;
-}
-
-/*!
- @brief Convenience factory method for initializing an autoreleased <tt>PKRepetition</tt> parser to repeatedly match against subparser <tt>p</tt>.
- @param p the subparser against wich to repeatedly match
- @result an initialized autoreleased <tt>PKRepetition</tt> parser.
-*/
-+ (PKRepetition *)repetitionWithSubparser:(PKParser *)p;
-
-/*!
- @brief Designated Initializer. Initialize a <tt>PKRepetition</tt> parser to repeatedly match against subparser <tt>p</tt>.
- @details Designated Initializer. Initialize a <tt>PKRepetition</tt> parser to repeatedly match against subparser <tt>p</tt>.
- @param p the subparser against wich to repeatedly match
- @result an initialized <tt>PKRepetition</tt> parser.
-*/
-- (id)initWithSubparser:(PKParser *)p;
-
-/*!
- @property subparser
- @brief this parser's subparser against which it repeatedly matches
-*/
-@property (nonatomic, readonly, retain) PKParser *subparser;
-@end
View
33 include/ParseKit/.svn/text-base/PKSequence.h.svn-base
@@ -1,33 +0,0 @@
-// Copyright 2010 Todd Ditchendorf
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-#import <Foundation/Foundation.h>
-#import <ParseKit/PKCollectionParser.h>
-
-/*!
- @class PKSequence
- @brief A <tt>PKSequence</tt> object is a collection of parsers, all of which must in turn match against an assembly for this parser to successfully match.
-*/
-@interface PKSequence : PKCollectionParser {
-
-}
-
-/*!
- @brief Convenience factory method for initializing an autoreleased <tt>PKSequence</tt> parser.
- @result an initialized autoreleased <tt>PKSequence</tt> parser.
-*/
-+ (PKSequence *)sequence;
-
-+ (PKSequence *)sequenceWithSubparsers:(PKParser *)p1, ...;
-@end
View
23 include/ParseKit/.svn/text-base/PKSingleLineCommentState.h.svn-base
@@ -1,23 +0,0 @@
-// Copyright 2010 Todd Ditchendorf
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-#import <Foundation/Foundation.h>
-#import <ParseKit/PKTokenizerState.h>
-
-@interface PKSingleLineCommentState : PKTokenizerState {
- NSMutableArray *startMarkers;
- NSString *currentStartMarker;
-}
-
-@end
View
40 include/ParseKit/.svn/text-base/PKSpecificChar.h.svn-base
@@ -1,40 +0,0 @@
-// Copyright 2010 Todd Ditchendorf
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-#import <ParseKit/PKTerminal.h>
-#import <ParseKit/PKTypes.h>
-
-/*!
- @class PKSpecificChar
- @brief A <tt>PKSpecificChar</tt> matches a specified character from a character assembly.
- @details <tt>-[PKSpecificChar qualifies:] returns true if an assembly's next element is equal to the character this object was constructed with.
-*/
-@interface PKSpecificChar : PKTerminal {
-
-}
-
-/*!
- @brief Convenience factory method for initializing an autoreleased <tt>PKSpecificChar</tt> parser.
- @param c the character this object should match
- @result an initialized autoreleased <tt>PKSpecificChar</tt> parser.
-*/
-+ (PKSpecificChar *)specificCharWithChar:(PKUniChar)c;
-
-/*!
- @brief Designated Initializer. Initializes a <tt>PKSpecificChar</tt> parser.
- @param c the character this object should match
- @result an initialized <tt>PKSpecificChar</tt> parser.
-*/
-- (id)initWithSpecificChar:(PKUniChar)c;
-@end
View
40 include/ParseKit/.svn/text-base/PKSymbol.h.svn-base
@@ -1,40 +0,0 @@
-// Copyright 2010 Todd Ditchendorf
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-#import <Foundation/Foundation.h>
-#import <ParseKit/PKTerminal.h>
-
-@class PKToken;
-
-/*!
- @class PKSymbol
- @brief A <tt>PKSymbol</tt> matches a specific sequence, such as <tt>&lt;</tt>, or <tt>&lt;=</tt> that a tokenizer returns as a symbol.
-*/
-@interface PKSymbol : PKTerminal {
- PKToken *symbol;
-}
-
-/*!
- @brief Convenience factory method for initializing an autoreleased <tt>PKSymbol</tt> object with a <tt>nil</tt> string value.
- @result an initialized autoreleased <tt>PKSymbol</tt> object with a <tt>nil</tt> string value
-*/
-+ (PKSymbol *)symbol;
-
-/*!
- @brief Convenience factory method for initializing an autoreleased <tt>PKSymbol</tt> object with <tt>s</tt> as a string value.
- @param s the string represented by this symbol
- @result an initialized autoreleased <tt>PKSymbol</tt> object with <tt>s</tt> as a string value
-*/
-+ (PKSymbol *)symbolWithString:(NSString *)s;
-@end
View
44 include/ParseKit/.svn/text-base/PKSymbolNode.h.svn-base
@@ -1,44 +0,0 @@
-// Copyright 2010 Todd Ditchendorf
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-#import <Foundation/Foundation.h>
-#import <ParseKit/PKTypes.h>
-
-/*!
- @class PKSymbolNode
- @brief A <tt>PKSymbolNode</tt> object is a member of a tree that contains all possible prefixes of allowable symbols.
- @details A <tt>PKSymbolNode</tt> object is a member of a tree that contains all possible prefixes of allowable symbols. Multi-character symbols appear in a <tt>PKSymbolNode</tt> tree with one node for each character. For example, the symbol <tt>=:~</tt> will appear in a tree as three nodes. The first node contains an equals sign, and has a child; that child contains a colon and has a child; this third child contains a tilde, and has no children of its own. If the colon node had another child for a dollar sign character, then the tree would contain the symbol <tt>=:$</tt>. A tree of <tt>PKSymbolNode</tt> objects collaborate to read a (potentially multi-character) symbol from an input stream. A root node with no character of its own finds an initial node that represents the first character in the input. This node looks to see if the next character in the stream matches one of its children. If so, the node delegates its reading task to its child. This approach walks down the tree, pulling symbols from the input that match the path down the tree. When a node does not have a child that matches the next character, we will have read the longest possible symbol prefix. This prefix may or may not be a valid symbol. Consider a tree that has had <tt>=:~</tt> added and has not had <tt>=:</tt> added. In this tree, of the three nodes that contain =:~, only the first and third contain complete symbols. If, say, the input contains <tt>=:a</tt>, the colon node will not have a child that matches the <tt>'a'</tt> and so it will stop reading. The colon node has to "unread": it must push back its character, and ask its parent to unread. Unreading continues until it reaches an ancestor that represents a valid symbol.
-*/
-@interface PKSymbolNode : NSObject {
- NSString *ancestry;
- PKSymbolNode *parent;
- NSMutableDictionary *children;
- PKUniChar character;
- NSString *string;
-}
-
-/*!
- @brief Initializes a <tt>PKSymbolNode</tt> with the given parent, representing the given character.
- @param p the parent of this node
- @param c the character for this node
- @result An initialized <tt>PKSymbolNode</tt>
-*/
-- (id)initWithParent:(PKSymbolNode *)p character:(PKUniChar)c;
-
-/*!
- @property ancestry
- @brief The string of the mulit-character symbol this node represents.
-*/
-@property (nonatomic, readonly, retain) NSString *ancestry;
-@end
View
48 include/ParseKit/.svn/text-base/PKSymbolRootNode.h.svn-base
@@ -1,48 +0,0 @@
-// Copyright 2010 Todd Ditchendorf
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-#import <Foundation/Foundation.h>
-#import <ParseKit/PKSymbolNode.h>
-
-@class PKReader;
-
-/*!
- @class PKSymbolRootNode
- @brief This class is a special case of a <tt>PKSymbolNode</tt>.
- @details This class is a special case of a <tt>PKSymbolNode</tt>. A <tt>PKSymbolRootNode</tt> object has no symbol of its own, but has children that represent all possible symbols.
-*/
-@interface PKSymbolRootNode : PKSymbolNode {
-}
-
-/*!
- @brief Adds the given string as a multi-character symbol.
- @param s a multi-character symbol that should be recognized as a single symbol token by this state
-*/
-- (void)add:(NSString *)s;
-
-/*!
- @brief Removes the given string as a multi-character symbol.
- @param s a multi-character symbol that should no longer be recognized as a single symbol token by this state
- @details if <tt>s</tt> was never added as a multi-character symbol, this has no effect
-*/
-- (void)remove:(NSString *)s;
-
-/*!
- @brief Return a symbol string from a reader.
- @param r the reader from which to read
- @param cin the character from witch to start
- @result a symbol string from a reader
-*/
-- (NSString *)nextSymbol:(PKReader *)r startingWith:(PKUniChar)cin;
-@end
View
44 include/ParseKit/.svn/text-base/PKSymbolState.h.svn-base
@@ -1,44 +0,0 @@
-// Copyright 2010 Todd Ditchendorf
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-#import <Foundation/Foundation.h>
-#import <ParseKit/PKTokenizerState.h>
-
-@class PKSymbolRootNode;
-
-/*!
- @class PKSymbolState
- @brief The idea of a symbol is a character that stands on its own, such as an ampersand or a parenthesis.
- @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>
- <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>
- <p>By default, this state recognizes the following multi- character symbols: <tt>!=</tt>, <tt>:-</tt>, <tt><=</tt>, <tt>>=</tt></p>
-*/
-@interface PKSymbolState : PKTokenizerState {
- PKSymbolRootNode *rootNode;
- NSMutableArray *addedSymbols;
-}
-
-/*!
- @brief Adds the given string as a multi-character symbol.
- @param s a multi-character symbol that should be recognized as a single symbol token by this state
-*/