Defines classes for parsing and compiling relation declarations, which consist of a name, then a series of newline-separated box and connection declarations inside a block of curly braces. Shell-style comments (prefixed with #) may be included within the body:
name
{
<box|connection>
<box|connection>
...
<box|connection>
}
Represents the abstract syntax of a relation constraint declaration, consisting of a name, a list of box syntax objects, and a list of connection syntax objects. Note that order is preserved among boxes and among connections respectively, but that the order of connections relative to boxes is insignificant.
Initializes a new relation syntax object with the given name and the the provided box and connection structures.
Checks and compiles this relation constraint from its abstract syntax into a new RelationDeclaration. object.
Parameters: | relations – The list of relation declarations compiled so far. Used to resolve macro references. |
---|---|
Returns: | the newly created relation declaration. |
Raises : | a CompilationError if any static checks fail. |
Parses the given input text to produce a new RelationSyntax object.
Returns: | the newly created syntax object. |
---|---|
Raises : | a ParsingError if syntax is invalid. |