next up previous
Next: Part 3: Developing the Up: Part 2: EnviroBot Net Previous: Part 2 Command Specification


Part 2 BNF

Please post queries, corrections, and kudos to the newsgroup ( csd.cmsc420). PLEASE LOOK TO THE SAMPLES FOR CORRECT FORMATTING. If there is a descrepancy between the two, go with the sample data.

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 command names are a bit shortened- their full form is as given in section 1.2.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 (<int>, <int>)

And, the pr quadtree search path (in radius_cell) demands only the coordinates:


  <cell> :=  (<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>
		Created cell <cell-name>.
		| <create-cmd>
		Error: Cell <cell-name> already exists.<nl>


<list-cmd> := <list-cmd>
	      <cell-list>

	
<cell-list> := <cell><nl>
	       <some-cells>
	       End of list.<nl>
	       | None.<nl>
 	      End of list. <nl>

<some-cells> := <cell><nl><some-cells> |





<print-bptree-cmd>:=<print-bptree-cmd>
	    bptree:<nl>
	    None.<nl>
	    End of list.<nl>
	    |<print-skip-cmd>
	    bptree:<nl>
	    <bptree-nodes>
	    End of list.<nl>

<bptree-nodes>:=<bptree-node><nl><bptree-nodes> |<bptree-node><nl>

<more bptree stuff to appear. don't believe this>


<insert-cmd> := <insert-cmd>
		Cell <cell-name> has been inserted.<nl>
	        | <insert-cmd>
		Cell <cell-name>  inserted and connected to <nl>
		cell <cell-name> (cost: <float>).
		| <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 quadtree.<nl>

<print-kdtree-cmd> := <print-kdtree-cmd>
		     Inserted cells:<nl>
		     <cell-list>

<print-net-cmd>  :=  <print-net-cmd>
                      Search path:<nl>
		     <cell-list>
		      Cells in net with cost <float>:
		     <adjacency-list>	
		





<adjacency-list> := <adjacency><nl>
	       <some-adjacencies>
	       End of list.<nl>
	       | None.<nl>
	       End of list.<nl>

<some-adjacencys> := <adjacency><nl><some-adjacencies> |

<adjacency> := <cell-name> <a strcmp order cell names delimited by
                                         ONE SPACE and NO NEWLINES>

<radius-cmd> := <radius-cmd>
		   Search path:<nl>
		   <cell-list>			
		   Cells within sphere:<nl>
		   <cell-list>


next up previous
Next: Part 3: Developing the Up: Part 2: EnviroBot Net Previous: Part 2 Command Specification
MM Hugue
2002-03-09

Web Accessibility