diff --git a/NUIParse/Parsers/NUIPShiftReduceParsers/NUIPItem.h b/NUIParse/Parsers/NUIPShiftReduceParsers/NUIPItem.h index 7d32c34..c68655c 100644 --- a/NUIParse/Parsers/NUIPShiftReduceParsers/NUIPItem.h +++ b/NUIParse/Parsers/NUIPShiftReduceParsers/NUIPItem.h @@ -28,9 +28,3 @@ - (BOOL)isEqualToItem:(NUIPItem *)item; @end - -@interface NSObject (NUIPIsItem) - -- (BOOL)isItem; - -@end diff --git a/NUIParse/Parsers/NUIPShiftReduceParsers/NUIPItem.m b/NUIParse/Parsers/NUIPShiftReduceParsers/NUIPItem.m index 1957cc8..77b0385 100644 --- a/NUIParse/Parsers/NUIPShiftReduceParsers/NUIPItem.m +++ b/NUIParse/Parsers/NUIPShiftReduceParsers/NUIPItem.m @@ -76,14 +76,9 @@ - (id)itemByMovingDotRight return [c autorelease]; } -- (BOOL)isItem -{ - return YES; -} - - (BOOL)isEqual:(id)object { - return [object isItem] && ((NUIPItem *)object)->position == position && ((NUIPItem *)object)->rule == rule; + return [object isKindOfClass:[NUIPItem class]] && [self isEqualToItem:object]; } - (BOOL)isEqualToItem:(NUIPItem *)item @@ -118,12 +113,3 @@ - (NSString *)description } @end - -@implementation NSObject (NUIPIsItem) - -- (BOOL)isItem -{ - return NO; -} - -@end