Skip to content

Commit

Permalink
Fix precedence of coalesce operators ?? and ??? (#1270)
Browse files Browse the repository at this point in the history
* Fix precedence of coalesce operators

* GOCC codegen

* unit-test updates

* operator-precedence documentation

* doc-build artifacts
  • Loading branch information
johnkerl authored Apr 16, 2023
1 parent b8f3902 commit ae61dc5
Show file tree
Hide file tree
Showing 18 changed files with 107,107 additions and 107,107 deletions.
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

0 comments on commit ae61dc5

Please sign in to comment.