On Sat, 1 Oct 2011 05:28:53 +0800 "ela" <> wrote:
e> "Jim Gibson" <> wrote in message
e> news:300920110932542310%...
>> I would recommend the book "Pro Perl Parsing", by Christopher M. Frenz,
>> Apress, and the module Parse::RecDescent (but the latter has a steep
>> learning curve).
e> Oh, it's CHAPTER 5 Performing Recursive-Descent Parsing with
e> Parse::RecDescent . . . I guess the module actually uses this. Let me read
e> that first and thanks for telling me this kind of problem is called
e> "recursive decent parsing"!
No, the problem is how to parse, the solution (algorithm) is recursive
descent (not "decent" although it is decent for most problems
There are actually many types and subtypes of parsers with many, many
applications. The one you're describing is fairly simple, but if
Bioperl has a parser for it already, just look inside the module and see
if you can augment it with the functions you need. It sounds like this
distance is a pretty basic function, so you should be able to either
write it yourself or ask the module maintainers for help.
Ted