summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Andreas Benkard <matthias@benkard.de>2008-06-19 17:51:12 +0200
committerMatthias Andreas Benkard <matthias@benkard.de>2008-06-19 17:51:12 +0200
commit8c290062cb26e7e1e63e365085a893c85be267c8 (patch)
treed30e8bad2f5797ee3ac02b2ea4bbf37053e22f58
parentd3e06a850374ea17d97481ab53d0d2dcbf857c25 (diff)
MLKDynamicContext: Minor improvements.
-rw-r--r--MLKDynamicContext.m17
1 files changed, 10 insertions, 7 deletions
diff --git a/MLKDynamicContext.m b/MLKDynamicContext.m
index 386c66e..74c75d0 100644
--- a/MLKDynamicContext.m
+++ b/MLKDynamicContext.m
@@ -61,7 +61,7 @@ static MLKDynamicContext *global_context;
unichar ch;
id NIL = [NSNull null];
-
+
// Build the initial readtable.
[readtable setSyntaxType:WHITESPACE forCharacter:'\t'];
[readtable setConstituentTrait:INVALID forCharacter:'\t'];
@@ -75,11 +75,11 @@ static MLKDynamicContext *global_context;
[readtable setConstituentTrait:INVALID forCharacter:' '];
// [readtable setSyntaxType:WHITESPACE forCharacter:'\Page'];
// [readtable setConstituentTrait:INVALID forCharacter:'\Page'];
-
+
[readtable setSyntaxType:CONSTITUENT forCharacter:'\b'];
[readtable setConstituentTrait:INVALID forCharacter:'\b'];
- // [readtable setSyntaxType:CONSTITUENT forCharacter:'\Rubout'];
- // [readtable setConstituentTrait:INVALID forCharacter:'\Rubout'];
+ [readtable setSyntaxType:CONSTITUENT forCharacter:'\177']; // Rubout
+ [readtable setConstituentTrait:INVALID forCharacter:'\177'];
[readtable setSyntaxType:CONSTITUENT forCharacter:':'];
[readtable setConstituentTrait:PACKAGE_MARKER forCharacter:':'];
@@ -102,8 +102,7 @@ static MLKDynamicContext *global_context;
[readtable setSyntaxType:CONSTITUENT forCharacter:'{'];
[readtable setSyntaxType:CONSTITUENT forCharacter:'}'];
[readtable setSyntaxType:CONSTITUENT forCharacter:'~'];
-
-
+
[readtable setSyntaxType:CONSTITUENT forCharacter:'+'];
[readtable setConstituentTrait:PLUS_SIGN forCharacter:'+'];
@@ -118,7 +117,8 @@ static MLKDynamicContext *global_context;
[readtable setConstituentTrait:RATIO_MARKER forCharacter:'/'];
// Maybe distinguish different types of exponent markers as the CLHS
- // does?
+ // does? For now, the MLKFloat class cluster's string-parsing
+ // constructor does the discrimination.
[readtable setConstituentTrait:EXPONENT_MARKER forCharacter:'d'];
[readtable setConstituentTrait:EXPONENT_MARKER forCharacter:'e'];
[readtable setConstituentTrait:EXPONENT_MARKER forCharacter:'f'];
@@ -147,18 +147,21 @@ static MLKDynamicContext *global_context;
{
[readtable setSyntaxType:CONSTITUENT forCharacter:ch];
[readtable setConstituentTrait:ALPHA_DIGIT forCharacter:ch];
+ [readtable unsetConstituentTrait:ALPHABETIC forCharacter:ch];
}
for (ch = 'A'; ch <= 'Z'; ch++)
{
[readtable setSyntaxType:CONSTITUENT forCharacter:ch];
[readtable setConstituentTrait:ALPHA_DIGIT forCharacter:ch];
+ [readtable unsetConstituentTrait:ALPHABETIC forCharacter:ch];
}
for (ch = 'a'; ch <= 'z'; ch++)
{
[readtable setSyntaxType:CONSTITUENT forCharacter:ch];
[readtable setConstituentTrait:ALPHA_DIGIT forCharacter:ch];
+ [readtable unsetConstituentTrait:ALPHABETIC forCharacter:ch];
}