Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.6-rc-2
-
None
Description
While an error recovery parser is a good idea it is currently not supported by the groovy grammar. The Groovy Eclipse team has come up with a solution of patching the grammar and adding their own AntrlParserPlugin implementation that is a subclass of the original AntrlParserPlugin. But the current implementation of AntrlParserPlugin makes coding subclasses rather cumbersome, specifically because the ast field is private and that the error recovery code must be injected in the middle of the execution of parseCST()
This feature proposes opening up AntrlParserPlugin for extension, by initially modifying the accessibility of the ast field (or provide protected mutator) by subclasses and refactoring parseCST() to a template method.
I'll provide a patch shortly and would love to have it merged before 1.6 ships, as this patch would not only help the Groovy Eclipse plugin but also other specialized tools (like SwingPad) that can reapt the benefits of an error recovery parser.