On 4 Jul 2001, David N. Welton wrote:

> Wojciech Kocjan <[EMAIL PROTECTED]> writes:
> [ dtcl on aolserver ]
> If someone wants to, go ahead, let me know how it goes, but it's not
> on my list of things to do:-)

Well, I'm considering it, since I'm partly using Apache and partly
AOLserver now, and I'm not sure with which one I'll stay with. But I'd
like to run my dtcl scripts. Besides, I prefer those <? to <%.


> > Also, it would be good to have a CGI interface to dtcl, but not one
> > written in Tcl. But this is probably more of a future plan.
> 
> It would require a rewrite of a lot of things, as it's all pretty tied
> up with Apache.  Seeing as how it's not a real high priority, the Tcl
> version is probably the fastest way to do things.

Hmmm, I'd put it on the to-do list. I would like to be able to launch dtcl
pages as CGI on some hosts. Besides, I'd like this parser to be
setuid-root and this isn't a good place to use tcl (even TclX).

I'll try and write the parser described below. Then I'll think about it.

It'd be nice if dtcl wouldn't only be Apache. Also, dtcl could set up some
basic functionality which could be written for most www servers -
something what PHP has done (except the fact that they wrote a separate
language as well :). Defining such basic functionality (probably most of
mod_dtcl's commands) could make mod_dtcl portable.

Also, defining what is apache-specific in the tcl api and what shouldn't
be used if the code is to be portable should be specified.

I don't want mod_dtcl to be apache-specific, although I want to use
mostly it on Apache.

> > The thing is that it would be nice to rewrite the dtcl parser to be
> > more universal. This could slow things down a bit (I'm not sure
> > about that one, especially if it's written in a nice manner), but
> > shouldn't be that bad...
> The chances of doing this have improved some with the rewriting I've
> been doing, but it's still not there %100.

The way I see this parser is a structure containing the following:
struct dtclParserData {
    char *beginning;
    char *end;
    unsigned long length;
    int type;
};

Type could be either text or code or endofdata.

It could either be a one-way list (ie. add struct dtclParserData *next at
the beginning), or a table with the last element's type set to some
specific type.

I'll probably write such a parser soon. It should just be a matter of
searching on '<' and '?' or '?' and '>'. Also, since I don't double the
data, this parser would be quite useful. 

--
Wojtek Kocjan
[EMAIL PROTECTED]



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

Reply via email to