I once wrote a simple compiler using C# and the tooling I used were GPLEX and GPPG for lexer and parser of my language.
I find myself wanting to write another language processor, this time in Kotlin. I have seen that if I intended to do it in Java I would be using JFlex and BYacc/J or Jay. These tools would generate a Lexical Scanner and a Grammar Parser for me but the output of these would be a .java
source file.
Which tools exist (or how can I use existing tools) to produce such Scanner and Parser as Kotlin sources? Maybe transform such .java
outputs to .kt
ones? Or maybe a way to transpile those .java files into Kotlin?