    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 escjava.ast;
    013
    014    import java.util.Hashtable;
    015    import java.util.Set;
    016    import java.util.ArrayList;
    017
    018    import javafe.ast.*;
    019    import javafe.util.Assert;
    020    import javafe.util.Location;
    021    import escjava.ParsedRoutineSpecs;
    022
    023    // Convention: unless otherwise noted, integer fields named "loc" refer
    024    // to the location of the first character of the syntactic unit
    025
    026    //# TagBase javafe.tc.TagConstants.LAST_TAG + 1
    027    //# VisitorRoot javafe.ast.Visitor
    028
    029
    030    //// Spec expressions
    031
    032    public abstract class GCExpr extends Expr
    033    {
    034      public int sloc;
    035
    036      public int eloc;
    037
    038
    039      public int getStartLoc() { return sloc; }
    040      public int getEndLoc() { return eloc; }
    041
    042
    043    // Generated boilerplate constructors:
    044
    045      /**
    046       * Construct a raw GCExpr whose class invariant(s) have not
    047       * yet been established.  It is the caller's job to
    048       * initialize the returned node's fields so that any
    049       * class invariants hold.
    050       */
    051
    052
    053
    054    // Generated boilerplate methods:
    055
    056      /** Return the number of children a node has. */
    057      public abstract int childCount();
    058
    059      /** Return the first-but-ith child of a node. */
    060      public abstract Object childAt(int i);
    061
    062      /** Return the tag of a node. */
    063      public abstract int getTag();
    064
    065      /** Return a string representation of <code>this</code>.
    066      Meant for debugging use only, not for presentation. */
    067      public abstract String toString();
    068
    069      /** Accept a visit from <code>v</code>.  This method simply
    070      calls the method of <code>v</code> corresponding to the
    071      allocated type of <code>this</code>, passing <code>this</code>
    072      as the argument.  See the design patterns book. */
    073      public abstract void accept(javafe.ast.Visitor v);
    074
    075    public abstract Object accept(javafe.ast.VisitorArgResult v, Object o);
    076
    077      public void check() {
    078      }
    079
    080    }