3 import java_cup.runtime.Symbol;
6 public class Identifier extends Token {
8 public Identifier(String identifier) {
9 this.identifier=identifier;
12 public String toString() {
13 return "Identifier <"+identifier+">";
16 /* Ben Walter <bwalter@mit.edu> correctly pointed out that
17 * the first released version of this grammar/lexer did not
18 * return the string value of the identifier in the parser token.
19 * Should be fixed now. ;-) <cananian@alumni.princeton.edu>
22 return new Symbol(Sym.IDENTIFIER, identifier);