KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > polyglot > lex > Identifier


1 package polyglot.lex;
2
3 import java_cup.runtime.Symbol;
4 import polyglot.util.Position;
5
6 /** A token class for identifiers. */
7 public class Identifier extends Token {
8   String JavaDoc identifier;
9   public Identifier(Position position, String JavaDoc identifier, int sym)
10   {
11     super(position, sym);
12     this.identifier=identifier;
13   }
14
15   public String JavaDoc getIdentifier() { return identifier; }
16
17   public String JavaDoc toString() { return "identifier \"" + identifier + "\""; }
18 }
19
Popular Tags