1 /*******************************************************************************
\r
2 * Copyright (c) 2007, 2010 Association for Decentralized Information Management
\r
3 * in Industry THTH ry.
\r
4 * All rights reserved. This program and the accompanying materials
\r
5 * are made available under the terms of the Eclipse Public License v1.0
\r
6 * which accompanies this distribution, and is available at
\r
7 * http://www.eclipse.org/legal/epl-v10.html
\r
10 * VTT Technical Research Centre of Finland - initial API and implementation
\r
11 *******************************************************************************/
\r
12 /* This file was generated by SableCC (http://www.sablecc.org/). */
\r
14 package org.simantics.spreadsheet.common.expression.analysis;
\r
16 import org.simantics.spreadsheet.common.expression.node.*;
\r
18 public class DepthFirstAdapter extends AnalysisAdapter
\r
20 public void inStart(Start node)
\r
25 public void outStart(Start node)
\r
30 public void defaultIn(@SuppressWarnings("unused") Node node)
\r
35 public void defaultOut(@SuppressWarnings("unused") Node node)
\r
41 public void caseStart(Start node)
\r
44 node.getPExpression().apply(this);
\r
45 node.getEOF().apply(this);
\r
49 public void inAMultExpression(AMultExpression node)
\r
54 public void outAMultExpression(AMultExpression node)
\r
60 public void caseAMultExpression(AMultExpression node)
\r
62 inAMultExpression(node);
\r
63 if(node.getMultiplicative() != null)
\r
65 node.getMultiplicative().apply(this);
\r
67 outAMultExpression(node);
\r
70 public void inAPlusExpression(APlusExpression node)
\r
75 public void outAPlusExpression(APlusExpression node)
\r
81 public void caseAPlusExpression(APlusExpression node)
\r
83 inAPlusExpression(node);
\r
84 if(node.getLeft() != null)
\r
86 node.getLeft().apply(this);
\r
88 if(node.getPlus() != null)
\r
90 node.getPlus().apply(this);
\r
92 if(node.getRight() != null)
\r
94 node.getRight().apply(this);
\r
96 outAPlusExpression(node);
\r
99 public void inAMinusExpression(AMinusExpression node)
\r
104 public void outAMinusExpression(AMinusExpression node)
\r
110 public void caseAMinusExpression(AMinusExpression node)
\r
112 inAMinusExpression(node);
\r
113 if(node.getExpression() != null)
\r
115 node.getExpression().apply(this);
\r
117 if(node.getMinus() != null)
\r
119 node.getMinus().apply(this);
\r
121 if(node.getMultiplicative() != null)
\r
123 node.getMultiplicative().apply(this);
\r
125 outAMinusExpression(node);
\r
128 public void inAUnaryMultiplicative(AUnaryMultiplicative node)
\r
133 public void outAUnaryMultiplicative(AUnaryMultiplicative node)
\r
139 public void caseAUnaryMultiplicative(AUnaryMultiplicative node)
\r
141 inAUnaryMultiplicative(node);
\r
142 if(node.getUnary() != null)
\r
144 node.getUnary().apply(this);
\r
146 outAUnaryMultiplicative(node);
\r
149 public void inAMultMultiplicative(AMultMultiplicative node)
\r
154 public void outAMultMultiplicative(AMultMultiplicative node)
\r
160 public void caseAMultMultiplicative(AMultMultiplicative node)
\r
162 inAMultMultiplicative(node);
\r
163 if(node.getLeft() != null)
\r
165 node.getLeft().apply(this);
\r
167 if(node.getMult() != null)
\r
169 node.getMult().apply(this);
\r
171 if(node.getRight() != null)
\r
173 node.getRight().apply(this);
\r
175 outAMultMultiplicative(node);
\r
178 public void inADivMultiplicative(ADivMultiplicative node)
\r
183 public void outADivMultiplicative(ADivMultiplicative node)
\r
189 public void caseADivMultiplicative(ADivMultiplicative node)
\r
191 inADivMultiplicative(node);
\r
192 if(node.getLeft() != null)
\r
194 node.getLeft().apply(this);
\r
196 if(node.getDiv() != null)
\r
198 node.getDiv().apply(this);
\r
200 if(node.getRight() != null)
\r
202 node.getRight().apply(this);
\r
204 outADivMultiplicative(node);
\r
207 public void inAPrimaryUnary(APrimaryUnary node)
\r
212 public void outAPrimaryUnary(APrimaryUnary node)
\r
218 public void caseAPrimaryUnary(APrimaryUnary node)
\r
220 inAPrimaryUnary(node);
\r
221 if(node.getPrimary() != null)
\r
223 node.getPrimary().apply(this);
\r
225 outAPrimaryUnary(node);
\r
228 public void inAUnaryplusUnary(AUnaryplusUnary node)
\r
233 public void outAUnaryplusUnary(AUnaryplusUnary node)
\r
239 public void caseAUnaryplusUnary(AUnaryplusUnary node)
\r
241 inAUnaryplusUnary(node);
\r
242 if(node.getPlus() != null)
\r
244 node.getPlus().apply(this);
\r
246 if(node.getUnary() != null)
\r
248 node.getUnary().apply(this);
\r
250 outAUnaryplusUnary(node);
\r
253 public void inAUnaryminusUnary(AUnaryminusUnary node)
\r
258 public void outAUnaryminusUnary(AUnaryminusUnary node)
\r
264 public void caseAUnaryminusUnary(AUnaryminusUnary node)
\r
266 inAUnaryminusUnary(node);
\r
267 if(node.getMinus() != null)
\r
269 node.getMinus().apply(this);
\r
271 if(node.getUnary() != null)
\r
273 node.getUnary().apply(this);
\r
275 outAUnaryminusUnary(node);
\r
278 public void inASingleArgList(ASingleArgList node)
\r
283 public void outASingleArgList(ASingleArgList node)
\r
289 public void caseASingleArgList(ASingleArgList node)
\r
291 inASingleArgList(node);
\r
292 if(node.getExpression() != null)
\r
294 node.getExpression().apply(this);
\r
296 outASingleArgList(node);
\r
299 public void inASequenceArgList(ASequenceArgList node)
\r
304 public void outASequenceArgList(ASequenceArgList node)
\r
310 public void caseASequenceArgList(ASequenceArgList node)
\r
312 inASequenceArgList(node);
\r
313 if(node.getArgList() != null)
\r
315 node.getArgList().apply(this);
\r
317 if(node.getComma() != null)
\r
319 node.getComma().apply(this);
\r
321 if(node.getExpression() != null)
\r
323 node.getExpression().apply(this);
\r
325 outASequenceArgList(node);
\r
328 public void inAValuePrimary(AValuePrimary node)
\r
333 public void outAValuePrimary(AValuePrimary node)
\r
339 public void caseAValuePrimary(AValuePrimary node)
\r
341 inAValuePrimary(node);
\r
342 if(node.getValue() != null)
\r
344 node.getValue().apply(this);
\r
346 outAValuePrimary(node);
\r
349 public void inAFunctionPrimary(AFunctionPrimary node)
\r
354 public void outAFunctionPrimary(AFunctionPrimary node)
\r
360 public void caseAFunctionPrimary(AFunctionPrimary node)
\r
362 inAFunctionPrimary(node);
\r
363 if(node.getFunc() != null)
\r
365 node.getFunc().apply(this);
\r
367 if(node.getArgList() != null)
\r
369 node.getArgList().apply(this);
\r
371 if(node.getRPar() != null)
\r
373 node.getRPar().apply(this);
\r
375 outAFunctionPrimary(node);
\r
378 public void inASingleRange(ASingleRange node)
\r
383 public void outASingleRange(ASingleRange node)
\r
389 public void caseASingleRange(ASingleRange node)
\r
391 inASingleRange(node);
\r
392 if(node.getCell() != null)
\r
394 node.getCell().apply(this);
\r
396 outASingleRange(node);
\r
399 public void inAMultiRange(AMultiRange node)
\r
404 public void outAMultiRange(AMultiRange node)
\r
410 public void caseAMultiRange(AMultiRange node)
\r
412 inAMultiRange(node);
\r
413 if(node.getLeft() != null)
\r
415 node.getLeft().apply(this);
\r
417 if(node.getColon() != null)
\r
419 node.getColon().apply(this);
\r
421 if(node.getRight() != null)
\r
423 node.getRight().apply(this);
\r
425 outAMultiRange(node);
\r
428 public void inAStringValue(AStringValue node)
\r
433 public void outAStringValue(AStringValue node)
\r
439 public void caseAStringValue(AStringValue node)
\r
441 inAStringValue(node);
\r
442 if(node.getString() != null)
\r
444 node.getString().apply(this);
\r
446 outAStringValue(node);
\r
449 public void inAConstantValue(AConstantValue node)
\r
454 public void outAConstantValue(AConstantValue node)
\r
460 public void caseAConstantValue(AConstantValue node)
\r
462 inAConstantValue(node);
\r
463 if(node.getNumber() != null)
\r
465 node.getNumber().apply(this);
\r
467 outAConstantValue(node);
\r
470 public void inARangeValue(ARangeValue node)
\r
475 public void outARangeValue(ARangeValue node)
\r
481 public void caseARangeValue(ARangeValue node)
\r
483 inARangeValue(node);
\r
484 if(node.getRange() != null)
\r
486 node.getRange().apply(this);
\r
488 outARangeValue(node);
\r
491 public void inAAddressValue(AAddressValue node)
\r
496 public void outAAddressValue(AAddressValue node)
\r
502 public void caseAAddressValue(AAddressValue node)
\r
504 inAAddressValue(node);
\r
505 if(node.getAmpersand() != null)
\r
507 node.getAmpersand().apply(this);
\r
509 if(node.getRange() != null)
\r
511 node.getRange().apply(this);
\r
513 outAAddressValue(node);
\r
516 public void inAExprValue(AExprValue node)
\r
521 public void outAExprValue(AExprValue node)
\r
527 public void caseAExprValue(AExprValue node)
\r
529 inAExprValue(node);
\r
530 if(node.getLPar() != null)
\r
532 node.getLPar().apply(this);
\r
534 if(node.getExpression() != null)
\r
536 node.getExpression().apply(this);
\r
538 if(node.getRPar() != null)
\r
540 node.getRPar().apply(this);
\r
542 outAExprValue(node);
\r