--- File Format for CS 110 Basic Drawing Program --- Br. Isidore Minerd O.S.B. The file format which we are using for our basic drawing program is a rather simple human-readable text file format. It is comprised of a number of line items, each of which denote a single shape on the screen. The rendering program reads each line, parses the data, and takes the appropriate action. Each record begins with the same two fields: ::= 1 | 2 ::= 1 | 0 For , a value of 1 means that the shape is a rectangle, while 2 indicates a circle. For , a value of 1 means that the object is to be filled when rendered, whereas 0 indicates that it is to remain "empty" (i.e. as merely the outline) A rectangle is defined as the following fields: ::= 1 Where are all defined as /[0-9]+([.][0-9]+)?/ (i.e. as floating point numbers) and respectively indicate the x and y coordinates of the rectangle's upper left corner. and respectively indicate the x and y coordinates of the rectangle's lower right corner. A circle is defined as the following fields: := 2 Where are all defined as /[0-9]+([.][0-9]+)?/ (i.e. as floating point numbers) and respectively indicate the x and y coordinates of the circle's center. indicates the radius of the circle. This means that the whole grammar for our file is: ::= ::= | "" ::= 1 | 2 ::= 0 | 1 ::= ::= /[0-9]+([.][0-9]+)?/ ::= /[0-9]+([.][0-9]+)?/ ::= /[0-9]+([.][0-9]+)?/ ::= /[0-9]+([.][0-9]+)?/ ::= ::= /[0-9]+([.][0-9]+)?/ ::= /[0-9]+([.][0-9]+)?/ ::= /[0-9]+([.][0-9]+)?/