antlr / antlr4

ANTLR (ANother Tool for Language Recognition) is a powerful parser generator for reading, processing, executing, or translating structured text or binary files.
http://antlr.org
BSD 3-Clause "New" or "Revised" License
17.03k stars 3.27k forks source link

Ambiguous method reference in C# doc comment #1013

Open brwml opened 8 years ago

brwml commented 8 years ago

Left-recursive rules emit overloaded methods causing the method reference in the doc comment to not resolve properly. According sharwell, "The reference should resolve properly unless the method is overloaded (more than one method with the same name in the type). That said, it seems left-recursive rules do emit overloaded methods. I believe the solution is to qualify the method with arguments for left-recursive rules."

The affected file is antlr4\tool\resources\org\antlr\v4\tool\templates\codegen\CSharp\CSharp.stg, on lines 122, 128, 164, and 174.

brwml commented 8 years ago

This issue only affects the base listener and visitor classes when a labeled rule is used. It turns out the interface definitions have the correct doc comments. I have a fix and will make a pull request shortly.

sharwell commented 8 years ago

This was fixed in #1018