Open kaby76 opened 3 years ago
This is because Dart doesn't support method overloading like Java, so the signature can clash if there is another token/rule of the same name.
I saw some other targets use <rule name>List()
instead of <rule name>s()
so the issue doesn't happen in this case. However that doesn't completely solve the issue. I can raise a PR to do the same, though it would introduce backward incompatibility.
This seems like an Antlr4 4.9.2 bug with Dart code generation. When I use "expressions" in grammars-v4/sql/plsql/PlSqlParser.g4, the generated code from Dart contains two methods for "expressions()" with different return values. I can work around the problem by renaming "expressions" to "expressions_" in the grammar.