Wojciech Kocjan <[EMAIL PROTECTED]> writes:
> >>Which currently cause problems with the parser. Thoughts? Maybe
> >>at the same time, I can make it accept <?dtcl as well as <?,
> >>also...
> > Hrmmm... Couldn't we just check to see if we're already in a
> > block of code?
> I suppose a counter would be the easiest way to do it - when started
> it is 0, on evert "<?rivet" it is incremented by 1, on every "?>" it
> is decremented if the counter is >0.
Yes, that's how my new parser works.
> However, I suppose a problem would be with XML stuff like this:
> <?rivet
> puts "<?xml version=\"1.0\" encoding=\"$encoding\"?>"
> ?>
Right..hrm...
> It will work with the above example. However, the following is a big
> problem:
>
> <?rivet
> proc php_end {} {
> puts "?>"
> }
> proc php_begin {} {
> puts "<?php "
> }
>
> php_begin
> puts "echo('test')"
> php_end
> ?>
Yuck, I think we are just going to have to tell people to escape it.
There are too many sneaky things like that.
--
David N. Welton
Consulting: http://www.dedasys.com/
Free Software: http://people.debian.org/~davidw/
Apache Tcl: http://tcl.apache.org/
Personal: http://www.efn.org/~davidw/
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]