On Feb 5, 6:03 am, samppi <rbysam...@gmail.com> wrote: > user=> ((array) (seq "[0,0]")) ; This works as intended: > [[\[ \0 \, \0 \]] nil] > user=> (value (seq "[0,3]")) ; This should return nil, but a weird > argument exception is raised instead: > java.lang.IllegalArgumentException: Key must be integer > (NO_SOURCE_FILE:0) > user=> ((array) (seq "[0,3]")) ; This is what I want: > nil
Did you ever get to the bottom of this? Incidentally, I've written a very similar parser library, which also works by creating functions that take in a source argument and return a vector containing the parsed tokens and the remainder of the source, or nil if there is no match. http://github.com/weavejester/rend/blob/43f882a9474fb8662007e5a5d0c50648fc0caa75/src/rend/parser/tools.clj The difference with mine is that instead of a "lit" rule to match a literal character, I created a "match" rule to match a regular expression. - James --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en -~----------~----~----~----~------~----~------~--~---