Permalink
Browse files

Switched back to 64 bit only – CoreParse requires the non-fragile ABI…

…, and hence can not run on 32 bit Mac OS. Also updated the delegate setter to actually set the delegate, and hid the delegate caching a bit better from the interface.
  • Loading branch information...
1 parent a0851b3 commit d4e0e5f40ed859ba339eb9254ca77c1ac2570903 @beelsebob committed Aug 23, 2012
@@ -1029,7 +1029,7 @@
1F0E891B130462F300537D04 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
- ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
+ ARCHS = "$(ARCHS_STANDARD_64_BIT)";
COMBINE_HIDPI_IMAGES = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_OPTIMIZATION_LEVEL = 0;
@@ -1058,7 +1058,7 @@
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.6;
ONLY_ACTIVE_ARCH = YES;
- SDKROOT = macosx10.6;
+ SDKROOT = "";
SUPPORTED_PLATFORMS = macosx;
VALID_ARCHS = "armv6 i386 x86_64 armv7";
};
@@ -1067,7 +1067,7 @@
1F0E891C130462F300537D04 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
- ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
+ ARCHS = "$(ARCHS_STANDARD_64_BIT)";
COMBINE_HIDPI_IMAGES = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_TREAT_IMPLICIT_FUNCTION_DECLARATIONS_AS_ERRORS = YES;
@@ -1094,7 +1094,7 @@
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.6;
ONLY_ACTIVE_ARCH = NO;
- SDKROOT = macosx10.6;
+ SDKROOT = "";
SUPPORTED_PLATFORMS = macosx;
VALID_ARCHS = "armv6 i386 x86_64 armv7";
};
@@ -79,6 +79,14 @@
@end
+typedef struct
+{
+ unsigned int didProduceSyntaxTree:1;
+ unsigned int didEncounterErrorOnInput:1;
+ unsigned int didEncounterErrorOnInputExpecting:1;
+
+} CPParserDelegateResponseCache;
+
/**
* The CPParser class allows you to parse token streams.
*
@@ -88,13 +96,8 @@
*/
@interface CPParser : NSObject
{
- struct
- {
- unsigned int didProduceSyntaxTree:1;
- unsigned int didEncounterErrorOnInput:1;
- unsigned int didEncounterErrorOnInputExpecting:1;
-
- } delegateRespondsTo;
+@protected
+ CPParserDelegateResponseCache delegateRespondsTo;
}
///---------------------------------------------------------------------------------------
@@ -58,8 +58,10 @@ - (id)parse:(CPTokenStream *)tokenStream
- (void)setDelegate:(id<CPParserDelegate>)aDelegate
{
- if (delegate != aDelegate)
+ if (delegate != aDelegate)
{
+ delegate = aDelegate;
+
delegateRespondsTo.didProduceSyntaxTree = [delegate respondsToSelector:@selector(parser:didProduceSyntaxTree:)];
delegateRespondsTo.didEncounterErrorOnInput = [delegate respondsToSelector:@selector(parser:didEncounterErrorOnInput:)];
delegateRespondsTo.didEncounterErrorOnInputExpecting = [delegate respondsToSelector:@selector(parser:didEncounterErrorOnInput:expecting:)];
@@ -65,15 +65,6 @@
* the output stream.
*/
@interface CPTokeniser : NSObject <NSCoding>
-{
- struct
- {
- unsigned int shouldConsumeToken:1;
- unsigned int willProduceToken:1;
- unsigned int didNotFindTokenOnInputPositionError:1;
-
- } delegateRespondsTo;
-}
///---------------------------------------------------------------------------------------
/// @name Managing the Delegate
@@ -11,10 +11,15 @@
#import "CPEOFToken.h"
#import "CPErrorToken.h"
-@interface CPTokeniser ()
+typedef struct
{
- NSMutableArray *tokenRecognisers;
-}
+ unsigned int shouldConsumeToken:1;
+ unsigned int willProduceToken:1;
+ unsigned int didNotFindTokenOnInputPositionError:1;
+
+} CPTokeniserDelegateResponseCache;
+
+@interface CPTokeniser ()
@property (readwrite, retain) NSMutableArray *tokenRecognisers;
@@ -24,6 +29,9 @@ - (void)advanceLineNumber:(NSUInteger *)ln columnNumber:(NSUInteger *)cn withInp
@end
@implementation CPTokeniser
+{
+ CPTokeniserDelegateResponseCache delegateRespondsTo;
+}
@synthesize tokenRecognisers;
@synthesize delegate;

0 comments on commit d4e0e5f

Please sign in to comment.