KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > antlr > TokenSymbol


1 package antlr;
2
3 /* ANTLR Translator Generator
4  * Project led by Terence Parr at http://www.jGuru.com
5  * Software rights: http://www.antlr.org/RIGHTS.html
6  *
7  * $Id: //depot/code/org.antlr/main/main/antlr/TokenSymbol.java#4 $
8  */

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