-
Notifications
You must be signed in to change notification settings - Fork 0
Add -> operator to Dsp.g4 grammar
#126
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -13,7 +13,7 @@ term | |
| : SYMBOL # symbol | ||
| | '(' term ')' # parentheses | ||
| | term '::' term # binary | ||
| | term '.' term # binary | ||
| | term ('.' | '->') term # binary | ||
|
||
| | term '[' term (',' term)* ']' # subscript | ||
| | term '(' (term (',' term)*)? ')' # function | ||
| | <assoc=right> ('~' | '!' | '-' | '+' | '&' | '*') term # unary | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The examples in the PR description suggest that
p -> q . yshould parse asp -> (q . y)(right-associative), but the grammar implementation makes both.and->left-associative by default in ANTLR4. This meansp -> q . ywill actually parse as(p -> q) . y. If right-associativity is intended for these operators, they would need separate grammar rules or explicit associativity directives. Please verify the expected associativity behavior and update the PR description examples if needed.