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