summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Andreas Benkard <matthias@benkard.de>2008-07-07 01:16:01 +0200
committerMatthias Andreas Benkard <matthias@benkard.de>2008-07-07 01:16:01 +0200
commitd8fa1c646c7e6a8fe5d6235b3e635b30f2bfa745 (patch)
treead91edb4891e83505ed7c1dfd6eb7f6d279e2fe6
parent97c4f28084dcd8ec65f739618e61fb5cfdfec9c8 (diff)
Ditch MLKEndOfFileError.
-rw-r--r--GNUmakefile20
-rw-r--r--MLKEndOfFileError.h32
-rw-r--r--MLKEndOfFileError.m36
-rw-r--r--MLKReader.m10
4 files changed, 16 insertions, 82 deletions
diff --git a/GNUmakefile b/GNUmakefile
index 2fb0d69..94ac8dc 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -29,16 +29,16 @@ ADDITIONAL_OBJCFLAGS = -Wall
ToiletKit_OBJC_FILES = MLKCharacter.m MLKCons.m MLKBinding.m \
MLKDoubleFloat.m MLKDynamicContext.m \
- MLKEndOfFileError.m MLKEnvironment.m MLKFloat.m \
- MLKInteger.m MLKInterpretedClosure.m \
- MLKInterpreter.m MLKLinkedList.m \
- MLKLexicalContext.m MLKLexicalEnvironment.m \
- MLKLispValue.m MLKNumber.m MLKPackage.m \
- MLKParenReader.m MLKQuoteReader.m MLKRatio.m \
- MLKReader.m MLKReadtable.m MLKReaderError.m \
- MLKRoot.m MLKSemicolonReader.m MLKSingleFloat.m \
- MLKStream.m MLKStringInputStream.m \
- MLKStringReader.m MLKSymbol.m MLKThrowException.m \
+ MLKEnvironment.m MLKFloat.m MLKInteger.m \
+ MLKInterpretedClosure.m MLKInterpreter.m \
+ MLKLinkedList.m MLKLexicalContext.m \
+ MLKLexicalEnvironment.m MLKLispValue.m \
+ MLKNumber.m MLKPackage.m MLKParenReader.m \
+ MLKQuoteReader.m MLKRatio.m MLKReader.m \
+ MLKReadtable.m MLKReaderError.m MLKRoot.m \
+ MLKSemicolonReader.m MLKSingleFloat.m MLKStream.m \
+ MLKStringInputStream.m MLKStringReader.m \
+ MLKSymbol.m MLKThrowException.m \
NSObject-MLKPrinting.m NSString-MLKPrinting.m
ToiletKit_LDFLAGS = -lgmp
#LIBRARIES_DEPEND_UPON
diff --git a/MLKEndOfFileError.h b/MLKEndOfFileError.h
deleted file mode 100644
index cb066c1..0000000
--- a/MLKEndOfFileError.h
+++ /dev/null
@@ -1,32 +0,0 @@
-/* -*- mode: objc; coding: utf-8 -*- */
-/* Étoilisp/Mulklisp, a Common Lisp subset for the Étoilé runtime.
- * Copyright (C) 2008 Matthias Andreas Benkard.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or (at
- * your option) any later version.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#import <Foundation/NSException.h>
-
-@class MLKStream;
-
-
-@interface MLKEndOfFileError : NSException
-{
- MLKStream *stream;
-}
-
--(MLKEndOfFileError *) initWithStream:(MLKStream *)aStream;
-
--(void) dealloc;
-@end
diff --git a/MLKEndOfFileError.m b/MLKEndOfFileError.m
deleted file mode 100644
index 23e60bf..0000000
--- a/MLKEndOfFileError.m
+++ /dev/null
@@ -1,36 +0,0 @@
-/* -*- mode: objc; coding: utf-8 -*- */
-/* Étoilisp/Mulklisp, a Common Lisp subset for the Étoilé runtime.
- * Copyright (C) 2008 Matthias Andreas Benkard.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or (at
- * your option) any later version.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#import "MLKEndOfFileError.h"
-#import "runtime-compatibility.h"
-
-
-@implementation MLKEndOfFileError
--(MLKEndOfFileError *) initWithStream:(MLKStream *)aStream
-{
- self = [super init];
- stream = aStream;
- return self;
-}
-
--(void) dealloc
-{
- RELEASE (stream);
- [super dealloc];
-}
-@end
diff --git a/MLKReader.m b/MLKReader.m
index 4acf24e..282db60 100644
--- a/MLKReader.m
+++ b/MLKReader.m
@@ -19,7 +19,6 @@
#import "MLKReader.h"
#import "MLKCharacter.h"
#import "MLKReadtable.h"
-#import "MLKEndOfFileError.h"
#import "MLKReaderError.h"
#import "MLKDynamicContext.h"
#import "MLKEnvironment.h"
@@ -62,7 +61,8 @@
if ([stream isEOF])
{
if (eofError)
- [[[MLKEndOfFileError alloc] initWithStream:stream] raise];
+ [NSException raise:@"MLKEndOfFileError"
+ format:@"Premature end of file on stream %@.", stream];
else
return eofValue;
}
@@ -98,7 +98,8 @@
if ([readtable isSingleEscapeCharacter:ch])
{
if ([stream isEOF])
- [[[MLKEndOfFileError alloc] initWithStream:stream] raise];
+ [NSException raise:@"MLKEndOfFileError"
+ format:@"Premature end of file on stream %@.", stream];;
token = [NSMutableString stringWithCapacity:8];
[token appendFormat:@"%C", [stream readChar]];
@@ -136,7 +137,8 @@
else if ([readtable isSingleEscapeCharacter:ch])
{
if ([stream isEOF])
- [[[MLKEndOfFileError alloc] initWithStream:stream] raise];
+ [NSException raise:@"MLKEndOfFileError"
+ format:@"Premature end of file on stream %@.", stream];
[token appendFormat:@"%C", [stream readChar]];
ever_escaped = YES;