Unless you're dealing with 1) binary data or 2) structured data (ie. XML)
where a path is more appropriate, then I think line / column is the way to
go.

Now, is this a clojure parser? Or a clojure parser generator library that
consumes a BNF-like file that defines another lang? As far as I can tell,
clojure doesn't have one. I have a recent project where clojure is pointing
to a SableCC BNF generated Lexer and Parser file. That project might give
you some ideas.

HTH
Tim


On Sun, May 2, 2010 at 8:29 PM, joshua-choi <[email protected]> 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}?
>
> 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.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to [email protected]
> Note that posts from new members are moderated - please be patient with
> your first post.
> To unsubscribe from this group, send email to
> [email protected]<clojure%[email protected]>
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to