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