My favorites | Sign in
Project Logo
                
New issue | Search
for
| Advanced search | Search tips
Issue 19: Grammar on interface
  Back to list
Status:  Accepted
Owner:  superduperhengyuan
Type-Enhancement
Priority-Medium


Sign in to add a comment
 
Reported by superduperhengyuan, Oct 21, 2009
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.
Sign in to add a comment

Hosted by Google Code