Hey Nikolay,
>
> I believe that the public API of my SANTLR tool (less the code generation) is pretty much rounded and documented. The only area which is missing (and will be missing for some time) is drill down into conflict details.
That looks like it could become a very useful tool. Important here is not only to point out what is wrong, but provide some help how to fix it. That might be non-trivial, e.g. with indirect left recursion, while for direct left recursion it’s almost irrelevant, since internally such a rule is converted to a non-left-recursive ATN structure by ANTLR4.
Another important information is the maximum lookahead used for a given input, which directly affects performance and memory footprint. Help to lower the lookahead would certainly be welcome! Could be there’s already some profiling info available related to that. However, in the Typescript runtime from Sam (which I use in my extension) the profiler classes are not complete yet.
I wonder why you want to work with an AST. It’s inferior to the parse tree and contains only informations about the input (while the parse tree contains context/invocation information, as well as the input details). All an AST does is to put the input symbols into an arbitrary tree structure. The parse tree provides this "by nature“.
Also, I believe the syntax highlighting feature shouldn’t be in SANTLR. It’s a pure text editor/IDE feature and only puts unrelated burden on the new tool.
Btw, when I we really come to include SANTLR in vscode, we will have to convert it to Typescript - jfyi.
Mike
--
www.soft-gems.net