From: Francis De Brabandere <francisdb@gmail.com> The 10 shift/reduce conflicts are inherent ambiguities where bison's default shift gives the correct behavior: colon chains extend greedily, and Else/End If bind to the innermost inline If (dangling-else rule). --- dlls/vbscript/parser.y | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/dlls/vbscript/parser.y b/dlls/vbscript/parser.y index 4977358b333..97badf7593f 100644 --- a/dlls/vbscript/parser.y +++ b/dlls/vbscript/parser.y @@ -93,6 +93,23 @@ static statement_t *link_statements(statement_t*,statement_t*); %define api.pure %start Program +/* 10 expected shift/reduce conflicts, all resolved correctly by bison's + * default shift: + * + * - 5 from colon chains: ':' can extend the current statement list or + * start a new one in SourceElements, inline If bodies, and Else bodies; + * shifting (greedy extension) gives the correct behavior. + * + * - 2 classic dangling Else / End If: "If a Then If b Then x Else y" + * and "If a Then If b Then x End If" where Else / End If binds to + * the innermost If. + * + * - 3 from End If / colon after inline If-Else: "If a Then If b Then + * x Else y End If" and similar; End If and ':' bind to the innermost + * If-Else. + */ +%expect 10 + %union { const WCHAR *string; statement_t *statement; -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/10343