I'm trying to understand the behavior of Qi's Difference Parsers.
With something like this:
ruleA =
ruleAa
| ruleAb
| ruleAc
;
ruleB =
ruleA - ruleAc
;
I was imagining that the parser would match ruleB iff the input matches ruleAa or ruleAb. In other words, ruleB would subtract one alternative (ruleAc) from ruleA. Is this incorrect?
In my code, I'm doing something like the above and it compiles but does not seem to behave as I expected. My actual use-case involves other factors that are hard to unwind here.
In essence, what I'm trying to do is this: I have a rule like ruleA, which contains a set of alternatives. This rule gets used in a few different places in my grammar. But in one particular use, I need to avoid evoking just one of the alternatives. It seems like the difference parser is intended for that purpose, but maybe I'm misunderstanding?
Thanks in advance!