Instructions to be performed in 'atRuleBody' state.
961709
protected function inAtRuleBodyState()
    {
        $char = $this->getCurrentChar();

        if ($char === self::CHAR_CLOSINGBRACE) {
            $buffer = implode('', $this->getBuffer());
            $openingCount = substr_count($buffer, self::CHAR_OPENINGBRACE);
            $closingCount = substr_count($buffer, self::CHAR_CLOSINGBRACE) + 1;

            if ($openingCount === $closingCount) {
                $this->cleanBuffer();
                $this->setState(self::RUNNING);
            } else {
                $this->bufferize($char);
            }
        } else {
            $this->bufferize($char);
        }

        $this->output($char);
    }
49586
def applyRule( self ):
        
        widget = self.queryBuilderWidget()
        if ( not widget ):
            return
        
        rule = widget.findRule(self.uiTermDDL.currentText())
        self.setCurrentRule(rule)
1148832
def atPage(self, page, pseudopage, declarations):
        
        return self.ruleset([self.selector('*')], declarations)
1214737
public final void entryRuleAtom() throws RecognitionException {
        try {
            // InternalXtext.g:696:1: ( ruleAtom EOF )
            // InternalXtext.g:697:1: ruleAtom EOF
            {
             before(grammarAccess.getAtomRule()); 
            pushFollow(FollowSets000.FOLLOW_1);
            ruleAtom();

            state._fsp--;

             after(grammarAccess.getAtomRule()); 
            match(input,EOF,FollowSets000.FOLLOW_2); 

            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }
        finally {
        }
        return ;
    }
117270
def run_console_rule(self, product, subject):
    
    request = self.execution_request([product], [subject])
    returns, throws = self.execute(request)

    if throws:
      _, state = throws[0]
      exc = state.exc
      self._trace_on_error([exc], request)
      return PANTS_FAILED_EXIT_CODE
    _, state = returns[0]
    return state.value.exit_code
1003515
def _set_body(self, body):
        """"""
        assert isinstance(body, CodeStatement)
        if isinstance(body, CodeBlock):
            self.body = body
        else:
            self.body._add(body)
346214
public void checkDataInnerRules(ValidationData data, Object bodyObj) {
        data.getValidationRules().stream().filter(vr -> vr.isUse()).forEach(rule -> {
            if (data.isListChild()) {
                this.checkPointListChild(data, rule, bodyObj, rule.getStandardValue());
            } else {
                this.checkPoint(data, rule, bodyObj, rule.getStandardValue());
            }
        });
    }
175331
def setCurrentRule( self, rule ):
        
        curr_rule = self.currentRule()
        if ( curr_rule == rule ):
            return
        
        self._currentRule = rule
        
        curr_op     = self.uiOperatorDDL.currentText()
        self.uiOperatorDDL.blockSignals(True)
        self.uiOperatorDDL.clear()
        if ( rule ):
            self.uiOperatorDDL.addItems(rule.operators())
            index = self.uiOperatorDDL.findText(curr_op)
            if ( index != -1 ):
                self.uiOperatorDDL.setCurrentIndex(index)
                
        self.uiOperatorDDL.blockSignals(False)
        
        self.updateEditor()
1222134
def process_rule(self,rule,pa,tuple):
        ''' 
        '''
        for i,v in enumerate(tuple):
            rule = rule.replace(pa[i],str(v))
        return eval(rule)
468827
def function_body_action(self, text, loc, fun):
        """"""
        exshared.setpos(loc, text)
        if DEBUG > 0:
            print("FUN_BODY:",fun)
            if DEBUG == 2: self.symtab.display()
            if DEBUG > 2: return
        self.codegen.function_body()
197297
def add_state(self, string):
        """"""
        parsed_string = string.split()
        if len(parsed_string) > 0:
            state, rules = parsed_string[0], parsed_string[1:]

            if len(rules) != len(self.alphabet):
                raise SyntaxError('Wrong count of rules ({cur}/{exp}): {string}'
                                  .format(cur=len(rules), exp=len(self.alphabet),
                                          string=string))

            if state in self.states or state == self.TERM_STATE:
                raise SyntaxError('Double definition of state: ' + state)
            else:
                self.states[state] = []

            for rule in rules:
                try:
                    self._add_rule(state, rule)
                except SyntaxError as err:
                    self.states.pop(state)
                    raise err
1057664
function statement(toks, i, n, handler) {
    if (i < n) {
      var tok = toks[i];
      if (tok.charAt(0) === '@') {
        return atrule(toks, i, n, handler, true);
      } else {
        return ruleset(toks, i, n, handler);
      }
    } else {
      return i;
    }
  }
220230
protected void evaluateRequiredRule(CmmnActivityExecution execution) {
    CmmnActivity activity = execution.getActivity();

    Object requiredRule = activity.getProperty(PROPERTY_REQUIRED_RULE);
    if (requiredRule != null) {
      CaseControlRule rule = (CaseControlRule) requiredRule;
      boolean required = rule.evaluate(execution);
      execution.setRequired(required);
    }
  }
1119620
def if_body_action(self, text, loc, arg):
        """"""
        exshared.setpos(loc, text)
        if DEBUG > 0:
            print("IF_BODY:",arg)
            if DEBUG == 2: self.symtab.display()
            if DEBUG > 2: return
        #generate conditional jump (based on last compare)
        label = self.codegen.label("false{0}".format(self.false_label_number), True, False)
        self.codegen.jump(self.relexp_code, True, label)
        #generate 'true' label (executes if condition is satisfied)
        self.codegen.newline_label("true{0}".format(self.label_number), True, True)
        #save label numbers (needed for nested if/while statements)
        self.label_stack.append(self.false_label_number)
        self.label_stack.append(self.label_number)
840076
@Override
    public void visit(@Nonnull SWRLRule rule) {
        for (SWRLAtom atom : rule.getBody()) {
            atom.accept(this);
        }
        for (SWRLAtom atom : rule.getHead()) {
            atom.accept(this);
        }
        processAxiomAnnotations(rule);
    }
949315
public void setBody(CharSequence body) {
        String bodyString;
        if (body != null) {
            bodyString = body.toString();
        } else {
            bodyString = null;
        }
        setBody(bodyString);
    }
806115
function checkBody (expected, actual, matchingRules){
    if(!expected){
        return;
    }
    if(!matchingRules){ //Use v1 style simple matching
        if(! _.isEqual(actual, expected)){
            return {
                error: "Body does not match expectation: ",
                expected: expected,
                actual: actual
            };
        }
    }
    else {
        var paths = Object.keys(matchingRules);
        var failures = paths.map(function(path){
            return v2Ruleset(path, matchingRules[path], actual, expected);
        }).filter(function(f){
            return f !== false;
        });
        if(failures.length){
            return failures[0];
        }
    }
}