01: package persistence.antlr.preprocessor;
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: import persistence.antlr.collections.impl.Vector;
10:
11: class Option {
12: protected String name;
13: protected String rhs;
14: protected Grammar enclosingGrammar;
15:
16: public Option(String n, String rhs, Grammar gr) {
17: name = n;
18: this .rhs = rhs;
19: setEnclosingGrammar(gr);
20: }
21:
22: public Grammar getEnclosingGrammar() {
23: return enclosingGrammar;
24: }
25:
26: public String getName() {
27: return name;
28: }
29:
30: public String getRHS() {
31: return rhs;
32: }
33:
34: public void setEnclosingGrammar(Grammar g) {
35: enclosingGrammar = g;
36: }
37:
38: public void setName(String n) {
39: name = n;
40: }
41:
42: public void setRHS(String rhs) {
43: this .rhs = rhs;
44: }
45:
46: public String toString() {
47: return "\t" + name + "=" + rhs;
48: }
49: }
|