[antlr-interest] how to solve 'code too large' problem?

scott at javadude.com scott at javadude.com
Fri Jul 13 11:32:29 PDT 2007


Huh? How is it not? You're writing a grammar for your xml file. You could
write an XMI grammar quite easily.

ANTXR saves you from having to write a lexer and adds some convenience
syntax for attributes and xml-rule names.

I know about the other XML parsers that you mention; it depends on what
you want to do with the xml. If you're just mapping xml to objects,
they'll work well. And DOM is just gross...

-- Scott

> Well, that's not really writing a parser for an XML document in ANTLR,
> is it? It's interesting and novel and probably good for some uses, but
> the case in point was someone writing a purpose-built ANTLR parser for
> XMI specifically.
>
> Also, there are other approaches that are not big chains of if-then-else
> tests or Digester rules. There are several DOM (-like) APIs, e.g. as
> well as JiBX, JAXB, etc.



More information about the antlr-interest mailing list