Notation: If the symbol on the left-hand-side is <XXX-cmd>, that means that upon reading the XXX comand from standard input you will write the right-hand side of the rule to standard output. The symbol <nl> means newline, or the friendly ``backslash n.''The command names are a bit shortened- their full form is as given in section 1.3.1- and you are should echo them command to output with a newline afterwards. Note that there may be extra requirements for the output (e.g., alphabetical order by cell name) which are not shown here, but appear elsewhere in the specification, or will be clarified on the newsgroup. For example, some parts of the spec ask you to print a list of cell names; for these,
<cell> := <cell-name>
Other parts ask you to print the cell with its coordinates, giving
<cell> := <cell-name> at (cell-coord)
and, the k-d tree search paths (in radius_cell, sector_cell, and similar functions) demand only the coordinates:
<cell> := <cell-coord>
where
<cell-coord> := (<int>, <int>)
So, pay attention. You should know the specification inside and out by the end of the semester-or, at least, *I* will.
<clear-cmd> := <clear-cmd>
All structures cleared.<nl>
<create-cmd> := <create-cmd>
Cell coordinates searched:<nl>
<cell-list>
Created cell <cell-name>.<nl>
| <create-cmd>
Error: Cell <cell-name> already exists.<nl>
| <create-cmd>
Cell coordinates searched:<nl>
<cell-list>
Error: Cell <cell-name> duplicates coordinates.<nl>
<list-cmd> := <list-cmd>
Cells of type <cell-type>:<nl>
<cell-list>
<cell-list> := <some-cells>
End of list.<nl>
| None.<nl>
End of list.<nl>
<some-cells> := <cell><nl><some-cells> | <cell><nl>
<print-skip-cmd>:=<print-skip-cmd>
Skiplist:<nl>
None.<nl>
End of list.<nl>
|<print-skip-cmd>
Skiplist:<nl>
<skiplist-nodes>
End of list.<nl>
<skiplist-nodes>:=<skiplist-node><nl><skiplist-nodes> |<skiplist-node><nl>
<skiplist-node>:=<cell> has <tower-height> links to cells: <nl>
<cell-list>
<tower-height>:=<int>
<insert-cmd> := <insert-cmd>
Cell <cell-name> has been inserted.<nl>
| <insert-cmd>
Error: Cell <cell-name> is not the name of a created cell.<nl>
| <insert-cmd>
Error: Cell <cell-name> is already in the PR quad tree.<nl>
<print-qtree-cmd> := <print-qtree-cmd>
Inserted cells:<nl>
<cell-list>
<rectangle-cmd> := <rectangle-cmd>
Checked cell coordinates:<nl>
<cell-list>
Cells within rectangle:<nl>
<cell-list>
<draw-cmd> := <draw-cmd>
Drawing.<nl>
<insert-fn-cmd> := <insert-fn-cmd>
Created edge between <cell-name> and <cell-name>.<nl>
| <insert-fn-cmd>
Error: <cell-name> and <cell-name> are not of the same type.<nl>
<print-fn-cmd> := <print-fn-cmd>
Feasible paths:<nl>
<adjacency-list>
| <print-fn-cmd>
Error: Bad argument.<nl>
<adjacency-list> := <some-adjacencies>
End of list.<nl>
| None.<nl>
End of list.<nl>
<some-adjacencys> := <adjacency><nl><some-adjacencies> | <adjacency><nl>
<adjacency> := <cell-name>: <list cell names, ONE SPACE between and NO NEWLINES>
<build-sn-cmd> := <build-sn-cmd>
Building support net.<nl>
| <build-sn-cmd>
Error: Bad argument.<nl>
<print-sn-cmd> := <print-sn-cmd>
<component-list>
Total # of connected components <int> <nl>
| <print-sn-cmd>
Error: No cells.<nl>
| <print-sn-cmd>
Error: Bad argument.<nl>
<component-list> := <adjacency-list> <component-list>
| <adjacency-list><nl>
Total length is: <total-length><nl>
<total-length> := <floating point number>