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

Randall R Schulz rschulz at sonic.net
Fri Jul 13 14:04:09 PDT 2007


Is there any way I can get you to stop sending me direct copies of your 
responses? Please? Why do people do that?


On Friday 13 July 2007 13:03, scott at javadude.com wrote:
> > On Friday 13 July 2007 11:32, scott at javadude.com wrote:
> >> Huh? How is it not?
> >
> > Because you're talking about writing an ANTXR specification. My
> > question was specifically about writing an ANTLR grammar for an XML
> > document format.
>
> 98% of ANTXR is ANTLR. An ANTXR grammar is essentially a superset of
> an ANTLR grammar.

Fine, but it's neither here nor there. Does ANTXR accept all ordinary 
ANTLR (v2) grammars producing the same result as one would get from 
applying ANTLR itself to those grammars? If not, it isn't a superset.


> > Yes, I see that. But you're not addressing the question I asked:
> > Why would someone write an ANTLR grammar for an XML document
> > format?
>
> With ANTXR existing, I would say noone should write an ANTLR grammar
> for XML ;)

Well, considering ANTXR is a modified ANTLR, are you going to commit to 
making sure it tracks the evolution of ANTLR for as long as ANTLR is 
being developed? Do you produce a new version whenever there's a 
bug-fix or other revision of ANTLR v2?


Are you going to produce a version of ANTXR for ANTLR v3? And if so, 
will you consider implementing it as a grammar transform rather than by 
modifying ANTLR itself?


By the way, does an ANTXR parser impose all the usual XML 
well-structured document requirements?


> Grammar-based XML parsing (whether ANTLR or ANTXR) can be very
> effective for some XML parsing tasks.

Of course, we've seen one example of what happens when you try to span 
all of XML's generic grammar plus a specific schema (generically 
speaking) in one shot with ANTLR: You can overload the Java class file 
size limit!


> ...
>
> -- Scott


Randall Schulz


More information about the antlr-interest mailing list