Open filippobottega opened 3 years ago
Yep. It can't find the generated classes because they're in the wrong namespace when code was generated by the tool--the base classes are in namespace "PlSqlParseTree". I forgot to add the "package" parameter to the "generate" command. But, the C# code that is in grammars-v4 uses "_input" (PlSqlParseTree.cs, line 14), and "_input" doesn't exist in Antlr4.Runtime.Standard. It's likely this is being targeted for the ancient Harwell's version of Antlr, not the official version. Fortunately, I have a shim library for all this junk. It'll take a few hours to make a new release and give a script to show how to do the generate and run.
Submitted https://github.com/antlr/grammars-v4/issues/1976 in the Grammars-v4 repo for multiple issues (no CI builds, targeting ancient Antlr runtime, wrong namespace).
Regarding the "_input" in the C# generated files should be InputStream
Regarding the "_input" in the C# generated files should be InputStream
Correct. "_input" should be InputStream in C# Antlr4.Runtime.Standard. It could, of course, be for another runtime like Java, Go, Dart, or the old Antlr4cs style. I have plans for a shim to bridge the gap between that style with C# Antlr4.Runtime.Standard and to parse the grammars to determine what to do.
For all of these, I am starting the process of pulling the Trash command-line tool out completely from Antlrvsix, and turning it into a collection of stand-alone Dotnet tools. Generate in Trash will be one of these, and it will be able to handle any target.
For the last month or two, I've been working on a replacement for Generate called "dotnet-antlr". It is now the basis for C# CI testing in antlr/grammars-v4. It can handle most of the target types. It also uses StringTemplates so one can tweak the driver code to ones needs, e.g., one set of templates for basic tree output, another for performance testing with warmup, etc. The tool works well with the pom.xml/Antlr plugin, but it doesn't work well right now for arbitrarily organized grammars plus source.
There will be a lot of changes coming in a few weeks.
--Ken
Hello, I'have tried to generate the plsql grammar. This is my stack (end of paths):
I have got 3 warnings and 14 errors.
Thank you for your support.