public void debug_stack(){
  StringBuffer sb=new StringBuffer("## STACK:");
  for (int i=0; i < stack.size(); i++) {
    Symbol s=(Symbol)stack.elementAt(i);
    sb.append(" <state " + s.parse_state + ", sym "+ s.sym+ ">");
    if ((i % 3) == 2 || (i == (stack.size() - 1))) {
      debug_message(sb.toString());
      sb=new StringBuffer("         ");
    }
  }
}

public void debug_stack ( ) { StringBuffer sb = new StringBuffer ( "## STACK:" ) ; for ( int i = 0 ; i < stack . size ( ) ; i ++ ) { Symbol s = ( Symbol ) stack . elementAt ( i ) ; sb . append ( " <state " + s . parse_state + ", sym " + s . sym + ">" ) ; if ( ( i % 3 ) == 2 || ( i == ( stack . size ( ) - 1 ) ) ) { debug_message ( sb . toString ( ) ) ; sb = new StringBuffer ( "         " ) ; } } }
do debug output for stack state . [ csa ]
