| 708 | |
| 709 | |
| 710 | public static class SymbolicValueReader extends AFn{ |
| 711 | |
| 712 | static IPersistentMap specials = PersistentHashMap.create(Symbol.intern("Inf"), Double.POSITIVE_INFINITY, |
| 713 | Symbol.intern("-Inf"), Double.NEGATIVE_INFINITY, |
| 714 | Symbol.intern("NaN"), Double.NaN); |
| 715 | |
| 716 | public Object invoke(Object reader, Object quote, Object opts) { |
| 717 | PushbackReader r = (PushbackReader) reader; |
| 718 | Object o = read(r, true, null, true, opts); |
| 719 | |
| 720 | if (!(o instanceof Symbol)) |
| 721 | throw Util.runtimeException("Invalid token: ##" + o); |
| 722 | if (!(specials.containsKey(o))) |
| 723 | throw Util.runtimeException("Unknown symbolic value: ##" + o); |
| 724 | |
| 725 | return specials.valAt(o); |
| 726 | } |
| 727 | } |
| 728 | |
| 729 | public static List readDelimitedList(char delim, PushbackReader r, boolean isRecursive, Object opts) { |
| 730 | final int firstline = |