[Biojava-l] Possible Submission

Robert Hubley rhubley@systemsbiology.org
Mon, 15 Oct 2001 11:04:55 -0700

This is a multi-part message in MIME format.
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

> I also have a question. Can it cope specifying formats that span multiple
> lines?  Or is it limited to treating non-XML files as being essentially
> record-based i.e. dealing with single lines at a time? Sometimes, it's
> useful (and necessary) to be able to read ahead several lines of a file,
> before actually parsing i.e. emitting SAX events.

That's a good question.  The short answer is yes.  You complicate
your specification every time you have to do this.  Basically there
are two types of "lookahead".  There is line lookahead (assuming you
are parsing line by line) which allows you to match a pattern
based on what lies ahead of it in the line.  You can also get tricky
with using parser states with the ability to "pushback" data on
the processing stream.  And lastly you can incorporate traditional
parser code into the "action" of a particular rule.  They all have
their drawbacks...and cause one to reflect on ever writing a
report-like output procedure into any future program. :-)

I have written my code to fit into the BioJava project as:


Should I just wrap it up and send it to you?


Content-Type: text/x-vcard; charset=us-ascii;
Content-Transfer-Encoding: 7bit
Content-Description: Card for Robert Hubley
Content-Disposition: attachment;

tel;fax:(206) 732-1299
tel;work:(206) 732-1292
org:Institute for Systems Biology;Computational Biology
title:Software Engineer
adr;quoted-printable:;;Institute for Systems Biology=0D=0A4225 Roosevelt Way NE=0D=0ASTE 200;Seattle;WA;98105-6099;USA
fn:Robert Hubley