-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix spurious syntax error in multidim. indexed array assignments
Example reproducers: $ my_array=((somevalue) (select)) && typeset -p my_array -ksh: syntax error: `select' unexpected $ my_array=((somevalue) select) && typeset -p my_array -ksh: syntax error: `select' unexpected Analysis: The problem is in the assign() function in parse.c. From the second value element on, reserved words/keywords are wrongly recognised when assign() is called recursively to parse multidimensional array assignments, because the lexer flag 'noreserv' is reset to zero in the course of the assign() call. src/cmd/ksh93/sh/parse.c: assign(): - After recursively calling assign() to deal with nested parentheses, set noreserv to back to 1 to re-disable the recognition of reserved words by the lexer. Thanks to @TristanJamesBall for the report. Resolves: #790
- Loading branch information
Showing
4 changed files
with
34 additions
and
2 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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