Skip to contentMethod: ParserVal()
      1: package parser;
2: //#############################################
3: //## file: Parser.java
4: //## Generated by Byacc/j
5: //#############################################
6: /**
7:  * BYACC/J Semantic Value for parser: Parser
8:  * This class provides some of the functionality
9:  * of the yacc/C 'union' directive
10:  */
11: public class ParserVal
12: {
13: /**
14:  * integer value of this 'union'
15:  */
16: public int ival;
17: 
18: /**
19:  * double value of this 'union'
20:  */
21: public double dval;
22: 
23: /**
24:  * string value of this 'union'
25:  */
26: public String sval;
27: 
28: /**
29:  * object value of this 'union'
30:  */
31: public Object obj;
32: 
33: //#############################################
34: //## C O N S T R U C T O R S
35: //#############################################
36: /**
37:  * Initialize me without a value
38:  */
39: public ParserVal()
40: {
41: }
42: /**
43:  * Initialize me as an int
44:  */
45: public ParserVal(int val)
46: {
47:   ival=val;
48: }
49: 
50: /**
51:  * Initialize me as a double
52:  */
53: public ParserVal(double val)
54: {
55:   dval=val;
56: }
57: 
58: /**
59:  * Initialize me as a string
60:  */
61: public ParserVal(String val)
62: {
63:   sval=val;
64: }
65: 
66: /**
67:  * Initialize me as an Object
68:  */
69: public ParserVal(Object val)
70: {
71:   obj=val;
72: }
73: }//end class
74: 
75: //#############################################
76: //## E N D    O F    F I L E
77: //#############################################