On 10.06.26 19:03, Tom Lane wrote:
Peter Eisentraut <[email protected]> writes:
The release notes of bison 3.0 say

    Missing semicolons at the end of actions are no longer added (as announced
    in the release 2.5).

But apparently that is not in fact happening?

I might be wrong, but I think that is saying that bison will no
longer add a semicolon at the end of the C code for an action.
If you do this:

diff --git a/src/pl/plpgsql/src/pl_gram.y b/src/pl/plpgsql/src/pl_gram.y
index 5009e59a78f..238c8ca80f1 100644
--- a/src/pl/plpgsql/src/pl_gram.y
+++ b/src/pl/plpgsql/src/pl_gram.y
@@ -415,8 +415,9 @@ option_value : T_WORD
                 }
              | unreserved_keyword
                 {
-                   $$ = pstrdup($1);
+                   $$ = pstrdup($1)
                 }
+       ;
opt_semi :
                 | ';'

it doesn't compile.  I don't have a pre-3.0 bison to compare to
though.

Yes, this appears to be correct. With bison 2.3, the above compiles. The generated code looks like

  case 11:
#line 417 "../src/pl/plpgsql/src/pl_gram.y"
    {
                    (yyval.str) = pstrdup((yyvsp[(1) - (1)].keyword))
                ;}
    break;



Reply via email to