Parses a businessRuleTask declaration.
437386
public ActivityImpl parseBusinessRuleTask(Element businessRuleTaskElement, ScopeImpl scope) {
    String decisionRef = businessRuleTaskElement.attributeNS(CAMUNDA_BPMN_EXTENSIONS_NS, "decisionRef");
    if (decisionRef != null) {
      return parseDmnBusinessRuleTask(businessRuleTaskElement, scope);
    }
    else {
      return parseServiceTaskLike("businessRuleTask", businessRuleTaskElement, scope);
    }
  }
457787
def parseCustom(self,
                    xbrl,
                    ignore_errors=0):
        
        custom_obj = Custom()

        custom_data = xbrl.find_all(re.compile('^((?!(us-gaap|dei|xbrll|xbrldi)).)*:\s*',
            re.IGNORECASE | re.MULTILINE))

        elements = {}
        for data in custom_data:
            if XBRLParser().is_number(data.text):
                setattr(custom_obj, data.name.split(':')[1], data.text)

        return custom_obj
681941
function declaration() {
        match(/^([;\s]*)+/); // ignore empty declarations + whitespace

        const comment_regexp = /\/\*[^*]*\*+([^/*][^*]*\*+)*\//g;
        let prop = match(/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);

        if (!prop) {
            return;
        }

        prop = prop[0].trim();

        if (!match(/^:\s*/)) {
            return error('property missing \':\'');
        }

        // Quotes regex repeats verbatim inside and outside parentheses
        const val = match(/^((?:\/\*.*?\*\/|'(?:\\'|.)*?'|"(?:\\"|.)*?"|\((\s*'(?:\\'|.)*?'|"(?:\\"|.)*?"|[^)]*?)\s*\)|[^};])+)/);
        const ret = {
            type    : 'declaration',
            property: prop.replace(comment_regexp, ''),
            value   : val ? val[0].replace(comment_regexp, '').trim() : ''
        };

        match(/^[;\s]*/);

        return ret;
    }
409543
def parse(self, content):
        
        # Remove all comments before searching for import rules, to not catch
        # commented breaked import rules
        declarations = self.REGEX_IMPORT_RULE.findall(
            self.remove_comments(content)
        )
        return self.flatten_rules(declarations)
684721
function parseConstLetDeclaration(kind) {
        var declarations, startToken;

        startToken = lookahead;

        expectKeyword(kind);

        declarations = parseVariableDeclarationList(kind);

        consumeSemicolon();

        return delegate.markEnd(delegate.createVariableDeclaration(declarations, kind), startToken);
    }
291483
private void parseImport() {
        tokenizer.consumeExpectedKeyword(KEYWORD_IMPORT);
        if (!tokenizer.current().isString()) {
            tokenizer.addError(tokenizer.current(),
                               "Unexpected token: '"
                               + tokenizer.current().getSource()
                               + "'. Expected a string constant naming an import file.");
        } else {
            result.addImport(tokenizer.consume().getContents());
        }
        tokenizer.consumeExpectedSymbol(";");
    }
1244083
def parse_declaration(self, tup_tree):
        

        self.check_node(tup_tree, 'DECLARATION')

        child = self.one_child(tup_tree, ('DECLGROUP',))

        return name(tup_tree), attrs(tup_tree), child
315125
private void parseNotationDecl() throws Exception {
        String nname;
        ExternalIdentifiers ids;

        requireWhitespace();
        nname = readNmtoken(true);
        // NE08
        if (nname.indexOf(':') >= 0) {
            fatal("Illegal character(':') in notation name ", nname, null);
        }
        requireWhitespace();

        // Read the external identifiers.
        ids = readExternalIds(true, false);

        // Register the notation.
        setNotation(nname, ids);

        skipWhitespace();
        require('>');
    }
545025
def parse(self, declarations_str):
        
        for decl in declarations_str.split(';'):
            if not decl.strip():
                continue
            prop, sep, val = decl.partition(':')
            prop = prop.strip().lower()
            # TODO: don't lowercase case sensitive parts of values (strings)
            val = val.strip().lower()
            if sep:
                yield prop, val
            else:
                warnings.warn('Ill-formatted attribute: expected a colon '
                              'in {decl!r}'.format(decl=decl), CSSWarning)
669924
function parseDeclaration($ast, declaration, scope) {
  const variable = {};

  const propertyNode = $ast(declaration)
  .children('property');

  variable.declarationClean = propertyNode.value();
  variable.position = propertyNode.get(0).start;

  variable.declaration = `$${variable.declarationClean}`;

  variable.expression = parseExpression($ast, declaration);
  variable.flags = {
    default: isDefaultDeclaration($ast, declaration),
    global: isExplicitGlobalDeclaration($ast, declaration),
  };

  variable.deps = getDeclarationDeps($ast, declaration, scope);

  return variable;
}
251836
def setDeclaration(self, declaration):
        
        assert isinstance(declaration.proxy, ProxyAbstractItemView), \
            "The model declaration must be a QtAbstractItemView subclass. " \
            "Got {]".format(declaration)

        self.declaration = declaration
194276
def _parse_check(self, rule):
        """"""

        # Handle the special constant-type checks
        for check_cls in (checks.FalseCheck, checks.TrueCheck):
            check = check_cls()
            if rule == str(check):
                return check

        try:
            kind, match = rule.split(':', 1)
        except Exception:
            if self.raise_error:
                raise InvalidRuleException(rule)
            else:
                LOG.exception('Failed to understand rule %r', rule)
                # If the rule is invalid, we'll fail closed
                return checks.FalseCheck()

        if kind in checks.registered_checks:
            return checks.registered_checks[kind](kind, match)
        elif None in checks.registered_checks:
            return checks.registered_checks[None](kind, match)
        elif self.raise_error:
            raise InvalidRuleException(rule)
        else:
            LOG.error('No handler for matches of kind %r', kind)
            # If the rule is invalid, we'll fail closed
            return checks.FalseCheck()
1201258
private void parse(String text, int start, int end)
   {
      int closing = getClosingParenthesisPosition(text, start);
      if (closing == -1 || closing > end)
      {
         throw new IllegalStateException("Error in parenthesis hierarchy");
      }
      if (!text.startsWith("(0||"))
      {
         throw new IllegalStateException("Not a valid record");
      }

      int valueStart = getNextOpeningParenthesisPosition(text, start);
      int valueStop = getClosingParenthesisPosition(text, valueStart);
      int dictStart = getNextOpeningParenthesisPosition(text, valueStop);
      int dictStop = getClosingParenthesisPosition(text, dictStart);
      parse(text, start + 4, valueStart, valueStop, dictStart, dictStop);
   }
338011
private ParseTree parseForStatement(SourcePosition start, ParseTree initializer) {
    if (initializer == null) {
      initializer = new NullTree(getTreeLocation(getTreeStartLocation()));
    }
    eat(TokenType.SEMI_COLON);

    ParseTree condition;
    if (!peek(TokenType.SEMI_COLON)) {
      condition = parseExpression();
    } else {
      condition = new NullTree(getTreeLocation(getTreeStartLocation()));
    }
    eat(TokenType.SEMI_COLON);

    ParseTree increment;
    if (!peek(TokenType.CLOSE_PAREN)) {
      increment = parseExpression();
    } else {
      increment = new NullTree(getTreeLocation(getTreeStartLocation()));
    }
    eat(TokenType.CLOSE_PAREN);
    ParseTree body = parseStatement();
    return new ForStatementTree(getTreeLocation(start), initializer, condition, increment, body);
  }
962401
private void parseDefinition() {
        values = new ArrayList<DSLVariableValue>();
        if (getDefinition() == null) {
            return;
        }

        int variableStart = definition.indexOf("{");
        while (variableStart >= 0) {
            int variableEnd = getIndexForEndOfVariable(definition,
                                                       variableStart);
            String variable = definition.substring(variableStart + 1,
                                                   variableEnd);
            values.add(parseValue(variable));
            variableStart = definition.indexOf("{",
                                               variableEnd);
        }
    }
461975
private void parseRebasePaths(String rebaseDefinitions) {
		StringTokenizer tokenizer = new StringTokenizer(rebaseDefinitions, ",");
		while (tokenizer.hasMoreTokens()) {
			String rebasePair = tokenizer.nextToken();
			int equals = rebasePair.indexOf('=');
			String fromPrefix = rebasePair.substring(0, equals);
			String toPrefix = rebasePair.substring(equals + 1);
			if (GlobalConfiguration.isRuntimeLogging && log.isLoggable(Level.INFO)) {
				log.info("processPropertiesConfiguration: adding rebase rule from '" + fromPrefix + "' to '" + toPrefix
						+ "'");
			}
			rebasePaths.put(fromPrefix, toPrefix);
		}
	}
735671
public final void importDeclaration() throws RecognitionException {
		int importDeclaration_StartIndex = input.index();

		try {
			if ( state.backtracking>0 && alreadyParsedRule(input, 3) ) { return; }

			// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:281:5: ( 'import' ( 'static' )? Identifier ( '.' Identifier )* ( '.' '*' )? ';' )
			// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:281:7: 'import' ( 'static' )? Identifier ( '.' Identifier )* ( '.' '*' )? ';'
			{
			match(input,89,FOLLOW_89_in_importDeclaration153); if (state.failed) return;
			// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:281:16: ( 'static' )?
			int alt5=2;
			int LA5_0 = input.LA(1);
			if ( (LA5_0==106) ) {
				alt5=1;
			}
			switch (alt5) {
				case 1 :
					// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:281:16: 'static'
					{
					match(input,106,FOLLOW_106_in_importDeclaration155); if (state.failed) return;
					}
					break;

			}

			match(input,Identifier,FOLLOW_Identifier_in_importDeclaration158); if (state.failed) return;
			// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:281:37: ( '.' Identifier )*
			loop6:
			while (true) {
				int alt6=2;
				int LA6_0 = input.LA(1);
				if ( (LA6_0==47) ) {
					int LA6_1 = input.LA(2);
					if ( (LA6_1==Identifier) ) {
						alt6=1;
					}

				}

				switch (alt6) {
				case 1 :
					// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:281:38: '.' Identifier
					{
					match(input,47,FOLLOW_47_in_importDeclaration161); if (state.failed) return;
					match(input,Identifier,FOLLOW_Identifier_in_importDeclaration163); if (state.failed) return;
					}
					break;

				default :
					break loop6;
				}
			}

			// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:281:55: ( '.' '*' )?
			int alt7=2;
			int LA7_0 = input.LA(1);
			if ( (LA7_0==47) ) {
				alt7=1;
			}
			switch (alt7) {
				case 1 :
					// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:281:56: '.' '*'
					{
					match(input,47,FOLLOW_47_in_importDeclaration168); if (state.failed) return;
					match(input,38,FOLLOW_38_in_importDeclaration170); if (state.failed) return;
					}
					break;

			}

			match(input,52,FOLLOW_52_in_importDeclaration174); if (state.failed) return;
			}

		}
		catch (RecognitionException re) {
			reportError(re);
			recover(input,re);
		}
		finally {
			// do for sure before leaving
			if ( state.backtracking>0 ) { memoize(input, 3, importDeclaration_StartIndex); }

		}
	}