From owner-freebsd-config Mon Jan 27 22:03:55 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id WAA21886 for config-outgoing; Mon, 27 Jan 1997 22:03:55 -0800 (PST) Received: from genesis.atrad.adelaide.edu.au (genesis.atrad.adelaide.edu.au [129.127.96.120]) by freefall.freebsd.org (8.8.5/8.8.5) with ESMTP id WAA21861; Mon, 27 Jan 1997 22:03:45 -0800 (PST) Received: (from msmith@localhost) by genesis.atrad.adelaide.edu.au (8.8.2/8.7.3) id QAA07873; Tue, 28 Jan 1997 16:31:50 +1030 (CST) From: Michael Smith Message-Id: <199701280601.QAA07873@genesis.atrad.adelaide.edu.au> Subject: Re: Kernel config metasyntax In-Reply-To: <199701280501.OAA16760@lenlen.mt.cs.keio.ac.jp> from HOSOKAWA Tatsumi at "Jan 28, 97 02:01:38 pm" To: hosokawa@mt.cs.keio.ac.jp (HOSOKAWA Tatsumi) Date: Tue, 28 Jan 1997 16:31:49 +1030 (CST) Cc: msmith@atrad.adelaide.edu.au, config@freebsd.org, chat@freebsd.org, hosokawa@mt.cs.keio.ac.jp X-Mailer: ELM [version 2.4ME+ PL28 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-config@freebsd.org X-Loop: FreeBSD.org Precedence: bulk HOSOKAWA Tatsumi stands accused of saying: > I don't want to flame about metaconfiguration base language because > the only thing I want is megtaconfiguration language :-). Ooh, you mean a megaconfiguration language? I agree 100% 8) > I personally think that writing parser in yacc is not difficult, and I > wrote yesterday's example only in a few hours. I also posted this > example in local hacker's mailing list and I got some advices. I'm > fixing the problems and extending the syntax to incorporate requested > features. My basic problem with using a yacc parser is that it sets not only the syntax but the content of the language in stone. The syntax I proposed basically boils down to : line : ->-(type)-(name)-[attribute-list]->- attribute-list : ->-'{'-+-[attribute]-+-'}'->- | | +-----<-------+ attribute : ->-'{'-(attribute-name)-+-(attribute-value)-+-'}'->- | | +---------<---------+ Where the parser _explicitly_ knows nothing about (type), (name), (attribute-name) or (attribute-value). I realise that in a B&D language like C, this abstraction is a little more complex to manage, but that is more an argument for a better choice of implementation language than a slur on the syntax. > HOSOKAWA, Tatsumi -- ]] Mike Smith, Software Engineer msmith@gsoft.com.au [[ ]] Genesis Software genesis@gsoft.com.au [[ ]] High-speed data acquisition and (GSM mobile) 0411-222-496 [[ ]] realtime instrument control. (ph) +61-8-8267-3493 [[ ]] Unix hardware collector. "Where are your PEZ?" The Tick [[