tag:blogger.com,1999:blog-4110180.post8217463919429555944..comments2025-07-21T06:33:41.604-07:00Comments on Tapestry Central: Clojure: Turns out, parsing is somewhat iterative, not functionalHoward Lewis Shiphttp://www.blogger.com/profile/04486596490758986709noreply@blogger.comBlogger5125tag:blogger.com,1999:blog-4110180.post-31141123644787806142009-06-29T18:04:03.489-07:002009-06-29T18:04:03.489-07:00I think you&#39;re trying to use parser combinator...I think you&#39;re trying to use parser combinators, of which Kotka is an implementation for Clojure.<br /><br />If you&#39;re on the JVM Scala provides good support, though not very well documented, for parser combinators.<br /><br />This is a very good introduction:<br />http://www.codecommit.com/blog/scala/formal-language-processing-in-scalaKarelhttps://www.blogger.com/profile/10620944303947608169noreply@blogger.comtag:blogger.com,1999:blog-4110180.post-78218762256298851052009-05-05T21:03:00.000-07:002009-05-05T21:03:00.000-07:00i don't know if this applies to Clojure but is a v...i don't know if this applies to Clojure but is a very easy reading about Monadic Parsing (asumes no Monads knowledge )<br /><br />http://cs.nott.ac.uk/~gmh/monparsing.pdfCésarhttps://www.blogger.com/profile/11052138023512732448noreply@blogger.comtag:blogger.com,1999:blog-4110180.post-19395019053146000192009-05-05T19:42:00.000-07:002009-05-05T19:42:00.000-07:00Actually, clojure.xml/parse runs a SAXParser insta...Actually, clojure.xml/parse runs a SAXParser instance and it's full of vars, (set!), (binding), etc.<br /><br />I actually used that as the basis for a more namespace-aware parser that emits the XML token stream.<br /><br />I could probably accomplish more of what I want in my parser, but I really want to isolate the non-functional, SAX-based portion and keep the rest pure Clojure, and I want the eventual token-to-tree parser to be truly functional. If I can wrap my head around the state and maybe monads, I think I'll have something.Howard Lewis Shiphttps://www.blogger.com/profile/04486596490758986709noreply@blogger.comtag:blogger.com,1999:blog-4110180.post-2826782341914802612009-05-05T19:34:00.000-07:002009-05-05T19:34:00.000-07:00Also it looks like the solution you feel most comf...Also it looks like the solution you feel most comfortable with, is similar (exactly?) how the clojure.xml parser works.swannodettehttps://www.blogger.com/profile/16106709055139197203noreply@blogger.comtag:blogger.com,1999:blog-4110180.post-63879488963086845992009-05-05T17:40:00.000-07:002009-05-05T17:40:00.000-07:00Do you know about this?: http://kotka.de/projects/...Do you know about this?: http://kotka.de/projects/clojure/parser.html<br /><br />I haven't used it (indeed, I don't use Clojure) but it looks like the obvious way to parse in Clojure.Tom Davieshttps://www.blogger.com/profile/13542052736852306130noreply@blogger.com