Wojciech Kocjan <[EMAIL PROTECTED]> writes:

> I've just finished writing the dparser code.

Cool!  Code is *always* appreciated.
 
> It should be compatible with dtcl's, except:
> 
> <?= $variable ?>   is the same as   <? hputs  $variable ?>
> <?dtcl code ?>     is the same as   <? code ?>

These would be good things to #define.

> The first thing is that it does NOT create Tcl code, it's only
> purpose is to create a list of elements in the page.

That's ok.

> There's also a quick-hack testing code :>

You should try it with example.ttml, that is a fairly 'difficult' file
to parse and run.  If it can do that, it's pretty complete.  It seems
to go into some kind of infinite loop when I run it on example.ttml.

> The code was tested and should have no memory leaks and no bugs -
> after all, this is just a small piece of code. I didn't have time to
> test binary data, though. I didn't use any str*() function, but only
> mem*() ones, so this code should work on binary files as well.

Good... a few comments:

    #ifdef USE_AOLSERVER_DEBUG
    Ns_Log(Notice,"ParserData delete.0");
    #endif

Couldn't you just put a Parser_Debug function to get rid of all those
ifdef's?

Style: white space is good, IMO.

    if ((rc=Dp_ParserData_Alloc())!=NULL) {

should look like

    if ((rc = Dp_ParserData_Alloc()) != NULL) {

and so on.  Tcl and Apache's C code is a pretty good place to start
from, style wise.

Comments should be C style comments.

I'll have a look at my own parser, too, and see what it would take to
extract *just* the parsing code.

Thanks,
-- 
David N. Welton
Free Software: http://people.debian.org/~davidw/
   Apache Tcl: http://tcl.apache.org/
     Personal: http://www.efn.org/~davidw/
         Work: http://www.innominate.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to