[antlr-interest] Any way to introduce a base class for
TreeParser/Lexer/Parser?
Gerald B. Rosenberg
gbr at newtechlaw.com
Wed Jun 1 10:18:26 PDT 2005
I would like to remove as much as possible the action code from the grammar
file.
This could be easily done if, in the grammar file, I could specify that the
TreeParser (or Parser or Lexer) extends from my own custom action library
class that otherwise maintains the necessary class hierarchy, i.e.,
inherits from antlr.TreeParser. Seems that the "extends" clauses are
referencing keywords rather than actual class names.
Is there some alternate notation for specifying a base class that I am
missing? Or, is there a better pattern for implementing externalized
action code? Does 3.0 provide any additional features?
Thanks,
Gerald
----
Gerald B. Rosenberg, Esq.
NewTechLaw
285 Hamilton Avenue, Suite 520
Palo Alto, CA 94301-2576
650.325.2100 (office) / 650.703.1724 (cell)
650.325.2107 (fax)
www.newtechlaw.com
More information about the antlr-interest
mailing list