Skip to content

Conversation

@ydah
Copy link
Member

@ydah ydah commented Mar 18, 2025

Support following:

%rule %inline op : '+'
                 | '-'
                 ;

%%

operation : op?
          ;

@ydah ydah force-pushed the args-include-inline branch from c8e613d to 231a8c5 Compare March 18, 2025 09:42
@ydah ydah requested a review from Copilot March 18, 2025 11:46
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This pull request implements support for parameterized rule arguments that include inline definitions and updates rbs-inline version references in various modules.

  • Added a new test case in the parser spec to verify the expansion of inlining rules.
  • Extended RuleBuilder with inline rule resolution and updated RBS-related comments.
  • Updated TODO comments across multiple files to reflect the upgrade to rbs-inline 0.11.0 with a reference to the related pull request.

Reviewed Changes

Copilot reviewed 21 out of 21 changed files in this pull request and generated no comments.

Show a summary per file
File Description
spec/lrama/parser_spec.rb New test for inline parameterized rules added.
lib/lrama/grammar/rule_builder.rb Inline rule resolution logic and local variable refactoring in process_rhs.
lib/lrama/grammar/code/rule_action.rb Updated rbs-inline TODO comment with new version and reference.
lib/lrama/grammar/percent_code.rb Updated rbs-inline TODO comment.
lib/lrama/grammar/counter.rb Updated rbs-inline TODO comment.
lib/lrama/grammar/code/printer_code.rb Updated rbs-inline TODO comment.
lib/lrama/grammar/type.rb Updated rbs-inline TODO comment.
lib/lrama/state/action/goto.rb Updated rbs-inline TODO comment.
lib/lrama/grammar/code/destructor_code.rb Updated rbs-inline TODO comment.
lib/lrama/state/action/shift.rb Updated rbs-inline TODO comment.
lib/lrama/grammar.rb Refactored $accept rule construction for clarity.
lib/lrama/tracer/duration.rb Updated rbs-inline TODO comment.
lib/lrama/state/action/reduce.rb Updated rbs-inline TODO comment.
lib/lrama/counterexamples/example.rb Updated rbs-inline TODO comment.
lib/lrama/state.rb Updated rbs-inline TODO comment.
lib/lrama/digraph.rb Updated rbs-inline TODO comment.
lib/lrama/states.rb Updated rbs-inline TODO comment.

@ydah ydah force-pushed the args-include-inline branch from 8de804f to 734ba1f Compare March 18, 2025 12:51
@ydah ydah force-pushed the args-include-inline branch from 734ba1f to 1a8c1cd Compare August 2, 2025 00:04
@ydah ydah merged commit 11deaed into ruby:master Aug 2, 2025
22 checks passed
@ydah ydah deleted the args-include-inline branch August 2, 2025 06:43
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