KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > sablecc > sablecc > launcher > syntax3 > node > Token


1 /* This file was generated by SableCC (http://www.sablecc.org/). */
2
3 package org.sablecc.sablecc.launcher.syntax3.node;
4
5 @SuppressWarnings JavaDoc("nls")
6 public abstract class Token extends Node
7 {
8     private String JavaDoc text;
9     private int line;
10     private int pos;
11
12     public String JavaDoc getText()
13     {
14         return this.text;
15     }
16
17     public void setText(@SuppressWarnings JavaDoc("hiding") String JavaDoc text)
18     {
19         this.text = text;
20     }
21
22     public int getLine()
23     {
24         return this.line;
25     }
26
27     public void setLine(@SuppressWarnings JavaDoc("hiding") int line)
28     {
29         this.line = line;
30     }
31
32     public int getPos()
33     {
34         return this.pos;
35     }
36
37     public void setPos(@SuppressWarnings JavaDoc("hiding") int pos)
38     {
39         this.pos = pos;
40     }
41
42     @Override JavaDoc
43     public String JavaDoc toString()
44     {
45         return this.text + " ";
46     }
47
48     @Override JavaDoc
49     void removeChild(@SuppressWarnings JavaDoc("unused") Node child)
50     {
51         throw new RuntimeException JavaDoc("Not a child.");
52     }
53
54     @Override JavaDoc
55     void replaceChild(@SuppressWarnings JavaDoc("unused") Node oldChild, @SuppressWarnings JavaDoc("unused") Node newChild)
56     {
57         throw new RuntimeException JavaDoc("Not a child.");
58     }
59 }
60
Popular Tags