kaby76 / AntlrVSIX

AntlrVSIX is a language server for use with Visual Studio 2019, Visual Studio Code, and Gnu Emacs to support Antlr, Bison, and W3C EBNF grammars. In addition to the IDE extensions provided here, a command-line tool is available to refactor grammars in order to make them cleaner, more readable, and more efficient.
https://marketplace.visualstudio.com/items?itemName=KenDomino.AntlrVSIX
MIT License
90 stars 12 forks source link

Action blocks in Antlr grammars should be serviced by a language server. #35

Open kaby76 opened 4 years ago

kaby76 commented 4 years ago

Action block, predicates, member code is defined in the target language. The code contained in these blocks is currently just text to the Antlr LSP server, but it should be handled by the appropriate server. So, I should be able to this code, and go to the definition. It should be colorized, and tooltips should appear. Unfortunately, there are no heterogeneous file types in LSP.

kaby76 commented 4 years ago

Some progress on this issue. I figured out that I can call Antlr recursively for a code block for action blocks. A prototype for this idea is here. https://github.com/kaby76/AntlrExamples/tree/master/AntlrTargetCSharp