I haven't touched Clojure in a year or two, and I'm not familiar with instaparse.
I can say, from a terminology stand-point, that a grammar (such as one in EBNF) can produce a parser, which then produces parse-trees of input strings. So, perhaps you mean that you want parse-trees of strings in the grammar of EBNF? It took me a few reads to come to this conclusion—the expression "get a parse tree of the EBNF" threw me off. It seems likely that instaparse is producing a parser, and may throw away the underlying graph (parse-tree) of the grammar. Regardless, I have a Scala tool that parses EBNF. I'm not sure about interop, but it's all JVM, right? https://github.com/benknoble/loner On Saturday, July 17, 2021 at 3:21:36 PM UTC-4 jsch...@gmail.com wrote: > > Hi all, > > I was hoping that I can call > > (instaparse.core/parser "my ::= 'ebnf' | 'grammar' ") > > to get a parse tree of the EBNF. I'd like to convert the EBNF to a > tree-sitter grammar.js. > > But when I evaluate the above expression, I only see a the original EBNF > input, reformatted, and without comments: > > => my = "ebnf" | "grammar" > > Is there a way to get hands on the underlying structure, i.e. the parse > tree? > > Best, Jakob > -- 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 unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/clojure/fc191009-45d0-4a0c-9175-c937f15409a5n%40googlegroups.com.