    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 class GeneratedTags {
    022       static public final int COMPILATIONUNIT = 0;
    023       static public final int SINGLETYPEIMPORTDECL = COMPILATIONUNIT + 1;
    024       static public final int ONDEMANDIMPORTDECL = SINGLETYPEIMPORTDECL + 1;
    025       static public final int CLASSDECL = ONDEMANDIMPORTDECL + 1;
    026       static public final int INTERFACEDECL = CLASSDECL + 1;
    027       static public final int CONSTRUCTORDECL = INTERFACEDECL + 1;
    028       static public final int METHODDECL = CONSTRUCTORDECL + 1;
    029       static public final int INITBLOCK = METHODDECL + 1;
    030       static public final int LOCALVARDECL = INITBLOCK + 1;
    031       static public final int FIELDDECL = LOCALVARDECL + 1;
    032       static public final int FORMALPARADECL = FIELDDECL + 1;
    033       static public final int BLOCKSTMT = FORMALPARADECL + 1;
    034       static public final int SWITCHSTMT = BLOCKSTMT + 1;
    035       static public final int ASSERTSTMT = SWITCHSTMT + 1;
    036       static public final int VARDECLSTMT = ASSERTSTMT + 1;
    037       static public final int CLASSDECLSTMT = VARDECLSTMT + 1;
    038       static public final int WHILESTMT = CLASSDECLSTMT + 1;
    039       static public final int DOSTMT = WHILESTMT + 1;
    040       static public final int SYNCHRONIZESTMT = DOSTMT + 1;
    041       static public final int EVALSTMT = SYNCHRONIZESTMT + 1;
    042       static public final int RETURNSTMT = EVALSTMT + 1;
    043       static public final int THROWSTMT = RETURNSTMT + 1;
    044       static public final int BREAKSTMT = THROWSTMT + 1;
    045       static public final int CONTINUESTMT = BREAKSTMT + 1;
    046       static public final int LABELSTMT = CONTINUESTMT + 1;
    047       static public final int IFSTMT = LABELSTMT + 1;
    048       static public final int FORSTMT = IFSTMT + 1;
    049       static public final int SKIPSTMT = FORSTMT + 1;
    050       static public final int SWITCHLABEL = SKIPSTMT + 1;
    051       static public final int TRYFINALLYSTMT = SWITCHLABEL + 1;
    052       static public final int TRYCATCHSTMT = TRYFINALLYSTMT + 1;
    053       static public final int CONSTRUCTORINVOCATION = TRYCATCHSTMT + 1;
    054       static public final int CATCHCLAUSE = CONSTRUCTORINVOCATION + 1;
    055       static public final int ARRAYINIT = CATCHCLAUSE + 1;
    056       static public final int THISEXPR = ARRAYINIT + 1;
    057       static public final int ARRAYREFEXPR = THISEXPR + 1;
    058       static public final int NEWINSTANCEEXPR = ARRAYREFEXPR + 1;
    059       static public final int NEWARRAYEXPR = NEWINSTANCEEXPR + 1;
    060       static public final int CONDEXPR = NEWARRAYEXPR + 1;
    061       static public final int INSTANCEOFEXPR = CONDEXPR + 1;
    062       static public final int CASTEXPR = INSTANCEOFEXPR + 1;
    063       static public final int PARENEXPR = CASTEXPR + 1;
    064       static public final int AMBIGUOUSVARIABLEACCESS = PARENEXPR + 1;
    065       static public final int VARIABLEACCESS = AMBIGUOUSVARIABLEACCESS + 1;
    066       static public final int FIELDACCESS = VARIABLEACCESS + 1;
    067       static public final int AMBIGUOUSMETHODINVOCATION = FIELDACCESS + 1;
    068       static public final int METHODINVOCATION = AMBIGUOUSMETHODINVOCATION + 1;
    069       static public final int CLASSLITERAL = METHODINVOCATION + 1;
    070       static public final int EXPROBJECTDESIGNATOR = CLASSLITERAL + 1;
    071       static public final int TYPEOBJECTDESIGNATOR = EXPROBJECTDESIGNATOR + 1;
    072       static public final int SUPEROBJECTDESIGNATOR = TYPEOBJECTDESIGNATOR + 1;
    073       static public final int ERRORTYPE = SUPEROBJECTDESIGNATOR + 1;
    074       static public final int TYPENAME = ERRORTYPE + 1;
    075       static public final int ARRAYTYPE = TYPENAME + 1;
    076       static public final int SIMPLENAME = ARRAYTYPE + 1;
    077       static public final int COMPOUNDNAME = SIMPLENAME + 1;
    078       static public final int LAST_TAG = COMPOUNDNAME;
    079
    080
    081        static public /*@ non_null @*/ String toString(int tag) {
    082          switch (tag) {
    083            case COMPILATIONUNIT: return "COMPILATIONUNIT";
    084            case SINGLETYPEIMPORTDECL: return "SINGLETYPEIMPORTDECL";
    085            case ONDEMANDIMPORTDECL: return "ONDEMANDIMPORTDECL";
    086            case CLASSDECL: return "CLASSDECL";
    087            case INTERFACEDECL: return "INTERFACEDECL";
    088            case CONSTRUCTORDECL: return "CONSTRUCTORDECL";
    089            case METHODDECL: return "METHODDECL";
    090            case INITBLOCK: return "INITBLOCK";
    091            case LOCALVARDECL: return "LOCALVARDECL";
    092            case FIELDDECL: return "FIELDDECL";
    093            case FORMALPARADECL: return "FORMALPARADECL";
    094            case BLOCKSTMT: return "BLOCKSTMT";
    095            case SWITCHSTMT: return "SWITCHSTMT";
    096            case ASSERTSTMT: return "ASSERTSTMT";
    097            case VARDECLSTMT: return "VARDECLSTMT";
    098            case CLASSDECLSTMT: return "CLASSDECLSTMT";
    099            case WHILESTMT: return "WHILESTMT";
    100            case DOSTMT: return "DOSTMT";
    101            case SYNCHRONIZESTMT: return "SYNCHRONIZESTMT";
    102            case EVALSTMT: return "EVALSTMT";
    103            case RETURNSTMT: return "RETURNSTMT";
    104            case THROWSTMT: return "THROWSTMT";
    105            case BREAKSTMT: return "BREAKSTMT";
    106            case CONTINUESTMT: return "CONTINUESTMT";
    107            case LABELSTMT: return "LABELSTMT";
    108            case IFSTMT: return "IFSTMT";
    109            case FORSTMT: return "FORSTMT";
    110            case SKIPSTMT: return "SKIPSTMT";
    111            case SWITCHLABEL: return "SWITCHLABEL";
    112            case TRYFINALLYSTMT: return "TRYFINALLYSTMT";
    113            case TRYCATCHSTMT: return "TRYCATCHSTMT";
    114            case CONSTRUCTORINVOCATION: return "CONSTRUCTORINVOCATION";
    115            case CATCHCLAUSE: return "CATCHCLAUSE";
    116            case ARRAYINIT: return "ARRAYINIT";
    117            case THISEXPR: return "THISEXPR";
    118            case ARRAYREFEXPR: return "ARRAYREFEXPR";
    119            case NEWINSTANCEEXPR: return "NEWINSTANCEEXPR";
    120            case NEWARRAYEXPR: return "NEWARRAYEXPR";
    121            case CONDEXPR: return "CONDEXPR";
    122            case INSTANCEOFEXPR: return "INSTANCEOFEXPR";
    123            case CASTEXPR: return "CASTEXPR";
    124            case PARENEXPR: return "PARENEXPR";
    125            case AMBIGUOUSVARIABLEACCESS: return "AMBIGUOUSVARIABLEACCESS";
    126            case VARIABLEACCESS: return "VARIABLEACCESS";
    127            case FIELDACCESS: return "FIELDACCESS";
    128            case AMBIGUOUSMETHODINVOCATION: return "AMBIGUOUSMETHODINVOCATION";
    129            case METHODINVOCATION: return "METHODINVOCATION";
    130            case CLASSLITERAL: return "CLASSLITERAL";
    131            case EXPROBJECTDESIGNATOR: return "EXPROBJECTDESIGNATOR";
    132            case TYPEOBJECTDESIGNATOR: return "TYPEOBJECTDESIGNATOR";
    133            case SUPEROBJECTDESIGNATOR: return "SUPEROBJECTDESIGNATOR";
    134            case ERRORTYPE: return "ERRORTYPE";
    135            case TYPENAME: return "TYPENAME";
    136            case ARRAYTYPE: return "ARRAYTYPE";
    137            case SIMPLENAME: return "SIMPLENAME";
    138            case COMPOUNDNAME: return "COMPOUNDNAME";
    139            default: return "Unknown javafe GeneratedTag " + tag;
    140          }
    141        }
    142    }