From 2ce5b7ded1c689548e9becb6fb39284ea68a1941 Mon Sep 17 00:00:00 2001 From: Matthias Andreas Benkard Date: Tue, 1 Jul 2008 17:08:10 +0200 Subject: Reader: Add support for string literals. --- MLKDynamicContext.m | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'MLKDynamicContext.m') diff --git a/MLKDynamicContext.m b/MLKDynamicContext.m index a2bc151..f0d25b9 100644 --- a/MLKDynamicContext.m +++ b/MLKDynamicContext.m @@ -31,6 +31,7 @@ #import "MLKPackage.h" #import "MLKParenReader.h" #import "MLKReadtable.h" +#import "MLKStringReader.h" #import "MLKSymbol.h" #import "MLKInteger.h" #import "runtime-compatibility.h" @@ -144,7 +145,6 @@ static MLKDynamicContext *global_context; [readtable setSyntaxType:MULTI_ESCAPE forCharacter:'|']; // [readtable setSyntaxType:TERMINATING_MACRO forCharacter:';']; - // [readtable setSyntaxType:TERMINATING_MACRO forCharacter:'"']; // [readtable setSyntaxType:NONTERMINATING_MACRO forCharacter:'#']; // [readtable setSyntaxType:TERMINATING_MACRO forCharacter:'\'']; // [readtable setSyntaxType:TERMINATING_MACRO forCharacter:'`']; @@ -153,10 +153,14 @@ static MLKDynamicContext *global_context; [readtable setSyntaxType:SINGLE_ESCAPE forCharacter:'\\']; [readtable setSyntaxType:TERMINATING_MACRO forCharacter:'(']; - [readtable setMacroFunction:[[MLKParenReader alloc] init] + [readtable setMacroFunction:AUTORELEASE([[MLKParenReader alloc] init]) forCharacter:'(']; [readtable setSyntaxType:TERMINATING_MACRO forCharacter:')']; + [readtable setSyntaxType:TERMINATING_MACRO forCharacter:'"']; + [readtable setMacroFunction:AUTORELEASE([[MLKStringReader alloc] init]) + forCharacter:'"']; + for (ch = '0'; ch <= '9'; ch++) { [readtable setSyntaxType:CONSTITUENT forCharacter:ch]; -- cgit v1.2.3