Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lazy reference resolution #219

Merged
merged 4 commits into from
Nov 12, 2023
Merged

Conversation

yui-knk
Copy link
Collaborator

@yui-knk yui-knk commented Nov 12, 2023

Rule build process is a bit complicated. new_token ("@1") is created
when derived rule is created. Original rule requires new_token, but
derived rule needs to refer to original rule.
We can avoid such complex order of rule generation by lazy reference resolution.

This PR also fixes a bug of derived rule for mid rule action referring to wrong LHS, mentioned by #195 (comment)

Rule build process is a bit complicated. `new_token` (`"@1"`) is created
when derived rule is created. Original rule requires `new_token`, but
derived rule needs to refer to original rule.
We can avoid such complex order of rule generation by lazy reference resolution.

This PR also fixes a bug of derived rule for mid rule action referring to wrong LHS,
mentioned by ruby#195 (comment)
@yui-knk yui-knk force-pushed the lazy_reference_resolution branch from 421c873 to f15e68e Compare November 12, 2023 09:38
@yui-knk yui-knk merged commit d134e68 into ruby:master Nov 12, 2023
14 checks passed
@yui-knk yui-knk deleted the lazy_reference_resolution branch November 12, 2023 09:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant