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

Add support for Parameterizing rules with zero parameters #391

Closed
wants to merge 1 commit into from

Conversation

ydah
Copy link
Collaborator

@ydah ydah commented Mar 24, 2024

In some cases, Inline does not specify parameters. Inline is implemented as an option to Parameterizing rules.
Therefore, we added support for Parameterizing rules with zero parameters.

In some cases, Inline does not specify parameters. Inline is implemented as an option to Parameterizing rules. Therefore, we added support for Parameterizing rules with zero parameters.
@@ -231,7 +231,12 @@ rule

token_declaration: id int_opt alias { result = val }

rule_declaration: "%rule" IDENTIFIER "(" rule_args ")" ":" rule_rhs_list
rule_declaration: "%rule" id_colon ":" rule_rhs_list
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think %rule without %inline is needless because it is same with
a normal production rule.
I agree to introducing zero parameters for %inline but it might be better to support the feature in #369.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed it is. So I close this PR. Thank you for your review!

@ydah ydah closed this Mar 30, 2024
@ydah ydah deleted the add-support-zero-param branch March 30, 2024 18:29
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.

2 participants