[antlr-interest] RFE: support for clean grammar
Guntis Ozols
guntiso at latnet.lv
Thu Jan 10 20:53:56 PST 2008
For those [few?] of us who want grammar separated from implementation,
there should be some easy way to do that. It gives us (blah blah...):
- independence of target language
- independence of antlr version & antlr internals
- ability to use the same grammar file to generate
parsers fitted for various purposes
(highlighting, editing, interpreting, compiling, ...)
- simplified testing and debugging
- ...
(!) I believe it can be achieved in many cases with the following
very-easy-to-implement *command line* options:
lexer.package
parser.package
lexer.superclass
parser.superclass
To cover the rest, two things should be supported by *antlr grammar*
i.e. in target language independent way:
no-arg method call (action)
no-arg boolean function call (predicate)
That's it. This is one step away,
we can have (first in the world?) portable grammars in few hours
Please correct me if I am wrong or missing something
Thanks,
Guntis
More information about the antlr-interest
mailing list