Tavis Rudd <[EMAIL PROTECTED]> wrote:
> On Tuesday 29 May 2001 23:11, Chuck Esterbrook wrote:
>
> > Well, for what it's worth, I prefer ;
> > I think ;# looks awkward at best and confusing at worst.
>
> I agree with you about that. It's just a pain in the ass to
> switch to a single char closure - i.e. create
> a parser that would be able to handle all the different types of
> directives in addition to $placeholders. Adding a new directive
> is currently a 5-10 minute process. I suspect it would be much
> more difficult to add new directives to a parser. For the amount
> of use the explicit closures are going to see it's just not worth
> the effort.
To be safe, any use of this syntax in a WYSIWYG editor should use
explicit closures -- newlines are meaningless in HTML, and you never
can be sure how the editor will treat them, or preserve them.
Using the parser shouldn't make your life harder. You don't need a
parser for the directives themselves, just the expressions. So you
find a #, check that it is followed with a directive, then you grab an
expression (if the directive calls for it), maybe another keyword
(like "in"), another expressions, etc. You can encapsulate the parser
is a single function easily enough, so that it just returns the parsed
expression and the point where the expression ended.
Ian
_______________________________________________
Webware-devel mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/webware-devel