One way to avoid having a giant file having lots of lexer/grammar
definition is to spread them out to several interfaces.
To support this feature, need to add a @CookCCGrammar marker on the
interfaces. Then the parser class that implements the interface should
have @CookCC marker (and CookCC would go check each interfaces). With IDEA
or Eclipse, the overriding functions can be automatically generated.
One advantage of this approach allows sub-component of a language grammar
to be individually tested, by building separate parser classes that
implement selected interfaces. The actual implementation of the language
can also be delayed, by simply using generated functions.
Original issue reported on code.google.com by superdup...@gmail.com on 22 Oct 2009 at 3:06
Original issue reported on code.google.com by
superdup...@gmail.com
on 22 Oct 2009 at 3:06