Parser Generator written in Kotlin common

I’m hoping that this will be useful to some folk.
I have written a parser in Kotlin common code.
It takes a context-free grammar (EBNF like syntax) and provides a parser.
Works at runtime, no code generation step.

I’d be interested in any feedback, thoughts, contributions.

an introduction article is here

and the code is of course available from github.

1 Like

Nice. Did you try to use GitHub - h0tk3y/better-parse: A nice parser combinator library for Kotlin along side with your generator?

No i didn’t.
But thanks for the pointer, it might be a good option for a future variation / enhancement.

I’ve written a PEG parser generator in pure Kotlin (JVM target only), similar to Java’s parboiled library.
You may give it a try: grampa

Also, maybe have a look at GitHub - valderman/konbini: Parser library for Kotlin.