I wrote a simple implementation: http://gist.github.com/953966<https://gist.github.com/953966> (only supports operators) It's not very elegant (I don't know how to use fnparse..), but it is functional. What it does is find out what the next element in the operator stack and the out stack should be, and then recursively update the stacks and output the finished out stack.
As I said I don't know how to use fnparse and therefore I couldn't really understand your code. Either way I hope that this code helps in some way.. ;) Jonathan On Tue, May 3, 2011 at 2:23 AM, Nicolas Buduroi <nbudu...@gmail.com> wrote: > Hi, I'm working on my parsing skills using fnparse 2.2.7 and have written > the following implementation of the Shunting-yard algorithm: > > https://gist.github.com/952607 > > I plan to make a lightning talk about monadic parser at the next Bonjure > meeting and I'd like to hear what people here think about that > implementation first. > > It is more imperative that I would like, but that is the nature of this > algorithm I think. Would a non-monadic implementation would be better in > some ways? How would you make this code more flexible, faster and/or > cleaner? Is there a more functional way of writing it? > > Thanks in advance for any comments! > > -- > 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 -- 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