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

@ -38,8 +38,10 @@ static char strbuf[25] = {
%expect 0 %expect 0
%name-prefix="seg_yy" %name-prefix="seg_yy"
%union { %union
struct BND { {
struct BND
{
float val; float val;
char ext; char ext;
char sigd; char sigd;

View File

@ -401,6 +401,7 @@ boot_index_param:
boot_ident boot_ident boot_ident boot_ident
{ {
IndexElem *n = makeNode(IndexElem); IndexElem *n = makeNode(IndexElem);
n->name = $1; n->name = $1;
n->expr = NULL; n->expr = NULL;
n->indexcolname = NULL; n->indexcolname = NULL;

File diff suppressed because it is too large Load Diff

View File

@ -42,11 +42,11 @@ Node *replication_parse_result;
%expect 0 %expect 0
%name-prefix="replication_yy" %name-prefix="replication_yy"
%union { %union
{
char *str; char *str;
bool boolval; bool boolval;
uint32 uintval; uint32 uintval;
XLogRecPtr recptr; XLogRecPtr recptr;
Node *node; Node *node;
List *list; List *list;

View File

@ -170,6 +170,7 @@ WAIT { return K_WAIT; }
<xd>{xdstop} { <xd>{xdstop} {
int len; int len;
yyless(1); yyless(1);
BEGIN(INITIAL); BEGIN(INITIAL);
yylval.str = litbufdup(); yylval.str = litbufdup();

View File

@ -77,7 +77,8 @@ static JsonPathParseItem *makeItemLikeRegex(JsonPathParseItem *expr,
%error-verbose %error-verbose
%parse-param {JsonPathParseResult **result} %parse-param {JsonPathParseResult **result}
%union { %union
{
JsonPathString str; JsonPathString str;
List *elems; /* list of JsonPathParseItem */ List *elems; /* list of JsonPathParseItem */
List *indexs; /* list of integers */ List *indexs; /* list of integers */

View File

@ -116,7 +116,8 @@ static void check_raise_parameters(PLpgSQL_stmt_raise *stmt);
%name-prefix="plpgsql_yy" %name-prefix="plpgsql_yy"
%locations %locations
%union { %union
{
core_YYSTYPE core_yystype; core_YYSTYPE core_yystype;
/* these fields must match core_YYSTYPE: */ /* these fields must match core_YYSTYPE: */
int ival; int ival;