CS 5500 Assignment #3. Assigned: Thursday, 16 January 2014 Due: Thursday, 30 January 2014 This is an individual assignment. Collaboration between students is forbidden on this assignment. You are responsible for keeping your code hidden from all other students. For this assignment, you will write a simple syntax checker that implements the specification given below. You must write all of your program's source code by yourself. You are not allowed to use source code written by other students, you are not allowed to use source code obtained from the World-Wide Web or other sources, and you are not allowed to use software packages unless they are already installed on the standard CCIS Linux machines. Your software must include a README file (which *must* be in UTF-8 plain text, and must be named README) that 1. gives your name (as you want the instructor to spell it), 2. gives your preferred email address(es) for contacting you, 3. tells the grader(s) how your software can be compiled and run on any CCIS Linux machine in the main lab. All of the files necessary to construct and to run your software must be combined into a gzip'ed tar file whose name ends in .tar.gz or .tgz. Submit that gzip'ed tar file before 6pm on the date it is due using the submit script that's described at the course assignments page: http://www.ccs.neu.edu/course/cs5500sp14/assignments.html Your software will be graded on these criteria: 1. the quality of the instructions and documentation in your README file, 2. the ease of constructing and running your software on CCIS Linux machines, 3. your software's correctness with respect to not attempting to read any files (apart from standard input) not attempting to create any files (apart from standard output) not producing extraneous output having no side effects apart from reading from and writing to standard input and output producing the specified error message for incorrect inputs returning an exit status of zero for correct inputs returning a nonzero exit status for incorrect inputs 4. and the readability of your source code. Your software's build process must result in software that can be invoked by cd'ing to the directory containing your software's executable and executing a command of the following form ./check5500 Your check5500 program must then read its input from standard input and decide whether that input is a syntactically correct message, where the syntax of correct messages is specified by the following context-free grammar: ::= ::= | | | | ::= | ::= | ::= | | ::= ::= | ::= | ::= 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 ::= a | b | c | d | e | f | g | h | i | j | k | l | m | n | o | p | q | r | s | t | u | v | w | x | y | z | A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z ::= " ::= ::= ::= | | ::= | If your software discovers that its input is syntactically correct according to the specification above, then your software should produce no output at all and should terminate with an exit status of 0. If your software discovers that its input is syntactically incorrect according to the specification above, then your software should write "ERROR" to standard output, followed by a newline (also sent to standard output), and should terminate with an exit status other than 0. ---------------------------------------------------------------- Examples. The following inputs should produce no output and terminate with an exit status of 0: 0010 Helen "In Xanadu did Kubla Khan" () ( ) (start) ( end win ) (move (A3 B3)) (attack (D1 E1) (result attacker)) (timing 95 60 120) (() (()) ((())) (((()))) ((((()))))) The following inputs should write "ERROR" to standard output and should terminate with an exit status other than 0: 10x D'Artagnan "No, punctuation is not allowed within strings." () ) ( (start"finish") (end) (win) (move "(A3 B3)") (attack )D1 E1( (result attacker)) (()(())((()))(((())))((((()))))) ----------------------------------------------------------------