Defines syntax objects, which contain the abstract syntax of the various types of declarations that make up a program. Syntax objects are created by parsing input text.
Syntax objects have two major methods: The static parse() method constructs a new syntax object from raw input text, and compile() constructs a new, semantically valid declaration object.
Classes: ProgramSyntax
Defines classes for parsing and compiling programs, which consist of a series of relation constraint declarations:
<relation>
<relation>
...
<relation>
Classes: RelationSyntax
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>
}
Classes: BoxSyntax
Defines classes for parsing and compiling box declarations, which consist of a name followed by an attribute list in square brackets. Box declarations must occupy a single line and must not contain arrows (->):
<name> [<attributelist>]
Classes: AttributeListSyntax
Defines classes for parsing attribute lists, which are comma-separated key/value pairs, with values in double quotes and preceded by the equals sign:
<name>="<value>", <name>="<value>", ..., <name>="<value>"
Classes: ConnectionSyntax
Defines classes for parsing and compiling connection declarations, which consist of exactly two node declarations separated by an arrow (->):
<node> -> <node>
Classes NodeSyntax
Defines classes for parsing and compiling node declarations, which consist of either a plain box name (indicating a macro input or output) or a box name and node name separated by a dot:
<boxname.nodename|boxname>