I am trying to learn IntelliJ IDEA plugin development and want to add one for Zig language. I do not have much experience with parsers/lexers development, so I am looking for your help, community.
Zig language defines its grammar here https://github.com/ziglang/zig-spec/blob/master/grammar/grammar.y I believe it is a YACC grammar. Now I want to adopt this grammar for my IntelliJ plugin. This will help me to minimize my efforts, avoid redevelopment and make future updates from upstream easier.
Thus my questions are:
- What is the best way to reuse this upstream grammar file for my plugin?
- Are there any tools to convert YACC to BNF/Flex?
- Any examples/resources on how to deal with YACC grammar in an IntelliJ Plugin project?
Thank you for your help.