Language Syntax
The set of possible G2 records is expressed by the following (non context-free)
grammar:
record => group nl
group => name value
name value nl indent group
value => ht string nl
nl indent group
nl indent array
array => index value
index value nl indent array
where
-
ht
is an ASCII tab character (011)
-
nl is an ASCII newline character
(012)
-
name is any valid C++ identifier
-
index is a non-negative integer
-
string is any sequence of printable
ASCII characters, as defined by the UNIX
isprint(3) function.
-
indent is one or more tabs, the
exact number depending on the depth of recursion in the definition.
The highest level name begins at the left
margin (indentation level zero).
Values (other
than simple strings,
which are separated from their names by tab) are indented one
level more deeply than their parent groups.
Note that two consecutive newlines
always terminate a G2 record.
Next topic:
Record Definition
Previous topic:
G2 Records
© 2005 The SCO Group, Inc. All rights reserved.
SCO OpenServer Release 6.0.0 -- 02 June 2005