Aug. 15th, 2013

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

When processed by yacc(1), Shell Grammar Rules result in 5 shift/reduce conflicts. These conflicts are all caused by unnecessary linebreak non-terminals in case_item_ns rule after compound_list non-terminals. The linebreak non-terminal are indeed unnecessary because compound_list rule
compound_list    :              term
                 | newline_list term
                 |              term separator
                 | newline_list term separator
                 ;
where
separator        : separator_op linebreak
                 | newline_list
                 ;
itself embeds linebreak definition
linebreak        : newline_list
                 | /* empty */
                 ;
Without the trailing linebreak non-terminals following compound_list, yacc(1) produces no shift/reduce conflicts.

Desired Action

On page 2351, lines 74863-74866, change
case_item_ns     :     pattern ')'               linebreak
                 |     pattern ')' compound_list linebreak
                 | '(' pattern ')'               linebreak
                 | '(' pattern ')' compound_list linebreak
                 ;
to
case_item_ns     :     pattern ')' linebreak
                 |     pattern ')' compound_list
                 | '(' pattern ')' linebreak
                 | '(' pattern ')' compound_list
                 ;

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 Jul. 21st, 2025 02:05 am
Powered by Dreamwidth Studios