From owner-freebsd-hackers@FreeBSD.ORG Mon Apr 25 17:56:40 2005 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8068516A4CE for ; Mon, 25 Apr 2005 17:56:40 +0000 (GMT) Received: from eva.fit.vutbr.cz (eva.fit.vutbr.cz [147.229.10.14]) by mx1.FreeBSD.org (Postfix) with ESMTP id 204AE43D5F for ; Mon, 25 Apr 2005 17:56:39 +0000 (GMT) (envelope-from xdivac02@stud.fit.vutbr.cz) Received: from eva.fit.vutbr.cz (localhost [127.0.0.1]) (8.13.4/8.13.3) with ESMTP id j3PHuZeq007730 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Mon, 25 Apr 2005 19:56:35 +0200 (CEST) Received: (from xdivac02@localhost) by eva.fit.vutbr.cz (8.13.4/8.13.3/Submit) id j3PHuZ6m007729; Mon, 25 Apr 2005 19:56:35 +0200 (CEST) Date: Mon, 25 Apr 2005 19:56:35 +0200 From: Divacky Roman To: Ron Chen Message-ID: <20050425175635.GA7617@stud.fit.vutbr.cz> References: <20050425055016.56609.qmail@web41303.mail.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050425055016.56609.qmail@web41303.mail.yahoo.com> User-Agent: Mutt/1.4.2i X-Scanned-By: MIMEDefang 2.49 on 147.229.10.14 cc: freebsd-hackers@freebsd.org Subject: Re: C-style expression processing... X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Apr 2005 17:56:40 -0000 On Sun, Apr 24, 2005 at 10:50:16PM -0700, Ron Chen wrote: > Hi, > > I am trying to add a new feature in Gridengine > (free/opensource) to support ex-LSF users - there are > more and more LSF users migrating to Gridengine), and > some requested this one: > > In LSF, a user can specify from the command line the > resource requirements of a batch job: > > (mem >= 100 || pg < 200.0) > > Where mem and pg are variables (they changes in time, > and the master cluster scheduler has the most > up-to-date information). And what I need is to find > out whether the expression is true or not. > > My question is, is there an expression processing > library that can handle complex equations easily? you can easily parse it, using yacc/lex... and even hand-writing such parser cannot be difficult..