Parsing rules
Michel Benevento
beno at xs4all.nl
Fri Nov 9 23:53:05 PST 2001
>To deal with the general run of character problems, I use pseudo-codes for
>the trouble characters and then process them out in finalFilter. For
>example, in my universe, a curly brace is -(- or -)-. I have a whole suite
>of these. (btw, I also use this technique to incorporate html in xml from a
>database I use to organize an e-comerce application. XML hates angle
>braces.)
Whoa, that sounds like a lot of work! Try this (I've been doing this for
years):
Write your javascript- and php-code in Frontier's script editor, skip all
the braces but use the outliner for appropriate indents. don't try to
compile them, it won't work, but that's ok.
Insert the code in your pages using a macro that converts these script
objects to strings, and voila, all you curly braces magically appear, no
errors.
Javascripts are the easiest, since they don't complain about e.g. }}}
line endings. Just make your #javascript directive a script object. For
php you need to add an extra empty line at the end of each control
structure, making this method a little less convenient, but only a
little. If you make you insert-macro smart enough (like I did) you can
even call macros within you scripts!
I hope this is clear, good luck.
michel benevento
More information about the Frontier-Users
mailing list