Oh, cool. That's a lot like my fnparse library: http://github.com/joshua-choi/fnparse/.
I never did figure out exactly why the behavior above occurred, but I found a solution for my problem at http://groups.google.com/group/clojure/browse_thread/thread/8c78b993402638a1. On Feb 7, 6:19 am, James Reeves <weavejes...@googlemail.com> wrote: > 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/43f882a9474fb8662007e5a5d0c50... > > 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 -~----------~----~----~----~------~----~------~--~---