Skip to content

Refactor Core Documentation (README, SYNTAX, GLR) and Sync API Signatures#52

Merged
ehwan merged 10 commits into
mainfrom
readmesyntax
Jun 18, 2026
Merged

Refactor Core Documentation (README, SYNTAX, GLR) and Sync API Signatures#52
ehwan merged 10 commits into
mainfrom
readmesyntax

Conversation

@ehwan

@ehwan ehwan commented Jun 18, 2026

Copy link
Copy Markdown
Owner

This Pull Request refactors the project's markdown documentation files (README.md, SYNTAX.md, and GLR.md) to improve readability, translate all parts into clean, natural English, and update all code examples to reflect the actual API signatures defined in rusty_lr_core. It also establishes workspace guidelines for AI agents in .agents/AGENTS.md.

Proposed Changes

Documentation Refactoring

  • README.md:
    • Rewrote sections in standard, natural English.
    • Updated the Quick Start section with a comprehensive expression calculator parser grammar.
    • Fixed method signatures in code examples (e.g., accept, expected_token, can_feed, trace, backtrace) to include the required &parser and &mut userdata arguments.
  • SYNTAX.md:
    • Rewrote the entire reference guide in natural English.
    • Aligned all section headers with diagnostic URLs hardcoded in rusty_lr_parser/src/parser/parser.rs (e.g., #token-type-must-defined, #operator-precedence, #location-tracking).
    • Improved samples for regex patterns (*, +, ?, $sep()), groupings, and rule prioritization.
  • GLR.md:
    • Translated and refined the Generalized LR parsing guide.
    • Corrected GLR API code samples to pass the required &mut userdata parameter.
    • Documented feed_location and dynamic branch pruning methods (Err propagation and *shift = false).

Project Customization Rules

  • .agents/AGENTS.md (New):
    • Created a set of instructions for future AI agents, detailing guidelines on documentation synchronization, syntax changes formatting, bootstrap test execution, copy-pasteable PR creation, and Implementation Plan console outputting.

Verification

  • Ran the parser bootstrap test script:
    ./scripts/bootstrap_test.sh

@ehwan ehwan self-assigned this Jun 18, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request introduces comprehensive updates to the documentation and guidelines of RustyLR, including a new agent guidelines file, a rewritten GLR parsing guide, an updated main README, and a restructured syntax reference. The review feedback highlights several issues in the documentation examples, such as unbound variables in the GLR expression grammar, absolute local file URLs in the agent guidelines, misleading comments regarding token value extraction, and a missing return type in the userdata example.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread GLR.md
Comment thread .agents/AGENTS.md Outdated

## 2. Documenting Syntax Modifications
In particular, when new grammar rules, directives, pattern operators, or reduce action features are introduced:
- You must add a detailed explanation with examples inside [SYNTAX.md](file:///wsl.localhost/Ubuntu-22.04/home/ehwan/workspace/RustyLR/SYNTAX.md).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

The link to SYNTAX.md uses an absolute local file URL (file:///wsl.localhost/...) pointing to your local WSL environment. This should be a relative link so that it works for other users and in different environments.

Suggested change
- You must add a detailed explanation with examples inside [SYNTAX.md](file:///wsl.localhost/Ubuntu-22.04/home/ehwan/workspace/RustyLR/SYNTAX.md).
- You must add a detailed explanation with examples inside [SYNTAX.md](../SYNTAX.md).

Comment thread .agents/AGENTS.md Outdated
In particular, when new grammar rules, directives, pattern operators, or reduce action features are introduced:
- You must add a detailed explanation with examples inside [SYNTAX.md](file:///wsl.localhost/Ubuntu-22.04/home/ehwan/workspace/RustyLR/SYNTAX.md).
- Ensure the documentation style matches the formatting, tone, and organization of existing syntax references.
- Preserve the exact header anchor names that are referenced as diagnostic URLs within the codebase (e.g., in [parser.rs](file:///wsl.localhost/Ubuntu-22.04/home/ehwan/workspace/RustyLR/rusty_lr_parser/src/parser/parser.rs)).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

The link to parser.rs uses an absolute local file URL pointing to your local WSL environment. This should be a relative link so that it works for other users and in different environments.

Suggested change
- Preserve the exact header anchor names that are referenced as diagnostic URLs within the codebase (e.g., in [parser.rs](file:///wsl.localhost/Ubuntu-22.04/home/ehwan/workspace/RustyLR/rusty_lr_parser/src/parser/parser.rs)).
- Preserve the exact header anchor names that are referenced as diagnostic URLs within the codebase (e.g., in [parser.rs](../rusty_lr_parser/src/parser/parser.rs)).

Comment thread SYNTAX.md Outdated
Comment thread SYNTAX.md Outdated
ehwan and others added 4 commits June 18, 2026 20:25
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
@ehwan
ehwan merged commit 11fae91 into main Jun 18, 2026
1 check passed
@ehwan
ehwan deleted the readmesyntax branch June 18, 2026 11:28
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