@Override
      public boolean isDelimiterChar(CharSequence buffer, int pos) {
        char c = buffer.charAt(pos);
        return (Character.isWhitespace(c) || c == '(' || c == ')' ||
            c == '[' || c == ']');
      }
Split the line by semicolon by ignoring the ones in the single/double quotes.
cli/src/java/org/apache/hadoop/hive/cli/CliDriver.java