From: Carl Worth Date: Mon, 17 May 2010 19:45:16 +0000 (-0700) Subject: Expect 1 shift/reduce conflict. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=796e1f0eadcfbbc6e4d79778b2378975204bb97c;p=mesa.git Expect 1 shift/reduce conflict. The most recent fix to the parser introduced a shift/reduce conflict. We document this conflict here, and tell bison that it need not report it (since I verified that it's being resolved in the direction desired). For the record, I did write additional lexer code to eliminate this conflict, but it was quite fragile, (would not accept a newline between a function-like macro name and the left parenthesis, for example). --- diff --git a/glcpp-parse.y b/glcpp-parse.y index 6f158d91398..959083578e7 100644 --- a/glcpp-parse.y +++ b/glcpp-parse.y @@ -116,6 +116,14 @@ _argument_list_member_at (argument_list_t *list, int index); %type argument macro parameter_list replacement_list %type argument_list +/* Hard to remove shift/reduce conflicts documented as follows: + * + * 1. '(' after FUNC_MACRO name which is correctly resolved to shift + * to form macro invocation rather than reducing directly to + * content. + */ +%expect 1 + %% input: