Skip to content

Implement no associative infix op for precedence!{}#413

Open
A4-Tacks wants to merge 6 commits into
kevinmehall:masterfrom
A4-Tacks:no-assoc-infix
Open

Implement no associative infix op for precedence!{}#413
A4-Tacks wants to merge 6 commits into
kevinmehall:masterfrom
A4-Tacks:no-assoc-infix

Conversation

@A4-Tacks

@A4-Tacks A4-Tacks commented Aug 8, 2025

Copy link
Copy Markdown
Contributor

Like a:@ "<" b:@ {}

Part of #404

@kevinmehall

Copy link
Copy Markdown
Owner

Rebased this and tweaked the test to use "<" and ">" as the example non-associative operators rather than "+" to demonstrate an example use case.

But I found a problem with it: I added a left-associative "||" that binds weaker than "<" and ">" but this doesn't work correctly -- it should be allowed to have an associative operator with non-associative arguments, but the new boolean result propagates up and prevents that operator from being parsed.

@A4-Tacks

A4-Tacks commented Nov 3, 2025

Copy link
Copy Markdown
Contributor Author

I have implemented a tests passed parser

But I suspect it has more hidden problems, and it's a bit unsightly

(The println!() used for debugging has not been removed)

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