1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-06 07:49:08 +03:00

Indent C code in flex and bison files

In the style of pgindent, done semi-manually.

Discussion: https://www.postgresql.org/message-id/flat/7d062ecc-7444-23ec-a159-acd8adf9b586%40enterprisedb.com
This commit is contained in:
Peter Eisentraut
2022-05-13 07:17:29 +02:00
parent 0cf16cb8ca
commit 30ed71e423
12 changed files with 1955 additions and 1167 deletions

View File

@@ -42,15 +42,15 @@ Node *replication_parse_result;
%expect 0
%name-prefix="replication_yy"
%union {
char *str;
bool boolval;
uint32 uintval;
XLogRecPtr recptr;
Node *node;
List *list;
DefElem *defelt;
%union
{
char *str;
bool boolval;
uint32 uintval;
XLogRecPtr recptr;
Node *node;
List *list;
DefElem *defelt;
}
/* Non-keyword tokens */
@@ -215,27 +215,27 @@ create_slot_legacy_opt:
K_EXPORT_SNAPSHOT
{
$$ = makeDefElem("snapshot",
(Node *)makeString("export"), -1);
(Node *) makeString("export"), -1);
}
| K_NOEXPORT_SNAPSHOT
{
$$ = makeDefElem("snapshot",
(Node *)makeString("nothing"), -1);
(Node *) makeString("nothing"), -1);
}
| K_USE_SNAPSHOT
{
$$ = makeDefElem("snapshot",
(Node *)makeString("use"), -1);
(Node *) makeString("use"), -1);
}
| K_RESERVE_WAL
{
$$ = makeDefElem("reserve_wal",
(Node *)makeBoolean(true), -1);
(Node *) makeBoolean(true), -1);
}
| K_TWO_PHASE
{
$$ = makeDefElem("two_phase",
(Node *)makeBoolean(true), -1);
(Node *) makeBoolean(true), -1);
}
;

View File

@@ -169,7 +169,8 @@ WAIT { return K_WAIT; }
}
<xd>{xdstop} {
int len;
int len;
yyless(1);
BEGIN(INITIAL);
yylval.str = litbufdup();
@@ -183,7 +184,7 @@ WAIT { return K_WAIT; }
}
{identifier} {
int len = strlen(yytext);
int len = strlen(yytext);
yylval.str = downcase_truncate_identifier(yytext, len, true);
return IDENT;