0001: //
0002: // Generated by JTB 1.2.2
0003: //
0004:
0005: package xtc.lang.javacc.visitor;
0006:
0007: import xtc.lang.javacc.syntaxtree.*;
0008: import java.util.*;
0009:
0010: /**
0011: * Provides default methods which visit each node in the tree in depth-first
0012: * order. Your visitors may extend this class.
0013: */
0014: public class ObjectDepthFirst implements ObjectVisitor {
0015: //
0016: // Auto class visitors--probably don't need to be overridden.
0017: //
0018: public Object visit(NodeList n, Object argu) {
0019: Object _ret = null;
0020: int _count = 0;
0021: for (Enumeration e = n.elements(); e.hasMoreElements();) {
0022: ((Node) e.nextElement()).accept(this , argu);
0023: _count++;
0024: }
0025: return _ret;
0026: }
0027:
0028: public Object visit(NodeListOptional n, Object argu) {
0029: if (n.present()) {
0030: Object _ret = null;
0031: int _count = 0;
0032: for (Enumeration e = n.elements(); e.hasMoreElements();) {
0033: ((Node) e.nextElement()).accept(this , argu);
0034: _count++;
0035: }
0036: return _ret;
0037: } else
0038: return null;
0039: }
0040:
0041: public Object visit(NodeOptional n, Object argu) {
0042: if (n.present())
0043: return n.node.accept(this , argu);
0044: else
0045: return null;
0046: }
0047:
0048: public Object visit(NodeSequence n, Object argu) {
0049: Object _ret = null;
0050: int _count = 0;
0051: for (Enumeration e = n.elements(); e.hasMoreElements();) {
0052: ((Node) e.nextElement()).accept(this , argu);
0053: _count++;
0054: }
0055: return _ret;
0056: }
0057:
0058: public Object visit(NodeToken n, Object argu) {
0059: return null;
0060: }
0061:
0062: //
0063: // User-generated visitor methods below
0064: //
0065:
0066: /**
0067: * Visit the specified node.
0068: * <pre>
0069: * f0 -> [ PackageDeclaration() ]
0070: * f1 -> ( ImportDeclaration() )*
0071: * f2 -> ( TypeDeclaration() )*
0072: * f3 -> <EOF>
0073: * </pre>
0074: */
0075: public Object visit(CompilationUnit n, Object argu) {
0076: Object _ret = null;
0077: n.f0.accept(this , argu);
0078: n.f1.accept(this , argu);
0079: n.f2.accept(this , argu);
0080: n.f3.accept(this , argu);
0081: return _ret;
0082: }
0083:
0084: /**
0085: * Visit the specified node.
0086: * <pre>
0087: * f0 -> "package"
0088: * f1 -> Name()
0089: * f2 -> ";"
0090: * </pre>
0091: */
0092: public Object visit(PackageDeclaration n, Object argu) {
0093: Object _ret = null;
0094: n.f0.accept(this , argu);
0095: n.f1.accept(this , argu);
0096: n.f2.accept(this , argu);
0097: return _ret;
0098: }
0099:
0100: /**
0101: * Visit the specified node.
0102: * <pre>
0103: * f0 -> "import"
0104: * f1 -> Name()
0105: * f2 -> [ "." "*" ]
0106: * f3 -> ";"
0107: * </pre>
0108: */
0109: public Object visit(ImportDeclaration n, Object argu) {
0110: Object _ret = null;
0111: n.f0.accept(this , argu);
0112: n.f1.accept(this , argu);
0113: n.f2.accept(this , argu);
0114: n.f3.accept(this , argu);
0115: return _ret;
0116: }
0117:
0118: /**
0119: * Visit the specified node.
0120: * <pre>
0121: * f0 -> ClassDeclaration()
0122: * | InterfaceDeclaration()
0123: * | ";"
0124: * </pre>
0125: */
0126: public Object visit(TypeDeclaration n, Object argu) {
0127: Object _ret = null;
0128: n.f0.accept(this , argu);
0129: return _ret;
0130: }
0131:
0132: /**
0133: * Visit the specified node.
0134: * <pre>
0135: * f0 -> ( "abstract" | "final" | "public" | "strictfp" )*
0136: * f1 -> UnmodifiedClassDeclaration()
0137: * </pre>
0138: */
0139: public Object visit(ClassDeclaration n, Object argu) {
0140: Object _ret = null;
0141: n.f0.accept(this , argu);
0142: n.f1.accept(this , argu);
0143: return _ret;
0144: }
0145:
0146: /**
0147: * Visit the specified node.
0148: * <pre>
0149: * f0 -> "class"
0150: * f1 -> <IDENTIFIER>
0151: * f2 -> [ "extends" Name() ]
0152: * f3 -> [ "implements" NameList() ]
0153: * f4 -> ClassBody()
0154: * </pre>
0155: */
0156: public Object visit(UnmodifiedClassDeclaration n, Object argu) {
0157: Object _ret = null;
0158: n.f0.accept(this , argu);
0159: n.f1.accept(this , argu);
0160: n.f2.accept(this , argu);
0161: n.f3.accept(this , argu);
0162: n.f4.accept(this , argu);
0163: return _ret;
0164: }
0165:
0166: /**
0167: * Visit the specified node.
0168: * <pre>
0169: * f0 -> "{"
0170: * f1 -> ( ClassBodyDeclaration() )*
0171: * f2 -> "}"
0172: * </pre>
0173: */
0174: public Object visit(ClassBody n, Object argu) {
0175: Object _ret = null;
0176: n.f0.accept(this , argu);
0177: n.f1.accept(this , argu);
0178: n.f2.accept(this , argu);
0179: return _ret;
0180: }
0181:
0182: /**
0183: * Visit the specified node.
0184: * <pre>
0185: * f0 -> ( "static" | "abstract" | "final" | "public" | "protected" | "private" | "strictfp" )*
0186: * f1 -> UnmodifiedClassDeclaration()
0187: * </pre>
0188: */
0189: public Object visit(NestedClassDeclaration n, Object argu) {
0190: Object _ret = null;
0191: n.f0.accept(this , argu);
0192: n.f1.accept(this , argu);
0193: return _ret;
0194: }
0195:
0196: /**
0197: * Visit the specified node.
0198: * <pre>
0199: * f0 -> Initializer()
0200: * | NestedClassDeclaration()
0201: * | NestedInterfaceDeclaration()
0202: * | ConstructorDeclaration()
0203: * | MethodDeclaration()
0204: * | FieldDeclaration()
0205: * | ";"
0206: * </pre>
0207: */
0208: public Object visit(ClassBodyDeclaration n, Object argu) {
0209: Object _ret = null;
0210: n.f0.accept(this , argu);
0211: return _ret;
0212: }
0213:
0214: /**
0215: * Visit the specified node.
0216: * <pre>
0217: * f0 -> ( "public" | "protected" | "private" | "static" | "abstract" | "final" | "native" | "synchronized" | "strictfp" )*
0218: * f1 -> ResultType()
0219: * f2 -> <IDENTIFIER>
0220: * f3 -> "("
0221: * </pre>
0222: */
0223: public Object visit(MethodDeclarationLookahead n, Object argu) {
0224: Object _ret = null;
0225: n.f0.accept(this , argu);
0226: n.f1.accept(this , argu);
0227: n.f2.accept(this , argu);
0228: n.f3.accept(this , argu);
0229: return _ret;
0230: }
0231:
0232: /**
0233: * Visit the specified node.
0234: * <pre>
0235: * f0 -> ( "abstract" | "public" | "strictfp" )*
0236: * f1 -> UnmodifiedInterfaceDeclaration()
0237: * </pre>
0238: */
0239: public Object visit(InterfaceDeclaration n, Object argu) {
0240: Object _ret = null;
0241: n.f0.accept(this , argu);
0242: n.f1.accept(this , argu);
0243: return _ret;
0244: }
0245:
0246: /**
0247: * Visit the specified node.
0248: * <pre>
0249: * f0 -> ( "static" | "abstract" | "final" | "public" | "protected" | "private" | "strictfp" )*
0250: * f1 -> UnmodifiedInterfaceDeclaration()
0251: * </pre>
0252: */
0253: public Object visit(NestedInterfaceDeclaration n, Object argu) {
0254: Object _ret = null;
0255: n.f0.accept(this , argu);
0256: n.f1.accept(this , argu);
0257: return _ret;
0258: }
0259:
0260: /**
0261: * Visit the specified node.
0262: * <pre>
0263: * f0 -> "interface"
0264: * f1 -> <IDENTIFIER>
0265: * f2 -> [ "extends" NameList() ]
0266: * f3 -> "{"
0267: * f4 -> ( InterfaceMemberDeclaration() )*
0268: * f5 -> "}"
0269: * </pre>
0270: */
0271: public Object visit(UnmodifiedInterfaceDeclaration n, Object argu) {
0272: Object _ret = null;
0273: n.f0.accept(this , argu);
0274: n.f1.accept(this , argu);
0275: n.f2.accept(this , argu);
0276: n.f3.accept(this , argu);
0277: n.f4.accept(this , argu);
0278: n.f5.accept(this , argu);
0279: return _ret;
0280: }
0281:
0282: /**
0283: * Visit the specified node.
0284: * <pre>
0285: * f0 -> NestedClassDeclaration()
0286: * | NestedInterfaceDeclaration()
0287: * | MethodDeclaration()
0288: * | FieldDeclaration()
0289: * | ";"
0290: * </pre>
0291: */
0292: public Object visit(InterfaceMemberDeclaration n, Object argu) {
0293: Object _ret = null;
0294: n.f0.accept(this , argu);
0295: return _ret;
0296: }
0297:
0298: /**
0299: * Visit the specified node.
0300: * <pre>
0301: * f0 -> ( "public" | "protected" | "private" | "static" | "final" | "transient" | "volatile" )*
0302: * f1 -> Type()
0303: * f2 -> VariableDeclarator()
0304: * f3 -> ( "," VariableDeclarator() )*
0305: * f4 -> ";"
0306: * </pre>
0307: */
0308: public Object visit(FieldDeclaration n, Object argu) {
0309: Object _ret = null;
0310: n.f0.accept(this , argu);
0311: n.f1.accept(this , argu);
0312: n.f2.accept(this , argu);
0313: n.f3.accept(this , argu);
0314: n.f4.accept(this , argu);
0315: return _ret;
0316: }
0317:
0318: /**
0319: * Visit the specified node.
0320: * <pre>
0321: * f0 -> VariableDeclaratorId()
0322: * f1 -> [ "=" VariableInitializer() ]
0323: * </pre>
0324: */
0325: public Object visit(VariableDeclarator n, Object argu) {
0326: Object _ret = null;
0327: n.f0.accept(this , argu);
0328: n.f1.accept(this , argu);
0329: return _ret;
0330: }
0331:
0332: /**
0333: * Visit the specified node.
0334: * <pre>
0335: * f0 -> <IDENTIFIER>
0336: * f1 -> ( "[" "]" )*
0337: * </pre>
0338: */
0339: public Object visit(VariableDeclaratorId n, Object argu) {
0340: Object _ret = null;
0341: n.f0.accept(this , argu);
0342: n.f1.accept(this , argu);
0343: return _ret;
0344: }
0345:
0346: /**
0347: * Visit the specified node.
0348: * <pre>
0349: * f0 -> ArrayInitializer()
0350: * | Expression()
0351: * </pre>
0352: */
0353: public Object visit(VariableInitializer n, Object argu) {
0354: Object _ret = null;
0355: n.f0.accept(this , argu);
0356: return _ret;
0357: }
0358:
0359: /**
0360: * Visit the specified node.
0361: * <pre>
0362: * f0 -> "{"
0363: * f1 -> [ VariableInitializer() ( "," VariableInitializer() )* ]
0364: * f2 -> [ "," ]
0365: * f3 -> "}"
0366: * </pre>
0367: */
0368: public Object visit(ArrayInitializer n, Object argu) {
0369: Object _ret = null;
0370: n.f0.accept(this , argu);
0371: n.f1.accept(this , argu);
0372: n.f2.accept(this , argu);
0373: n.f3.accept(this , argu);
0374: return _ret;
0375: }
0376:
0377: /**
0378: * Visit the specified node.
0379: * <pre>
0380: * f0 -> ( "public" | "protected" | "private" | "static" | "abstract" | "final" | "native" | "synchronized" | "strictfp" )*
0381: * f1 -> ResultType()
0382: * f2 -> MethodDeclarator()
0383: * f3 -> [ "throws" NameList() ]
0384: * f4 -> ( Block() | ";" )
0385: * </pre>
0386: */
0387: public Object visit(MethodDeclaration n, Object argu) {
0388: Object _ret = null;
0389: n.f0.accept(this , argu);
0390: n.f1.accept(this , argu);
0391: n.f2.accept(this , argu);
0392: n.f3.accept(this , argu);
0393: n.f4.accept(this , argu);
0394: return _ret;
0395: }
0396:
0397: /**
0398: * Visit the specified node.
0399: * <pre>
0400: * f0 -> <IDENTIFIER>
0401: * f1 -> FormalParameters()
0402: * f2 -> ( "[" "]" )*
0403: * </pre>
0404: */
0405: public Object visit(MethodDeclarator n, Object argu) {
0406: Object _ret = null;
0407: n.f0.accept(this , argu);
0408: n.f1.accept(this , argu);
0409: n.f2.accept(this , argu);
0410: return _ret;
0411: }
0412:
0413: /**
0414: * Visit the specified node.
0415: * <pre>
0416: * f0 -> "("
0417: * f1 -> [ FormalParameter() ( "," FormalParameter() )* ]
0418: * f2 -> ")"
0419: * </pre>
0420: */
0421: public Object visit(FormalParameters n, Object argu) {
0422: Object _ret = null;
0423: n.f0.accept(this , argu);
0424: n.f1.accept(this , argu);
0425: n.f2.accept(this , argu);
0426: return _ret;
0427: }
0428:
0429: /**
0430: * Visit the specified node.
0431: * <pre>
0432: * f0 -> [ "final" ]
0433: * f1 -> Type()
0434: * f2 -> VariableDeclaratorId()
0435: * </pre>
0436: */
0437: public Object visit(FormalParameter n, Object argu) {
0438: Object _ret = null;
0439: n.f0.accept(this , argu);
0440: n.f1.accept(this , argu);
0441: n.f2.accept(this , argu);
0442: return _ret;
0443: }
0444:
0445: /**
0446: * Visit the specified node.
0447: * <pre>
0448: * f0 -> [ "public" | "protected" | "private" ]
0449: * f1 -> <IDENTIFIER>
0450: * f2 -> FormalParameters()
0451: * f3 -> [ "throws" NameList() ]
0452: * f4 -> "{"
0453: * f5 -> [ ExplicitConstructorInvocation() ]
0454: * f6 -> ( BlockStatement() )*
0455: * f7 -> "}"
0456: * </pre>
0457: */
0458: public Object visit(ConstructorDeclaration n, Object argu) {
0459: Object _ret = null;
0460: n.f0.accept(this , argu);
0461: n.f1.accept(this , argu);
0462: n.f2.accept(this , argu);
0463: n.f3.accept(this , argu);
0464: n.f4.accept(this , argu);
0465: n.f5.accept(this , argu);
0466: n.f6.accept(this , argu);
0467: n.f7.accept(this , argu);
0468: return _ret;
0469: }
0470:
0471: /**
0472: * Visit the specified node.
0473: * <pre>
0474: * f0 -> "this" Arguments() ";"
0475: * | [ PrimaryExpression() "." ] "super" Arguments() ";"
0476: * </pre>
0477: */
0478: public Object visit(ExplicitConstructorInvocation n, Object argu) {
0479: Object _ret = null;
0480: n.f0.accept(this , argu);
0481: return _ret;
0482: }
0483:
0484: /**
0485: * Visit the specified node.
0486: * <pre>
0487: * f0 -> [ "static" ]
0488: * f1 -> Block()
0489: * </pre>
0490: */
0491: public Object visit(Initializer n, Object argu) {
0492: Object _ret = null;
0493: n.f0.accept(this , argu);
0494: n.f1.accept(this , argu);
0495: return _ret;
0496: }
0497:
0498: /**
0499: * Visit the specified node.
0500: * <pre>
0501: * f0 -> ( PrimitiveType() | Name() )
0502: * f1 -> ( "[" "]" )*
0503: * </pre>
0504: */
0505: public Object visit(Type n, Object argu) {
0506: Object _ret = null;
0507: n.f0.accept(this , argu);
0508: n.f1.accept(this , argu);
0509: return _ret;
0510: }
0511:
0512: /**
0513: * Visit the specified node.
0514: * <pre>
0515: * f0 -> "boolean"
0516: * | "char"
0517: * | "byte"
0518: * | "short"
0519: * | "int"
0520: * | "long"
0521: * | "float"
0522: * | "double"
0523: * </pre>
0524: */
0525: public Object visit(PrimitiveType n, Object argu) {
0526: Object _ret = null;
0527: n.f0.accept(this , argu);
0528: return _ret;
0529: }
0530:
0531: /**
0532: * Visit the specified node.
0533: * <pre>
0534: * f0 -> "void"
0535: * | Type()
0536: * </pre>
0537: */
0538: public Object visit(ResultType n, Object argu) {
0539: Object _ret = null;
0540: n.f0.accept(this , argu);
0541: return _ret;
0542: }
0543:
0544: /**
0545: * Visit the specified node.
0546: * <pre>
0547: * f0 -> <IDENTIFIER>
0548: * f1 -> ( "." <IDENTIFIER> )*
0549: * </pre>
0550: */
0551: public Object visit(Name n, Object argu) {
0552: Object _ret = null;
0553: n.f0.accept(this , argu);
0554: n.f1.accept(this , argu);
0555: return _ret;
0556: }
0557:
0558: /**
0559: * Visit the specified node.
0560: * <pre>
0561: * f0 -> Name()
0562: * f1 -> ( "," Name() )*
0563: * </pre>
0564: */
0565: public Object visit(NameList n, Object argu) {
0566: Object _ret = null;
0567: n.f0.accept(this , argu);
0568: n.f1.accept(this , argu);
0569: return _ret;
0570: }
0571:
0572: /**
0573: * Visit the specified node.
0574: * <pre>
0575: * f0 -> ConditionalExpression()
0576: * f1 -> [ AssignmentOperator() Expression() ]
0577: * </pre>
0578: */
0579: public Object visit(Expression n, Object argu) {
0580: Object _ret = null;
0581: n.f0.accept(this , argu);
0582: n.f1.accept(this , argu);
0583: return _ret;
0584: }
0585:
0586: /**
0587: * Visit the specified node.
0588: * <pre>
0589: * f0 -> "="
0590: * | "*="
0591: * | "/="
0592: * | "%="
0593: * | "+="
0594: * | "-="
0595: * | "<<="
0596: * | ">>="
0597: * | ">>>="
0598: * | "&="
0599: * | "^="
0600: * | "|="
0601: * </pre>
0602: */
0603: public Object visit(AssignmentOperator n, Object argu) {
0604: Object _ret = null;
0605: n.f0.accept(this , argu);
0606: return _ret;
0607: }
0608:
0609: /**
0610: * Visit the specified node.
0611: * <pre>
0612: * f0 -> ConditionalOrExpression()
0613: * f1 -> [ "?" Expression() ":" ConditionalExpression() ]
0614: * </pre>
0615: */
0616: public Object visit(ConditionalExpression n, Object argu) {
0617: Object _ret = null;
0618: n.f0.accept(this , argu);
0619: n.f1.accept(this , argu);
0620: return _ret;
0621: }
0622:
0623: /**
0624: * Visit the specified node.
0625: * <pre>
0626: * f0 -> ConditionalAndExpression()
0627: * f1 -> ( "||" ConditionalAndExpression() )*
0628: * </pre>
0629: */
0630: public Object visit(ConditionalOrExpression n, Object argu) {
0631: Object _ret = null;
0632: n.f0.accept(this , argu);
0633: n.f1.accept(this , argu);
0634: return _ret;
0635: }
0636:
0637: /**
0638: * Visit the specified node.
0639: * <pre>
0640: * f0 -> InclusiveOrExpression()
0641: * f1 -> ( "&&" InclusiveOrExpression() )*
0642: * </pre>
0643: */
0644: public Object visit(ConditionalAndExpression n, Object argu) {
0645: Object _ret = null;
0646: n.f0.accept(this , argu);
0647: n.f1.accept(this , argu);
0648: return _ret;
0649: }
0650:
0651: /**
0652: * Visit the specified node.
0653: * <pre>
0654: * f0 -> ExclusiveOrExpression()
0655: * f1 -> ( "|" ExclusiveOrExpression() )*
0656: * </pre>
0657: */
0658: public Object visit(InclusiveOrExpression n, Object argu) {
0659: Object _ret = null;
0660: n.f0.accept(this , argu);
0661: n.f1.accept(this , argu);
0662: return _ret;
0663: }
0664:
0665: /**
0666: * Visit the specified node.
0667: * <pre>
0668: * f0 -> AndExpression()
0669: * f1 -> ( "^" AndExpression() )*
0670: * </pre>
0671: */
0672: public Object visit(ExclusiveOrExpression n, Object argu) {
0673: Object _ret = null;
0674: n.f0.accept(this , argu);
0675: n.f1.accept(this , argu);
0676: return _ret;
0677: }
0678:
0679: /**
0680: * Visit the specified node.
0681: * <pre>
0682: * f0 -> EqualityExpression()
0683: * f1 -> ( "&" EqualityExpression() )*
0684: * </pre>
0685: */
0686: public Object visit(AndExpression n, Object argu) {
0687: Object _ret = null;
0688: n.f0.accept(this , argu);
0689: n.f1.accept(this , argu);
0690: return _ret;
0691: }
0692:
0693: /**
0694: * Visit the specified node.
0695: * <pre>
0696: * f0 -> InstanceOfExpression()
0697: * f1 -> ( ( "==" | "!=" ) InstanceOfExpression() )*
0698: * </pre>
0699: */
0700: public Object visit(EqualityExpression n, Object argu) {
0701: Object _ret = null;
0702: n.f0.accept(this , argu);
0703: n.f1.accept(this , argu);
0704: return _ret;
0705: }
0706:
0707: /**
0708: * Visit the specified node.
0709: * <pre>
0710: * f0 -> RelationalExpression()
0711: * f1 -> [ "instanceof" Type() ]
0712: * </pre>
0713: */
0714: public Object visit(InstanceOfExpression n, Object argu) {
0715: Object _ret = null;
0716: n.f0.accept(this , argu);
0717: n.f1.accept(this , argu);
0718: return _ret;
0719: }
0720:
0721: /**
0722: * Visit the specified node.
0723: * <pre>
0724: * f0 -> ShiftExpression()
0725: * f1 -> ( ( "<" | ">" | "<=" | ">=" ) ShiftExpression() )*
0726: * </pre>
0727: */
0728: public Object visit(RelationalExpression n, Object argu) {
0729: Object _ret = null;
0730: n.f0.accept(this , argu);
0731: n.f1.accept(this , argu);
0732: return _ret;
0733: }
0734:
0735: /**
0736: * Visit the specified node.
0737: * <pre>
0738: * f0 -> AdditiveExpression()
0739: * f1 -> ( ( "<<" | ">>" | ">>>" ) AdditiveExpression() )*
0740: * </pre>
0741: */
0742: public Object visit(ShiftExpression n, Object argu) {
0743: Object _ret = null;
0744: n.f0.accept(this , argu);
0745: n.f1.accept(this , argu);
0746: return _ret;
0747: }
0748:
0749: /**
0750: * Visit the specified node.
0751: * <pre>
0752: * f0 -> MultiplicativeExpression()
0753: * f1 -> ( ( "+" | "-" ) MultiplicativeExpression() )*
0754: * </pre>
0755: */
0756: public Object visit(AdditiveExpression n, Object argu) {
0757: Object _ret = null;
0758: n.f0.accept(this , argu);
0759: n.f1.accept(this , argu);
0760: return _ret;
0761: }
0762:
0763: /**
0764: * Visit the specified node.
0765: * <pre>
0766: * f0 -> UnaryExpression()
0767: * f1 -> ( ( "*" | "/" | "%" ) UnaryExpression() )*
0768: * </pre>
0769: */
0770: public Object visit(MultiplicativeExpression n, Object argu) {
0771: Object _ret = null;
0772: n.f0.accept(this , argu);
0773: n.f1.accept(this , argu);
0774: return _ret;
0775: }
0776:
0777: /**
0778: * Visit the specified node.
0779: * <pre>
0780: * f0 -> ( "+" | "-" ) UnaryExpression()
0781: * | PreIncrementExpression()
0782: * | PreDecrementExpression()
0783: * | UnaryExpressionNotPlusMinus()
0784: * </pre>
0785: */
0786: public Object visit(UnaryExpression n, Object argu) {
0787: Object _ret = null;
0788: n.f0.accept(this , argu);
0789: return _ret;
0790: }
0791:
0792: /**
0793: * Visit the specified node.
0794: * <pre>
0795: * f0 -> "++"
0796: * f1 -> PrimaryExpression()
0797: * </pre>
0798: */
0799: public Object visit(PreIncrementExpression n, Object argu) {
0800: Object _ret = null;
0801: n.f0.accept(this , argu);
0802: n.f1.accept(this , argu);
0803: return _ret;
0804: }
0805:
0806: /**
0807: * Visit the specified node.
0808: * <pre>
0809: * f0 -> "--"
0810: * f1 -> PrimaryExpression()
0811: * </pre>
0812: */
0813: public Object visit(PreDecrementExpression n, Object argu) {
0814: Object _ret = null;
0815: n.f0.accept(this , argu);
0816: n.f1.accept(this , argu);
0817: return _ret;
0818: }
0819:
0820: /**
0821: * Visit the specified node.
0822: * <pre>
0823: * f0 -> ( "~" | "!" ) UnaryExpression()
0824: * | CastExpression()
0825: * | PostfixExpression()
0826: * </pre>
0827: */
0828: public Object visit(UnaryExpressionNotPlusMinus n, Object argu) {
0829: Object _ret = null;
0830: n.f0.accept(this , argu);
0831: return _ret;
0832: }
0833:
0834: /**
0835: * Visit the specified node.
0836: * <pre>
0837: * f0 -> "(" PrimitiveType()
0838: * | "(" Name() "[" "]"
0839: * | "(" Name() ")" ( "~" | "!" | "(" | <IDENTIFIER> | "this" | "super" | "new" | Literal() )
0840: * </pre>
0841: */
0842: public Object visit(CastLookahead n, Object argu) {
0843: Object _ret = null;
0844: n.f0.accept(this , argu);
0845: return _ret;
0846: }
0847:
0848: /**
0849: * Visit the specified node.
0850: * <pre>
0851: * f0 -> PrimaryExpression()
0852: * f1 -> [ "++" | "--" ]
0853: * </pre>
0854: */
0855: public Object visit(PostfixExpression n, Object argu) {
0856: Object _ret = null;
0857: n.f0.accept(this , argu);
0858: n.f1.accept(this , argu);
0859: return _ret;
0860: }
0861:
0862: /**
0863: * Visit the specified node.
0864: * <pre>
0865: * f0 -> "(" Type() ")" UnaryExpression()
0866: * | "(" Type() ")" UnaryExpressionNotPlusMinus()
0867: * </pre>
0868: */
0869: public Object visit(CastExpression n, Object argu) {
0870: Object _ret = null;
0871: n.f0.accept(this , argu);
0872: return _ret;
0873: }
0874:
0875: /**
0876: * Visit the specified node.
0877: * <pre>
0878: * f0 -> PrimaryPrefix()
0879: * f1 -> ( PrimarySuffix() )*
0880: * </pre>
0881: */
0882: public Object visit(PrimaryExpression n, Object argu) {
0883: Object _ret = null;
0884: n.f0.accept(this , argu);
0885: n.f1.accept(this , argu);
0886: return _ret;
0887: }
0888:
0889: /**
0890: * Visit the specified node.
0891: * <pre>
0892: * f0 -> Literal()
0893: * | "this"
0894: * | "super" "." <IDENTIFIER>
0895: * | "(" Expression() ")"
0896: * | AllocationExpression()
0897: * | ResultType() "." "class"
0898: * | Name()
0899: * </pre>
0900: */
0901: public Object visit(PrimaryPrefix n, Object argu) {
0902: Object _ret = null;
0903: n.f0.accept(this , argu);
0904: return _ret;
0905: }
0906:
0907: /**
0908: * Visit the specified node.
0909: * <pre>
0910: * f0 -> "." "this"
0911: * | "." "super"
0912: * | "." AllocationExpression()
0913: * | "[" Expression() "]"
0914: * | "." <IDENTIFIER>
0915: * | Arguments()
0916: * </pre>
0917: */
0918: public Object visit(PrimarySuffix n, Object argu) {
0919: Object _ret = null;
0920: n.f0.accept(this , argu);
0921: return _ret;
0922: }
0923:
0924: /**
0925: * Visit the specified node.
0926: * <pre>
0927: * f0 -> <INTEGER_LITERAL>
0928: * | <FLOATING_POINT_LITERAL>
0929: * | <CHARACTER_LITERAL>
0930: * | <STRING_LITERAL>
0931: * | BooleanLiteral()
0932: * | NullLiteral()
0933: * </pre>
0934: */
0935: public Object visit(Literal n, Object argu) {
0936: Object _ret = null;
0937: n.f0.accept(this , argu);
0938: return _ret;
0939: }
0940:
0941: /**
0942: * Visit the specified node.
0943: * <pre>
0944: * f0 -> "true"
0945: * | "false"
0946: * </pre>
0947: */
0948: public Object visit(BooleanLiteral n, Object argu) {
0949: Object _ret = null;
0950: n.f0.accept(this , argu);
0951: return _ret;
0952: }
0953:
0954: /**
0955: * Visit the specified node.
0956: * <pre>
0957: * f0 -> "null"
0958: * </pre>
0959: */
0960: public Object visit(NullLiteral n, Object argu) {
0961: Object _ret = null;
0962: n.f0.accept(this , argu);
0963: return _ret;
0964: }
0965:
0966: /**
0967: * Visit the specified node.
0968: * <pre>
0969: * f0 -> "("
0970: * f1 -> [ ArgumentList() ]
0971: * f2 -> ")"
0972: * </pre>
0973: */
0974: public Object visit(Arguments n, Object argu) {
0975: Object _ret = null;
0976: n.f0.accept(this , argu);
0977: n.f1.accept(this , argu);
0978: n.f2.accept(this , argu);
0979: return _ret;
0980: }
0981:
0982: /**
0983: * Visit the specified node.
0984: * <pre>
0985: * f0 -> Expression()
0986: * f1 -> ( "," Expression() )*
0987: * </pre>
0988: */
0989: public Object visit(ArgumentList n, Object argu) {
0990: Object _ret = null;
0991: n.f0.accept(this , argu);
0992: n.f1.accept(this , argu);
0993: return _ret;
0994: }
0995:
0996: /**
0997: * Visit the specified node.
0998: * <pre>
0999: * f0 -> "new" PrimitiveType() ArrayDimsAndInits()
1000: * | "new" Name() ( ArrayDimsAndInits() | Arguments() [ ClassBody() ] )
1001: * </pre>
1002: */
1003: public Object visit(AllocationExpression n, Object argu) {
1004: Object _ret = null;
1005: n.f0.accept(this , argu);
1006: return _ret;
1007: }
1008:
1009: /**
1010: * Visit the specified node.
1011: * <pre>
1012: * f0 -> ( "[" Expression() "]" )+ ( "[" "]" )*
1013: * | ( "[" "]" )+ ArrayInitializer()
1014: * </pre>
1015: */
1016: public Object visit(ArrayDimsAndInits n, Object argu) {
1017: Object _ret = null;
1018: n.f0.accept(this , argu);
1019: return _ret;
1020: }
1021:
1022: /**
1023: * Visit the specified node.
1024: * <pre>
1025: * f0 -> LabeledStatement()
1026: * | Block()
1027: * | EmptyStatement()
1028: * | StatementExpression() ";"
1029: * | SwitchStatement()
1030: * | IfStatement()
1031: * | WhileStatement()
1032: * | DoStatement()
1033: * | ForStatement()
1034: * | BreakStatement()
1035: * | ContinueStatement()
1036: * | ReturnStatement()
1037: * | ThrowStatement()
1038: * | SynchronizedStatement()
1039: * | TryStatement()
1040: * | AssertStatement()
1041: * </pre>
1042: */
1043: public Object visit(Statement n, Object argu) {
1044: Object _ret = null;
1045: n.f0.accept(this , argu);
1046: return _ret;
1047: }
1048:
1049: /**
1050: * Visit the specified node.
1051: * <pre>
1052: * f0 -> <IDENTIFIER>
1053: * f1 -> ":"
1054: * f2 -> Statement()
1055: * </pre>
1056: */
1057: public Object visit(LabeledStatement n, Object argu) {
1058: Object _ret = null;
1059: n.f0.accept(this , argu);
1060: n.f1.accept(this , argu);
1061: n.f2.accept(this , argu);
1062: return _ret;
1063: }
1064:
1065: /**
1066: * Visit the specified node.
1067: * <pre>
1068: * f0 -> "{"
1069: * f1 -> ( BlockStatement() )*
1070: * f2 -> "}"
1071: * </pre>
1072: */
1073: public Object visit(Block n, Object argu) {
1074: Object _ret = null;
1075: n.f0.accept(this , argu);
1076: n.f1.accept(this , argu);
1077: n.f2.accept(this , argu);
1078: return _ret;
1079: }
1080:
1081: /**
1082: * Visit the specified node.
1083: * <pre>
1084: * f0 -> LocalVariableDeclaration() ";"
1085: * | Statement()
1086: * | UnmodifiedClassDeclaration()
1087: * | UnmodifiedInterfaceDeclaration()
1088: * </pre>
1089: */
1090: public Object visit(BlockStatement n, Object argu) {
1091: Object _ret = null;
1092: n.f0.accept(this , argu);
1093: return _ret;
1094: }
1095:
1096: /**
1097: * Visit the specified node.
1098: * <pre>
1099: * f0 -> [ "final" ]
1100: * f1 -> Type()
1101: * f2 -> VariableDeclarator()
1102: * f3 -> ( "," VariableDeclarator() )*
1103: * </pre>
1104: */
1105: public Object visit(LocalVariableDeclaration n, Object argu) {
1106: Object _ret = null;
1107: n.f0.accept(this , argu);
1108: n.f1.accept(this , argu);
1109: n.f2.accept(this , argu);
1110: n.f3.accept(this , argu);
1111: return _ret;
1112: }
1113:
1114: /**
1115: * Visit the specified node.
1116: * <pre>
1117: * f0 -> ";"
1118: * </pre>
1119: */
1120: public Object visit(EmptyStatement n, Object argu) {
1121: Object _ret = null;
1122: n.f0.accept(this , argu);
1123: return _ret;
1124: }
1125:
1126: /**
1127: * Visit the specified node.
1128: * <pre>
1129: * f0 -> PreIncrementExpression()
1130: * | PreDecrementExpression()
1131: * | PrimaryExpression() [ "++" | "--" | AssignmentOperator() Expression() ]
1132: * </pre>
1133: */
1134: public Object visit(StatementExpression n, Object argu) {
1135: Object _ret = null;
1136: n.f0.accept(this , argu);
1137: return _ret;
1138: }
1139:
1140: /**
1141: * Visit the specified node.
1142: * <pre>
1143: * f0 -> "switch"
1144: * f1 -> "("
1145: * f2 -> Expression()
1146: * f3 -> ")"
1147: * f4 -> "{"
1148: * f5 -> ( SwitchLabel() ( BlockStatement() )* )*
1149: * f6 -> "}"
1150: * </pre>
1151: */
1152: public Object visit(SwitchStatement n, Object argu) {
1153: Object _ret = null;
1154: n.f0.accept(this , argu);
1155: n.f1.accept(this , argu);
1156: n.f2.accept(this , argu);
1157: n.f3.accept(this , argu);
1158: n.f4.accept(this , argu);
1159: n.f5.accept(this , argu);
1160: n.f6.accept(this , argu);
1161: return _ret;
1162: }
1163:
1164: /**
1165: * Visit the specified node.
1166: * <pre>
1167: * f0 -> "case" Expression() ":"
1168: * | "default" ":"
1169: * </pre>
1170: */
1171: public Object visit(SwitchLabel n, Object argu) {
1172: Object _ret = null;
1173: n.f0.accept(this , argu);
1174: return _ret;
1175: }
1176:
1177: /**
1178: * Visit the specified node.
1179: * <pre>
1180: * f0 -> "if"
1181: * f1 -> "("
1182: * f2 -> Expression()
1183: * f3 -> ")"
1184: * f4 -> Statement()
1185: * f5 -> [ "else" Statement() ]
1186: * </pre>
1187: */
1188: public Object visit(IfStatement n, Object argu) {
1189: Object _ret = null;
1190: n.f0.accept(this , argu);
1191: n.f1.accept(this , argu);
1192: n.f2.accept(this , argu);
1193: n.f3.accept(this , argu);
1194: n.f4.accept(this , argu);
1195: n.f5.accept(this , argu);
1196: return _ret;
1197: }
1198:
1199: /**
1200: * Visit the specified node.
1201: * <pre>
1202: * f0 -> "while"
1203: * f1 -> "("
1204: * f2 -> Expression()
1205: * f3 -> ")"
1206: * f4 -> Statement()
1207: * </pre>
1208: */
1209: public Object visit(WhileStatement n, Object argu) {
1210: Object _ret = null;
1211: n.f0.accept(this , argu);
1212: n.f1.accept(this , argu);
1213: n.f2.accept(this , argu);
1214: n.f3.accept(this , argu);
1215: n.f4.accept(this , argu);
1216: return _ret;
1217: }
1218:
1219: /**
1220: * Visit the specified node.
1221: * <pre>
1222: * f0 -> "do"
1223: * f1 -> Statement()
1224: * f2 -> "while"
1225: * f3 -> "("
1226: * f4 -> Expression()
1227: * f5 -> ")"
1228: * f6 -> ";"
1229: * </pre>
1230: */
1231: public Object visit(DoStatement n, Object argu) {
1232: Object _ret = null;
1233: n.f0.accept(this , argu);
1234: n.f1.accept(this , argu);
1235: n.f2.accept(this , argu);
1236: n.f3.accept(this , argu);
1237: n.f4.accept(this , argu);
1238: n.f5.accept(this , argu);
1239: n.f6.accept(this , argu);
1240: return _ret;
1241: }
1242:
1243: /**
1244: * Visit the specified node.
1245: * <pre>
1246: * f0 -> "for"
1247: * f1 -> "("
1248: * f2 -> [ ForInit() ]
1249: * f3 -> ";"
1250: * f4 -> [ Expression() ]
1251: * f5 -> ";"
1252: * f6 -> [ ForUpdate() ]
1253: * f7 -> ")"
1254: * f8 -> Statement()
1255: * </pre>
1256: */
1257: public Object visit(ForStatement n, Object argu) {
1258: Object _ret = null;
1259: n.f0.accept(this , argu);
1260: n.f1.accept(this , argu);
1261: n.f2.accept(this , argu);
1262: n.f3.accept(this , argu);
1263: n.f4.accept(this , argu);
1264: n.f5.accept(this , argu);
1265: n.f6.accept(this , argu);
1266: n.f7.accept(this , argu);
1267: n.f8.accept(this , argu);
1268: return _ret;
1269: }
1270:
1271: /**
1272: * Visit the specified node.
1273: * <pre>
1274: * f0 -> LocalVariableDeclaration()
1275: * | StatementExpressionList()
1276: * </pre>
1277: */
1278: public Object visit(ForInit n, Object argu) {
1279: Object _ret = null;
1280: n.f0.accept(this , argu);
1281: return _ret;
1282: }
1283:
1284: /**
1285: * Visit the specified node.
1286: * <pre>
1287: * f0 -> StatementExpression()
1288: * f1 -> ( "," StatementExpression() )*
1289: * </pre>
1290: */
1291: public Object visit(StatementExpressionList n, Object argu) {
1292: Object _ret = null;
1293: n.f0.accept(this , argu);
1294: n.f1.accept(this , argu);
1295: return _ret;
1296: }
1297:
1298: /**
1299: * Visit the specified node.
1300: * <pre>
1301: * f0 -> StatementExpressionList()
1302: * </pre>
1303: */
1304: public Object visit(ForUpdate n, Object argu) {
1305: Object _ret = null;
1306: n.f0.accept(this , argu);
1307: return _ret;
1308: }
1309:
1310: /**
1311: * Visit the specified node.
1312: * <pre>
1313: * f0 -> "break"
1314: * f1 -> [ <IDENTIFIER> ]
1315: * f2 -> ";"
1316: * </pre>
1317: */
1318: public Object visit(BreakStatement n, Object argu) {
1319: Object _ret = null;
1320: n.f0.accept(this , argu);
1321: n.f1.accept(this , argu);
1322: n.f2.accept(this , argu);
1323: return _ret;
1324: }
1325:
1326: /**
1327: * Visit the specified node.
1328: * <pre>
1329: * f0 -> "continue"
1330: * f1 -> [ <IDENTIFIER> ]
1331: * f2 -> ";"
1332: * </pre>
1333: */
1334: public Object visit(ContinueStatement n, Object argu) {
1335: Object _ret = null;
1336: n.f0.accept(this , argu);
1337: n.f1.accept(this , argu);
1338: n.f2.accept(this , argu);
1339: return _ret;
1340: }
1341:
1342: /**
1343: * Visit the specified node.
1344: * <pre>
1345: * f0 -> "return"
1346: * f1 -> [ Expression() ]
1347: * f2 -> ";"
1348: * </pre>
1349: */
1350: public Object visit(ReturnStatement n, Object argu) {
1351: Object _ret = null;
1352: n.f0.accept(this , argu);
1353: n.f1.accept(this , argu);
1354: n.f2.accept(this , argu);
1355: return _ret;
1356: }
1357:
1358: /**
1359: * Visit the specified node.
1360: * <pre>
1361: * f0 -> "throw"
1362: * f1 -> Expression()
1363: * f2 -> ";"
1364: * </pre>
1365: */
1366: public Object visit(ThrowStatement n, Object argu) {
1367: Object _ret = null;
1368: n.f0.accept(this , argu);
1369: n.f1.accept(this , argu);
1370: n.f2.accept(this , argu);
1371: return _ret;
1372: }
1373:
1374: /**
1375: * Visit the specified node.
1376: * <pre>
1377: * f0 -> "synchronized"
1378: * f1 -> "("
1379: * f2 -> Expression()
1380: * f3 -> ")"
1381: * f4 -> Block()
1382: * </pre>
1383: */
1384: public Object visit(SynchronizedStatement n, Object argu) {
1385: Object _ret = null;
1386: n.f0.accept(this , argu);
1387: n.f1.accept(this , argu);
1388: n.f2.accept(this , argu);
1389: n.f3.accept(this , argu);
1390: n.f4.accept(this , argu);
1391: return _ret;
1392: }
1393:
1394: /**
1395: * Visit the specified node.
1396: * <pre>
1397: * f0 -> "try"
1398: * f1 -> Block()
1399: * f2 -> ( "catch" "(" FormalParameter() ")" Block() )*
1400: * f3 -> [ "finally" Block() ]
1401: * </pre>
1402: */
1403: public Object visit(TryStatement n, Object argu) {
1404: Object _ret = null;
1405: n.f0.accept(this , argu);
1406: n.f1.accept(this , argu);
1407: n.f2.accept(this , argu);
1408: n.f3.accept(this , argu);
1409: return _ret;
1410: }
1411:
1412: /**
1413: * Visit the specified node.
1414: * <pre>
1415: * f0 -> "assert"
1416: * f1 -> Expression()
1417: * f2 -> [ ":" Expression() ]
1418: * f3 -> ";"
1419: * </pre>
1420: */
1421: public Object visit(AssertStatement n, Object argu) {
1422: Object _ret = null;
1423: n.f0.accept(this, argu);
1424: n.f1.accept(this, argu);
1425: n.f2.accept(this, argu);
1426: n.f3.accept(this, argu);
1427: return _ret;
1428: }
1429:
1430: }
|