1 /* This file was generated by SableCC (http://www.sablecc.org/). */
3 package org.simantics.basicexpression.analysis;
6 import org.simantics.basicexpression.node.*;
8 public class DepthFirstAdapter extends AnalysisAdapter
11 protected Throwable exception;
13 public void except(Throwable exception) {
14 this.exception = exception;
17 public void inStart(Start node)
22 public void outStart(Start node)
27 public void defaultIn(@SuppressWarnings("unused") Node node)
32 public void defaultOut(@SuppressWarnings("unused") Node node)
38 public void caseStart(Start node)
41 node.getPExpression().apply(this);
42 node.getEOF().apply(this);
46 public void inAMultExpression(AMultExpression node)
51 public void outAMultExpression(AMultExpression node)
57 public void caseAMultExpression(AMultExpression node)
59 inAMultExpression(node);
60 if(node.getMultiplicative() != null)
62 node.getMultiplicative().apply(this);
64 outAMultExpression(node);
67 public void inAPlusExpression(APlusExpression node)
72 public void outAPlusExpression(APlusExpression node)
78 public void caseAPlusExpression(APlusExpression node)
80 inAPlusExpression(node);
81 if(node.getLeft() != null)
83 node.getLeft().apply(this);
85 if(node.getPlus() != null)
87 node.getPlus().apply(this);
89 if(node.getRight() != null)
91 node.getRight().apply(this);
93 outAPlusExpression(node);
96 public void inAMinusExpression(AMinusExpression node)
101 public void outAMinusExpression(AMinusExpression node)
107 public void caseAMinusExpression(AMinusExpression node)
109 inAMinusExpression(node);
110 if(node.getExpression() != null)
112 node.getExpression().apply(this);
114 if(node.getMinus() != null)
116 node.getMinus().apply(this);
118 if(node.getMultiplicative() != null)
120 node.getMultiplicative().apply(this);
122 outAMinusExpression(node);
125 public void inAUnaryMultiplicative(AUnaryMultiplicative node)
130 public void outAUnaryMultiplicative(AUnaryMultiplicative node)
136 public void caseAUnaryMultiplicative(AUnaryMultiplicative node)
138 inAUnaryMultiplicative(node);
139 if(node.getUnary() != null)
141 node.getUnary().apply(this);
143 outAUnaryMultiplicative(node);
146 public void inAMultMultiplicative(AMultMultiplicative node)
151 public void outAMultMultiplicative(AMultMultiplicative node)
157 public void caseAMultMultiplicative(AMultMultiplicative node)
159 inAMultMultiplicative(node);
160 if(node.getLeft() != null)
162 node.getLeft().apply(this);
164 if(node.getMult() != null)
166 node.getMult().apply(this);
168 if(node.getRight() != null)
170 node.getRight().apply(this);
172 outAMultMultiplicative(node);
175 public void inADivMultiplicative(ADivMultiplicative node)
180 public void outADivMultiplicative(ADivMultiplicative node)
186 public void caseADivMultiplicative(ADivMultiplicative node)
188 inADivMultiplicative(node);
189 if(node.getLeft() != null)
191 node.getLeft().apply(this);
193 if(node.getDiv() != null)
195 node.getDiv().apply(this);
197 if(node.getRight() != null)
199 node.getRight().apply(this);
201 outADivMultiplicative(node);
204 public void inAPrimaryUnary(APrimaryUnary node)
209 public void outAPrimaryUnary(APrimaryUnary node)
215 public void caseAPrimaryUnary(APrimaryUnary node)
217 inAPrimaryUnary(node);
218 if(node.getPrimary() != null)
220 node.getPrimary().apply(this);
222 outAPrimaryUnary(node);
225 public void inAUnaryplusUnary(AUnaryplusUnary node)
230 public void outAUnaryplusUnary(AUnaryplusUnary node)
236 public void caseAUnaryplusUnary(AUnaryplusUnary node)
238 inAUnaryplusUnary(node);
239 if(node.getPlus() != null)
241 node.getPlus().apply(this);
243 if(node.getUnary() != null)
245 node.getUnary().apply(this);
247 outAUnaryplusUnary(node);
250 public void inAUnaryminusUnary(AUnaryminusUnary node)
255 public void outAUnaryminusUnary(AUnaryminusUnary node)
261 public void caseAUnaryminusUnary(AUnaryminusUnary node)
263 inAUnaryminusUnary(node);
264 if(node.getMinus() != null)
266 node.getMinus().apply(this);
268 if(node.getUnary() != null)
270 node.getUnary().apply(this);
272 outAUnaryminusUnary(node);
275 public void inASingleArgList(ASingleArgList node)
280 public void outASingleArgList(ASingleArgList node)
286 public void caseASingleArgList(ASingleArgList node)
288 inASingleArgList(node);
289 if(node.getExpression() != null)
291 node.getExpression().apply(this);
293 outASingleArgList(node);
296 public void inASequenceArgList(ASequenceArgList node)
301 public void outASequenceArgList(ASequenceArgList node)
307 public void caseASequenceArgList(ASequenceArgList node)
309 inASequenceArgList(node);
310 if(node.getArgList() != null)
312 node.getArgList().apply(this);
314 if(node.getComma() != null)
316 node.getComma().apply(this);
318 if(node.getExpression() != null)
320 node.getExpression().apply(this);
322 outASequenceArgList(node);
325 public void inAValuePrimary(AValuePrimary node)
330 public void outAValuePrimary(AValuePrimary node)
336 public void caseAValuePrimary(AValuePrimary node)
338 inAValuePrimary(node);
339 if(node.getValue() != null)
341 node.getValue().apply(this);
343 outAValuePrimary(node);
346 public void inAVariablePrimary(AVariablePrimary node)
351 public void outAVariablePrimary(AVariablePrimary node)
357 public void caseAVariablePrimary(AVariablePrimary node)
359 inAVariablePrimary(node);
360 if(node.getVariable() != null)
362 node.getVariable().apply(this);
364 outAVariablePrimary(node);
367 public void inAFunctionPrimary(AFunctionPrimary node)
372 public void outAFunctionPrimary(AFunctionPrimary node)
378 public void caseAFunctionPrimary(AFunctionPrimary node)
380 inAFunctionPrimary(node);
381 if(node.getFunc() != null)
383 node.getFunc().apply(this);
385 if(node.getArgList() != null)
387 node.getArgList().apply(this);
389 if(node.getRPar() != null)
391 node.getRPar().apply(this);
393 outAFunctionPrimary(node);
396 public void inASingleRange(ASingleRange node)
401 public void outASingleRange(ASingleRange node)
407 public void caseASingleRange(ASingleRange node)
409 inASingleRange(node);
410 if(node.getCell() != null)
412 node.getCell().apply(this);
414 outASingleRange(node);
417 public void inAMultiRange(AMultiRange node)
422 public void outAMultiRange(AMultiRange node)
428 public void caseAMultiRange(AMultiRange node)
431 if(node.getLeft() != null)
433 node.getLeft().apply(this);
435 if(node.getColon() != null)
437 node.getColon().apply(this);
439 if(node.getRight() != null)
441 node.getRight().apply(this);
443 outAMultiRange(node);
446 public void inARviValue(ARviValue node)
451 public void outARviValue(ARviValue node)
457 public void caseARviValue(ARviValue node)
460 if(node.getRvi() != null)
462 node.getRvi().apply(this);
467 public void inAStringValue(AStringValue node)
472 public void outAStringValue(AStringValue node)
478 public void caseAStringValue(AStringValue node)
480 inAStringValue(node);
481 if(node.getString() != null)
483 node.getString().apply(this);
485 outAStringValue(node);
488 public void inAConstantValue(AConstantValue node)
493 public void outAConstantValue(AConstantValue node)
499 public void caseAConstantValue(AConstantValue node)
501 inAConstantValue(node);
502 if(node.getNumber() != null)
504 node.getNumber().apply(this);
506 outAConstantValue(node);
509 public void inARangeValue(ARangeValue node)
514 public void outARangeValue(ARangeValue node)
520 public void caseARangeValue(ARangeValue node)
523 if(node.getRange() != null)
525 node.getRange().apply(this);
527 outARangeValue(node);
530 public void inAAddressValue(AAddressValue node)
535 public void outAAddressValue(AAddressValue node)
541 public void caseAAddressValue(AAddressValue node)
543 inAAddressValue(node);
544 if(node.getAmpersand() != null)
546 node.getAmpersand().apply(this);
548 if(node.getRange() != null)
550 node.getRange().apply(this);
552 outAAddressValue(node);
555 public void inAExprValue(AExprValue node)
560 public void outAExprValue(AExprValue node)
566 public void caseAExprValue(AExprValue node)
569 if(node.getLPar() != null)
571 node.getLPar().apply(this);
573 if(node.getExpression() != null)
575 node.getExpression().apply(this);
577 if(node.getRPar() != null)
579 node.getRPar().apply(this);