A BNF-like Description

The grammar was derived from the Java class definitions, plus a small amount of additional information. XML and Relax NG schemas were produced in a similar way and are more useful for some purposes.

In the grammar, non-terminal synbols are written in upper case. Most of them correspond to class names. Alternatives for a given non-terminal are separated by " | " or listed in separate rules for the same non-terminal. Repetition (zero or more instances) is shown as "...". For example, a list of plan-nodes would be described like this:


All fields represented as elements are implicitly optional and may occur in any order

There is a close correspondence with the semi-formal notation used earlier. For example,

   element plan-variable-declarations: list of plan-variable-declaration
   element plan-issues: list of plan-issue
   element plan-issue-refinements: list of plan-issue-refinement
   element plan-nodes: list of plan-node
   element plan-refinements: list of plan-refinement
   element constraints: list of constrainer
   element world-state: list of pattern-assignment
   element annotations: map
PLAN ::=

OBJECT should be understood as standing for any object represented in I-X XML. For example, the syntax for a map is <map>MAP-ENTRY...</map> where

A map therefore contains a sequence of zero or more map-entries, and the keys and values in the map-entries map be any representable objects.

Comparison with the XML and RELAX NG Schemas

The syntax of atomic objects other than enumerations is not included in the BNF-style grammar.

The XML and RELAX NG schemas give a syntax for everything that would normally appear. [It is not possible to give an absolutely complete syntax in a file prepared in advance, because new representable classes may be defined at any time.]

However, the XML schema cannot give the syntax of particular constraint types, because the contents of their parameters field varies depending on the values of the type and relation fields. For that level of detail about constraint syntax, see the rules for KNOWN-CONSTRAINT in the BNF-style grammar or in the RELAX NG constraint schema.

Jeff Dalton <J.Dalton@ed.ac.uk>