From owner-freebsd-hackers@FreeBSD.ORG Wed Jan 16 14:39:28 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9B66016A417 for ; Wed, 16 Jan 2008 14:39:28 +0000 (UTC) (envelope-from rb@gid.co.uk) Received: from gidgate.gid.co.uk (gid.co.uk [194.32.164.225]) by mx1.freebsd.org (Postfix) with ESMTP id 2921B13C447 for ; Wed, 16 Jan 2008 14:39:27 +0000 (UTC) (envelope-from rb@gid.co.uk) Received: from [192.168.234.199] ([192.168.234.199]) by gidgate.gid.co.uk (8.13.8/8.13.8) with ESMTP id m0GEdQ4p019865; Wed, 16 Jan 2008 14:39:26 GMT (envelope-from rb@gid.co.uk) Message-Id: From: Bob Bishop To: Ulf Lilleengen In-Reply-To: <20080116133214.GA2666@carrot.studby.ntnu.no> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v915) Date: Wed, 16 Jan 2008 14:39:26 +0000 References: <20080116093302.GA13632@carrot.studby.ntnu.no> <0CE4984F-41F7-44EA-9FE7-0E573DB2B338@gid.co.uk> <20080116133214.GA2666@carrot.studby.ntnu.no> X-Mailer: Apple Mail (2.915) Cc: freebsd-hackers@freebsd.org Subject: Re: Csup cvsmode build discussion X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Jan 2008 14:39:28 -0000 Hi, On 16 Jan 2008, at 13:32, Ulf Lilleengen wrote: > On Wed, Jan 16, 2008 at 11:08:20AM +0000, Bob Bishop wrote: >> [...] >> Why do you want prefixing? And precisely what do you want to do with >> parameters? >> > Prefixing is needed since csup already have a configuration parser > written in > lex/yacc and therefore needed to avoid conflicts. You can alternatively avoid conflicts by putting both grammars in the same file, with an entry rule which refers to one or other of the two grammars' real entries based on a defined token. You then arrange for the lexer to supply the appropriate value of the switch token each time the parser is started up. > Parameters is nice if one > were to modify the parser to take extra arguments, I don't have a > concrete > example for it yet, but it's nonetheless a requirement for > reentrancy. [etc] You may be able to do this using a variation on the above trick. > -- > Ulf Lilleengen > -- Bob Bishop +44 (0)118 940 1243 rb@gid.co.uk fax +44 (0)118 940 1295