summaryrefslogtreecommitdiff
path: root/tool
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2023-03-08 17:39:33 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2023-03-08 20:07:46 +0900
commitbead4bce3b4544cb61b3c05c11204a377e20cdfa (patch)
tree1aaaa8de123a4528581d76669aafe618632beaa4 /tool
parent116320402109c9b6de66bc71ed02ef4d12c38dc0 (diff)
Constify local static variables in yyparse
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/7477
Diffstat (limited to 'tool')
-rwxr-xr-xtool/ytab.sed2
1 files changed, 2 insertions, 0 deletions
diff --git a/tool/ytab.sed b/tool/ytab.sed
index 95a9b3e1eb..70951b780d 100755
--- a/tool/ytab.sed
+++ b/tool/ytab.sed
@@ -75,6 +75,8 @@ s/\( YYFPRINTF *(\)yyo,/\1p,/
s/\( YYFPRINTF *(\)stderr,/\1p,/
s/\( YYDPRINTF *((\)stderr,/\1p,/
s/^\([ ]*\)\(yyerror[ ]*([ ]*parser,\)/\1parser_\2/
+s/\(static\)\( YYSTYPE yyval_default\)/\1 const\2/
+s/\(static\)\( YYLTYPE yyloc_default\)/\1 const\2/
s!^ *extern char \*getenv();!/* & */!
s/^\(#.*\)".*\.tab\.c"/\1"parse.c"/
/^\(#.*\)".*\.y"/s:\\\\:/:g