Kudzu
A monadic (I think...) recursive-descent parser written in Kotlin
Kudzu is a recursive-descent parser written in Kotlin, with the goal of immutability and simplicity. It is mostly an exercise for me to learn more about parsing algorithms, but should work reasonably-well enough to be used for small non-trivial parsers.
Why did I write it?
I've got several projects which require custom parsing, and after looking around at the various options available in Java and Kotlin, I've decided that I would just rather write my own. Most of the ones I found either require Java 8 (a deal-breaker if I want to use it on Android), or I found them to be very complex to use, being intended for writing full-blown, high-performance compilers. I needed something simple, and I also wanted to learn how parsers work, so I decided to make my own.
This library is a parser combinator like…
Good. You are on the right path mate. I have my own toy language too: github.com/david-szabo97/DevLang
You might take a look at it how it works.
You can find comments,tests and examples in the Main.java
You get started by doing some Google searches. Keywords: interpeter, compiler, parser, lexer, opcode, virtual machine.
I used to read a blog series to put together my own language.
Maybe this one: aosabook.org/en/500L/a-python-inte...
But I am not sure anymore. It was 2 year ago :)
Good luck!