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>]
Represents the abstract syntax of a box declaration, which has a name and an attribute list.
Initializes a new box syntax object with the given name and attribute list.
Allows the use of square-bracket notation to retrieve the value of one of this box’s attributes.
Checks and compiles the abstract syntax structure to create a new BoxDeclaration object of the appropriate subclass.
Parameters: |
|
---|---|
Returns: | the newly created box declaration. |
Raises : | a CompilationError if any static checks fail. |
Parses the given input text to produce a new BoxSyntax object.
Returns: | the newly created box syntax object. |
---|---|
Raises : | a ParsingError if syntax is invalid. |