The Regents of the University of California. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. Neither the name of the University nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
.ds RH "Configuration File Grammar
.bp
APPENDIX A. CONFIGURATION FILE GRAMMAR .R
The following grammar is a compressed form of the actual yacc\|(1) grammar used by config to parse configuration files. Terminal symbols are shown all in upper case, literals are emboldened; optional clauses are enclosed in brackets, ``['' and ``]''; zero or more instantiations are denoted with ``*''.
Configuration ::= [ Spec ; ]* Spec ::= Config_spec | Device_spec | trace | /* lambda */ /* configuration specifications */ Config_spec ::= machine ID | cpu ID | options Opt_list | ident ID | System_spec | timezone [ - ] NUMBER [ dst [ NUMBER ] ] | timezone [ - ] FPNUMBER [ dst [ NUMBER ] ] | maxusers NUMBER /* system configuration specifications */ System_spec ::= config ID System_parameter [ System_parameter ]* System_parameter ::= swap_spec | root_spec | dump_spec | arg_spec swap_spec ::= swap [ on ] swap_dev [ and swap_dev ]* swap_dev ::= dev_spec [ size NUMBER ] root_spec ::= root [ on ] dev_spec dump_spec ::= dumps [ on ] dev_spec arg_spec ::= args [ on ] dev_spec dev_spec ::= dev_name | major_minor major_minor ::= major NUMBER minor NUMBER dev_name ::= ID [ NUMBER [ ID ] ] /* option specifications */ Opt_list ::= Option [ , Option ]* Option ::= ID [ = Opt_value ] Opt_value ::= ID | NUMBER Mkopt_list ::= Mkoption [ , Mkoption ]* Mkoption ::= ID = Opt_value /* device specifications */ Device_spec ::= device Dev_name Dev_info Int_spec | master Dev_name Dev_info | disk Dev_name Dev_info | tape Dev_name Dev_info | controller Dev_name Dev_info [ Int_spec ] | pseudo-device Dev [ NUMBER ] Dev_name ::= Dev NUMBER Dev ::= uba | mba | ID Dev_info ::= Con_info [ Info ]* Con_info ::= at Dev NUMBER | at nexus NUMBER Info ::= csr NUMBER | drive NUMBER | slave NUMBER | flags NUMBER Int_spec ::= vector ID [ ID ]* | priority NUMBERLexical Conventions
The terminal symbols are loosely defined as:
One or more alphabetics, either upper or lower case, and underscore, ``_''.
Approximately the C language specification for an integer number. That is, a leading ``0x'' indicates a hexadecimal value, a leading ``0'' indicates an octal value, otherwise the number is expected to be a decimal value. Hexadecimal numbers may use either upper or lower case alphabetics.
A floating point number without exponent. That is a number of the form ``nnn.ddd'', where the fractional component is optional.
In special instances a question mark, ``?'', can be substituted for a ``NUMBER'' token. This is used to effect wildcarding in device interconnection specifications.
Comments in configuration files are indicated by a ``#'' character at the beginning of the line; the remainder of the line is discarded.
A specification is interpreted as a continuation of the previous line if the first character of the line is tab.