private AbstractRule processRule(RulesTextProvider textProvider)
    {
    	log.debug("processRule");
    	int start = textProvider.getPos();
        Rule rule = new Rule();
        LoadCommonRuleData(rule,textProvider);
        textProvider.addTOCElement(null, rule.getDescription(), start, textProvider.getPos(), TYPE_RULE);
        exactOrError("{",textProvider);
        
        if (!exact("if",textProvider))
            throw new ParserException("expected 'if' in a rule: ",textProvider);
        // Condition
        Expression condition = processCondition(textProvider);
        rule.addCondition(condition);
        exactOrError("{",textProvider);
        while (!exact("}",textProvider))
        {
            Expression action = processAction(textProvider);
            exact(";",textProvider);
            rule.addAction(action);
        }
        exact("}",textProvider);

        return rule;
    }
private AbstractRule processRule ( RulesTextProvider textProvider ) { log . debug ( "processRule" ) ; int start = textProvider . getPos ( ) ; Rule rule = new Rule ( ) ; LoadCommonRuleData ( rule , textProvider ) ; textProvider . addTOCElement ( null , rule . getDescription ( ) , start , textProvider . getPos ( ) , TYPE_RULE ) ; exactOrError ( "{" , textProvider ) ; if ( ! exact ( "if" , textProvider ) ) throw new ParserException ( "expected 'if' in a rule: " , textProvider ) ; Expression condition = processCondition ( textProvider ) ; rule . addCondition ( condition ) ; exactOrError ( "{" , textProvider ) ; while ( ! exact ( "}" , textProvider ) ) { Expression action = processAction ( textProvider ) ; exact ( ";" , textProvider ) ; rule . addAction ( action ) ; } exact ( "}" , textProvider ) ; return rule ; }
Method processRule. Parse the rule. Rules have an if/then structure
with conditions and actions
@return Rule
@throws ParserException