Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit9812138

Browse files
committed
ecpg: avoid breaking the IDENT precedence level in two.
Careless string hacking caused parse.pl to transform gram.y'sdeclaration%nonassoc IDENT PARTITION RANGE ROWS ...into%nonassoc IDENT%nonassoc CSTRING PARTITION RANGE ROWS ...It turns out that this has no semantic impact, because thegenerated preproc.c is exactly the same either way (if youinject a blank line to keep line numbers the same).Nonetheless, given the great emphasis that the commentary ingram.y places on keeping those other keywords at the sameprecedence level as IDENT, this seems like foolishly risking ecpgbehaving differently from the core parser. Adjust the code sothat CSTRING is added to the precedence line without breaking itinto two lines.Discussion:https://postgr.es/m/2157151.1713540065@sss.pgh.pa.us
1 parentf244a2b commit9812138

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

‎src/interfaces/ecpg/preproc/parse.pl

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -289,11 +289,10 @@ sub main
289289
# Accumulate the line in $str.
290290
$str =$str .'' .$a;
291291

292-
# HACK: insert our own %nonassoc line after IDENT.
293-
# XXX: this seems pretty wrong, IDENT is not last on its line!
292+
# Give our token CSTRING the same precedence as IDENT.
294293
if ($aeq'IDENT' &&$arr[0]eq'%nonassoc')
295294
{
296-
$str =$str ."\n%nonassoc CSTRING";
295+
$str =$str ." CSTRING";
297296
}
298297
}
299298
# Save the lightly-processed line in orig_tokens.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp