PostgreSQL Source Code  git master
pl_scanner.c File Reference
#include "postgres.h"
#include "mb/pg_wchar.h"
#include "parser/scanner.h"
#include "plpgsql.h"
#include "pl_gram.h"
Include dependency graph for pl_scanner.c:

Go to the source code of this file.

Data Structures

struct  TokenAuxData
 

Macros

#define PG_KEYWORD(a, b, c)   {a,b,c},
 
#define AT_STMT_START(prev_token)
 
#define MAX_PUSHBACKS   4
 

Functions

static int internal_yylex (TokenAuxData *auxdata)
 
static void push_back_token (int token, TokenAuxData *auxdata)
 
static void location_lineno_init (void)
 
int plpgsql_yylex (void)
 
void plpgsql_push_back_token (int token)
 
bool plpgsql_token_is_unreserved_keyword (int token)
 
void plpgsql_append_source_text (StringInfo buf, int startlocation, int endlocation)
 
int plpgsql_peek (void)
 
void plpgsql_peek2 (int *tok1_p, int *tok2_p, int *tok1_loc, int *tok2_loc)
 
int plpgsql_scanner_errposition (int location)
 
void plpgsql_yyerror (const char *message)
 
int plpgsql_location_to_lineno (int location)
 
int plpgsql_latest_lineno (void)
 
void plpgsql_scanner_init (const char *str)
 
void plpgsql_scanner_finish (void)
 

Variables

IdentifierLookup plpgsql_IdentifierLookup = IDENTIFIER_LOOKUP_NORMAL
 
static const ScanKeyword reserved_keywords []
 
static const int num_reserved_keywords = lengthof(reserved_keywords)
 
static const ScanKeyword unreserved_keywords []
 
static const int num_unreserved_keywords = lengthof(unreserved_keywords)
 
static core_yyscan_t yyscanner = NULL
 
static core_yy_extra_type core_yy
 
static const char * scanorig
 
static int plpgsql_yyleng
 
static int plpgsql_yytoken
 
static int num_pushbacks
 
static int pushback_token [MAX_PUSHBACKS]
 
static TokenAuxData pushback_auxdata [MAX_PUSHBACKS]
 
static const char * cur_line_start
 
static const char * cur_line_end
 
static int cur_line_num
 

Macro Definition Documentation

◆ AT_STMT_START

#define AT_STMT_START (   prev_token)
Value:
((prev_token) == ';' || \
(prev_token) == K_BEGIN || \
(prev_token) == K_THEN || \
(prev_token) == K_ELSE || \
(prev_token) == K_LOOP)

Definition at line 192 of file pl_scanner.c.

Referenced by plpgsql_yylex().

◆ MAX_PUSHBACKS

#define MAX_PUSHBACKS   4

Definition at line 229 of file pl_scanner.c.

Referenced by push_back_token().

◆ PG_KEYWORD

#define PG_KEYWORD (   a,
  b,
  c 
)    {a,b,c},

Definition at line 25 of file pl_scanner.c.

Function Documentation

◆ internal_yylex()

static int internal_yylex ( TokenAuxData auxdata)
static

Definition at line 430 of file pl_scanner.c.

References core_yylex(), TokenAuxData::leng, TokenAuxData::lloc, TokenAuxData::lval, num_pushbacks, pstrdup(), pushback_token, core_yy_extra_type::scanbuf, and yyscanner.

Referenced by plpgsql_peek(), plpgsql_peek2(), and plpgsql_yylex().

431 {
432  int token;
433  const char *yytext;
434 
435  if (num_pushbacks > 0)
436  {
437  num_pushbacks--;
438  token = pushback_token[num_pushbacks];
439  *auxdata = pushback_auxdata[num_pushbacks];
440  }
441  else
442  {
443  token = core_yylex(&auxdata->lval.core_yystype,
444  &auxdata->lloc,
445  yyscanner);
446 
447  /* remember the length of yytext before it gets changed */
448  yytext = core_yy.scanbuf + auxdata->lloc;
449  auxdata->leng = strlen(yytext);
450 
451  /* Check for << >> and #, which the core considers operators */
452  if (token == Op)
453  {
454  if (strcmp(auxdata->lval.str, "<<") == 0)
455  token = LESS_LESS;
456  else if (strcmp(auxdata->lval.str, ">>") == 0)
457  token = GREATER_GREATER;
458  else if (strcmp(auxdata->lval.str, "#") == 0)
459  token = '#';
460  }
461 
462  /* The core returns PARAM as ival, but we treat it like IDENT */
463  else if (token == PARAM)
464  {
465  auxdata->lval.str = pstrdup(yytext);
466  }
467  }
468 
469  return token;
470 }
static TokenAuxData pushback_auxdata[MAX_PUSHBACKS]
Definition: pl_scanner.c:233
char * pstrdup(const char *in)
Definition: mcxt.c:1161
YYLTYPE lloc
Definition: pl_scanner.c:204
YYSTYPE lval
Definition: pl_scanner.c:203
char * scanbuf
Definition: scanner.h:72
static int num_pushbacks
Definition: pl_scanner.c:231
static int pushback_token[MAX_PUSHBACKS]
Definition: pl_scanner.c:232
int core_yylex(core_YYSTYPE *lvalp, YYLTYPE *llocp, core_yyscan_t yyscanner)
static core_yy_extra_type core_yy
Definition: pl_scanner.c:217
static core_yyscan_t yyscanner
Definition: pl_scanner.c:216

◆ location_lineno_init()

static void location_lineno_init ( void  )
static

Definition at line 684 of file pl_scanner.c.

References cur_line_end, cur_line_num, cur_line_start, and scanorig.

Referenced by plpgsql_location_to_lineno(), and plpgsql_scanner_init().

685 {
687  cur_line_num = 1;
688 
689  cur_line_end = strchr(cur_line_start, '\n');
690 }
static int cur_line_num
Definition: pl_scanner.c:238
static const char * cur_line_start
Definition: pl_scanner.c:236
static const char * scanorig
Definition: pl_scanner.c:220
static const char * cur_line_end
Definition: pl_scanner.c:237

◆ plpgsql_append_source_text()

void plpgsql_append_source_text ( StringInfo  buf,
int  startlocation,
int  endlocation 
)

Definition at line 526 of file pl_scanner.c.

References appendBinaryStringInfo(), Assert, and scanorig.

528 {
529  Assert(startlocation <= endlocation);
530  appendBinaryStringInfo(buf, scanorig + startlocation,
531  endlocation - startlocation);
532 }
static const char * scanorig
Definition: pl_scanner.c:220
#define Assert(condition)
Definition: c.h:699
void appendBinaryStringInfo(StringInfo str, const char *data, int datalen)
Definition: stringinfo.c:208

◆ plpgsql_latest_lineno()

int plpgsql_latest_lineno ( void  )

Definition at line 694 of file pl_scanner.c.

References cur_line_num.

Referenced by plpgsql_compile_error_callback().

695 {
696  return cur_line_num;
697 }
static int cur_line_num
Definition: pl_scanner.c:238

◆ plpgsql_location_to_lineno()

int plpgsql_location_to_lineno ( int  location)

Definition at line 660 of file pl_scanner.c.

References cur_line_end, cur_line_num, cur_line_start, location_lineno_init(), and scanorig.

661 {
662  const char *loc;
663 
664  if (location < 0 || scanorig == NULL)
665  return 0; /* garbage in, garbage out */
666  loc = scanorig + location;
667 
668  /* be correct, but not fast, if input location goes backwards */
669  if (loc < cur_line_start)
671 
672  while (cur_line_end != NULL && loc > cur_line_end)
673  {
675  cur_line_num++;
676  cur_line_end = strchr(cur_line_start, '\n');
677  }
678 
679  return cur_line_num;
680 }
static int cur_line_num
Definition: pl_scanner.c:238
static void location_lineno_init(void)
Definition: pl_scanner.c:684
static const char * cur_line_start
Definition: pl_scanner.c:236
static const char * scanorig
Definition: pl_scanner.c:220
static const char * cur_line_end
Definition: pl_scanner.c:237

◆ plpgsql_peek()

int plpgsql_peek ( void  )

Definition at line 542 of file pl_scanner.c.

References internal_yylex(), and push_back_token().

543 {
544  int tok1;
545  TokenAuxData aux1;
546 
547  tok1 = internal_yylex(&aux1);
548  push_back_token(tok1, &aux1);
549  return tok1;
550 }
static int internal_yylex(TokenAuxData *auxdata)
Definition: pl_scanner.c:430
static void push_back_token(int token, TokenAuxData *auxdata)
Definition: pl_scanner.c:476

◆ plpgsql_peek2()

void plpgsql_peek2 ( int *  tok1_p,
int *  tok2_p,
int *  tok1_loc,
int *  tok2_loc 
)

Definition at line 561 of file pl_scanner.c.

References internal_yylex(), TokenAuxData::lloc, and push_back_token().

562 {
563  int tok1,
564  tok2;
565  TokenAuxData aux1,
566  aux2;
567 
568  tok1 = internal_yylex(&aux1);
569  tok2 = internal_yylex(&aux2);
570 
571  *tok1_p = tok1;
572  if (tok1_loc)
573  *tok1_loc = aux1.lloc;
574  *tok2_p = tok2;
575  if (tok2_loc)
576  *tok2_loc = aux2.lloc;
577 
578  push_back_token(tok2, &aux2);
579  push_back_token(tok1, &aux1);
580 }
YYLTYPE lloc
Definition: pl_scanner.c:204
static int internal_yylex(TokenAuxData *auxdata)
Definition: pl_scanner.c:430
static void push_back_token(int token, TokenAuxData *auxdata)
Definition: pl_scanner.c:476

◆ plpgsql_push_back_token()

void plpgsql_push_back_token ( int  token)

Definition at line 492 of file pl_scanner.c.

References TokenAuxData::leng, TokenAuxData::lloc, TokenAuxData::lval, plpgsql_yyleng, and push_back_token().

493 {
494  TokenAuxData auxdata;
495 
496  auxdata.lval = plpgsql_yylval;
497  auxdata.lloc = plpgsql_yylloc;
498  auxdata.leng = plpgsql_yyleng;
499  push_back_token(token, &auxdata);
500 }
YYLTYPE lloc
Definition: pl_scanner.c:204
YYSTYPE lval
Definition: pl_scanner.c:203
static int plpgsql_yyleng
Definition: pl_scanner.c:223
static void push_back_token(int token, TokenAuxData *auxdata)
Definition: pl_scanner.c:476

◆ plpgsql_scanner_errposition()

int plpgsql_scanner_errposition ( int  location)

Definition at line 594 of file pl_scanner.c.

References internalerrposition(), internalerrquery(), pg_mbstrlen_with_len(), and scanorig.

Referenced by plpgsql_yyerror().

595 {
596  int pos;
597 
598  if (location < 0 || scanorig == NULL)
599  return 0; /* no-op if location is unknown */
600 
601  /* Convert byte offset to character number */
602  pos = pg_mbstrlen_with_len(scanorig, location) + 1;
603  /* And pass it to the ereport mechanism */
604  (void) internalerrposition(pos);
605  /* Also pass the function body string */
606  return internalerrquery(scanorig);
607 }
int pg_mbstrlen_with_len(const char *mbstr, int limit)
Definition: mbutils.c:794
static const char * scanorig
Definition: pl_scanner.c:220
int internalerrquery(const char *query)
Definition: elog.c:1161
int internalerrposition(int cursorpos)
Definition: elog.c:1141

◆ plpgsql_scanner_finish()

void plpgsql_scanner_finish ( void  )

Definition at line 735 of file pl_scanner.c.

References scanner_finish(), scanorig, and yyscanner.

Referenced by do_compile(), and plpgsql_compile_inline().

736 {
737  /* release storage */
739  /* avoid leaving any dangling pointers */
740  yyscanner = NULL;
741  scanorig = NULL;
742 }
static const char * scanorig
Definition: pl_scanner.c:220
static core_yyscan_t yyscanner
Definition: pl_scanner.c:216
void scanner_finish(core_yyscan_t yyscanner)

◆ plpgsql_scanner_init()

void plpgsql_scanner_init ( const char *  str)

Definition at line 708 of file pl_scanner.c.

References IDENTIFIER_LOOKUP_NORMAL, location_lineno_init(), num_pushbacks, num_reserved_keywords, plpgsql_IdentifierLookup, plpgsql_yytoken, scanner_init(), scanorig, generate_unaccent_rules::str, and yyscanner.

Referenced by do_compile(), and plpgsql_compile_inline().

709 {
710  /* Start up the core scanner */
713 
714  /*
715  * scanorig points to the original string, which unlike the scanner's
716  * scanbuf won't be modified on-the-fly by flex. Notice that although
717  * yytext points into scanbuf, we rely on being able to apply locations
718  * (offsets from string start) to scanorig as well.
719  */
720  scanorig = str;
721 
722  /* Other setup */
724  plpgsql_yytoken = 0;
725 
726  num_pushbacks = 0;
727 
729 }
static const ScanKeyword reserved_keywords[]
Definition: pl_scanner.c:70
static void location_lineno_init(void)
Definition: pl_scanner.c:684
static int plpgsql_yytoken
Definition: pl_scanner.c:226
static const char * scanorig
Definition: pl_scanner.c:220
IdentifierLookup plpgsql_IdentifierLookup
Definition: pl_scanner.c:29
static int num_pushbacks
Definition: pl_scanner.c:231
static core_yy_extra_type core_yy
Definition: pl_scanner.c:217
core_yyscan_t scanner_init(const char *str, core_yy_extra_type *yyext, const ScanKeyword *keywords, int num_keywords)
static core_yyscan_t yyscanner
Definition: pl_scanner.c:216
static const int num_reserved_keywords
Definition: pl_scanner.c:97

◆ plpgsql_token_is_unreserved_keyword()

bool plpgsql_token_is_unreserved_keyword ( int  token)

Definition at line 509 of file pl_scanner.c.

References i, num_unreserved_keywords, and value.

510 {
511  int i;
512 
513  for (i = 0; i < num_unreserved_keywords; i++)
514  {
515  if (unreserved_keywords[i].value == token)
516  return true;
517  }
518  return false;
519 }
static const int num_unreserved_keywords
Definition: pl_scanner.c:184
static const ScanKeyword unreserved_keywords[]
Definition: pl_scanner.c:99
static struct @131 value
int i

◆ plpgsql_yyerror()

void plpgsql_yyerror ( const char *  message)

Definition at line 621 of file pl_scanner.c.

References _, ereport, errcode(), errmsg(), ERROR, plpgsql_scanner_errposition(), plpgsql_yyleng, and core_yy_extra_type::scanbuf.

622 {
623  char *yytext = core_yy.scanbuf + plpgsql_yylloc;
624 
625  if (*yytext == '\0')
626  {
627  ereport(ERROR,
628  (errcode(ERRCODE_SYNTAX_ERROR),
629  /* translator: %s is typically the translation of "syntax error" */
630  errmsg("%s at end of input", _(message)),
631  plpgsql_scanner_errposition(plpgsql_yylloc)));
632  }
633  else
634  {
635  /*
636  * If we have done any lookahead then flex will have restored the
637  * character after the end-of-token. Zap it again so that we report
638  * only the single token here. This modifies scanbuf but we no longer
639  * care about that.
640  */
641  yytext[plpgsql_yyleng] = '\0';
642 
643  ereport(ERROR,
644  (errcode(ERRCODE_SYNTAX_ERROR),
645  /* translator: first %s is typically the translation of "syntax error" */
646  errmsg("%s at or near \"%s\"", _(message), yytext),
647  plpgsql_scanner_errposition(plpgsql_yylloc)));
648  }
649 }
int errcode(int sqlerrcode)
Definition: elog.c:575
char * scanbuf
Definition: scanner.h:72
#define ERROR
Definition: elog.h:43
#define ereport(elevel, rest)
Definition: elog.h:122
static core_yy_extra_type core_yy
Definition: pl_scanner.c:217
static int plpgsql_yyleng
Definition: pl_scanner.c:223
int plpgsql_scanner_errposition(int location)
Definition: pl_scanner.c:594
int errmsg(const char *fmt,...)
Definition: elog.c:797
#define _(x)
Definition: elog.c:84

◆ plpgsql_yylex()

int plpgsql_yylex ( void  )

Definition at line 256 of file pl_scanner.c.

References AT_STMT_START, internal_yylex(), TokenAuxData::leng, TokenAuxData::lloc, TokenAuxData::lval, ScanKeyword::name, num_unreserved_keywords, plpgsql_parse_dblword(), plpgsql_parse_tripword(), plpgsql_parse_word(), plpgsql_yyleng, plpgsql_yytoken, push_back_token(), core_yy_extra_type::scanbuf, ScanKeywordLookup(), and ScanKeyword::value.

257 {
258  int tok1;
259  TokenAuxData aux1;
260  const ScanKeyword *kw;
261 
262  tok1 = internal_yylex(&aux1);
263  if (tok1 == IDENT || tok1 == PARAM)
264  {
265  int tok2;
266  TokenAuxData aux2;
267 
268  tok2 = internal_yylex(&aux2);
269  if (tok2 == '.')
270  {
271  int tok3;
272  TokenAuxData aux3;
273 
274  tok3 = internal_yylex(&aux3);
275  if (tok3 == IDENT)
276  {
277  int tok4;
278  TokenAuxData aux4;
279 
280  tok4 = internal_yylex(&aux4);
281  if (tok4 == '.')
282  {
283  int tok5;
284  TokenAuxData aux5;
285 
286  tok5 = internal_yylex(&aux5);
287  if (tok5 == IDENT)
288  {
289  if (plpgsql_parse_tripword(aux1.lval.str,
290  aux3.lval.str,
291  aux5.lval.str,
292  &aux1.lval.wdatum,
293  &aux1.lval.cword))
294  tok1 = T_DATUM;
295  else
296  tok1 = T_CWORD;
297  }
298  else
299  {
300  /* not A.B.C, so just process A.B */
301  push_back_token(tok5, &aux5);
302  push_back_token(tok4, &aux4);
303  if (plpgsql_parse_dblword(aux1.lval.str,
304  aux3.lval.str,
305  &aux1.lval.wdatum,
306  &aux1.lval.cword))
307  tok1 = T_DATUM;
308  else
309  tok1 = T_CWORD;
310  }
311  }
312  else
313  {
314  /* not A.B.C, so just process A.B */
315  push_back_token(tok4, &aux4);
316  if (plpgsql_parse_dblword(aux1.lval.str,
317  aux3.lval.str,
318  &aux1.lval.wdatum,
319  &aux1.lval.cword))
320  tok1 = T_DATUM;
321  else
322  tok1 = T_CWORD;
323  }
324  }
325  else
326  {
327  /* not A.B, so just process A */
328  push_back_token(tok3, &aux3);
329  push_back_token(tok2, &aux2);
330  if (plpgsql_parse_word(aux1.lval.str,
331  core_yy.scanbuf + aux1.lloc,
332  &aux1.lval.wdatum,
333  &aux1.lval.word))
334  tok1 = T_DATUM;
335  else if (!aux1.lval.word.quoted &&
336  (kw = ScanKeywordLookup(aux1.lval.word.ident,
339  {
340  aux1.lval.keyword = kw->name;
341  tok1 = kw->value;
342  }
343  else
344  tok1 = T_WORD;
345  }
346  }
347  else
348  {
349  /* not A.B, so just process A */
350  push_back_token(tok2, &aux2);
351 
352  /*
353  * If we are at start of statement, prefer unreserved keywords
354  * over variable names, unless the next token is assignment or
355  * '[', in which case prefer variable names. (Note we need not
356  * consider '.' as the next token; that case was handled above,
357  * and we always prefer variable names in that case.) If we are
358  * not at start of statement, always prefer variable names over
359  * unreserved keywords.
360  */
362  !(tok2 == '=' || tok2 == COLON_EQUALS || tok2 == '['))
363  {
364  /* try for unreserved keyword, then for variable name */
365  if (core_yy.scanbuf[aux1.lloc] != '"' &&
366  (kw = ScanKeywordLookup(aux1.lval.str,
369  {
370  aux1.lval.keyword = kw->name;
371  tok1 = kw->value;
372  }
373  else if (plpgsql_parse_word(aux1.lval.str,
374  core_yy.scanbuf + aux1.lloc,
375  &aux1.lval.wdatum,
376  &aux1.lval.word))
377  tok1 = T_DATUM;
378  else
379  tok1 = T_WORD;
380  }
381  else
382  {
383  /* try for variable name, then for unreserved keyword */
384  if (plpgsql_parse_word(aux1.lval.str,
385  core_yy.scanbuf + aux1.lloc,
386  &aux1.lval.wdatum,
387  &aux1.lval.word))
388  tok1 = T_DATUM;
389  else if (!aux1.lval.word.quoted &&
390  (kw = ScanKeywordLookup(aux1.lval.word.ident,
393  {
394  aux1.lval.keyword = kw->name;
395  tok1 = kw->value;
396  }
397  else
398  tok1 = T_WORD;
399  }
400  }
401  }
402  else
403  {
404  /*
405  * Not a potential plpgsql variable name, just return the data.
406  *
407  * Note that we also come through here if the grammar pushed back a
408  * T_DATUM, T_CWORD, T_WORD, or unreserved-keyword token returned by a
409  * previous lookup cycle; thus, pushbacks do not incur extra lookup
410  * work, since we'll never do the above code twice for the same token.
411  * This property also makes it safe to rely on the old value of
412  * plpgsql_yytoken in the is-this-start-of-statement test above.
413  */
414  }
415 
416  plpgsql_yylval = aux1.lval;
417  plpgsql_yylloc = aux1.lloc;
418  plpgsql_yyleng = aux1.leng;
419  plpgsql_yytoken = tok1;
420  return tok1;
421 }
bool plpgsql_parse_dblword(char *word1, char *word2, PLwdatum *wdatum, PLcword *cword)
Definition: pl_comp.c:1418
const ScanKeyword * ScanKeywordLookup(const char *text, const ScanKeyword *keywords, int num_keywords)
Definition: keywords.c:64
YYLTYPE lloc
Definition: pl_scanner.c:204
static const int num_unreserved_keywords
Definition: pl_scanner.c:184
YYSTYPE lval
Definition: pl_scanner.c:203
char * scanbuf
Definition: scanner.h:72
static int plpgsql_yytoken
Definition: pl_scanner.c:226
const char * name
Definition: keywords.h:26
static const ScanKeyword unreserved_keywords[]
Definition: pl_scanner.c:99
static int internal_yylex(TokenAuxData *auxdata)
Definition: pl_scanner.c:430
bool plpgsql_parse_word(char *word1, const char *yytxt, PLwdatum *wdatum, PLword *word)
Definition: pl_comp.c:1363
int16 value
Definition: keywords.h:27
static core_yy_extra_type core_yy
Definition: pl_scanner.c:217
static int plpgsql_yyleng
Definition: pl_scanner.c:223
#define AT_STMT_START(prev_token)
Definition: pl_scanner.c:192
bool plpgsql_parse_tripword(char *word1, char *word2, char *word3, PLwdatum *wdatum, PLcword *cword)
Definition: pl_comp.c:1498
static void push_back_token(int token, TokenAuxData *auxdata)
Definition: pl_scanner.c:476

◆ push_back_token()

static void push_back_token ( int  token,
TokenAuxData auxdata 
)
static

Definition at line 476 of file pl_scanner.c.

References elog, ERROR, MAX_PUSHBACKS, num_pushbacks, and pushback_token.

Referenced by plpgsql_peek(), plpgsql_peek2(), plpgsql_push_back_token(), and plpgsql_yylex().

477 {
479  elog(ERROR, "too many tokens pushed back");
480  pushback_token[num_pushbacks] = token;
481  pushback_auxdata[num_pushbacks] = *auxdata;
482  num_pushbacks++;
483 }
#define MAX_PUSHBACKS
Definition: pl_scanner.c:229
static TokenAuxData pushback_auxdata[MAX_PUSHBACKS]
Definition: pl_scanner.c:233
#define ERROR
Definition: elog.h:43
static int num_pushbacks
Definition: pl_scanner.c:231
static int pushback_token[MAX_PUSHBACKS]
Definition: pl_scanner.c:232
#define elog
Definition: elog.h:219

Variable Documentation

◆ core_yy

core_yy_extra_type core_yy
static

Definition at line 217 of file pl_scanner.c.

◆ cur_line_end

const char* cur_line_end
static

Definition at line 237 of file pl_scanner.c.

Referenced by location_lineno_init(), and plpgsql_location_to_lineno().

◆ cur_line_num

int cur_line_num
static

◆ cur_line_start

const char* cur_line_start
static

Definition at line 236 of file pl_scanner.c.

Referenced by location_lineno_init(), and plpgsql_location_to_lineno().

◆ num_pushbacks

int num_pushbacks
static

Definition at line 231 of file pl_scanner.c.

Referenced by internal_yylex(), plpgsql_scanner_init(), and push_back_token().

◆ num_reserved_keywords

const int num_reserved_keywords = lengthof(reserved_keywords)
static

Definition at line 97 of file pl_scanner.c.

Referenced by plpgsql_scanner_init().

◆ num_unreserved_keywords

const int num_unreserved_keywords = lengthof(unreserved_keywords)
static

Definition at line 184 of file pl_scanner.c.

Referenced by plpgsql_token_is_unreserved_keyword(), and plpgsql_yylex().

◆ plpgsql_IdentifierLookup

◆ plpgsql_yyleng

int plpgsql_yyleng
static

Definition at line 223 of file pl_scanner.c.

Referenced by plpgsql_push_back_token(), plpgsql_yyerror(), and plpgsql_yylex().

◆ plpgsql_yytoken

int plpgsql_yytoken
static

Definition at line 226 of file pl_scanner.c.

Referenced by plpgsql_scanner_init(), and plpgsql_yylex().

◆ pushback_auxdata

TokenAuxData pushback_auxdata[MAX_PUSHBACKS]
static

Definition at line 233 of file pl_scanner.c.

◆ pushback_token

int pushback_token[MAX_PUSHBACKS]
static

Definition at line 232 of file pl_scanner.c.

Referenced by internal_yylex(), and push_back_token().

◆ reserved_keywords

const ScanKeyword reserved_keywords[]
static
Initial value:
= {
}

Definition at line 70 of file pl_scanner.c.

◆ scanorig

◆ unreserved_keywords

const ScanKeyword unreserved_keywords[]
static

Definition at line 99 of file pl_scanner.c.

◆ yyscanner