KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > persistence > antlr > TokenSymbol


1 package persistence.antlr;
2
3 /* ANTLR Translator Generator
4  * Project led by Terence Parr at http://www.jGuru.com
5  * Software rights: http://www.antlr.org/license.html
6  *
7  */

8
9 class TokenSymbol extends GrammarSymbol {
10     protected int ttype;
11     /** describes what token matches in "human terms" */
12     protected String JavaDoc paraphrase = null;
13
14     /** Set to a value in the tokens {...} section */
15     protected String JavaDoc ASTNodeType;
16
17     public TokenSymbol(String JavaDoc r) {
18         super(r);
19         ttype = Token.INVALID_TYPE;
20     }
21
22     public String JavaDoc getASTNodeType() {
23         return ASTNodeType;
24     }
25
26     public void setASTNodeType(String JavaDoc type) {
27         ASTNodeType = type;
28     }
29
30     public String JavaDoc getParaphrase() {
31         return paraphrase;
32     }
33
34     public int getTokenType() {
35         return ttype;
36     }
37
38     public void setParaphrase(String JavaDoc p) {
39         paraphrase = p;
40     }
41
42     public void setTokenType(int t) {
43         ttype = t;
44     }
45 }
46
Popular Tags