harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nikolay Kuznetsov" <nikolay.kuznet...@gmail.com>
Subject Re: Platform dependent code placement (was: Re: repo layout again)
Date Tue, 21 Feb 2006 20:30:00 GMT
Hello, team,

I've tried to simplify construction below, which is sample of Andrey's
ant script, and end up with following regular expression which matches
string containing particular OS identifier or strings w/o any OS
identifiers:

".*([_\\W]${env.OS}[_\\W].*$|.*(?<!.*[\\W_](win|lin|sol)[\\W_].*)$)"

This would work fine with regex package from HARMONY-39 contribution,
but fail to compile with SUN's classes (PatternSyntaxException:
Look-behind group does not have an obvious maximum length, I would
appreciate if someone point me to the place in any regex
specification, stating that it's valid behavior).

>From the compatibility point of view this enhancement is no good, but
to give a hint how to implement negative assertions in terms of regex
negative look behind/ahead is the solution.

>            <propertyregex property="OS.match" input="@{file}"
> regexp="[\W_]${env.OS}[\W_]" override="yes" defaultValue="no"
> select="yes"/>
>            <propertyregex property="OS.any.match" input="@{file}"
> regexp="[\W_](win|linux|solaris)[\W_]" override="yes"
> defaultValue="no" select="yes"/>

>                        <istrue value="${OS.match}"/>
>                        <not>
>                            <istrue value="${OS.any.match}"/>
>                        </not>

Thank you.

Nikolay Kuznetsov
Intel Middleware Products Division

Mime
View raw message