Aug. 17th, 2013

http://austingroupbugs.net/view.php?id=736

An empty Shell program and a program consisting of two or more commands separated with NEWLINE tokens are valid Shell scripts. However, Shell Grammar Rules only accept exactly one single command which results in a syntax error against zero commands and two or more commands separated with NEWLINE tokens.

Desired Action

On page 2350, lines 74801-74808, change
%start  complete_command
%%
complete_command : list separator
                 | list
                 ;
to
%start script
%%
script           : commands linebreak
                 | /* empty */
                 ;
commands         : commands newline_list complete_command
                 |                       complete_command
                 ;
complete_command : list separator_op
                 | list
                 ;
http://austingroupbugs.net/view.php?id=737

Shell Grammar Rules for compound_list duplicate the definition of linebreak
linebreak        : newline_list
                 | /* empty */
                 ;
which results in four grammar rules for compound_list instead of two.

Desired Action

On page 2350, lines 74834-74838, change
compound_list    :              term
                 | newline_list term
                 |              term separator
                 | newline_list term separator
                 ;
to
compound_list    : linebreak term
                 | linebreak term separator
                 ;

Profile

Anton Salikhmetov

November 2018

S M T W T F S
    123
45678 910
11121314151617
18192021222324
252627282930 

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Jun. 26th, 2025 05:04 pm
Powered by Dreamwidth Studios