public String mostOfString(){
  String typeName="";
switch (type) {
case BUILTIN:
    typeName="BUILTIN";
  break;
case NUMBER:
typeName="NUMBER";
break;
case STRING:
typeName="STRING";
break;
case PF_STEP:
typeName="PF_STEP";
break;
case IDENT:
typeName="IDENT";
break;
case COMMENT:
typeName="COMMENT";
break;
case DASHES:
typeName="DASHES";
break;
case END_MODULE:
typeName="END_MODULE";
break;
case PROLOG:
typeName="PROLOG";
break;
case EPILOG:
typeName="EPILOG";
break;
case PCAL_LABEL:
typeName="PCAL_LABEL";
break;
}
;
String str="\"" + string + "\"";
if (string == null) {
str="null";
}
;
String result="[str |-> " + str + ",\t type |-> "+ typeName+ ",\t col |-> "+ column+ ",\t width |-> "+ getWidth();
if (aboveAlign.line != -1) {
result=result + ",\t above |-> " + aboveAlign.toString();
}
;
if (belowAlign.line != -1) {
result=result + ",\t below |-> " + belowAlign.toString();
}
;
if (preSpace != 0) {
result=result + ", space |-> " + preSpace;
}
;
if (isAlignmentPoint) {
result=result + ", align |-> true";
}
;
if (distFromMargin != 0) {
result=result + ", dist |-> " + distFromMargin;
}
;
if (subscript) {
result=result + ", sub |-> 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 PF_STEP : typeName = "PF_STEP" ; break ; case IDENT : typeName = "IDENT" ; break ; case COMMENT : typeName = "COMMENT" ; break ; case DASHES : typeName = "DASHES" ; break ; case END_MODULE : typeName = "END_MODULE" ; break ; case PROLOG : typeName = "PROLOG" ; break ; case EPILOG : typeName = "EPILOG" ; break ; case PCAL_LABEL : typeName = "PCAL_LABEL" ; break ; } ; String str = "\"" + string + "\"" ; if ( string == null ) { str = "null" ; } ; String result = "[str |-> " + str + ",\t type |-> " + typeName + ",\t col |-> " + column + ",\t width |-> " + getWidth ( ) ; if ( aboveAlign . line != - 1 ) { result = result + ",\t above |-> " + aboveAlign . toString ( ) ; } ; if ( belowAlign . line != - 1 ) { result = result + ",\t below |-> " + belowAlign . toString ( ) ; } ; if ( preSpace != 0 ) { result = result + ", space |-> " + preSpace ; } ; if ( isAlignmentPoint ) { result = result + ", align |-> true" ; } ; if ( distFromMargin != 0 ) { result = result + ", dist |-> " + distFromMargin ; } ; if ( subscript ) { result = result + ", sub |-> 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 breakline method .
