Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 28 Jan 1997 14:53:14 +1030 (CST)
From:      Michael Smith <msmith@atrad.adelaide.edu.au>
To:        msmith@genesis.atrad.adelaide.edu.au (Michael Smith)
Cc:        config@freebsd.org, chat@freebsd.org
Subject:   Re: Kernel config metasyntax
Message-ID:  <199701280423.OAA07019@genesis.atrad.adelaide.edu.au>
In-Reply-To: <199701280416.OAA06928@genesis.atrad.adelaide.edu.au> from Michael Smith at "Jan 28, 97 02:46:53 pm"

next in thread | previous in thread | raw e-mail | index | archive | help
Michael Smith stands accused of saying:
> 
> To add an option, you would write an option definition in the
> metaconfiguration language.  The example I provided _explicitly_
> parses the metaconfiguration language samples that I posted earlier;
> it simply takes advange of the braced syntax and the Tcl parser to
> avoid reinventing the wheel.  If you want to parse the syntax in 
> another language, it's still easy.

I haven't commented on Tatsumi's post yet (still too busy 8) but one
thing that I should observe :

Using a rigid syntax (eg. a Yacc syntax) is a Very Bad Idea, as it
closes the definition of the language.  The whole idea behind the
attribute name/value pairing is that attribute-dependent functions
should be triggered by the presence of the attribute, and it should be
possible to add attributes to an option/whatever definition without
having to tell the parser about it.

(ie. if you eyeball the Tcl parser I posted, you'll notice that all it
does is register the existence of the option, and pile all of the
attributes supplied with it into the array.  Later, anything that cares
about options can access all of this and make up its own mind; the parser
should not need to know or care what the attributes and their valus are.)

-- 
]] 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  [[



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199701280423.OAA07019>