On Sun, May 2, 2010 at 6:29 PM, joshua-choi <rbysam...@gmail.com> wrote: > I'm making a parsing library that can keep track of its location in a > stream of tokens, and the tokens can be of any type—character, map, > and so forth. I need advice on this question: > > Can you think of an instance where the location would not be a line > number and column number, such as {:line 3, :column 25}?
Binary input wouldn't be required to have a concept of lines or columns. > I'm deciding if I should bother with the trouble of making the > location data structure independent and pluggable with my parser, or > if I should make it always a line-column pair, which would make the > API much simpler. The clj-peg library requires pre-wrapping any input to be parsed in an interface that provides quite a bit of flexibility like this. I would agree that it makes it more complicated though. -Rich -- 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 Note that posts from new members are moderated - please be patient with your first post. 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