cfengine-develop
[Top][All Lists]
Advanced

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

Re: [Cfengine-develop] Development plan / meeting


From: Mark Burgess
Subject: Re: [Cfengine-develop] Development plan / meeting
Date: Mon, 3 Mar 2003 14:09:32 +0100 (MET)

> Forgive me if I get my terminology wrong -- I'm another of those
> former physicists and never did any formal compiler work...
> 
> What are the types that we need to handle? Obviously, strings and
> integers. Should permissions be a basic type? How about booleans? IP
> ranges? Enums?
> 
> At present, we're parsing a lot as if it's a string, then at
> work-time, checking to see if it makes sense. With some well-chosen
> basic types we can move loads of checking to the parse stage and
> simplify code.
> 


This is part of what we have to answer in rewriting the parser.
It would be a mistake to think of cfengine as being anything like
C or Java or perl etc.

There is no "right way" of making a parser. Cfengine does not really
have many data types, but it does have

 "Quoted strings"
 /path/object

 { containers like editfiles }

 options=value

Part of the problem with the parser as it is now is that I started
defining different types "item" "pathname" etc and many of these
turned out to be redundant, thus there is duplicate code.

A separate project to work through this would be valuable and
might also help us to see how the language itself needs to
develop,

Mark

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Work: +47 22453272            Email:  address@hidden
Fax : +47 22453205            WWW  :  http://www.iu.hio.no/~mark
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~





reply via email to

[Prev in Thread] Current Thread [Next in Thread]