COP5555 SimpleParser Program Help
1.  Make sure your HW2 Submission has "cop5555.jar" files in it.
2.  The package should include the following files: Scanner.java, SimpleParser.java, and SyntaxException.java
3.  Don't change cop5555.tokens package, and don't submit it.
4.  Scanner.next(); SimpleParser.parse(); should be public.
5.  The msg in the SyntaxException will not be graded, but it will be helpful for you to locate the error.
 The errors will be an important part for grading, so take care of all kinds of errors.
6.  The following is a simple test program, you can use this to test your program:

import java.io.*;
import cop5555_tokens.Token;
import static cop5555_tokens.Token.Kind.*;

public class TestParser{
public static void main(String args[]){
  cop5555.SimpleParser p = null;
  Reader r = null;
  try {
    r = new BufferedReader(new FileReader(args[0]));
  }catch(FileNotFoundException e){
    System.exit(-1);
  }
  try{
    p = new cop5555.SimpleParser(r);
  }catch(IOException e){
    System.exit(-1);
  }
  try{
    p.parse();
  }catch(cop5555.SyntaxException e){
    System.out.println(e);
  }
}
}
Input Output
program test {}  
program test1 {{3}} cop5555.SyntaxException: expected token RBRACE
INT_LIT 3:0,16
456bcd cop5555.SyntaxException: expected token PROGRAM
ERROR Illegal char after int lit:0,0