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 public class LockSetExpr extends Expr
032 {
033 public int loc;
034
035
036 //@ public represents startLoc <- loc;
037 public /*@ pure @*/ int getStartLoc() { return loc; }
038
039
040 // Generated boilerplate constructors:
041
042 //@ ensures this.loc == loc;
043 protected LockSetExpr(int loc) {
044 this.loc = loc;
045 }
046
047 // Generated boilerplate methods:
048
049 public final int childCount() {
050 return 0;
051 }
052
053 public final Object childAt(int index) {
054 /*throws IndexOutOfBoundsException*/
055 if (index < 0)
056 throw new IndexOutOfBoundsException("AST child index " + index);
057 int indexPre = index;
058
059 int sz;
060
061 throw new IndexOutOfBoundsException("AST child index " + indexPre);
062 } //@ nowarn Exception;
063
064 public final /*@non_null*/String toString() {
065 return "[LockSetExpr"
066 + " loc = " + this.loc
067 + "]";
068 }
069
070 public final int getTag() {
071 return TagConstants.LOCKSETEXPR;
072 }
073
074 public final void accept(javafe.ast.Visitor v) {
075 if (v instanceof Visitor) ((Visitor)v).visitLockSetExpr(this);
076 }
077
078 public final Object accept(javafe.ast.VisitorArgResult v, Object o) {
079 if (v instanceof VisitorArgResult) return ((VisitorArgResult)v).visitLockSetExpr(this, o); else return null;
080 }
081
082 public void check() {
083 }
084
085 //@ ensures \result != null;
086 public static LockSetExpr make(int loc) {
087 LockSetExpr result = new LockSetExpr(loc);
088 return result;
089 }
090 }