I'm currently attending the course "Compilers Construction" and I'm developing a simplified Java grammar in Antlr 4. The part involving Java grammar works just fine, except that it is slightly different from the original Java.
I'm told I should no use brackets and instead use indentation. I have tried a few examples from the internet, only examples for Antlr 3 which won't work in Antlr 4.
Can anyone help me with this indentation issue, or provide me the Python grammar for Antlr 4?
What about official GitHub ANTLR4 grammar repository? You can find many common language grammars. There is even a python3 directory containing Python3.g4
.
This should help you out.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With