Help! With a Kotlin implementation of ANTLR4

118 views
Skip to first unread message

Tianyu Zhu

unread,
Mar 11, 2022, 8:34:47 PM3/11/22
to antlr-discussion
I realize that is probably a long shot, but I really need some help with https://github.com/Strumenta/antlr-kotlin

It is a Kotlin implementation of ANTLR4 and I'm using it because I can use it to write code that runs on both the JVM as well as the web.

The problem is: It doesn't support operator precedence! E.g. If you try to parse 1 - 2 + 3, it will interpret it as 1 - (2 + 3) instead of (1 - 2) + 3.

Here's the Github issue that I've posted: https://github.com/Strumenta/antlr-kotlin/pull/75

I would like to fix this bug, but unfortunately I know *nothing* about ANTLR internals. It looks like the runtime implements many (most?) of the classes in Kotlin that I see in the Java implementation.

Would anyone be able to help me out? Maybe point me in the right direction?

Sky

Tianyu Zhu

unread,
Mar 14, 2022, 10:24:46 AM3/14/22
to antlr-discussion
I've managed to fix this issue! https://github.com/Strumenta/antlr-kotlin/pull/75
Reply all
Reply to author
Forward
0 new messages