001: /* This file was generated by SableCC (http://www.sablecc.org/). */
002:
003: package org.sablecc.sablecc.analysis;
004:
005: import org.sablecc.sablecc.node.*;
006:
007: public class ReversedDepthFirstAdapter extends AnalysisAdapter {
008: public void inStart(Start node) {
009: defaultIn(node);
010: }
011:
012: public void outStart(Start node) {
013: defaultOut(node);
014: }
015:
016: public void defaultIn(Node node) {
017: }
018:
019: public void defaultOut(Node node) {
020: }
021:
022: public void caseStart(Start node) {
023: inStart(node);
024: node.getEOF().apply(this );
025: node.getPGrammar().apply(this );
026: outStart(node);
027: }
028:
029: public void inAGrammar(AGrammar node) {
030: defaultIn(node);
031: }
032:
033: public void outAGrammar(AGrammar node) {
034: defaultOut(node);
035: }
036:
037: public void caseAGrammar(AGrammar node) {
038: inAGrammar(node);
039: if (node.getAst() != null) {
040: node.getAst().apply(this );
041: }
042: if (node.getProductions() != null) {
043: node.getProductions().apply(this );
044: }
045: if (node.getIgnTokens() != null) {
046: node.getIgnTokens().apply(this );
047: }
048: if (node.getTokens() != null) {
049: node.getTokens().apply(this );
050: }
051: if (node.getStates() != null) {
052: node.getStates().apply(this );
053: }
054: if (node.getHelpers() != null) {
055: node.getHelpers().apply(this );
056: }
057: {
058: Object temp[] = node.getPackage().toArray();
059: for (int i = temp.length - 1; i >= 0; i--) {
060: ((TPkgId) temp[i]).apply(this );
061: }
062: }
063: outAGrammar(node);
064: }
065:
066: public void inAHelpers(AHelpers node) {
067: defaultIn(node);
068: }
069:
070: public void outAHelpers(AHelpers node) {
071: defaultOut(node);
072: }
073:
074: public void caseAHelpers(AHelpers node) {
075: inAHelpers(node);
076: {
077: Object temp[] = node.getHelperDefs().toArray();
078: for (int i = temp.length - 1; i >= 0; i--) {
079: ((PHelperDef) temp[i]).apply(this );
080: }
081: }
082: outAHelpers(node);
083: }
084:
085: public void inAHelperDef(AHelperDef node) {
086: defaultIn(node);
087: }
088:
089: public void outAHelperDef(AHelperDef node) {
090: defaultOut(node);
091: }
092:
093: public void caseAHelperDef(AHelperDef node) {
094: inAHelperDef(node);
095: if (node.getRegExp() != null) {
096: node.getRegExp().apply(this );
097: }
098: if (node.getId() != null) {
099: node.getId().apply(this );
100: }
101: outAHelperDef(node);
102: }
103:
104: public void inAStates(AStates node) {
105: defaultIn(node);
106: }
107:
108: public void outAStates(AStates node) {
109: defaultOut(node);
110: }
111:
112: public void caseAStates(AStates node) {
113: inAStates(node);
114: {
115: Object temp[] = node.getListId().toArray();
116: for (int i = temp.length - 1; i >= 0; i--) {
117: ((TId) temp[i]).apply(this );
118: }
119: }
120: outAStates(node);
121: }
122:
123: public void inATokens(ATokens node) {
124: defaultIn(node);
125: }
126:
127: public void outATokens(ATokens node) {
128: defaultOut(node);
129: }
130:
131: public void caseATokens(ATokens node) {
132: inATokens(node);
133: {
134: Object temp[] = node.getTokenDefs().toArray();
135: for (int i = temp.length - 1; i >= 0; i--) {
136: ((PTokenDef) temp[i]).apply(this );
137: }
138: }
139: outATokens(node);
140: }
141:
142: public void inATokenDef(ATokenDef node) {
143: defaultIn(node);
144: }
145:
146: public void outATokenDef(ATokenDef node) {
147: defaultOut(node);
148: }
149:
150: public void caseATokenDef(ATokenDef node) {
151: inATokenDef(node);
152: if (node.getLookAhead() != null) {
153: node.getLookAhead().apply(this );
154: }
155: if (node.getSlash() != null) {
156: node.getSlash().apply(this );
157: }
158: if (node.getRegExp() != null) {
159: node.getRegExp().apply(this );
160: }
161: if (node.getId() != null) {
162: node.getId().apply(this );
163: }
164: if (node.getStateList() != null) {
165: node.getStateList().apply(this );
166: }
167: outATokenDef(node);
168: }
169:
170: public void inAStateList(AStateList node) {
171: defaultIn(node);
172: }
173:
174: public void outAStateList(AStateList node) {
175: defaultOut(node);
176: }
177:
178: public void caseAStateList(AStateList node) {
179: inAStateList(node);
180: {
181: Object temp[] = node.getStateLists().toArray();
182: for (int i = temp.length - 1; i >= 0; i--) {
183: ((PStateListTail) temp[i]).apply(this );
184: }
185: }
186: if (node.getTransition() != null) {
187: node.getTransition().apply(this );
188: }
189: if (node.getId() != null) {
190: node.getId().apply(this );
191: }
192: outAStateList(node);
193: }
194:
195: public void inAStateListTail(AStateListTail node) {
196: defaultIn(node);
197: }
198:
199: public void outAStateListTail(AStateListTail node) {
200: defaultOut(node);
201: }
202:
203: public void caseAStateListTail(AStateListTail node) {
204: inAStateListTail(node);
205: if (node.getTransition() != null) {
206: node.getTransition().apply(this );
207: }
208: if (node.getId() != null) {
209: node.getId().apply(this );
210: }
211: outAStateListTail(node);
212: }
213:
214: public void inATransition(ATransition node) {
215: defaultIn(node);
216: }
217:
218: public void outATransition(ATransition node) {
219: defaultOut(node);
220: }
221:
222: public void caseATransition(ATransition node) {
223: inATransition(node);
224: if (node.getId() != null) {
225: node.getId().apply(this );
226: }
227: outATransition(node);
228: }
229:
230: public void inAIgnTokens(AIgnTokens node) {
231: defaultIn(node);
232: }
233:
234: public void outAIgnTokens(AIgnTokens node) {
235: defaultOut(node);
236: }
237:
238: public void caseAIgnTokens(AIgnTokens node) {
239: inAIgnTokens(node);
240: {
241: Object temp[] = node.getListId().toArray();
242: for (int i = temp.length - 1; i >= 0; i--) {
243: ((TId) temp[i]).apply(this );
244: }
245: }
246: outAIgnTokens(node);
247: }
248:
249: public void inARegExp(ARegExp node) {
250: defaultIn(node);
251: }
252:
253: public void outARegExp(ARegExp node) {
254: defaultOut(node);
255: }
256:
257: public void caseARegExp(ARegExp node) {
258: inARegExp(node);
259: {
260: Object temp[] = node.getConcats().toArray();
261: for (int i = temp.length - 1; i >= 0; i--) {
262: ((PConcat) temp[i]).apply(this );
263: }
264: }
265: outARegExp(node);
266: }
267:
268: public void inAConcat(AConcat node) {
269: defaultIn(node);
270: }
271:
272: public void outAConcat(AConcat node) {
273: defaultOut(node);
274: }
275:
276: public void caseAConcat(AConcat node) {
277: inAConcat(node);
278: {
279: Object temp[] = node.getUnExps().toArray();
280: for (int i = temp.length - 1; i >= 0; i--) {
281: ((PUnExp) temp[i]).apply(this );
282: }
283: }
284: outAConcat(node);
285: }
286:
287: public void inAUnExp(AUnExp node) {
288: defaultIn(node);
289: }
290:
291: public void outAUnExp(AUnExp node) {
292: defaultOut(node);
293: }
294:
295: public void caseAUnExp(AUnExp node) {
296: inAUnExp(node);
297: if (node.getUnOp() != null) {
298: node.getUnOp().apply(this );
299: }
300: if (node.getBasic() != null) {
301: node.getBasic().apply(this );
302: }
303: outAUnExp(node);
304: }
305:
306: public void inACharBasic(ACharBasic node) {
307: defaultIn(node);
308: }
309:
310: public void outACharBasic(ACharBasic node) {
311: defaultOut(node);
312: }
313:
314: public void caseACharBasic(ACharBasic node) {
315: inACharBasic(node);
316: if (node.getChar() != null) {
317: node.getChar().apply(this );
318: }
319: outACharBasic(node);
320: }
321:
322: public void inASetBasic(ASetBasic node) {
323: defaultIn(node);
324: }
325:
326: public void outASetBasic(ASetBasic node) {
327: defaultOut(node);
328: }
329:
330: public void caseASetBasic(ASetBasic node) {
331: inASetBasic(node);
332: if (node.getSet() != null) {
333: node.getSet().apply(this );
334: }
335: outASetBasic(node);
336: }
337:
338: public void inAStringBasic(AStringBasic node) {
339: defaultIn(node);
340: }
341:
342: public void outAStringBasic(AStringBasic node) {
343: defaultOut(node);
344: }
345:
346: public void caseAStringBasic(AStringBasic node) {
347: inAStringBasic(node);
348: if (node.getString() != null) {
349: node.getString().apply(this );
350: }
351: outAStringBasic(node);
352: }
353:
354: public void inAIdBasic(AIdBasic node) {
355: defaultIn(node);
356: }
357:
358: public void outAIdBasic(AIdBasic node) {
359: defaultOut(node);
360: }
361:
362: public void caseAIdBasic(AIdBasic node) {
363: inAIdBasic(node);
364: if (node.getId() != null) {
365: node.getId().apply(this );
366: }
367: outAIdBasic(node);
368: }
369:
370: public void inARegExpBasic(ARegExpBasic node) {
371: defaultIn(node);
372: }
373:
374: public void outARegExpBasic(ARegExpBasic node) {
375: defaultOut(node);
376: }
377:
378: public void caseARegExpBasic(ARegExpBasic node) {
379: inARegExpBasic(node);
380: if (node.getRegExp() != null) {
381: node.getRegExp().apply(this );
382: }
383: outARegExpBasic(node);
384: }
385:
386: public void inACharChar(ACharChar node) {
387: defaultIn(node);
388: }
389:
390: public void outACharChar(ACharChar node) {
391: defaultOut(node);
392: }
393:
394: public void caseACharChar(ACharChar node) {
395: inACharChar(node);
396: if (node.getChar() != null) {
397: node.getChar().apply(this );
398: }
399: outACharChar(node);
400: }
401:
402: public void inADecChar(ADecChar node) {
403: defaultIn(node);
404: }
405:
406: public void outADecChar(ADecChar node) {
407: defaultOut(node);
408: }
409:
410: public void caseADecChar(ADecChar node) {
411: inADecChar(node);
412: if (node.getDecChar() != null) {
413: node.getDecChar().apply(this );
414: }
415: outADecChar(node);
416: }
417:
418: public void inAHexChar(AHexChar node) {
419: defaultIn(node);
420: }
421:
422: public void outAHexChar(AHexChar node) {
423: defaultOut(node);
424: }
425:
426: public void caseAHexChar(AHexChar node) {
427: inAHexChar(node);
428: if (node.getHexChar() != null) {
429: node.getHexChar().apply(this );
430: }
431: outAHexChar(node);
432: }
433:
434: public void inAOperationSet(AOperationSet node) {
435: defaultIn(node);
436: }
437:
438: public void outAOperationSet(AOperationSet node) {
439: defaultOut(node);
440: }
441:
442: public void caseAOperationSet(AOperationSet node) {
443: inAOperationSet(node);
444: if (node.getRight() != null) {
445: node.getRight().apply(this );
446: }
447: if (node.getBinOp() != null) {
448: node.getBinOp().apply(this );
449: }
450: if (node.getLeft() != null) {
451: node.getLeft().apply(this );
452: }
453: outAOperationSet(node);
454: }
455:
456: public void inAIntervalSet(AIntervalSet node) {
457: defaultIn(node);
458: }
459:
460: public void outAIntervalSet(AIntervalSet node) {
461: defaultOut(node);
462: }
463:
464: public void caseAIntervalSet(AIntervalSet node) {
465: inAIntervalSet(node);
466: if (node.getRight() != null) {
467: node.getRight().apply(this );
468: }
469: if (node.getLeft() != null) {
470: node.getLeft().apply(this );
471: }
472: outAIntervalSet(node);
473: }
474:
475: public void inAStarUnOp(AStarUnOp node) {
476: defaultIn(node);
477: }
478:
479: public void outAStarUnOp(AStarUnOp node) {
480: defaultOut(node);
481: }
482:
483: public void caseAStarUnOp(AStarUnOp node) {
484: inAStarUnOp(node);
485: if (node.getStar() != null) {
486: node.getStar().apply(this );
487: }
488: outAStarUnOp(node);
489: }
490:
491: public void inAQMarkUnOp(AQMarkUnOp node) {
492: defaultIn(node);
493: }
494:
495: public void outAQMarkUnOp(AQMarkUnOp node) {
496: defaultOut(node);
497: }
498:
499: public void caseAQMarkUnOp(AQMarkUnOp node) {
500: inAQMarkUnOp(node);
501: if (node.getQMark() != null) {
502: node.getQMark().apply(this );
503: }
504: outAQMarkUnOp(node);
505: }
506:
507: public void inAPlusUnOp(APlusUnOp node) {
508: defaultIn(node);
509: }
510:
511: public void outAPlusUnOp(APlusUnOp node) {
512: defaultOut(node);
513: }
514:
515: public void caseAPlusUnOp(APlusUnOp node) {
516: inAPlusUnOp(node);
517: if (node.getPlus() != null) {
518: node.getPlus().apply(this );
519: }
520: outAPlusUnOp(node);
521: }
522:
523: public void inAPlusBinOp(APlusBinOp node) {
524: defaultIn(node);
525: }
526:
527: public void outAPlusBinOp(APlusBinOp node) {
528: defaultOut(node);
529: }
530:
531: public void caseAPlusBinOp(APlusBinOp node) {
532: inAPlusBinOp(node);
533: outAPlusBinOp(node);
534: }
535:
536: public void inAMinusBinOp(AMinusBinOp node) {
537: defaultIn(node);
538: }
539:
540: public void outAMinusBinOp(AMinusBinOp node) {
541: defaultOut(node);
542: }
543:
544: public void caseAMinusBinOp(AMinusBinOp node) {
545: inAMinusBinOp(node);
546: outAMinusBinOp(node);
547: }
548:
549: public void inAProductions(AProductions node) {
550: defaultIn(node);
551: }
552:
553: public void outAProductions(AProductions node) {
554: defaultOut(node);
555: }
556:
557: public void caseAProductions(AProductions node) {
558: inAProductions(node);
559: {
560: Object temp[] = node.getProds().toArray();
561: for (int i = temp.length - 1; i >= 0; i--) {
562: ((PProd) temp[i]).apply(this );
563: }
564: }
565: outAProductions(node);
566: }
567:
568: public void inAProd(AProd node) {
569: defaultIn(node);
570: }
571:
572: public void outAProd(AProd node) {
573: defaultOut(node);
574: }
575:
576: public void caseAProd(AProd node) {
577: inAProd(node);
578: {
579: Object temp[] = node.getAlts().toArray();
580: for (int i = temp.length - 1; i >= 0; i--) {
581: ((PAlt) temp[i]).apply(this );
582: }
583: }
584: {
585: Object temp[] = node.getProdTransform().toArray();
586: for (int i = temp.length - 1; i >= 0; i--) {
587: ((PElem) temp[i]).apply(this );
588: }
589: }
590: if (node.getArrow() != null) {
591: node.getArrow().apply(this );
592: }
593: if (node.getId() != null) {
594: node.getId().apply(this );
595: }
596: outAProd(node);
597: }
598:
599: public void inAAlt(AAlt node) {
600: defaultIn(node);
601: }
602:
603: public void outAAlt(AAlt node) {
604: defaultOut(node);
605: }
606:
607: public void caseAAlt(AAlt node) {
608: inAAlt(node);
609: if (node.getAltTransform() != null) {
610: node.getAltTransform().apply(this );
611: }
612: {
613: Object temp[] = node.getElems().toArray();
614: for (int i = temp.length - 1; i >= 0; i--) {
615: ((PElem) temp[i]).apply(this );
616: }
617: }
618: if (node.getAltName() != null) {
619: node.getAltName().apply(this );
620: }
621: outAAlt(node);
622: }
623:
624: public void inAAltTransform(AAltTransform node) {
625: defaultIn(node);
626: }
627:
628: public void outAAltTransform(AAltTransform node) {
629: defaultOut(node);
630: }
631:
632: public void caseAAltTransform(AAltTransform node) {
633: inAAltTransform(node);
634: if (node.getRBrace() != null) {
635: node.getRBrace().apply(this );
636: }
637: {
638: Object temp[] = node.getTerms().toArray();
639: for (int i = temp.length - 1; i >= 0; i--) {
640: ((PTerm) temp[i]).apply(this );
641: }
642: }
643: if (node.getLBrace() != null) {
644: node.getLBrace().apply(this );
645: }
646: outAAltTransform(node);
647: }
648:
649: public void inANewTerm(ANewTerm node) {
650: defaultIn(node);
651: }
652:
653: public void outANewTerm(ANewTerm node) {
654: defaultOut(node);
655: }
656:
657: public void caseANewTerm(ANewTerm node) {
658: inANewTerm(node);
659: {
660: Object temp[] = node.getParams().toArray();
661: for (int i = temp.length - 1; i >= 0; i--) {
662: ((PTerm) temp[i]).apply(this );
663: }
664: }
665: if (node.getLPar() != null) {
666: node.getLPar().apply(this );
667: }
668: if (node.getProdName() != null) {
669: node.getProdName().apply(this );
670: }
671: outANewTerm(node);
672: }
673:
674: public void inAListTerm(AListTerm node) {
675: defaultIn(node);
676: }
677:
678: public void outAListTerm(AListTerm node) {
679: defaultOut(node);
680: }
681:
682: public void caseAListTerm(AListTerm node) {
683: inAListTerm(node);
684: {
685: Object temp[] = node.getListTerms().toArray();
686: for (int i = temp.length - 1; i >= 0; i--) {
687: ((PListTerm) temp[i]).apply(this );
688: }
689: }
690: if (node.getLBkt() != null) {
691: node.getLBkt().apply(this );
692: }
693: outAListTerm(node);
694: }
695:
696: public void inASimpleTerm(ASimpleTerm node) {
697: defaultIn(node);
698: }
699:
700: public void outASimpleTerm(ASimpleTerm node) {
701: defaultOut(node);
702: }
703:
704: public void caseASimpleTerm(ASimpleTerm node) {
705: inASimpleTerm(node);
706: if (node.getSimpleTermTail() != null) {
707: node.getSimpleTermTail().apply(this );
708: }
709: if (node.getId() != null) {
710: node.getId().apply(this );
711: }
712: if (node.getSpecifier() != null) {
713: node.getSpecifier().apply(this );
714: }
715: outASimpleTerm(node);
716: }
717:
718: public void inANullTerm(ANullTerm node) {
719: defaultIn(node);
720: }
721:
722: public void outANullTerm(ANullTerm node) {
723: defaultOut(node);
724: }
725:
726: public void caseANullTerm(ANullTerm node) {
727: inANullTerm(node);
728: outANullTerm(node);
729: }
730:
731: public void inANewListTerm(ANewListTerm node) {
732: defaultIn(node);
733: }
734:
735: public void outANewListTerm(ANewListTerm node) {
736: defaultOut(node);
737: }
738:
739: public void caseANewListTerm(ANewListTerm node) {
740: inANewListTerm(node);
741: {
742: Object temp[] = node.getParams().toArray();
743: for (int i = temp.length - 1; i >= 0; i--) {
744: ((PTerm) temp[i]).apply(this );
745: }
746: }
747: if (node.getLPar() != null) {
748: node.getLPar().apply(this );
749: }
750: if (node.getProdName() != null) {
751: node.getProdName().apply(this );
752: }
753: outANewListTerm(node);
754: }
755:
756: public void inASimpleListTerm(ASimpleListTerm node) {
757: defaultIn(node);
758: }
759:
760: public void outASimpleListTerm(ASimpleListTerm node) {
761: defaultOut(node);
762: }
763:
764: public void caseASimpleListTerm(ASimpleListTerm node) {
765: inASimpleListTerm(node);
766: if (node.getSimpleTermTail() != null) {
767: node.getSimpleTermTail().apply(this );
768: }
769: if (node.getId() != null) {
770: node.getId().apply(this );
771: }
772: if (node.getSpecifier() != null) {
773: node.getSpecifier().apply(this );
774: }
775: outASimpleListTerm(node);
776: }
777:
778: public void inAProdName(AProdName node) {
779: defaultIn(node);
780: }
781:
782: public void outAProdName(AProdName node) {
783: defaultOut(node);
784: }
785:
786: public void caseAProdName(AProdName node) {
787: inAProdName(node);
788: if (node.getProdNameTail() != null) {
789: node.getProdNameTail().apply(this );
790: }
791: if (node.getId() != null) {
792: node.getId().apply(this );
793: }
794: outAProdName(node);
795: }
796:
797: public void inAElem(AElem node) {
798: defaultIn(node);
799: }
800:
801: public void outAElem(AElem node) {
802: defaultOut(node);
803: }
804:
805: public void caseAElem(AElem node) {
806: inAElem(node);
807: if (node.getUnOp() != null) {
808: node.getUnOp().apply(this );
809: }
810: if (node.getId() != null) {
811: node.getId().apply(this );
812: }
813: if (node.getSpecifier() != null) {
814: node.getSpecifier().apply(this );
815: }
816: if (node.getElemName() != null) {
817: node.getElemName().apply(this );
818: }
819: outAElem(node);
820: }
821:
822: public void inATokenSpecifier(ATokenSpecifier node) {
823: defaultIn(node);
824: }
825:
826: public void outATokenSpecifier(ATokenSpecifier node) {
827: defaultOut(node);
828: }
829:
830: public void caseATokenSpecifier(ATokenSpecifier node) {
831: inATokenSpecifier(node);
832: outATokenSpecifier(node);
833: }
834:
835: public void inAProductionSpecifier(AProductionSpecifier node) {
836: defaultIn(node);
837: }
838:
839: public void outAProductionSpecifier(AProductionSpecifier node) {
840: defaultOut(node);
841: }
842:
843: public void caseAProductionSpecifier(AProductionSpecifier node) {
844: inAProductionSpecifier(node);
845: outAProductionSpecifier(node);
846: }
847:
848: public void inAAst(AAst node) {
849: defaultIn(node);
850: }
851:
852: public void outAAst(AAst node) {
853: defaultOut(node);
854: }
855:
856: public void caseAAst(AAst node) {
857: inAAst(node);
858: {
859: Object temp[] = node.getProds().toArray();
860: for (int i = temp.length - 1; i >= 0; i--) {
861: ((PAstProd) temp[i]).apply(this );
862: }
863: }
864: outAAst(node);
865: }
866:
867: public void inAAstProd(AAstProd node) {
868: defaultIn(node);
869: }
870:
871: public void outAAstProd(AAstProd node) {
872: defaultOut(node);
873: }
874:
875: public void caseAAstProd(AAstProd node) {
876: inAAstProd(node);
877: {
878: Object temp[] = node.getAlts().toArray();
879: for (int i = temp.length - 1; i >= 0; i--) {
880: ((PAstAlt) temp[i]).apply(this );
881: }
882: }
883: if (node.getId() != null) {
884: node.getId().apply(this );
885: }
886: outAAstProd(node);
887: }
888:
889: public void inAAstAlt(AAstAlt node) {
890: defaultIn(node);
891: }
892:
893: public void outAAstAlt(AAstAlt node) {
894: defaultOut(node);
895: }
896:
897: public void caseAAstAlt(AAstAlt node) {
898: inAAstAlt(node);
899: {
900: Object temp[] = node.getElems().toArray();
901: for (int i = temp.length - 1; i >= 0; i--) {
902: ((PElem) temp[i]).apply(this);
903: }
904: }
905: if (node.getAltName() != null) {
906: node.getAltName().apply(this);
907: }
908: outAAstAlt(node);
909: }
910: }
|