helpful progress reporting
[IRC.git] / Robust / src / Lex / Identifier.java
1 package Lex;
2
3 import java_cup.runtime.Symbol;
4 import Parse.Sym;
5
6 public class Identifier extends Token {
7   String identifier;
8   public Identifier(String identifier) {
9     this.identifier=identifier;
10   }
11
12   public String toString() {
13     return "Identifier <"+identifier+">";
14   }
15
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>
20    */
21   Symbol token() {
22     return new Symbol(Sym.IDENTIFIER, identifier);
23   }
24 }