The Regents of the University of California. All rights reserved.
%sccs.include.redist.roff%
@(#)a.t 8.1 (Berkeley) 06/08/93
.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.