[Date Index][Thread Index]
[Date Prev][Date Next][Thread Prev][Thread Next]

Re: Proposed changes for pass 1 wml_p1_ipp



On Thu, 3 Feb 2000, Franz Knipp wrote:

> Hello,
> 
> while experimenting with pass 1 I found a strange behaviour in handling
> the comments - #include and variable substitution was done also their...

Hi Franz,

ipp is much more complex that it looks like, so i have to be very
careful. I discuss below some of your points.

[...]
> *  If you include files with the #include 'pattern' tag, there are three
> variables which are set to the complete file name (with path and
> extension) of itself, the previous and the next file: INCLUDE_SRC,
> INCLUDE_PREV, INCLUDE_NEXT. These variables are available with e. g.
> $(INCLUDE_SRC). If you want to use them in the further passes, you have to
> assign variables like <set-var INCLUDE_SRC=$(INCLUDE_SRC).

Hmmm, i am not convinced this is the best approach for your problem, i
will think about it.

> *  Comment blocks are now really comment blocks, that means that no
> #include, #use, #depend, variable substition and so on is performed on
> that block. This is true for # line comments and /* */ C-style comments.
> 
> *  The handling of comments is now done in another part and should be
> faster than previos (therefore I deleted the warning in the man page).

Here is where we have to be careful, do these changes break anything?

> *  Silent Assign Methods: to assign variables without writing themselves
> to the output (file) I've invented the following "variable substitutions":
> 
>    $(name:!value)  Silent Assign: name = value, also if name is yet
>                      definied
> 
>    $(name:~value)  Silent Assign when Unset

This is a very nice idea.

[...]
> To Denis (I think this is your first name): I've updated the documentation
> part ;-) That's necessary for me to keep in mind my changes ;-))

You're right, that's my first name. As i said before, some of your code
will be put into wml-SNAP soon, but not everything.
Another point: please avoid constructs like
  +    ($l =~ m/^#(use|include|depends)\s+(\S+)(.*)$/ and $use = 1)
  +       or next if $l =~ m/^[ \t]*#.*$/ ;
these are very hard to maintain.

Thanks

-- 
Denis Barbier
WML Maintainer

______________________________________________________________________
Website META Language (WML)                www.engelschall.com/sw/wml/
Official Support Mailing List                   sw-wml@engelschall.com
Automated List Manager                       majordomo@engelschall.com