Custom Language Support Tutorial with Antlr V4
Hi
I am trying to make a custom language support plugin for TCL language.The main purpose of it is to highlight the code, find declarations etc.
I followed the "Custom Language Support Tutorial" which was very good but i found it very difficult to create a proper bnf file for TCL.
Searching on the web i discovered a Antlr V4 grammar that suits my needs but got lost when trying to follow the steps from the basic tutorial.
Should i define again lexer and parser? Which steps should i skip and are there any extra steps that i should follow? Finally is there any chance that you might update the tutorial to also include the Antlr grammar?
I found the Antlr sample plugin but again didn't help that much.(https://github.com/antlr/jetbrains-plugin-sample)
Please sign in to leave a comment.
You must choose _either_ Antlr and its tooling or the way described in Custom Language Support Tutorial (using native IJ Platform functionality).
It should be possible to convert existing Antlr .g file into corresponding BNF and then follow all steps from tutorial as is.
"It should be possible"... Are there any pointers on how to do this? How to use existing ANTLR grammar to create .bnf one?
Conversion must be done manually by translating .g grammar to BNF rules and associated necessary code/manual parsing rules etc.