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 ReversedDepthFirstAdapter extends AnalysisAdapter
10 public void inStart(Start node)
15 public void outStart(Start node)
20 public void defaultIn(@SuppressWarnings("unused") Node node)
25 public void defaultOut(@SuppressWarnings("unused") Node node)
31 public void caseStart(Start node)
34 node.getEOF().apply(this);
35 node.getPExpression().apply(this);
39 public void inAMultExpression(AMultExpression node)
44 public void outAMultExpression(AMultExpression node)
50 public void caseAMultExpression(AMultExpression node)
52 inAMultExpression(node);
53 if(node.getMultiplicative() != null)
55 node.getMultiplicative().apply(this);
57 outAMultExpression(node);
60 public void inAPlusExpression(APlusExpression node)
65 public void outAPlusExpression(APlusExpression node)
71 public void caseAPlusExpression(APlusExpression node)
73 inAPlusExpression(node);
74 if(node.getRight() != null)
76 node.getRight().apply(this);
78 if(node.getPlus() != null)
80 node.getPlus().apply(this);
82 if(node.getLeft() != null)
84 node.getLeft().apply(this);
86 outAPlusExpression(node);
89 public void inAMinusExpression(AMinusExpression node)
94 public void outAMinusExpression(AMinusExpression node)
100 public void caseAMinusExpression(AMinusExpression node)
102 inAMinusExpression(node);
103 if(node.getMultiplicative() != null)
105 node.getMultiplicative().apply(this);
107 if(node.getMinus() != null)
109 node.getMinus().apply(this);
111 if(node.getExpression() != null)
113 node.getExpression().apply(this);
115 outAMinusExpression(node);
118 public void inAUnaryMultiplicative(AUnaryMultiplicative node)
123 public void outAUnaryMultiplicative(AUnaryMultiplicative node)
129 public void caseAUnaryMultiplicative(AUnaryMultiplicative node)
131 inAUnaryMultiplicative(node);
132 if(node.getUnary() != null)
134 node.getUnary().apply(this);
136 outAUnaryMultiplicative(node);
139 public void inAMultMultiplicative(AMultMultiplicative node)
144 public void outAMultMultiplicative(AMultMultiplicative node)
150 public void caseAMultMultiplicative(AMultMultiplicative node)
152 inAMultMultiplicative(node);
153 if(node.getRight() != null)
155 node.getRight().apply(this);
157 if(node.getMult() != null)
159 node.getMult().apply(this);
161 if(node.getLeft() != null)
163 node.getLeft().apply(this);
165 outAMultMultiplicative(node);
168 public void inADivMultiplicative(ADivMultiplicative node)
173 public void outADivMultiplicative(ADivMultiplicative node)
179 public void caseADivMultiplicative(ADivMultiplicative node)
181 inADivMultiplicative(node);
182 if(node.getRight() != null)
184 node.getRight().apply(this);
186 if(node.getDiv() != null)
188 node.getDiv().apply(this);
190 if(node.getLeft() != null)
192 node.getLeft().apply(this);
194 outADivMultiplicative(node);
197 public void inAPrimaryUnary(APrimaryUnary node)
202 public void outAPrimaryUnary(APrimaryUnary node)
208 public void caseAPrimaryUnary(APrimaryUnary node)
210 inAPrimaryUnary(node);
211 if(node.getPrimary() != null)
213 node.getPrimary().apply(this);
215 outAPrimaryUnary(node);
218 public void inAUnaryplusUnary(AUnaryplusUnary node)
223 public void outAUnaryplusUnary(AUnaryplusUnary node)
229 public void caseAUnaryplusUnary(AUnaryplusUnary node)
231 inAUnaryplusUnary(node);
232 if(node.getUnary() != null)
234 node.getUnary().apply(this);
236 if(node.getPlus() != null)
238 node.getPlus().apply(this);
240 outAUnaryplusUnary(node);
243 public void inAUnaryminusUnary(AUnaryminusUnary node)
248 public void outAUnaryminusUnary(AUnaryminusUnary node)
254 public void caseAUnaryminusUnary(AUnaryminusUnary node)
256 inAUnaryminusUnary(node);
257 if(node.getUnary() != null)
259 node.getUnary().apply(this);
261 if(node.getMinus() != null)
263 node.getMinus().apply(this);
265 outAUnaryminusUnary(node);
268 public void inASingleArgList(ASingleArgList node)
273 public void outASingleArgList(ASingleArgList node)
279 public void caseASingleArgList(ASingleArgList node)
281 inASingleArgList(node);
282 if(node.getExpression() != null)
284 node.getExpression().apply(this);
286 outASingleArgList(node);
289 public void inASequenceArgList(ASequenceArgList node)
294 public void outASequenceArgList(ASequenceArgList node)
300 public void caseASequenceArgList(ASequenceArgList node)
302 inASequenceArgList(node);
303 if(node.getExpression() != null)
305 node.getExpression().apply(this);
307 if(node.getComma() != null)
309 node.getComma().apply(this);
311 if(node.getArgList() != null)
313 node.getArgList().apply(this);
315 outASequenceArgList(node);
318 public void inAValuePrimary(AValuePrimary node)
323 public void outAValuePrimary(AValuePrimary node)
329 public void caseAValuePrimary(AValuePrimary node)
331 inAValuePrimary(node);
332 if(node.getValue() != null)
334 node.getValue().apply(this);
336 outAValuePrimary(node);
339 public void inAVariablePrimary(AVariablePrimary node)
344 public void outAVariablePrimary(AVariablePrimary node)
350 public void caseAVariablePrimary(AVariablePrimary node)
352 inAVariablePrimary(node);
353 if(node.getVariable() != null)
355 node.getVariable().apply(this);
357 outAVariablePrimary(node);
360 public void inAFunctionPrimary(AFunctionPrimary node)
365 public void outAFunctionPrimary(AFunctionPrimary node)
371 public void caseAFunctionPrimary(AFunctionPrimary node)
373 inAFunctionPrimary(node);
374 if(node.getRPar() != null)
376 node.getRPar().apply(this);
378 if(node.getArgList() != null)
380 node.getArgList().apply(this);
382 if(node.getFunc() != null)
384 node.getFunc().apply(this);
386 outAFunctionPrimary(node);
389 public void inASingleRange(ASingleRange node)
394 public void outASingleRange(ASingleRange node)
400 public void caseASingleRange(ASingleRange node)
402 inASingleRange(node);
403 if(node.getCell() != null)
405 node.getCell().apply(this);
407 outASingleRange(node);
410 public void inAMultiRange(AMultiRange node)
415 public void outAMultiRange(AMultiRange node)
421 public void caseAMultiRange(AMultiRange node)
424 if(node.getRight() != null)
426 node.getRight().apply(this);
428 if(node.getColon() != null)
430 node.getColon().apply(this);
432 if(node.getLeft() != null)
434 node.getLeft().apply(this);
436 outAMultiRange(node);
439 public void inARviValue(ARviValue node)
444 public void outARviValue(ARviValue node)
450 public void caseARviValue(ARviValue node)
453 if(node.getRvi() != null)
455 node.getRvi().apply(this);
460 public void inAStringValue(AStringValue node)
465 public void outAStringValue(AStringValue node)
471 public void caseAStringValue(AStringValue node)
473 inAStringValue(node);
474 if(node.getString() != null)
476 node.getString().apply(this);
478 outAStringValue(node);
481 public void inAConstantValue(AConstantValue node)
486 public void outAConstantValue(AConstantValue node)
492 public void caseAConstantValue(AConstantValue node)
494 inAConstantValue(node);
495 if(node.getNumber() != null)
497 node.getNumber().apply(this);
499 outAConstantValue(node);
502 public void inARangeValue(ARangeValue node)
507 public void outARangeValue(ARangeValue node)
513 public void caseARangeValue(ARangeValue node)
516 if(node.getRange() != null)
518 node.getRange().apply(this);
520 outARangeValue(node);
523 public void inAAddressValue(AAddressValue node)
528 public void outAAddressValue(AAddressValue node)
534 public void caseAAddressValue(AAddressValue node)
536 inAAddressValue(node);
537 if(node.getRange() != null)
539 node.getRange().apply(this);
541 if(node.getAmpersand() != null)
543 node.getAmpersand().apply(this);
545 outAAddressValue(node);
548 public void inAExprValue(AExprValue node)
553 public void outAExprValue(AExprValue node)
559 public void caseAExprValue(AExprValue node)
562 if(node.getRPar() != null)
564 node.getRPar().apply(this);
566 if(node.getExpression() != null)
568 node.getExpression().apply(this);
570 if(node.getLPar() != null)
572 node.getLPar().apply(this);