Migrate grammar DSL to operator-only Type‑0 model and add rewrite-rule operators - #175
Draft
TristinPorter with Copilot wants to merge 1 commit into
Draft
Migrate grammar DSL to operator-only Type‑0 model and add rewrite-rule operators#175TristinPorter with Copilot wants to merge 1 commit into
TristinPorter with Copilot wants to merge 1 commit into
Conversation
Agent-Logs-Url: https://github.com/Tristin-Porter/CDTk/sessions/ac101061-cbc2-481f-8aa4-6773b8d70852 Co-authored-by: TristinPorter <232979486+TristinPorter@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
TristinPorter
May 21, 2026 05:27
View session
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This updates the internal grammar surface to a Type‑0 rewrite-oriented model:
Rulevariables + terminal literals + first-declared start rule + operator syntax for productions/rewrite rules. It removes legacy builder/chaining APIs from grammar declaration paths and introduces explicitEmptysemantics for ε.Core grammar model (Type‑0)
Rulecomposition to operator-only grammar construction (+,|).Rule.Emptyas the canonical ε symbol.Rulefield in declaration order.Terminal model simplification
TokenSpechierarchy with a minimal terminal-orientedTokenwrapper.char,byte,int(hex-byte range), andbyte[].Rewrite system syntax
RewriteProduction(α -> β)RewriteRule(collection of productions)(alpha) > (beta)to create rewrite productions|to compose multiple productions into oneRewriteRule.API cleanup / syntax migration
Ref, optional/repetition/list/precedence builder helpers, and chained rewrite methods)..Ref,.Then,.Or,.To,.Rewrite,.Transform).Usage shape (new DSL)