sirthias / parboiled2

A macro-based PEG parser generator for Scala 2.10+

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Question: Calling Parboiled 2 from Kotlin

binkley opened this issue · comments

I have Kotlin project using Parboiled 1, and I'd like to investigate migrating to Parboiled 2.
Are there any resources this project or others have shared?

Ref: binkley/kotlin-dice#133

Hey @binkley, I don't think it's possible to use parboiled2 from any other language than Scala.
While the first version generated the actual low-level parser code at runtime parboiled 2 switched to macro-based parser generation that is done by the Scala compiler at compile time.
While this has a number of benefits over the earlier approach it also means that, without the Scala compiler, parboiled 2 is entirely useless.
In fact, pb2 is very much Scala-only...