Skip to content

Conversation

@ydah
Copy link
Member

@ydah ydah commented Jun 14, 2025

Fixes: #182

@ydah ydah marked this pull request as ready for review June 14, 2025 14:30
@ydah ydah requested a review from Copilot August 30, 2025 23:04
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 PR fixes issue #182 by allowing terminal symbols to be used anywhere within grammar rules, not just at specific positions. The change enables more flexible grammar rule definitions where terminal symbols can appear in any part of a production rule.

  • Adds support for terminal symbols in any position within grammar rules
  • Introduces proper handling of rule continuation with OrMark symbols
  • Maintains current rule target state across rule definitions

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
lib/racc/grammarfileparser.rb Core logic changes to track current rule target and handle rule continuations with OrMark
test/assets/term.y Test grammar file demonstrating terminal symbols used in various positions
test/regress/term Generated parser output from the test grammar
test/test_racc_command.rb New test case to verify the terminal symbol functionality

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

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.

Terminal can only be in first term

1 participant