Official Kotlin Grammar Performance
I’m using ANTLR4 and the official Kotlin G4 grammar (
Grammar) to parse and analyze Kotlin source code.
Unfortunately the performance of this grammar can be fairly awful, even on simple inputs. For example, parsing a 20-arm if-else statement takes around 500ms. I’m currently encountering a situation where parsing successful examples of a simple program we have students write in an...