[antlr-interest] strategy for parsing large repeated records

Peter Robinson Peter.Robinson at t-online.de
Wed Jan 19 13:52:01 PST 2005


Dear List,

I am working on a parser to read in information from one of the NCBI
bioinformatics resources in ASN.1 format. These files contain up to
10,000s of individual records that each contain up to several kb of
information. Although I am still learning my way around ANTLR, I don't
think the actual parsing of these files will be difficult. I would like
to ask about ideas for the best strategy. My current plan

1) Call from a main method the method which corresponds to the rule for
individual records.
2) Each time this method is called, create a Java object which will
receive the parsed information.
3) Within each rule, call methods from the above object to put
information from the parse in
4) When the method returns to main, use something else to do something
with the information (print to file, enter to a database etc).

Does that sound reasonable? I have not been able to find any comparable
projects on the antlr website or by google. Sorry if the above is either
obvious or ridiculous, I am still new to this game...
-Peter
-- 
Peter N. Robinson
peter.robinson at t-online.de
peter.robinson at charite.de
http://www.charite.de/ch/medgen/robinson/



More information about the antlr-interest mailing list