public static boolean symbolNeedsQuoting(CharSequence symbol,boolean quoteOperators){
  int length=symbol.length();
  if (length == 0) {
    throw new EmptySymbolException();
  }
  if (!isIdentifierKeyword(symbol)) {
    char c=symbol.charAt(0);
    if (!quoteOperators && isOperatorPart(c)) {
      for (int ii=0; ii < length; ii++) {
        c=symbol.charAt(ii);
        if (!isOperatorPart(c)) {
          return true;
        }
      }
      return false;
    }
 else     if (isIdentifierStart(c)) {
      for (int ii=0; ii < length; ii++) {
        c=symbol.charAt(ii);
        if ((c == '\'' || c < 32 || c > 126) || !isIdentifierPart(c)) {
          return true;
        }
      }
      return false;
    }
  }
  return true;
}

public static boolean symbolNeedsQuoting ( CharSequence symbol , boolean quoteOperators ) { int length = symbol . length ( ) ; if ( length == 0 ) { throw new EmptySymbolException ( ) ; } if ( ! isIdentifierKeyword ( symbol ) ) { char c = symbol . charAt ( 0 ) ; if ( ! quoteOperators && isOperatorPart ( c ) ) { for ( int ii = 0 ; ii < length ; ii ++ ) { c = symbol . charAt ( ii ) ; if ( ! isOperatorPart ( c ) ) { return true ; } } return false ; } else if ( isIdentifierStart ( c ) ) { for ( int ii = 0 ; ii < length ; ii ++ ) { c = symbol . charAt ( ii ) ; if ( ( c == '\'' || c < 32 || c > 126 ) || ! isIdentifierPart ( c ) ) { return true ; } } return false ; } } return true ; }
determines whether the text of a symbol requires ( single ) quotes .
