Storing text in parsable document (Naresh Bhatia)
Tue, 11 Jul 1995 14:03:49 GMT

          From comp.compilers

Related articles
Storing text in parsable document (1995-07-11)
Re: Storing text in parsable document (1995-07-17)
| List of all articles for this month |

Newsgroups: comp.compilers
From: (Naresh Bhatia)
Keywords: design, question
Organization: NETCOM On-line Communication Services (408 261-4700 guest)
Date: Tue, 11 Jul 1995 14:03:49 GMT

I have a need to store free form text in a parsable document. Aside from
this free form text, the document is very well structured and is readily
parsable. I am looking for suggestions on how to store the free form text
so as to make its retrieval easy.

In general, the free form text can be huge. It is made up of paragraphs,
which are a contiguous flow of words without new line characters. I would
prefer not to store one line per paragraph, because the line may become
too big, making its readability very awkward. Also I may overflow my
scanner's buffers.

Any suggestions would be greatly appreciated.

[I'd store the text with a byte count in front, to make it easy either to
allocate a buffer and suck it in, or skip over it. Alternatively, if you
expect to skip the text more often than you read it, put it out of line at
the end of the file with a pointer from the place where it logically occurs.


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.