public String mostOfString(){
  String typeName="";
switch (type) {
case BUILTIN:
    typeName="BUILTIN";
  break;
case NUMBER:
typeName="NUMBER";
break;
case STRING:
typeName="STRING";
break;
case IDENT:
typeName="IDENT";
break;
case OTHER:
typeName="OTHER";
break;
case REP_CHAR:
typeName="REP_CHAR";
break;
case LEFT_DQUOTE:
typeName="LEFT_DQUOTE";
break;
case RIGHT_DQUOTE:
typeName="RIGHT_DQUOTE";
break;
case VERB:
typeName="VERB";
break;
case TEX:
typeName="TEX";
break;
}
;
String str="\"" + string + "\"";
if (string == null) {
str="null";
}
;
String result="[str |-> " + str + ",\t type |-> "+ typeName+ ",\t col |-> "+ column+ ",\t width |-> "+ getWidth();
if (isTLA) {
result=result + ",\t isTLA |-> true";
}
;
if (isAmbiguous) {
result=result + ",\t isAmbig |-> true";
}
;
return result;
}

public String mostOfString ( ) { String typeName = "" ; switch ( type ) { case BUILTIN : typeName = "BUILTIN" ; break ; case NUMBER : typeName = "NUMBER" ; break ; case STRING : typeName = "STRING" ; break ; case IDENT : typeName = "IDENT" ; break ; case OTHER : typeName = "OTHER" ; break ; case REP_CHAR : typeName = "REP_CHAR" ; break ; case LEFT_DQUOTE : typeName = "LEFT_DQUOTE" ; break ; case RIGHT_DQUOTE : typeName = "RIGHT_DQUOTE" ; break ; case VERB : typeName = "VERB" ; break ; case TEX : typeName = "TEX" ; break ; } ; String str = "\"" + string + "\"" ; if ( string == null ) { str = "null" ; } ; String result = "[str |-> " + str + ",\t type |-> " + typeName + ",\t col |-> " + column + ",\t width |-> " + getWidth ( ) ; if ( isTLA ) { result = result + ",\t isTLA |-> true" ; } ; if ( isAmbiguous ) { result = result + ",\t isAmbig |-> true" ; } ; return result ; }
the following defines a tostring ( ) method for printing a token for debugging . to do a decent job , it splits it into reasonably - sized lines , using the misc . breakline method .
