Clooj 0.4.0/REPL bug parsing comments that shouldn't be being parsed

24 views
Skip to first unread message

Cedric Greevey

unread,
Jan 28, 2014, 10:25:52 PM1/28/14
to clo...@googlegroups.com, cl...@googlegroups.com
user=> (defn foo []
  ; 2*a/b
)
NumberFormatException Invalid number: 2*a  clojure.lang.LispReader.readNumber (LispReader.java:258)
RuntimeException Unmatched delimiter: )  clojure.lang.Util.runtimeException (Util.java:219)
RuntimeException Unmatched delimiter: )  clojure.lang.Util.runtimeException (Util.java:219)
RuntimeException Unmatched delimiter: )  clojure.lang.Util.runtimeException (Util.java:219)
RuntimeException Unmatched delimiter: )  clojure.lang.Util.runtimeException (Util.java:219)
#'mercator.core/foo
RuntimeException Unmatched delimiter: )  clojure.lang.Util.runtimeException (Util.java:219)
RuntimeException Unmatched delimiter: )  clojure.lang.Util.runtimeException (Util.java:219)
user=>

This happens at the REPL in clooj 0.4.0 but not clooj 0.2.8. It also affects loading from a source window. Any semicolon comment containing a whitespace-delimited substring that starts with a digit and contains a forward slash seems to trigger it, even though it should not be trying to read anything on a line after ; with the LispReader at all.

This might not be confined to clooj; it could be a problem with one or another version of clojure.core's REPL and/or lein repl and/or nrepl. It's easy to test by pasting the above dummy function definition into any REPL that has a paste capability, and short enough to just type at one that doesn't.

I'm aware that there's a clooj 0.4.1; but it hangs on startup on my machine so I can't test on it.

Reply all
Reply to author
Forward
0 new messages