60#include "pl_reserved_kwlist_d.h"
61#include "pl_unreserved_kwlist_d.h"
64#define PG_KEYWORD(kwname, value) value,
82#define AT_STMT_START(prev_token) \
83 ((prev_token) == ';' || \
84 (prev_token) == K_BEGIN || \
85 (prev_token) == K_THEN || \
86 (prev_token) == K_ELSE || \
87 (prev_token) == K_LOOP)
98#define MAX_PUSHBACKS 4
147#define yyextra (((struct yyguts_t *) yyscanner)->yyextra_r)
246 else if (!
aux1.lval.word.quoted &&
288 else if (!
aux1.lval.word.quoted &&
329 return yyextra->plpgsql_yyleng;
344 if (
yyextra->num_pushbacks > 0)
388 elog(
ERROR,
"too many tokens pushed back");
543 errmsg(
"%s at end of input",
_(message)),
579 loc =
yyextra->scanorig + location;
640 yyext->plpgsql_yytoken = 0;
642 yyext->num_pushbacks = 0;
#define Assert(condition)
int internalerrquery(const char *query)
int internalerrposition(int cursorpos)
int errcode(int sqlerrcode)
int errmsg(const char *fmt,...)
#define ereport(elevel,...)
#define palloc0_object(type)
int ScanKeywordLookup(const char *str, const ScanKeywordList *keywords)
static const char * GetScanKeyword(int n, const ScanKeywordList *keywords)
int pg_mbstrlen_with_len(const char *mbstr, int limit)
char * pstrdup(const char *in)
static char buf[DEFAULT_XLOG_SEG_SIZE]
bool plpgsql_parse_dblword(char *word1, char *word2, PLwdatum *wdatum, PLcword *cword)
bool plpgsql_parse_word(char *word1, const char *yytxt, bool lookup, PLwdatum *wdatum, PLword *word)
bool plpgsql_parse_tripword(char *word1, char *word2, char *word3, PLwdatum *wdatum, PLcword *cword)
#define AT_STMT_START(prev_token)
void plpgsql_append_source_text(StringInfo buf, int startlocation, int endlocation, yyscan_t yyscanner)
void plpgsql_peek2(int *tok1_p, int *tok2_p, int *tok1_loc, int *tok2_loc, yyscan_t yyscanner)
int plpgsql_token_length(yyscan_t yyscanner)
int plpgsql_yylex(YYSTYPE *yylvalp, YYLTYPE *yyllocp, yyscan_t yyscanner)
static const uint16 UnreservedPLKeywordTokens[]
IdentifierLookup plpgsql_IdentifierLookup
void plpgsql_scanner_finish(yyscan_t yyscanner)
bool plpgsql_token_is_unreserved_keyword(int token)
static const uint16 ReservedPLKeywordTokens[]
static void push_back_token(int token, TokenAuxData *auxdata, yyscan_t yyscanner)
yyscan_t plpgsql_scanner_init(const char *str)
void plpgsql_yyerror(YYLTYPE *yyllocp, PLpgSQL_stmt_block **plpgsql_parse_result_p, yyscan_t yyscanner, const char *message)
int plpgsql_scanner_errposition(int location, yyscan_t yyscanner)
static int internal_yylex(TokenAuxData *auxdata, yyscan_t yyscanner)
void plpgsql_push_back_token(int token, YYSTYPE *yylvalp, YYLTYPE *yyllocp, yyscan_t yyscanner)
int plpgsql_peek(yyscan_t yyscanner)
int plpgsql_location_to_lineno(int location, yyscan_t yyscanner)
static void location_lineno_init(yyscan_t yyscanner)
int plpgsql_latest_lineno(yyscan_t yyscanner)
@ IDENTIFIER_LOOKUP_NORMAL
core_yyscan_t scanner_init(const char *str, core_yy_extra_type *yyext, const ScanKeywordList *keywordlist, const uint16 *keyword_tokens)
void scanner_finish(core_yyscan_t yyscanner)
int core_yylex(core_YYSTYPE *yylval_param, YYLTYPE *yylloc_param, core_yyscan_t yyscanner)
void appendBinaryStringInfo(StringInfo str, const void *data, int datalen)
struct plpgsql_yy_extra_type * yyextra_r