001    // -*- mode: java -*-
002    /* Copyright 2000, 2001, Compaq Computer Corporation */
003    
004    /* IF THIS IS A JAVA FILE, DO NOT EDIT IT!  
005    
006       Most Java files in this directory which are part of the Javafe AST
007       are automatically generated using the astgen comment (see
008       ESCTools/Javafe/astgen) from the input file 'hierarchy.h'.  If you
009       wish to modify AST classes or introduce new ones, modify
010       'hierarchy.j.'
011     */
012    
013    package escjava.ast;
014    
015    import java.util.Hashtable;
016    import java.util.Set;
017    import java.util.ArrayList;
018    
019    import javafe.ast.*;
020    import javafe.util.Assert;
021    import javafe.util.Location;
022    import escjava.ParsedRoutineSpecs;
023    
024    // Convention: unless otherwise noted, integer fields named "loc" refer
025    // to the location of the first character of the syntactic unit
026    
027    //# TagBase javafe.tc.TagConstants.LAST_TAG + 1
028    //# VisitorRoot javafe.ast.Visitor
029    
030    
031    //// Spec expressions
032    
033    public abstract class GCExpr extends Expr
034    {
035      public int sloc;
036    
037      public int eloc;
038    
039    
040      public /*@ pure @*/ int getStartLoc() { return sloc; }
041      /*@ also
042        @ public normal_behavior
043        @ ensures \result == eloc;
044        @*/
045      public /*@ pure @*/ int getEndLoc() { return eloc; }
046    
047    
048    // Generated boilerplate constructors:
049    
050      protected GCExpr(int sloc, int eloc) {
051         this.sloc = sloc;
052         this.eloc = eloc;
053      }
054      
055    
056    // Generated boilerplate methods:
057    
058      /** Return the number of children a node has. */
059      public abstract int childCount();
060    
061      /** Return the first-but-ith child of a node. */
062      public abstract Object childAt(int i);
063    
064      /** Return the tag of a node. */
065      public abstract int getTag();
066    
067      /** Return a string representation of <code>this</code>.
068      Meant for debugging use only, not for presentation. */
069      public abstract /*@non_null*/ String toString();
070    
071      /** Accept a visit from <code>v</code>.  This method simply
072      calls the method of <code>v</code> corresponding to the
073      allocated type of <code>this</code>, passing <code>this</code>
074      as the argument.  See the design patterns book. */
075      public abstract void accept(javafe.ast.Visitor v);
076    
077    public abstract Object accept(javafe.ast.VisitorArgResult v, Object o);
078    
079      public void check() {
080      }
081    
082    }