Generate the rules for the standard keywords.

@param keywords the standard keywords.
@return the rules.
558696
protected List<Map<String, ?>> generateStandardKeywords(Set<String> keywords) {
		final List<Map<String, ?>> list = new ArrayList<>();
		if (!keywords.isEmpty()) {
			list.add(pattern(it -> {
				it.matches(keywordRegex(keywords));
				it.style(KEYWORD_STYLE);
				it.comment("Standard Keywords"); //$NON-NLS-1$
			}));
		}
		return list;
	}
1055456
public java.util.List<String> getRuleNames() {
        if (ruleNames == null) {
            ruleNames = new com.amazonaws.internal.SdkInternalList<String>();
        }
        return ruleNames;
    }
125550
def get_keywords_as_string(keywords):
        
        if type(keywords) is list:
            keywords = ', '.join(keywords)
        if type(keywords) is str:
            final_keywords = keywords
        elif type(keywords) is unicode:
            final_keywords = keywords.encode('utf-8')
        elif keywords is None:
            final_keywords = ""
        else:
            raise TypeError("keywords argument must be a string or a list of strings; got a %s" % type(keywords))
        return final_keywords
1357605
public boolean addKeywords(String keywords) {
        try {
            return add(new Meta(Element.KEYWORDS, keywords));
		} catch (DocumentException de) {
            throw new ExceptionConverter(de);
        }
    }
907150
protected static Iterable<Keyword> getAllKeywords(Grammar grammar) {
		final Map<String, Keyword> keywords = new HashMap<>();
		final List<ParserRule> rules = GrammarUtil.allParserRules(grammar);
		for (final ParserRule parserRule : rules) {
			final List<Keyword> list = typeSelect(eAllContentsAsList(parserRule), Keyword.class);
			for (final Keyword keyword : list) {
				keywords.put(keyword.getValue(), keyword);
			}
		}
		final List<EnumRule> enumRules = GrammarUtil.allEnumRules(grammar);
		for (final EnumRule enumRule : enumRules) {
			final List<Keyword> list = typeSelect(eAllContentsAsList(enumRule), Keyword.class);
			for (final Keyword keyword : list) {
				keywords.put(keyword.getValue(), keyword);
			}
		}
		return keywords.values();
	}
1152196
public final void parse() {
        Collection<Keyword> unsupportedRestKeywords = new LinkedList<>();
        unsupportedRestKeywords.addAll(Arrays.asList(DefaultKeyword.UNION, DefaultKeyword.INTERSECT, DefaultKeyword.EXCEPT, DefaultKeyword.MINUS));
        unsupportedRestKeywords.addAll(Arrays.asList(getUnsupportedKeywordsRest()));
        lexerEngine.unsupportedIfEqual(unsupportedRestKeywords.toArray(new Keyword[unsupportedRestKeywords.size()]));
    }
816849
protected List<Map<String, ?>> generatePrimitiveTypes(Set<String> primitiveTypes) {
		final List<Map<String, ?>> list = new ArrayList<>();
		if (!primitiveTypes.isEmpty()) {
			list.add(pattern(it -> {
				it.matches(keywordRegex(primitiveTypes) + "(?:\\s*\\[\\s*\\])*"); //$NON-NLS-1$
				it.style(PRIMITIVE_TYPE_STYLE);
				it.comment("Primitive types"); //$NON-NLS-1$
			}));
		}
		return list;
	}
1212430
public JSONArray getKeywordsJsonArray() {
        JSONArray keywordArray = new JSONArray();
        for (String keyword : keywords_) {
            keywordArray.put(keyword);
        }
        return keywordArray;
    }
752747
function createKeywords(args) {
    // TODO Hmm.. Circular dependency... something smells here...
    var validators = require('./validators');

    var keys = [];
    for(var i = 0; i < args.length; i++) {
        var keyword = {name: args[i]};
        
        if(_.isArray(args[i + 1])) {
            i++;
            keyword.args = args[i];
        }

        if(validators.isReturn(args[i + 1])) {
            i++;
            keyword.returnVar = pickReturnVar(args[i]);
        }
        keys.push(keyword);
    }
    return keys;
}
157175
def defined_namespace_keywords(self) -> Set[str]:  # noqa: D401
        """"""
        return set(self.namespace_pattern) | set(self.namespace_url)
436153
public static Trie<String> toStringTrie(List<String> words) {
        final TrieBuilder<String> builder = new TrieBuilder<>();
        for (String word : words) {
            builder.add(word, "");
        }
        return builder.build();
    }
1235186
def keywords(self):
        
        defined_keywords = [
            ('allowempty_map', 'allowempty_map'),
            ('assertion', 'assertion'),
            ('default', 'default'),
            ('class', 'class'),
            ('desc', 'desc'),
            ('enum', 'enum'),
            ('example', 'example'),
            ('extensions', 'extensions'),
            ('format', 'format'),
            ('func', 'func'),
            ('ident', 'ident'),
            ('include_name', 'include'),
            ('length', 'length'),
            ('map_regex_rule', 'map_regex_rule'),
            ('mapping', 'mapping'),
            ('matching', 'matching'),
            ('matching_rule', 'matching_rule'),
            ('name', 'name'),
            ('nullable', 'nullable')
            ('parent', 'parent'),
            ('pattern', 'pattern'),
            ('pattern_regexp', 'pattern_regexp'),
            ('range', 'range'),
            ('regex_mappings', 'regex_mappings'),
            ('required', 'required'),
            ('schema', 'schema'),
            ('schema_str', 'schema_str'),
            ('sequence', 'sequence'),
            ('type', 'type'),
            ('type_class', 'type_class'),
            ('unique', 'unique'),
            ('version', 'version'),
        ]
        found_keywords = []

        for var_name, keyword_name in defined_keywords:
            if getattr(self, var_name, None):
                found_keywords.append(keyword_name)

        return found_keywords
552533
public List<String> getKeywords(String document, int size)
    {
        return getKeywords(defaultSegment.seg(document), size);
    }
1267426
public static Keyword keyword(Object o) {
        if (o instanceof Keyword)
            return (Keyword) o;
        else if (o instanceof String) {
            String s = (String) o;
            if (s.charAt(0) == ':')
                return new KeywordImpl(s.substring(1));
            else
                return new KeywordImpl(s);
        }
        else throw new IllegalArgumentException("Cannot make keyword from " + o.getClass().getSimpleName());
    }
932205
public void removeKeyword(String keyword) {
        if (!taxonomy.concepts.containsKey(keyword)) {
            throw new IllegalArgumentException(String.format("Concept %s does not exist.", keyword));
        }

        taxonomy.concepts.remove(keyword);
        if (synset != null) {
            synset.remove(keyword);
        }
    }
710561
public Set<String> getPureKeywords() {
		Set<String> kws = this.pureSarlKeywords == null ? null : this.pureSarlKeywords.get();
		if (kws == null) {
			kws = new HashSet<>();
			kws.add(getAsKeyword());
			kws.add(getRequiresKeyword());
			kws.add(getWithKeyword());
			kws.add(getItKeyword());
			kws.add(getArtifactKeyword());
			kws.add(getAnnotationKeyword());
			kws.add(getSpaceKeyword());
			kws.add(getOnKeyword());
			kws.add(getCapacityKeyword());
			kws.add(getEventKeyword());
			kws.add(getVarKeyword());
			kws.add(getAgentKeyword());
			kws.add(getDispatchKeyword());
			kws.add(getUsesKeyword());
			kws.add(getSkillKeyword());
			kws.add(getDefKeyword());
			kws.add(getFiresKeyword());
			kws.add(getOverrideKeyword());
			kws.add(getIsStaticAssumeKeyword());
			kws.add(getBehaviorKeyword());
			kws.add(getExtensionExtensionKeyword());
			kws.add(getValKeyword());
			kws.add(getTypeofKeyword());
			kws.add(getOccurrenceKeyword());
			this.pureSarlKeywords = new SoftReference<>(kws);
		}
		return Collections.unmodifiableSet(kws);
	}
848374
protected List<Map<String, ?>> generateTypeDeclarations(Set<String> declarators) {
		final List<Map<String, ?>> list = new ArrayList<>();
		if (!declarators.isEmpty()) {
			list.add(pattern(it -> {
				it.matches(keywordRegex(declarators));
				it.style(TYPE_DECLARATION_STYLE);
				it.comment("Type Declarations"); //$NON-NLS-1$
			}));
		}
		return list;
	}