1 2 3 package org.sablecc.sablecc.syntax3.node; 4 5 import org.sablecc.sablecc.syntax3.analysis.*; 6 7 @SuppressWarnings ("nls") 8 public final class AStatesLexer extends PLexer 9 { 10 private PHelpers _helpers_; 11 private PTokens _tokens_; 12 private PInvestigators _investigators_; 13 private PStates _states_; 14 15 public AStatesLexer() 16 { 17 } 19 20 public AStatesLexer( 21 @SuppressWarnings ("hiding") PHelpers _helpers_, 22 @SuppressWarnings ("hiding") PTokens _tokens_, 23 @SuppressWarnings ("hiding") PInvestigators _investigators_, 24 @SuppressWarnings ("hiding") PStates _states_) 25 { 26 setHelpers(_helpers_); 28 29 setTokens(_tokens_); 30 31 setInvestigators(_investigators_); 32 33 setStates(_states_); 34 35 } 36 37 @Override 38 public Object clone() 39 { 40 return new AStatesLexer( 41 cloneNode(this._helpers_), 42 cloneNode(this._tokens_), 43 cloneNode(this._investigators_), 44 cloneNode(this._states_)); 45 } 46 47 public void apply(Switch sw) 48 { 49 ((Analysis) sw).caseAStatesLexer(this); 50 } 51 52 public PHelpers getHelpers() 53 { 54 return this._helpers_; 55 } 56 57 public void setHelpers(PHelpers node) 58 { 59 if(this._helpers_ != null) 60 { 61 this._helpers_.parent(null); 62 } 63 64 if(node != null) 65 { 66 if(node.parent() != null) 67 { 68 node.parent().removeChild(node); 69 } 70 71 node.parent(this); 72 } 73 74 this._helpers_ = node; 75 } 76 77 public PTokens getTokens() 78 { 79 return this._tokens_; 80 } 81 82 public void setTokens(PTokens node) 83 { 84 if(this._tokens_ != null) 85 { 86 this._tokens_.parent(null); 87 } 88 89 if(node != null) 90 { 91 if(node.parent() != null) 92 { 93 node.parent().removeChild(node); 94 } 95 96 node.parent(this); 97 } 98 99 this._tokens_ = node; 100 } 101 102 public PInvestigators getInvestigators() 103 { 104 return this._investigators_; 105 } 106 107 public void setInvestigators(PInvestigators node) 108 { 109 if(this._investigators_ != null) 110 { 111 this._investigators_.parent(null); 112 } 113 114 if(node != null) 115 { 116 if(node.parent() != null) 117 { 118 node.parent().removeChild(node); 119 } 120 121 node.parent(this); 122 } 123 124 this._investigators_ = node; 125 } 126 127 public PStates getStates() 128 { 129 return this._states_; 130 } 131 132 public void setStates(PStates node) 133 { 134 if(this._states_ != null) 135 { 136 this._states_.parent(null); 137 } 138 139 if(node != null) 140 { 141 if(node.parent() != null) 142 { 143 node.parent().removeChild(node); 144 } 145 146 node.parent(this); 147 } 148 149 this._states_ = node; 150 } 151 152 @Override 153 public String toString() 154 { 155 return "" 156 + toString(this._helpers_) 157 + toString(this._tokens_) 158 + toString(this._investigators_) 159 + toString(this._states_); 160 } 161 162 @Override 163 void removeChild(@SuppressWarnings ("unused") Node child) 164 { 165 if(this._helpers_ == child) 167 { 168 this._helpers_ = null; 169 return; 170 } 171 172 if(this._tokens_ == child) 173 { 174 this._tokens_ = null; 175 return; 176 } 177 178 if(this._investigators_ == child) 179 { 180 this._investigators_ = null; 181 return; 182 } 183 184 if(this._states_ == child) 185 { 186 this._states_ = null; 187 return; 188 } 189 190 throw new RuntimeException ("Not a child."); 191 } 192 193 @Override 194 void replaceChild(@SuppressWarnings ("unused") Node oldChild, @SuppressWarnings ("unused") Node newChild) 195 { 196 if(this._helpers_ == oldChild) 198 { 199 setHelpers((PHelpers) newChild); 200 return; 201 } 202 203 if(this._tokens_ == oldChild) 204 { 205 setTokens((PTokens) newChild); 206 return; 207 } 208 209 if(this._investigators_ == oldChild) 210 { 211 setInvestigators((PInvestigators) newChild); 212 return; 213 } 214 215 if(this._states_ == oldChild) 216 { 217 setStates((PStates) newChild); 218 return; 219 } 220 221 throw new RuntimeException ("Not a child."); 222 } 223 } 224 | Popular Tags |