When the file ends in the middle of a rule with remaining expectations, it doesn't trigger an expectation error (it does, of course, fail to parse).
A simplified example that triggers the behavior is this:
data_var_decls_r
%= (lit("data")
> lit('{'))
> lit('}');
If the input is only
data {
then the expectation error for the final expected }
isn't triggered.
Is there a way to deal with expectation errors that extend past the end of file?