changed Rule to Parser and added test programs

*renamed Rule.java to Parser.java
*added 3 test programs to data folder
*implemented match() and syntaxError()
added checkForScanError() to Scanner
implemented assignment, write, read statements