[antlr-interest] performance issue with skip functionality in generated Java parser for binary data

Terence Parr parrt at cs.usfca.edu
Sat Sep 10 10:47:05 PDT 2005


On Sep 7, 2005, at 5:34 AM, Mark Venbrux wrote:

> Hi,
> First of all: ANTLR is great. Especially with the Eclipse plug-in.
> So I tried something difficult to start with. Namely: parsing  
> binary IsoBox files.
> This is a file structure with no explicit separators, so you need  
> to interpret length fields to parse the structure.
> The media content is just a lot of data, so I would like to skip  
> it. But performance for big files collapses completely.

Have you tried using a random access file and making the input stream  
itself simply skip forward with a seek?  Then antlr wouldn't care and  
could just do consume()s :)

Ter
--
CS Professor & Grad Director, University of San Francisco
Creator, ANTLR Parser Generator, http://www.antlr.org
Cofounder, http://www.jguru.com



More information about the antlr-interest mailing list