Hello,
Ole Arndt ole@sugarshark.com writes:
This prevents loading a newer parenscript, which uses an
inverted readtable case via named-readtables:
Armed Bear Common Lisp 0.26.0-dev-svn-13273
Java 1.6.0_17 Sun Microsystems Inc.
Java HotSpot(TM) 64-Bit Server VM
Low-level initialization completed in 0.712 seconds.
Startup completed in 3.154 seconds.
Type ":help" for a list of available commands.
CL-USER(1): (setf (readtable-case *readtable*) :invert)
:invert
CL-USER(2): (string :cl)
"CL"
CL-USER(3): (string '#:cl)
"cl"
Mark Evenson evenson@panix.com writes:
Filed as [ticket #148][1]. Thanks for the report!
The attached patch fixes the test case above.
Loading a newer parenscript still fails while loading the fasl for
parenscripts package.lisp. It seems that named-readtables (as it warns
about on loading) does not yet work with abcl.
Ole
--
Ole Arndt
http://www.sugarshark.com
diff --git a/src/org/armedbear/lisp/Stream.java b/src/org/armedbear/lisp/Stream.java
index c641ede..de7cf1a 100644
--- a/src/org/armedbear/lisp/Stream.java
+++ b/src/org/armedbear/lisp/Stream.java
@@ -543,17 +543,16 @@ public class Stream extends StructureObject {
}
public LispObject readSymbol() {
- final Readtable rt =
- (Readtable) Symbol.CURRENT_READTABLE.symbolValue(LispThread.currentThread());
- StringBuilder sb = new StringBuilder();
- _readToken(sb, rt);
- return new Symbol(sb.toString());
+ return readSymbol((Readtable) Symbol.CURRENT_READTABLE
+ .symbolValue(LispThread.currentThread()));
}
public LispObject readSymbol(Readtable rt) {
StringBuilder sb = new StringBuilder();
- _readToken(sb, rt);
- return new Symbol(sb.toString());
+ BitSet flags = _readToken(sb, rt);
+
+ return new Symbol(rt.getReadtableCase() == Keyword.INVERT ?
+ invert(sb.toString(), flags) : sb.toString());
}
public LispObject readStructure(ReadtableAccessor rta) {