ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@apache.org>
Subject Re: Possible Ant 1.7 alpha bug: property expansion.
Date Fri, 04 Jun 2004 07:30:35 GMT
On Thu, 3 Jun 2004, Matt Benson <gudnabrsam@yahoo.com> wrote:
> --- Stefan Bodewig <bodewig@apache.org> wrote:
>> On Thu, 3 Jun 2004, Jose Alberto Fernandez
>> <jalberto@cellectivity.com>
>> wrote:
> [SNIP]
>> > Agree in principle. As a matter of fact, we
>> already have the
>> > PropertyHelper chain framework.
>> 
>> That's what I've been talking about, yes 8-)
>> 
> 
> Nice... however, since we're actually talking about
> the parsing of properties from a String, we've got to
> head 'em off at the pass, so to speak...

Yes, Jose Alberto and you are certainly correct.  The actual
tokenization may depend on the PropertyHelper in question and thus may
be different for each PropertyHelper in the chain.

Any PropertyHelper further down the chain wouldn't have a chance to
expand ${${a}.${b}} "correctly" if the top level decided that the
whole expression ends at the first closing brace.

Can we even solve that without making the contract stricter in some
way?

So far it looks to me as if we'd have to change the top level
tokenization algorithm to something more sane - i.e. count opening
braces, close when you encounter the "matching" closing brace or at
the last brace found if there is no matching closing brace - if we
want to allow more complex PropertyHelpers.

I don't see any easy way to defer the actual string tokenization to
the individual PropertyHelpers of the chain, so we may be better
served by defining a more useful algorithm at the top.

Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message