Skip to content
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

Fix precedence of coalesce operators ?? and ??? #1270

Merged
merged 5 commits into from
Apr 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/src/manpage.md
Original file line number Diff line number Diff line change
Expand Up @@ -3354,5 +3354,5 @@ MILLER(1) MILLER(1)



2023-04-15 MILLER(1)
2023-04-16 MILLER(1)
</pre>
2 changes: 1 addition & 1 deletion docs/src/manpage.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3333,4 +3333,4 @@ MILLER(1) MILLER(1)



2023-04-15 MILLER(1)
2023-04-16 MILLER(1)
4 changes: 2 additions & 2 deletions docs/src/reference-dsl-differences.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ mlr: cannot parse DSL expression.
Parse error on token "$y" at line 6 column 3.
Please check for missing semicolon.
Expected one of:
␚ ; > >> | ? || ^^ && ?? ??? =~ !=~ == != <=> >= < <= ^ & << >>> + - .+
.- * / // % .* ./ .// . ** [ [[ [[[
␚ ; > >> | ? || ^^ && =~ !=~ == != <=> >= < <= ^ & << >>> + - .+ .- *
/ // % .* ./ .// . ?? ??? ** [ [[ [[[

</pre>

Expand Down
4 changes: 2 additions & 2 deletions docs/src/reference-dsl-higher-order-functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -812,8 +812,8 @@ mlr: cannot parse DSL expression.
Parse error on token "(" at line 4 column 35.
Please check for missing semicolon.
Expected one of:
; } > >> | ? || ^^ && ?? ??? =~ !=~ == != <=> >= < <= ^ & << >>> + - .+
.- * / // % .* ./ .// . **
; } > >> | ? || ^^ && =~ !=~ == != <=> >= < <= ^ & << >>> + - .+ .- * /
// % .* ./ .// . ?? ??? **

</pre>

Expand Down
4 changes: 2 additions & 2 deletions docs/src/reference-dsl-operators.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ Operators are listed in order of decreasing precedence, highest first.
|-------------------------------|---------------|
| `()` `{}` `[]` | left to right |
| `**` | right to left |
| `???` | left to right |
| `??` | left to right |
| `!` `~` unary`+` unary`-` | right to left |
| `.` | left to right |
| `*` `/` `//` `%` | left to right |
Expand All @@ -38,8 +40,6 @@ Operators are listed in order of decreasing precedence, highest first.
| `|` | left to right |
| `<` `<=` `>` `>=` | left to right |
| `==` `!=` `=~` `!=~` `<=>` | left to right |
| `???` | left to right |
| `??` | left to right |
| `&&` | left to right |
| `^^` | left to right |
| `||` | left to right |
Expand Down
4 changes: 2 additions & 2 deletions docs/src/reference-dsl-operators.md.in
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ Operators are listed in order of decreasing precedence, highest first.
|-------------------------------|---------------|
| `()` `{}` `[]` | left to right |
| `**` | right to left |
| `???` | left to right |
| `??` | left to right |
| `!` `~` unary`+` unary`-` | right to left |
| `.` | left to right |
| `*` `/` `//` `%` | left to right |
Expand All @@ -22,8 +24,6 @@ Operators are listed in order of decreasing precedence, highest first.
| `|` | left to right |
| `<` `<=` `>` `>=` | left to right |
| `==` `!=` `=~` `!=~` `<=>` | left to right |
| `???` | left to right |
| `??` | left to right |
| `&&` | left to right |
| `^^` | left to right |
| `||` | left to right |
Expand Down
56 changes: 28 additions & 28 deletions internal/pkg/parsing/lexer/acttab.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

84 changes: 42 additions & 42 deletions internal/pkg/parsing/lexer/lexer.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading