01: package antlr;
02:
03: /* ANTLR Translator Generator
04: * Project led by Terence Parr at http://www.cs.usfca.edu
05: * Software rights: http://www.antlr.org/license.html
06: */
07:
08: class TokenSymbol extends GrammarSymbol {
09: protected int ttype;
10: /** describes what token matches in "human terms" */
11: protected String paraphrase = null;
12:
13: /** Set to a value in the tokens {...} section */
14: protected String ASTNodeType;
15:
16: public TokenSymbol(String r) {
17: super (r);
18: ttype = Token.INVALID_TYPE;
19: }
20:
21: public String getASTNodeType() {
22: return ASTNodeType;
23: }
24:
25: public void setASTNodeType(String type) {
26: ASTNodeType = type;
27: }
28:
29: public String getParaphrase() {
30: return paraphrase;
31: }
32:
33: public int getTokenType() {
34: return ttype;
35: }
36:
37: public void setParaphrase(String p) {
38: paraphrase = p;
39: }
40:
41: public void setTokenType(int t) {
42: ttype = t;
43: }
44: }
|