add source code that does not have location annotations.
[IRC.git] / Robust / JavaGrammar / Lex / Identifier.java
1 package Lex;
2
3 import java_cup.runtime.Symbol;
4
5 public class Identifier extends Token {
6   String identifier;
7   public Identifier(String identifier) { this.identifier=identifier; }
8
9   public String toString() { return "Identifier <"+identifier+">"; }
10
11   /* Ben Walter <bwalter@mit.edu> correctly pointed out that
12    * the first released version of this grammar/lexer did not
13    * return the string value of the identifier in the parser token.
14    * Should be fixed now. ;-) <cananian@alumni.princeton.edu>
15    */
16   Symbol token() { return new Symbol(Sym.IDENTIFIER, identifier); }
17 }