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()