plpgsql: Rename a variable for clarity
Rename "core_yy_extra_type core_yy" to "core_yy_extra". The previous name was a bit unclear and confusing. The new name matches the name used elsewhere for the same purpose, for example in src/backend/parser/gramparse.h.
This commit is contained in:
parent
a86cfcae7c
commit
3f2d72b493
@ -104,7 +104,7 @@ typedef struct
|
|||||||
|
|
||||||
/* The stuff the core lexer needs */
|
/* The stuff the core lexer needs */
|
||||||
static core_yyscan_t yyscanner = NULL;
|
static core_yyscan_t yyscanner = NULL;
|
||||||
static core_yy_extra_type core_yy;
|
static core_yy_extra_type core_yy_extra;
|
||||||
|
|
||||||
/* The original input string */
|
/* The original input string */
|
||||||
static const char *scanorig;
|
static const char *scanorig;
|
||||||
@ -224,7 +224,7 @@ plpgsql_yylex(void)
|
|||||||
push_back_token(tok3, &aux3);
|
push_back_token(tok3, &aux3);
|
||||||
push_back_token(tok2, &aux2);
|
push_back_token(tok2, &aux2);
|
||||||
if (plpgsql_parse_word(aux1.lval.str,
|
if (plpgsql_parse_word(aux1.lval.str,
|
||||||
core_yy.scanbuf + aux1.lloc,
|
core_yy_extra.scanbuf + aux1.lloc,
|
||||||
true,
|
true,
|
||||||
&aux1.lval.wdatum,
|
&aux1.lval.wdatum,
|
||||||
&aux1.lval.word))
|
&aux1.lval.word))
|
||||||
@ -264,7 +264,7 @@ plpgsql_yylex(void)
|
|||||||
* non-variable cases.
|
* non-variable cases.
|
||||||
*/
|
*/
|
||||||
if (plpgsql_parse_word(aux1.lval.str,
|
if (plpgsql_parse_word(aux1.lval.str,
|
||||||
core_yy.scanbuf + aux1.lloc,
|
core_yy_extra.scanbuf + aux1.lloc,
|
||||||
(!AT_STMT_START(plpgsql_yytoken) ||
|
(!AT_STMT_START(plpgsql_yytoken) ||
|
||||||
(tok2 == '=' || tok2 == COLON_EQUALS ||
|
(tok2 == '=' || tok2 == COLON_EQUALS ||
|
||||||
tok2 == '[')),
|
tok2 == '[')),
|
||||||
@ -340,7 +340,7 @@ internal_yylex(TokenAuxData *auxdata)
|
|||||||
yyscanner);
|
yyscanner);
|
||||||
|
|
||||||
/* remember the length of yytext before it gets changed */
|
/* remember the length of yytext before it gets changed */
|
||||||
yytext = core_yy.scanbuf + auxdata->lloc;
|
yytext = core_yy_extra.scanbuf + auxdata->lloc;
|
||||||
auxdata->leng = strlen(yytext);
|
auxdata->leng = strlen(yytext);
|
||||||
|
|
||||||
/* Check for << >> and #, which the core considers operators */
|
/* Check for << >> and #, which the core considers operators */
|
||||||
@ -515,7 +515,7 @@ plpgsql_scanner_errposition(int location)
|
|||||||
void
|
void
|
||||||
plpgsql_yyerror(const char *message)
|
plpgsql_yyerror(const char *message)
|
||||||
{
|
{
|
||||||
char *yytext = core_yy.scanbuf + plpgsql_yylloc;
|
char *yytext = core_yy_extra.scanbuf + plpgsql_yylloc;
|
||||||
|
|
||||||
if (*yytext == '\0')
|
if (*yytext == '\0')
|
||||||
{
|
{
|
||||||
@ -603,7 +603,7 @@ void
|
|||||||
plpgsql_scanner_init(const char *str)
|
plpgsql_scanner_init(const char *str)
|
||||||
{
|
{
|
||||||
/* Start up the core scanner */
|
/* Start up the core scanner */
|
||||||
yyscanner = scanner_init(str, &core_yy,
|
yyscanner = scanner_init(str, &core_yy_extra,
|
||||||
&ReservedPLKeywords, ReservedPLKeywordTokens);
|
&ReservedPLKeywords, ReservedPLKeywordTokens);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user