[futurebasic] Parsing

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : November 1997 : Group Archive : Group : All Groups

From: Brian Victor <bhv11@...>
Date: Fri, 28 Nov 1997 19:07:35 -0500
I need my program to parse some fairly sizable text based files.  The file
specification is quite loose, however, so I can't know exactly where each
element of the file will be.  What I'm looking for is a fast way to locate,
for example, the first character in the handle that is NOT a white space
(CHR's 9 through 13) or the first character that IS the start of a
subsection: ({[< and such.  I'm using some FN MUNGER code that was posted
here a while back for most of my parsing, but I haven't found a way to do
this with that yet.

While I'm at it, if anyone knows a way to search for a string that is not
within a subsection (a pair of the above characters: {}, (), etc.) I'd
appreciate hearing that, as well.  My current solution is to search for the
string, and then search for the start and end of the subsections leading up
to the string and making sure that the last subsection ends before the
string begins.  It works, but it seems to me like there should be a faster
method.

Thanks in advance.

-- Brian Victor