Function: combobulate-procedure-expand-rules
combobulate-procedure-expand-rules is a natively compiled function
defined in combobulate-procedure.el.
Signature
(combobulate-procedure-expand-rules RULES)
Documentation
Expand RULES into a set of node types.
RULES is a list of strings or forms matching the following:
A string must be a valid node type for that language.
The value t is a special case that matches all node types.
A rule form is a list of the form (rule RULE-NAME [FIELD ...]) with FIELD being a list of fields to draw the node types from, and RULE-NAME a valid production rule (node type). If all fields are desired, the form (rule RULE-NAME) matches all fields.
An inverted rule (that uses the inverted production rules table) is a list of the form (irule RULE-NAME).
An exclusion is a list of the form (exclude RULES EXCLUSIONS), where all RULES are matched, and then all EXCLUSIONS are removed from that set.
The special form (all) matches all node types, including supertypes and internal types. It is equivalent to manually typing out all the rules in the production rules table for a language.
By default, all RULES treated are unioned together, and duplicates are removed.
If combobulate-procedure-exclude-rules is set, it is used to
exclude node types from all expansion results.
Source Code
;; Defined in /nix/store/b5fvrwzi3zvkabyzx0in6gw1cj963z46-emacs-packages-deps/share/emacs/site-lisp/combobulate-procedure.el
(defun combobulate-procedure-expand-rules (rules)
"Expand RULES into a set of node types.
RULES is a list of strings or forms matching the following:
A string must be a valid node type for that language.
The value `t' is a special case that matches all node types.
A rule form is a list of the form (rule RULE-NAME [FIELD ...])
with FIELD being a list of fields to draw the node types from,
and RULE-NAME a valid production rule (node type). If all fields
are desired, the form (rule RULE-NAME) matches all fields.
An inverted rule (that uses the inverted production rules table)
is a list of the form (irule RULE-NAME).
An exclusion is a list of the form (exclude RULES EXCLUSIONS),
where all RULES are matched, and then all EXCLUSIONS are removed
from that set.
The special form (all) matches all node types, including
supertypes and internal types. It is equivalent to manually
typing out all the rules in the production rules table for a
language.
By default, all RULES treated are unioned together, and
duplicates are removed.
If `combobulate-procedure-exclude-rules' is set, it is used to
exclude node types from all expansion results."
;; try to ensure that RULES is a list and that if we're given a form
;; where the car is a symbol, we wrap it in a list.
(setq rules (ensure-list rules))
(when (symbolp (car rules))
(setq rules (list rules)))
(combobulate-procedure-expand-rules-1 rules))