private void evaluateInput(String message) throws Exception {
        // Parse the input message
        
        Matcher matcher = pattern.matcher(message);
        
        if (matcher.matches() == false) {
            throw new IllegalArgumentException(
                "Syntax error: " + message);
        }
        
        // Parse the received command
        
        String command = matcher.group(1);
        String params = matcher.group(2);
        
        if ("id".equals(command)) {
            parseID(params);
        } else if ("uciok".equals(command)) {
            parseUCIOk(params);
        } else if ("readyok".equals(command)) {
            parseReadyOk(params);
        } else if ("bestmove".equals(command)) {
            parseBestMove(params);
        } else if ("copyprotection".equals(command)) {
            parseCopyProtection(params);
        } else if ("registration".equals(command)) {
            parseRegistration(params);
        } else if ("info".equals(command)) {
            parseInfo(params);
        } else if ("option".equals(command)) {
            parseOption(params);
        } else {
            throw new IllegalArgumentException(
                "Unknown engine command: " + command);
        }
    }