Property file format

All the property (*.prp) files use an LL1 syntax for a simple, recursive descent parser. The parser currently has no error recovery and effectively stops at the first error. Tokens enclosed within curly braces {} are optional. Tokens enclosed within angle brackets <> are further decomposed according to their own BNF (Backus Naur Form) descriptions.

The BNF for the *.prp files is as follows:

<file> ::= {"Subject" <subject>} "end"

For example, the factory.prp file begins with an optional list of subjects, each beginning with the keyword "Subject," and ends with the required keyword "end":

Subject General
Subject Statechart
Subject ObjectModelGe
.
.
.
end

<subject> ::= <name> {"Metaclass" <metaclass>} "end"

As another example, the subject General begins with a name, followed by a list of metaclasses, followed by the keyword "end":

Subject General
Metaclass Graphics
Metaclass Model
end

<metaclass> ::= <name> {"Property" <property>} "end"

The file contains the following type declarations:

A string that indicates a type with two possible values, TRUE or FALSE.

The enum values string is a comma-separated list of legal, enumerated values. A second quoted string indicates the default. For example, the quoted string "on,off" contains enumerated values.

A value. For example, a property value could be the quoted string "Arial 10 NoBold NoItalic".

A quoted string is a string that starts and ends with double-quotes and can contain newlines. A backslash must precede any literal double-quote or backslash characters within the string. For example, "FALSE" is a quoted string.


Feedback