Updates to Lexer for Handling Comments
--Dan Grossman, CS211 TA
Thanks to one of my sections, we discovered a difference between the JavaDUCK grammar and the real Java grammar.
In Java, an abstract method has a semicolon after right parenthesis that ends the parameter list. And it has no body (i.e. a balanced curly block). In JavaDUCK, all methods, including abstract ones, have bodies and never semicolons.
THE GRAMMAR WE GAVE YOU IS THE FINAL WORD! Do what the handout says -- assume ALL METHODS HAVE BODIES AND NONE HAVE SEMICOLONS. We will test your program according to this assumption.
This decision has the advantage that there is technically NO CHANGE to the assignment. It has the disadvantage that we _thought_ JavaDUCK files were also legal Java files, but we were not quite right. My sincerest apologies.
-- Dan, CS211 TA