protected void processRuleBlock(String block, Engine engine) throws Exception {
        BufferedReader reader = new BufferedReader(new StringReader(block));
        String line = reader.readLine();
        String name = "";
        int index = line.indexOf(' ');
        if (index >= 0) {
            name = line.substring(index + 1); //does not need to be valid name
        }
        RuleBlock ruleBlock = new RuleBlock(name);
        engine.addRuleBlock(ruleBlock);

        while ((line = reader.readLine()) != null) {
            String firstToken = line.substring(0, line.indexOf(' '));
            if ("AND".equals(firstToken)) {
                ruleBlock.setConjunction(extractTNorm(line));
            } else if ("OR".equals(firstToken)) {
                ruleBlock.setDisjunction(extractSNorm(line));
            } else if ("ACT".equals(firstToken)) {
                ruleBlock.setActivation(extractTNorm(line));
            } else if ("ENABLED".equals(firstToken)) {
                ruleBlock.setEnabled(extractEnabled(line));
            } else if ("RULE".equals(firstToken)) {
                int ruleStart = line.indexOf(':');
                if (ruleStart < 0) {
                    ruleStart = "RULE".length();
                }
                String rule = line.substring(ruleStart + 1).trim();
                ruleBlock.addRule(Rule.parse(rule, engine));
            } else {
                throw new RuntimeException(String.format(
                        "[syntax error] keyword <%s> not recognized in line %s",
                        firstToken, line));
            }
        }
    }