[lokisetup] New feature : boolean variables and expressions
ludwig.nussel at suse.de
Fri Mar 31 07:18:00 EST 2006
On Thursday 30 March 2006 02:20, Stéphane Peter wrote:
> About Boolean Expressions :
> Many elements support the 'if' or 'condition' attribute to reference
> complex expressions
> using the Setup boolean variables. The expressions have to follow the
> following syntax:
> expression := [!]<operator>(<expression1>,<expression2>) |
> [!]<boolean name>
> Supported operators are : + (logical "and"), | (logical "or"), and ^
> (logical "exclusive or").
> Any expression can be negated by a ! prefix.
> An undefined boolean is the same as a false boolean.
> Some examples :
> Match Fedora on PowerPC system:
> Match one of SuSE, Redhat 9 or Fedora, on all but Intel:
Intereting idea but the syntax is really weird. If you move the
operator inside the parenthesis you could say it's like lisp.
(and (or? suse (and redhat distro-major-9) fedora) (not x86))
You could also just use xml to represent that expression. You don't
need an additional parser then.
(o_ Ludwig Nussel
//\ SUSE LINUX Products GmbH, Development
More information about the Lokisetup