comby-tools/comby

Specifying exclusions for matches

elfring opened this issue · 2 comments

Named matches can capture some data.
I would like to become able to specify that other matches must not find such data again which were determined already according to selected names (or predefined identifiers).
🔮 How are the chances to exclude unwanted matches occasionally?

Yeah the only way to exclude matches right now is directly, based on the captured value, that you can refer to, with rules, and if you have one match that binds multiple values, you can exclude based on these docs. But it's not possible to express excluding matches in terms of other matches, like "if I saw :[x] match "foo" in a previous match then exclude this new match based on the previous matches value of :[x]". I.e., if the matched values/environments are disjoint, there is no way to compare them using comby itself. This might be something that's more suitable to postprocess with an external program or script, if you export the matches.

This might be something that's more suitable to postprocess with an external program or script, if you export the matches.

I would appreciate if more source code transformations would become supported also by the means of your tool for further collateral evolution.