    001    /* Copyright 2000, 2001, Compaq Computer Corporation */
    002
    003    /* IF THIS IS A JAVA FILE, DO NOT EDIT IT!
    004
    005       Most Java files in this directory which are part of the Javafe AST
    006       are automatically generated using the astgen comment (see
    007       ESCTools/Javafe/astgen) from the input file 'hierarchy.h'.  If you
    008       wish to modify AST classes or introduce new ones, modify
    009       'hierarchy.j.'
    010     */
    011
    012    package javafe.ast;
    013
    014    import javafe.util.Assert;
    015    import javafe.util.Location;
    016    import javafe.util.ErrorSet;
    017
    018    // Convention: unless otherwise noted, integer fields named "loc" refer
    019    // to the location of the first character of the syntactic unit
    020
    021    public abstract class VisitorArgResult {
    022      //@ requires x != null;
    023      //@ ensures \result != null;
    024      public abstract Object visitASTNode(ASTNode x, Object o);
    025
    026      //@ requires x != null;
    027      //@ ensures \result != null;
    028      public Object visitCompilationUnit(CompilationUnit x, Object o) {
    029        return visitASTNode(x, o);
    030      }
    031
    032      //@ requires x != null;
    033      //@ ensures \result != null;
    034      public Object visitImportDecl(ImportDecl x, Object o) {
    035        return visitASTNode(x, o);
    036      }
    037
    038      //@ requires x != null;
    039      //@ ensures \result != null;
    040      public Object visitSingleTypeImportDecl(SingleTypeImportDecl x, Object o) {
    041        return visitImportDecl(x, o);
    042      }
    043
    044      //@ requires x != null;
    045      //@ ensures \result != null;
    046      public Object visitOnDemandImportDecl(OnDemandImportDecl x, Object o) {
    047        return visitImportDecl(x, o);
    048      }
    049
    050      //@ requires x != null;
    051      //@ ensures \result != null;
    052      public Object visitTypeDecl(TypeDecl x, Object o) {
    053        return visitASTNode(x, o);
    054      }
    055
    056      //@ requires x != null;
    057      //@ ensures \result != null;
    058      public Object visitClassDecl(ClassDecl x, Object o) {
    059        return visitTypeDecl(x, o);
    060      }
    061
    062      //@ requires x != null;
    063      //@ ensures \result != null;
    064      public Object visitInterfaceDecl(InterfaceDecl x, Object o) {
    065        return visitTypeDecl(x, o);
    066      }
    067
    068      //@ requires x != null;
    069      //@ ensures \result != null;
    070      public Object visitRoutineDecl(RoutineDecl x, Object o) {
    071        return visitASTNode(x, o);
    072      }
    073
    074      //@ requires x != null;
    075      //@ ensures \result != null;
    076      public Object visitConstructorDecl(ConstructorDecl x, Object o) {
    077        return visitRoutineDecl(x, o);
    078      }
    079
    080      //@ requires x != null;
    081      //@ ensures \result != null;
    082      public Object visitMethodDecl(MethodDecl x, Object o) {
    083        return visitRoutineDecl(x, o);
    084      }
    085
    086      //@ requires x != null;
    087      //@ ensures \result != null;
    088      public Object visitInitBlock(InitBlock x, Object o) {
    089        return visitASTNode(x, o);
    090      }
    091
    092      //@ requires x != null;
    093      //@ ensures \result != null;
    094      public Object visitTypeDeclElemPragma(TypeDeclElemPragma x, Object o) {
    095        return visitASTNode(x, o);
    096      }
    097
    098      //@ requires x != null;
    099      //@ ensures \result != null;
    100      public Object visitGenericVarDecl(GenericVarDecl x, Object o) {
    101        return visitASTNode(x, o);
    102      }
    103
    104      //@ requires x != null;
    105      //@ ensures \result != null;
    106      public Object visitLocalVarDecl(LocalVarDecl x, Object o) {
    107        return visitGenericVarDecl(x, o);
    108      }
    109
    110      //@ requires x != null;
    111      //@ ensures \result != null;
    112      public Object visitFieldDecl(FieldDecl x, Object o) {
    113        return visitGenericVarDecl(x, o);
    114      }
    115
    116      //@ requires x != null;
    117      //@ ensures \result != null;
    118      public Object visitFormalParaDecl(FormalParaDecl x, Object o) {
    119        return visitGenericVarDecl(x, o);
    120      }
    121
    122      //@ requires x != null;
    123      //@ ensures \result != null;
    124      public Object visitStmt(Stmt x, Object o) {
    125        return visitASTNode(x, o);
    126      }
    127
    128      //@ requires x != null;
    129      //@ ensures \result != null;
    130      public Object visitGenericBlockStmt(GenericBlockStmt x, Object o) {
    131        return visitStmt(x, o);
    132      }
    133
    134      //@ requires x != null;
    135      //@ ensures \result != null;
    136      public Object visitBlockStmt(BlockStmt x, Object o) {
    137        return visitGenericBlockStmt(x, o);
    138      }
    139
    140      //@ requires x != null;
    141      //@ ensures \result != null;
    142      public Object visitSwitchStmt(SwitchStmt x, Object o) {
    143        return visitGenericBlockStmt(x, o);
    144      }
    145
    146      //@ requires x != null;
    147      //@ ensures \result != null;
    148      public Object visitAssertStmt(AssertStmt x, Object o) {
    149        return visitStmt(x, o);
    150      }
    151
    152      //@ requires x != null;
    153      //@ ensures \result != null;
    154      public Object visitVarDeclStmt(VarDeclStmt x, Object o) {
    155        return visitStmt(x, o);
    156      }
    157
    158      //@ requires x != null;
    159      //@ ensures \result != null;
    160      public Object visitClassDeclStmt(ClassDeclStmt x, Object o) {
    161        return visitStmt(x, o);
    162      }
    163
    164      //@ requires x != null;
    165      //@ ensures \result != null;
    166      public Object visitWhileStmt(WhileStmt x, Object o) {
    167        return visitStmt(x, o);
    168      }
    169
    170      //@ requires x != null;
    171      //@ ensures \result != null;
    172      public Object visitDoStmt(DoStmt x, Object o) {
    173        return visitStmt(x, o);
    174      }
    175
    176      //@ requires x != null;
    177      //@ ensures \result != null;
    178      public Object visitSynchronizeStmt(SynchronizeStmt x, Object o) {
    179        return visitStmt(x, o);
    180      }
    181
    182      //@ requires x != null;
    183      //@ ensures \result != null;
    184      public Object visitEvalStmt(EvalStmt x, Object o) {
    185        return visitStmt(x, o);
    186      }
    187
    188      //@ requires x != null;
    189      //@ ensures \result != null;
    190      public Object visitReturnStmt(ReturnStmt x, Object o) {
    191        return visitStmt(x, o);
    192      }
    193
    194      //@ requires x != null;
    195      //@ ensures \result != null;
    196      public Object visitThrowStmt(ThrowStmt x, Object o) {
    197        return visitStmt(x, o);
    198      }
    199
    200      //@ requires x != null;
    201      //@ ensures \result != null;
    202      public Object visitBranchStmt(BranchStmt x, Object o) {
    203        return visitStmt(x, o);
    204      }
    205
    206      //@ requires x != null;
    207      //@ ensures \result != null;
    208      public Object visitBreakStmt(BreakStmt x, Object o) {
    209        return visitBranchStmt(x, o);
    210      }
    211
    212      //@ requires x != null;
    213      //@ ensures \result != null;
    214      public Object visitContinueStmt(ContinueStmt x, Object o) {
    215        return visitBranchStmt(x, o);
    216      }
    217
    218      //@ requires x != null;
    219      //@ ensures \result != null;
    220      public Object visitLabelStmt(LabelStmt x, Object o) {
    221        return visitStmt(x, o);
    222      }
    223
    224      //@ requires x != null;
    225      //@ ensures \result != null;
    226      public Object visitIfStmt(IfStmt x, Object o) {
    227        return visitStmt(x, o);
    228      }
    229
    230      //@ requires x != null;
    231      //@ ensures \result != null;
    232      public Object visitForStmt(ForStmt x, Object o) {
    233        return visitStmt(x, o);
    234      }
    235
    236      //@ requires x != null;
    237      //@ ensures \result != null;
    238      public Object visitSkipStmt(SkipStmt x, Object o) {
    239        return visitStmt(x, o);
    240      }
    241
    242      //@ requires x != null;
    243      //@ ensures \result != null;
    244      public Object visitSwitchLabel(SwitchLabel x, Object o) {
    245        return visitStmt(x, o);
    246      }
    247
    248      //@ requires x != null;
    249      //@ ensures \result != null;
    250      public Object visitTryFinallyStmt(TryFinallyStmt x, Object o) {
    251        return visitStmt(x, o);
    252      }
    253
    254      //@ requires x != null;
    255      //@ ensures \result != null;
    256      public Object visitTryCatchStmt(TryCatchStmt x, Object o) {
    257        return visitStmt(x, o);
    258      }
    259
    260      //@ requires x != null;
    261      //@ ensures \result != null;
    262      public Object visitStmtPragma(StmtPragma x, Object o) {
    263        return visitStmt(x, o);
    264      }
    265
    266      //@ requires x != null;
    267      //@ ensures \result != null;
    268      public Object visitConstructorInvocation(ConstructorInvocation x, Object o) {
    269        return visitStmt(x, o);
    270      }
    271
    272      //@ requires x != null;
    273      //@ ensures \result != null;
    274      public Object visitCatchClause(CatchClause x, Object o) {
    275        return visitASTNode(x, o);
    276      }
    277
    278      //@ requires x != null;
    279      //@ ensures \result != null;
    280      public Object visitVarInit(VarInit x, Object o) {
    281        return visitASTNode(x, o);
    282      }
    283
    284      //@ requires x != null;
    285      //@ ensures \result != null;
    286      public Object visitArrayInit(ArrayInit x, Object o) {
    287        return visitVarInit(x, o);
    288      }
    289
    290      //@ requires x != null;
    291      //@ ensures \result != null;
    292      public Object visitExpr(Expr x, Object o) {
    293        return visitVarInit(x, o);
    294      }
    295
    296      //@ requires x != null;
    297      //@ ensures \result != null;
    298      public Object visitThisExpr(ThisExpr x, Object o) {
    299        return visitExpr(x, o);
    300      }
    301
    302      //@ requires x != null;
    303      //@ ensures \result != null;
    304      public Object visitLiteralExpr(LiteralExpr x, Object o) {
    305        return visitExpr(x, o);
    306      }
    307
    308      //@ requires x != null;
    309      //@ ensures \result != null;
    310      public Object visitArrayRefExpr(ArrayRefExpr x, Object o) {
    311        return visitExpr(x, o);
    312      }
    313
    314      //@ requires x != null;
    315      //@ ensures \result != null;
    316      public Object visitNewInstanceExpr(NewInstanceExpr x, Object o) {
    317        return visitExpr(x, o);
    318      }
    319
    320      //@ requires x != null;
    321      //@ ensures \result != null;
    322      public Object visitNewArrayExpr(NewArrayExpr x, Object o) {
    323        return visitExpr(x, o);
    324      }
    325
    326      //@ requires x != null;
    327      //@ ensures \result != null;
    328      public Object visitCondExpr(CondExpr x, Object o) {
    329        return visitExpr(x, o);
    330      }
    331
    332      //@ requires x != null;
    333      //@ ensures \result != null;
    334      public Object visitInstanceOfExpr(InstanceOfExpr x, Object o) {
    335        return visitExpr(x, o);
    336      }
    337
    338      //@ requires x != null;
    339      //@ ensures \result != null;
    340      public Object visitCastExpr(CastExpr x, Object o) {
    341        return visitExpr(x, o);
    342      }
    343
    344      //@ requires x != null;
    345      //@ ensures \result != null;
    346      public Object visitBinaryExpr(BinaryExpr x, Object o) {
    347        return visitExpr(x, o);
    348      }
    349
    350      //@ requires x != null;
    351      //@ ensures \result != null;
    352      public Object visitUnaryExpr(UnaryExpr x, Object o) {
    353        return visitExpr(x, o);
    354      }
    355
    356      //@ requires x != null;
    357      //@ ensures \result != null;
    358      public Object visitParenExpr(ParenExpr x, Object o) {
    359        return visitExpr(x, o);
    360      }
    361
    362      //@ requires x != null;
    363      //@ ensures \result != null;
    364      public Object visitAmbiguousVariableAccess(AmbiguousVariableAccess x, Object o) {
    365        return visitExpr(x, o);
    366      }
    367
    368      //@ requires x != null;
    369      //@ ensures \result != null;
    370      public Object visitVariableAccess(VariableAccess x, Object o) {
    371        return visitExpr(x, o);
    372      }
    373
    374      //@ requires x != null;
    375      //@ ensures \result != null;
    376      public Object visitFieldAccess(FieldAccess x, Object o) {
    377        return visitExpr(x, o);
    378      }
    379
    380      //@ requires x != null;
    381      //@ ensures \result != null;
    382      public Object visitAmbiguousMethodInvocation(AmbiguousMethodInvocation x, Object o) {
    383        return visitExpr(x, o);
    384      }
    385
    386      //@ requires x != null;
    387      //@ ensures \result != null;
    388      public Object visitMethodInvocation(MethodInvocation x, Object o) {
    389        return visitExpr(x, o);
    390      }
    391
    392      //@ requires x != null;
    393      //@ ensures \result != null;
    394      public Object visitClassLiteral(ClassLiteral x, Object o) {
    395        return visitExpr(x, o);
    396      }
    397
    398      //@ requires x != null;
    399      //@ ensures \result != null;
    400      public Object visitObjectDesignator(ObjectDesignator x, Object o) {
    401        return visitASTNode(x, o);
    402      }
    403
    404      //@ requires x != null;
    405      //@ ensures \result != null;
    406      public Object visitExprObjectDesignator(ExprObjectDesignator x, Object o) {
    407        return visitObjectDesignator(x, o);
    408      }
    409
    410      //@ requires x != null;
    411      //@ ensures \result != null;
    412      public Object visitTypeObjectDesignator(TypeObjectDesignator x, Object o) {
    413        return visitObjectDesignator(x, o);
    414      }
    415
    416      //@ requires x != null;
    417      //@ ensures \result != null;
    418      public Object visitSuperObjectDesignator(SuperObjectDesignator x, Object o) {
    419        return visitObjectDesignator(x, o);
    420      }
    421
    422      //@ requires x != null;
    423      //@ ensures \result != null;
    424      public Object visitType(Type x, Object o) {
    425        return visitASTNode(x, o);
    426      }
    427
    428      //@ requires x != null;
    429      //@ ensures \result != null;
    430      public Object visitErrorType(ErrorType x, Object o) {
    431        return visitType(x, o);
    432      }
    433
    434      //@ requires x != null;
    435      //@ ensures \result != null;
    436      public Object visitPrimitiveType(PrimitiveType x, Object o) {
    437        return visitType(x, o);
    438      }
    439
    440      //@ requires x != null;
    441      //@ ensures \result != null;
    442      public Object visitTypeName(TypeName x, Object o) {
    443        return visitType(x, o);
    444      }
    445
    446      //@ requires x != null;
    447      //@ ensures \result != null;
    448      public Object visitArrayType(ArrayType x, Object o) {
    449        return visitType(x, o);
    450      }
    451
    452      //@ requires x != null;
    453      //@ ensures \result != null;
    454      public Object visitName(Name x, Object o) {
    455        return visitASTNode(x, o);
    456      }
    457
    458      //@ requires x != null;
    459      //@ ensures \result != null;
    460      public Object visitSimpleName(SimpleName x, Object o) {
    461        return visitName(x, o);
    462      }
    463
    464      //@ requires x != null;
    465      //@ ensures \result != null;
    466      public Object visitCompoundName(CompoundName x, Object o) {
    467        return visitName(x, o);
    468      }
    469
    470      //@ requires x != null;
    471      //@ ensures \result != null;
    472      public Object visitModifierPragma(ModifierPragma x, Object o) {
    473        return visitASTNode(x, o);
    474      }
    475
    476      //@ requires x != null;
    477      //@ ensures \result != null;
    478      public Object visitLexicalPragma(LexicalPragma x, Object o) {
    479        return visitASTNode(x, o);
    480      }
    481
    482      //@ requires x != null;
    483      //@ ensures \result != null;
    484      public Object visitTypeModifierPragma(TypeModifierPragma x, Object o) {
    485        return visitASTNode(x, o);
    486      }
    487
    488    }