You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Make the position deducer more careful:
* A rule reference in a base alternative can match several items of
the inserted alternative ("pair 'c'" with "pair: 'a' 'b'" shadows
"'a' 'b' 'c' 'd'").
* A failure after a cut fails the whole rule, so "'a' 'c'" must be
inserted before "'a' ~ 'b'".
* An inserted alternative which can match the same code as the base
alternative or its proper prefix would report a false error on
valid code re-parsed in the second pass; never insert it before
the base alternative.
The only change in the generated parser: the error alternative in
with_item is now inserted before the base alternative (this is
equivalent, as its action only reports an error for an invalid
target).
An alternative inserted by a rule extension now always fails in a
generated Python parser (which has no second parsing pass), like an
alternative which references an invalid_* rule.
NamedItem.__repr__() now includes the item type, so two groups which
only differ by the item type do not share an artificial rule.
build_parser() accepts path-like objects again.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
0 commit comments