Fork me on GitHub
#clojure-dev
<
2017-05-17
>
mikera03:05:24

Not sure if anyone else has played with it, but I really like parboiled (https://github.com/sirthias/parboiled) as a parser generator. I've successfully build a Clojure-like parser in a day or two using it for my own experimental language. Relevant source here: https://github.com/mikera/magic/blob/master/src/main/java/magic/compiler/Reader.java

mikera03:05:47

If there is serious interest in rewriting Clojure's reader or developing new parsers, I think it is well worth a look.

matan07:05:09

@mikera I know parboiled from my Scala days

matan07:05:18

Have you actually used it from clojure?

matan07:05:14

@alexmiller > but the Java version is still noticeably faster kind of hurts to know..

mikera08:05:17

@matan I don't think it would possible to actually define the parser in Clojure since parboiled relies on some clever analysis / code generation from Java source code. However it would be very easy to use the generated parser from Clojure (you could just wrap it in an IFn that e.g. takes a string and produces data structures / AST nodes)

thheller17:05:50

@alexmiller do you know why the https://groups.google.com/forum/?fromgroups#!forum/clojurescript group is text-only and not like the clojure group which allows formatting?

alexmiller17:05:45

probably just a setting somewhere

thheller17:05:13

can you change it? or who is the admin of that?

alexmiller17:05:28

not me :) presumably @dnolen could