[lokisetup] New feature : boolean variables and expressions

Stéphane Peter megastep at megastep.org
Fri Mar 31 11:26:48 EST 2006

On Mar 31, 2006, at 4:18 AM, Ludwig Nussel wrote:
>> [..]
>> Some examples :
>> Match Fedora on PowerPC system:
>>     +(fedora,ppc)
>> Match one of SuSE, Redhat 9 or Fedora, on all but Intel:
>>    +(^(suse,+(redhat,distro-major-9),fedora),!x86)
> 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))

Yeah well, I wanted something very simple and concise, and looking  
for a single character for the operator was really faster to write  
than a whole keyword. The whole parser is really not big at the  
moment, and it works. If I really wanted LISP, there are free parsers  
I could just have reused.

> You could also just use xml to represent that expression. You don't
> need an additional parser then.

Good point, although I tend to prefer simple strings to replace the  
existing system in place, which was already a string with a command  
to call. We would also have to worry about children XML nodes in many  
places where we didn't expect much more than attributes before, which  
would complicate things further and certainly introduce more bugs. ;)

> cu
> Ludwig
> -- 
>  (o_   Ludwig Nussel
>  //\   SUSE LINUX Products GmbH, Development
>  V_/_  http://www.suse.de/

Stéphane Peter
megastep at megastep.org

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://icculus.org/pipermail/lokisetup/attachments/20060331/f60c7cb7/attachment.htm>

More information about the Lokisetup mailing list