This shouldn't be on cold-announce, lets do additional followups to
On Wed, Nov 17, 1999 at 01:49:28PM -0800, Jeff Kesselman wrote:
> Textdump is human readable and IMO very simple to grok. Why dont you
> just dump and look at the output?
>> I've been going through the ColdC reference material lately and it
>> appears that the Text Dump Structure information is missing. I was
>> wondering if this information is available somewhere?
It should be documented, and I never did. But Jeff is right, it is
easy to figure out. You can dig into the spagetti of textdb.c if you
want the full gritty details. Basically you have one 'statement'
which ends with a semicolon (always). The statement format is
[new|old] <directive> <directive args>;
My long term goals when I redid the textdump parsing was to have
textdb.c be an interim phase until I wroteup a yacc parser for the
textdump. My goals with the rewrite of textdump parsing was to make
it more parseable by external scripts (specifically in dealing with
broken lines--for programs that might choke on a single string 10MB in
length). But yacc hasn't been done yet, so you do have some limits
which shouldn't exist. Basically, you can break a line with a
backslash followed by a newline (but this is the only valid way--it
does not process backslashes in other contexts--such as a method).
You can also break the line with a block in curly braces -- only for
methods. As for the format of each directive, just read the textdump.
for the most part dont expect it to be forgiving about its format. It
wasn't intended to be used as an end-user programming format, but
simply as a machine readable and parsable format which can be read and
tweaked by humans. The new/old prefix to a directive WILL change its
behaviour--for many directives you have three conditions: new(add),
old(delete) and neither. If you are doing a new, it will expect
whatever you are doing to not exist currently. Doing an old WILL
DELETE IT. So doing 'old object #124124;' will delete the object.
This is so you can 'patch' databases from coldcc.
Basically, follow Jeff's advice--read the textdump. Also look at the
source, and finally ask me if you need clarification.