[antlr-interest] Re: Local lookahead depth

Oliver Zeigermann oliver at zeigermann.de
Sun Nov 9 23:22:53 PST 2003


--- In antlr-interest at yahoogroups.com, "lgcraymer" <lgc at m...> wrote:
> > >>2.) Sometimes using tree transformation is too expensive
> > > 
> > > 
> > > Sometimes it is overkill (unnecessary development), but too 
> > > expensive?  I doubt it, especially for languages where lexing 
> and 
> > > parsing are complex.  [BTW, my experience is that 
> unsubstantiated 
> > > performance arguments are usually bogus and made in an attempt 
> to 
> > > subjectively win an argument that cannot be won on the basis of 
> > > objective evidence.]
> > 
> > I have the same experience. But consider extremely large amounts 
> of 
> > input to be parsed. In this case it is prohibitve to generate an 
> AST 
> > because of the memory issue. As a very practical exmaple I have 
> parsing 
> > of the AMM (Aircraft Maintenance Manual) which is available in 
> SGML 
> > (very hard to parse, really). I parsed this a few years using 
> ANTLR, but 
> > its size normally is around 100MB. A few years ago my machine had 
> 128MB 
> > of RAM! You see what I mean?
> 
> And how much disk space did you have?  On a UNIX box, mmap() is a 
> good way of automating file I/O, but even on systems without virtual 
> memory, you can fake it. Performance is not an issue--with a problem 
> of this size, nothing stays in the processor cache, and the overhead 
> of the disk writes will be only a few percent.
> 
> --Loring


Loring,

are you really serious about this? Have a look at the DOM vs. SAX
discussion in the XML area...

Oliver


 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 




More information about the antlr-interest mailing list