summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Andreas Benkard <matthias@benkard.de>2008-06-15 00:28:22 +0200
committerMatthias Andreas Benkard <matthias@benkard.de>2008-06-15 00:28:22 +0200
commit5994688058139e7ef4bc22120dc2345b5d68e8d3 (patch)
treea8f0e5441b26f234caa43691d777b5612e7fafbb
parent49197c750ebfbb5eb763306f1fed0ef698ad7ca2 (diff)
MLKReadtable: Declare a number of new constituent trait predicates.
-rw-r--r--MLKReadtable.h12
-rw-r--r--MLKReadtable.m5
2 files changed, 11 insertions, 6 deletions
diff --git a/MLKReadtable.h b/MLKReadtable.h
index 2ea4cc7..b7e3a66 100644
--- a/MLKReadtable.h
+++ b/MLKReadtable.h
@@ -52,9 +52,19 @@ enum MLKReadtableCase
-(BOOL) isSingleEscapeCharacter:(unichar)ch;
-(BOOL) isMultipleEscapeCharacter:(unichar)ch;
-(BOOL) isConstituentCharacter:(unichar)ch;
--(BOOL) isInvalidCharacter:(unichar)ch;
-(BOOL) characterHasCase:(unichar)ch;
+-(BOOL) isInvalidConstituent:(unichar)ch;
+-(BOOL) isAlphabeticConstituent:(unichar)ch;
+-(BOOL) isPackageMarkerConstituent:(unichar)ch;
+-(BOOL) isAlphaDigitConstituent:(unichar)ch;
+-(BOOL) isExponentMarkerConstituent:(unichar)ch;
+-(BOOL) isRatioMarkerConstituent:(unichar)ch;
+-(BOOL) isDecimalPointConstituent:(unichar)ch;
+-(BOOL) isMinusSignConstituent:(unichar)ch;
+-(BOOL) isPlusSignConstituent:(unichar)ch;
+-(BOOL) isDotConstituent:(unichar)ch;
+
-(MLKClosure *) macroFunctionForCharacter:(unichar)ch;
-(unichar) charWithReadtableCase:(unichar)ch;
@end
diff --git a/MLKReadtable.m b/MLKReadtable.m
index 41d6a9c..c1a1ff5 100644
--- a/MLKReadtable.m
+++ b/MLKReadtable.m
@@ -91,11 +91,6 @@
isEqual:[NSNumber numberWithShort:CONSTITUENT]]);
}
--(BOOL) isInvalidCharacter:(unichar)ch;
-{
- return ([_syntaxTable objectForKey:[NSNumber numberWithLong:ch]] == nil);
-}
-
-(BOOL) characterHasCase:(unichar)ch
{
return (![[[NSString stringWithFormat:@"%C", ch] uppercaseString]