congo-cc / congo-parser-generator

The CongoCC Parser Generator, the Next Generation of JavaCC 21, which in turn was the next generation of JavaCC
https://discuss.congocc.org/
Other
33 stars 9 forks source link

Implement reapers for parsers generated in Python and C#. #151

Closed vsajip closed 5 months ago

vsajip commented 5 months ago

These don't use the visitor pattern, but instead focus only on the Parser class, where almost all of the benefits are to be had. Unreferenced methods other than those in the parser API and unused first and follow sets are removed.

revusky commented 5 months ago

FYI, in your CSharp reaper, line 30, you can simply write:

     ClassDeclaration pc  = cu.firstDescendantOfType(ClassDeclaration.class, Reaper::isParserClass);
     if (pc == null) return;

and so on

vsajip commented 5 months ago

Getting failures on Windows and JDK 17 combination only ... perhaps encoding related? Investigating.