# Why HS and HS' Can Differ in Function-like Macro Expansion

In Prosser's algorithm, when a function-like macro is expanded:

```
T^HS • ( • actuals • )^HS' • TS''
```

the combined hide set is `(HS ∩ HS') ∪ {T}`. The macro name token `T`
and the closing `)` can arrive from different expansion contexts, each
carrying their own accumulated hide sets.

## Simple case: macro name produced by a prior expansion

```c
#define G F
#define F(x) x
```

Expanding `G(1)`:

1. `G` is object-like, HS = {}. Expand it: `subst` produces `F`, then
   `hsadd` sets HS = {G} on it.
2. Rescan the result prepended to the remaining tokens:
   `F^{G} ( 1 )^{} ...`
3. `F` is a function-like macro. Now T = `F` with HS = {G}, and the
   `)` comes from the original source with HS' = {}.
4. Combined hide set: ({G} ∩ {}) ∪ {F} = **{F}**.

Notice G is **not** in the final hide set. So if `F`'s body expands to
something containing `G`, that `G` can be expanded again. This is
correct -- `G` is not recursing here, it merely produced `F`.

If the algorithm used **union** instead of intersection, the hide set
would be {G, F}, and `G` would be unnecessarily blocked inside `F`'s
expansion.

## Reverse case: `)` comes from an expansion

```c
#define RPAREN )
#define F(x) x
```

If during rescanning we encounter `F^{} ( 1 RPAREN` and `RPAREN`
expands to `)^{RPAREN}`:

- T = `F`, HS = {}
- HS' = {RPAREN}
- Combined: ({} ∩ {RPAREN}) ∪ {F} = **{F}**

Again, `RPAREN` doesn't leak into `F`'s expansion hide set, because it
has nothing to do with `F`'s recursion prevention.

## Both non-empty

```c
#define G F
#define H )
#define F(x) x
```

If rescanning produces `F^{G} ( 1 )^{H}`:

- HS = {G}, HS' = {H}
- Combined: ({G} ∩ {H}) ∪ {F} = **{F}**

Neither G nor H propagates, because neither is relevant to both sides
of the invocation.

## Why intersection

The `)` token is the "end boundary" of the macro call. Its hide set
reflects which macros were active in the context that *produced* that
`)`. The macro name's hide set reflects which macros were active in the
context that *produced* the name. Intersection keeps only the macro
names that were hidden in **both** contexts -- those are the ones
genuinely at risk of infinite recursion. Everything else is allowed to
re-expand, which is the most permissive correct choice.
