]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.spreadsheet.common/src/org/simantics/spreadsheet/common/expression/analysis/ReversedDepthFirstAdapter.java
Migrated source code from Simantics SVN
[simantics/platform.git] / bundles / org.simantics.spreadsheet.common / src / org / simantics / spreadsheet / common / expression / analysis / ReversedDepthFirstAdapter.java
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
8  *\r
9  * Contributors:\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
13 \r
14 package org.simantics.spreadsheet.common.expression.analysis;\r
15 \r
16 import org.simantics.spreadsheet.common.expression.node.*;\r
17 \r
18 public class ReversedDepthFirstAdapter extends AnalysisAdapter\r
19 {\r
20     public void inStart(Start node)\r
21     {\r
22         defaultIn(node);\r
23     }\r
24 \r
25     public void outStart(Start node)\r
26     {\r
27         defaultOut(node);\r
28     }\r
29 \r
30     public void defaultIn(@SuppressWarnings("unused") Node node)\r
31     {\r
32         // Do nothing\r
33     }\r
34 \r
35     public void defaultOut(@SuppressWarnings("unused") Node node)\r
36     {\r
37         // Do nothing\r
38     }\r
39 \r
40     @Override\r
41     public void caseStart(Start node)\r
42     {\r
43         inStart(node);\r
44         node.getEOF().apply(this);\r
45         node.getPExpression().apply(this);\r
46         outStart(node);\r
47     }\r
48 \r
49     public void inAMultExpression(AMultExpression node)\r
50     {\r
51         defaultIn(node);\r
52     }\r
53 \r
54     public void outAMultExpression(AMultExpression node)\r
55     {\r
56         defaultOut(node);\r
57     }\r
58 \r
59     @Override\r
60     public void caseAMultExpression(AMultExpression node)\r
61     {\r
62         inAMultExpression(node);\r
63         if(node.getMultiplicative() != null)\r
64         {\r
65             node.getMultiplicative().apply(this);\r
66         }\r
67         outAMultExpression(node);\r
68     }\r
69 \r
70     public void inAPlusExpression(APlusExpression node)\r
71     {\r
72         defaultIn(node);\r
73     }\r
74 \r
75     public void outAPlusExpression(APlusExpression node)\r
76     {\r
77         defaultOut(node);\r
78     }\r
79 \r
80     @Override\r
81     public void caseAPlusExpression(APlusExpression node)\r
82     {\r
83         inAPlusExpression(node);\r
84         if(node.getRight() != null)\r
85         {\r
86             node.getRight().apply(this);\r
87         }\r
88         if(node.getPlus() != null)\r
89         {\r
90             node.getPlus().apply(this);\r
91         }\r
92         if(node.getLeft() != null)\r
93         {\r
94             node.getLeft().apply(this);\r
95         }\r
96         outAPlusExpression(node);\r
97     }\r
98 \r
99     public void inAMinusExpression(AMinusExpression node)\r
100     {\r
101         defaultIn(node);\r
102     }\r
103 \r
104     public void outAMinusExpression(AMinusExpression node)\r
105     {\r
106         defaultOut(node);\r
107     }\r
108 \r
109     @Override\r
110     public void caseAMinusExpression(AMinusExpression node)\r
111     {\r
112         inAMinusExpression(node);\r
113         if(node.getMultiplicative() != null)\r
114         {\r
115             node.getMultiplicative().apply(this);\r
116         }\r
117         if(node.getMinus() != null)\r
118         {\r
119             node.getMinus().apply(this);\r
120         }\r
121         if(node.getExpression() != null)\r
122         {\r
123             node.getExpression().apply(this);\r
124         }\r
125         outAMinusExpression(node);\r
126     }\r
127 \r
128     public void inAUnaryMultiplicative(AUnaryMultiplicative node)\r
129     {\r
130         defaultIn(node);\r
131     }\r
132 \r
133     public void outAUnaryMultiplicative(AUnaryMultiplicative node)\r
134     {\r
135         defaultOut(node);\r
136     }\r
137 \r
138     @Override\r
139     public void caseAUnaryMultiplicative(AUnaryMultiplicative node)\r
140     {\r
141         inAUnaryMultiplicative(node);\r
142         if(node.getUnary() != null)\r
143         {\r
144             node.getUnary().apply(this);\r
145         }\r
146         outAUnaryMultiplicative(node);\r
147     }\r
148 \r
149     public void inAMultMultiplicative(AMultMultiplicative node)\r
150     {\r
151         defaultIn(node);\r
152     }\r
153 \r
154     public void outAMultMultiplicative(AMultMultiplicative node)\r
155     {\r
156         defaultOut(node);\r
157     }\r
158 \r
159     @Override\r
160     public void caseAMultMultiplicative(AMultMultiplicative node)\r
161     {\r
162         inAMultMultiplicative(node);\r
163         if(node.getRight() != null)\r
164         {\r
165             node.getRight().apply(this);\r
166         }\r
167         if(node.getMult() != null)\r
168         {\r
169             node.getMult().apply(this);\r
170         }\r
171         if(node.getLeft() != null)\r
172         {\r
173             node.getLeft().apply(this);\r
174         }\r
175         outAMultMultiplicative(node);\r
176     }\r
177 \r
178     public void inADivMultiplicative(ADivMultiplicative node)\r
179     {\r
180         defaultIn(node);\r
181     }\r
182 \r
183     public void outADivMultiplicative(ADivMultiplicative node)\r
184     {\r
185         defaultOut(node);\r
186     }\r
187 \r
188     @Override\r
189     public void caseADivMultiplicative(ADivMultiplicative node)\r
190     {\r
191         inADivMultiplicative(node);\r
192         if(node.getRight() != null)\r
193         {\r
194             node.getRight().apply(this);\r
195         }\r
196         if(node.getDiv() != null)\r
197         {\r
198             node.getDiv().apply(this);\r
199         }\r
200         if(node.getLeft() != null)\r
201         {\r
202             node.getLeft().apply(this);\r
203         }\r
204         outADivMultiplicative(node);\r
205     }\r
206 \r
207     public void inAPrimaryUnary(APrimaryUnary node)\r
208     {\r
209         defaultIn(node);\r
210     }\r
211 \r
212     public void outAPrimaryUnary(APrimaryUnary node)\r
213     {\r
214         defaultOut(node);\r
215     }\r
216 \r
217     @Override\r
218     public void caseAPrimaryUnary(APrimaryUnary node)\r
219     {\r
220         inAPrimaryUnary(node);\r
221         if(node.getPrimary() != null)\r
222         {\r
223             node.getPrimary().apply(this);\r
224         }\r
225         outAPrimaryUnary(node);\r
226     }\r
227 \r
228     public void inAUnaryplusUnary(AUnaryplusUnary node)\r
229     {\r
230         defaultIn(node);\r
231     }\r
232 \r
233     public void outAUnaryplusUnary(AUnaryplusUnary node)\r
234     {\r
235         defaultOut(node);\r
236     }\r
237 \r
238     @Override\r
239     public void caseAUnaryplusUnary(AUnaryplusUnary node)\r
240     {\r
241         inAUnaryplusUnary(node);\r
242         if(node.getUnary() != null)\r
243         {\r
244             node.getUnary().apply(this);\r
245         }\r
246         if(node.getPlus() != null)\r
247         {\r
248             node.getPlus().apply(this);\r
249         }\r
250         outAUnaryplusUnary(node);\r
251     }\r
252 \r
253     public void inAUnaryminusUnary(AUnaryminusUnary node)\r
254     {\r
255         defaultIn(node);\r
256     }\r
257 \r
258     public void outAUnaryminusUnary(AUnaryminusUnary node)\r
259     {\r
260         defaultOut(node);\r
261     }\r
262 \r
263     @Override\r
264     public void caseAUnaryminusUnary(AUnaryminusUnary node)\r
265     {\r
266         inAUnaryminusUnary(node);\r
267         if(node.getUnary() != null)\r
268         {\r
269             node.getUnary().apply(this);\r
270         }\r
271         if(node.getMinus() != null)\r
272         {\r
273             node.getMinus().apply(this);\r
274         }\r
275         outAUnaryminusUnary(node);\r
276     }\r
277 \r
278     public void inASingleArgList(ASingleArgList node)\r
279     {\r
280         defaultIn(node);\r
281     }\r
282 \r
283     public void outASingleArgList(ASingleArgList node)\r
284     {\r
285         defaultOut(node);\r
286     }\r
287 \r
288     @Override\r
289     public void caseASingleArgList(ASingleArgList node)\r
290     {\r
291         inASingleArgList(node);\r
292         if(node.getExpression() != null)\r
293         {\r
294             node.getExpression().apply(this);\r
295         }\r
296         outASingleArgList(node);\r
297     }\r
298 \r
299     public void inASequenceArgList(ASequenceArgList node)\r
300     {\r
301         defaultIn(node);\r
302     }\r
303 \r
304     public void outASequenceArgList(ASequenceArgList node)\r
305     {\r
306         defaultOut(node);\r
307     }\r
308 \r
309     @Override\r
310     public void caseASequenceArgList(ASequenceArgList node)\r
311     {\r
312         inASequenceArgList(node);\r
313         if(node.getExpression() != null)\r
314         {\r
315             node.getExpression().apply(this);\r
316         }\r
317         if(node.getComma() != null)\r
318         {\r
319             node.getComma().apply(this);\r
320         }\r
321         if(node.getArgList() != null)\r
322         {\r
323             node.getArgList().apply(this);\r
324         }\r
325         outASequenceArgList(node);\r
326     }\r
327 \r
328     public void inAValuePrimary(AValuePrimary node)\r
329     {\r
330         defaultIn(node);\r
331     }\r
332 \r
333     public void outAValuePrimary(AValuePrimary node)\r
334     {\r
335         defaultOut(node);\r
336     }\r
337 \r
338     @Override\r
339     public void caseAValuePrimary(AValuePrimary node)\r
340     {\r
341         inAValuePrimary(node);\r
342         if(node.getValue() != null)\r
343         {\r
344             node.getValue().apply(this);\r
345         }\r
346         outAValuePrimary(node);\r
347     }\r
348 \r
349     public void inAFunctionPrimary(AFunctionPrimary node)\r
350     {\r
351         defaultIn(node);\r
352     }\r
353 \r
354     public void outAFunctionPrimary(AFunctionPrimary node)\r
355     {\r
356         defaultOut(node);\r
357     }\r
358 \r
359     @Override\r
360     public void caseAFunctionPrimary(AFunctionPrimary node)\r
361     {\r
362         inAFunctionPrimary(node);\r
363         if(node.getRPar() != null)\r
364         {\r
365             node.getRPar().apply(this);\r
366         }\r
367         if(node.getArgList() != null)\r
368         {\r
369             node.getArgList().apply(this);\r
370         }\r
371         if(node.getFunc() != null)\r
372         {\r
373             node.getFunc().apply(this);\r
374         }\r
375         outAFunctionPrimary(node);\r
376     }\r
377 \r
378     public void inASingleRange(ASingleRange node)\r
379     {\r
380         defaultIn(node);\r
381     }\r
382 \r
383     public void outASingleRange(ASingleRange node)\r
384     {\r
385         defaultOut(node);\r
386     }\r
387 \r
388     @Override\r
389     public void caseASingleRange(ASingleRange node)\r
390     {\r
391         inASingleRange(node);\r
392         if(node.getCell() != null)\r
393         {\r
394             node.getCell().apply(this);\r
395         }\r
396         outASingleRange(node);\r
397     }\r
398 \r
399     public void inAMultiRange(AMultiRange node)\r
400     {\r
401         defaultIn(node);\r
402     }\r
403 \r
404     public void outAMultiRange(AMultiRange node)\r
405     {\r
406         defaultOut(node);\r
407     }\r
408 \r
409     @Override\r
410     public void caseAMultiRange(AMultiRange node)\r
411     {\r
412         inAMultiRange(node);\r
413         if(node.getRight() != null)\r
414         {\r
415             node.getRight().apply(this);\r
416         }\r
417         if(node.getColon() != null)\r
418         {\r
419             node.getColon().apply(this);\r
420         }\r
421         if(node.getLeft() != null)\r
422         {\r
423             node.getLeft().apply(this);\r
424         }\r
425         outAMultiRange(node);\r
426     }\r
427 \r
428     public void inAStringValue(AStringValue node)\r
429     {\r
430         defaultIn(node);\r
431     }\r
432 \r
433     public void outAStringValue(AStringValue node)\r
434     {\r
435         defaultOut(node);\r
436     }\r
437 \r
438     @Override\r
439     public void caseAStringValue(AStringValue node)\r
440     {\r
441         inAStringValue(node);\r
442         if(node.getString() != null)\r
443         {\r
444             node.getString().apply(this);\r
445         }\r
446         outAStringValue(node);\r
447     }\r
448 \r
449     public void inAConstantValue(AConstantValue node)\r
450     {\r
451         defaultIn(node);\r
452     }\r
453 \r
454     public void outAConstantValue(AConstantValue node)\r
455     {\r
456         defaultOut(node);\r
457     }\r
458 \r
459     @Override\r
460     public void caseAConstantValue(AConstantValue node)\r
461     {\r
462         inAConstantValue(node);\r
463         if(node.getNumber() != null)\r
464         {\r
465             node.getNumber().apply(this);\r
466         }\r
467         outAConstantValue(node);\r
468     }\r
469 \r
470     public void inARangeValue(ARangeValue node)\r
471     {\r
472         defaultIn(node);\r
473     }\r
474 \r
475     public void outARangeValue(ARangeValue node)\r
476     {\r
477         defaultOut(node);\r
478     }\r
479 \r
480     @Override\r
481     public void caseARangeValue(ARangeValue node)\r
482     {\r
483         inARangeValue(node);\r
484         if(node.getRange() != null)\r
485         {\r
486             node.getRange().apply(this);\r
487         }\r
488         outARangeValue(node);\r
489     }\r
490 \r
491     public void inAAddressValue(AAddressValue node)\r
492     {\r
493         defaultIn(node);\r
494     }\r
495 \r
496     public void outAAddressValue(AAddressValue node)\r
497     {\r
498         defaultOut(node);\r
499     }\r
500 \r
501     @Override\r
502     public void caseAAddressValue(AAddressValue node)\r
503     {\r
504         inAAddressValue(node);\r
505         if(node.getRange() != null)\r
506         {\r
507             node.getRange().apply(this);\r
508         }\r
509         if(node.getAmpersand() != null)\r
510         {\r
511             node.getAmpersand().apply(this);\r
512         }\r
513         outAAddressValue(node);\r
514     }\r
515 \r
516     public void inAExprValue(AExprValue node)\r
517     {\r
518         defaultIn(node);\r
519     }\r
520 \r
521     public void outAExprValue(AExprValue node)\r
522     {\r
523         defaultOut(node);\r
524     }\r
525 \r
526     @Override\r
527     public void caseAExprValue(AExprValue node)\r
528     {\r
529         inAExprValue(node);\r
530         if(node.getRPar() != null)\r
531         {\r
532             node.getRPar().apply(this);\r
533         }\r
534         if(node.getExpression() != null)\r
535         {\r
536             node.getExpression().apply(this);\r
537         }\r
538         if(node.getLPar() != null)\r
539         {\r
540             node.getLPar().apply(this);\r
541         }\r
542         outAExprValue(node);\r
543     }\r
544 }\r