I haven't compared it directly to any other parsing libraries, but I'd surmise that it'll be slower than more optimized libraries, especially Java ones.
Currently, the optimizations that the library has is that it lazily evaluates both rules (in the conc and alt forms) and token sequences. At this moment, I'm also working on a memoization rule maker, which hopefully would make parsers work in polynomial time. On Jul 14, 11:21 am, ronen <nark...@gmail.com> wrote: > Looks quite nice, can you tell how it compares (performance wise) to > other parsing libraries? > > On Jul 6, 3:55 am, Wilson MacGyver <wmacgy...@gmail.com> wrote: > > > > > Thanks for the tip on looking at clojure.contrib. I keep forgetting to > > check there. > > > On Jul 5, 2009, at 4:20 PM, samppi <rbysam...@gmail.com> wrote: > > > > If you need a JSON parser, there's already a good one included with > > > clojure.contrib. The one with the FnParse library is just a sample to > > > show how it works. But please feel free to use it however it can be > > > useful to you. :) > > > > On Jul 4, 1:45 pm, Wilson MacGyver <wmacgy...@gmail.com> wrote: > > >> Very timely, I need to parse a bunch on JSON files on Monday :) good > > >> work > > > >> Sent from my iPhone > > > >> On Jul 4, 2009, at 3:16 PM, samppi <rbysam...@gmail.com> wrote: > > > >>> I'm pleased to announce FnParse, a monadic functional parsing > > >>> library > > >>> for Clojure, half a year in the making. I started on FnParse in > > >>> December as my first Clojure project, and now it has matured to > > >>> something that I believe is very and immediately useful. Currently, > > >>> I'm writing a YAML parser using FnParse. > > > >>> With FnParse, you can easily parse a string or any sequence of > > >>> tokens > > >>> into native data structures. FnParse is based on the concept of the > > >>> rule, a self-contained function that accepts a state data structure, > > >>> containing a sequence of tokens, and either consumes some tokens-- > > >>> turning them into new data--or fails. Rules correspond nicely to > > >>> EBNF > > >>> productions and productions in other sort of grammars. FnParse > > >>> provides common rules, functions that create new rules, and > > >>> functions > > >>> that facilitate using rules. > > > >>> A sample JSON parser is athttp://wiki.github.com/joshua-choi/ > > >>> fnparse/sample-json-parser > > >>> . > > >>> Online documentation is available at:http://wiki.github.com/joshua- > > >>> choi/fnparse > > >>> . > > >>> The source is at:http://github.com/joshua-choi/fnparse. > > > >>> If you are confused about anything or find any bugs, please create > > >>> an > > >>> issue on GitHub (http://github.com/joshua-choi/fnparse/issues) or > > >>> send > > >>> me a message on GitHub. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---