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 188 of file pl_scanner.c.

Referenced by plpgsql_yylex().

◆ MAX_PUSHBACKS

#define MAX_PUSHBACKS   4

Definition at line 225 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 426 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().

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

◆ location_lineno_init()

static void location_lineno_init ( void  )
static

Definition at line 680 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().

681 {
683  cur_line_num = 1;
684 
685  cur_line_end = strchr(cur_line_start, '\n');
686 }
static int cur_line_num
Definition: pl_scanner.c:234
static const char * cur_line_start
Definition: pl_scanner.c:232
static const char * scanorig
Definition: pl_scanner.c:216
static const char * cur_line_end
Definition: pl_scanner.c:233

◆ plpgsql_append_source_text()

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

Definition at line 522 of file pl_scanner.c.

References appendBinaryStringInfo(), Assert, and scanorig.

524 {
525  Assert(startlocation <= endlocation);
526  appendBinaryStringInfo(buf, scanorig + startlocation,
527  endlocation - startlocation);
528 }
static const char * scanorig
Definition: pl_scanner.c:216
#define Assert(condition)
Definition: c.h:688
void appendBinaryStringInfo(StringInfo str, const char *data, int datalen)
Definition: stringinfo.c:208

◆ plpgsql_latest_lineno()

int plpgsql_latest_lineno ( void  )

Definition at line 690 of file pl_scanner.c.

References cur_line_num.

Referenced by plpgsql_compile_error_callback().

691 {
692  return cur_line_num;
693 }
static int cur_line_num
Definition: pl_scanner.c:234

◆ plpgsql_location_to_lineno()

int plpgsql_location_to_lineno ( int  location)

Definition at line 656 of file pl_scanner.c.

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

657 {
658  const char *loc;
659 
660  if (location < 0 || scanorig == NULL)
661  return 0; /* garbage in, garbage out */
662  loc = scanorig + location;
663 
664  /* be correct, but not fast, if input location goes backwards */
665  if (loc < cur_line_start)
667 
668  while (cur_line_end != NULL && loc > cur_line_end)
669  {
671  cur_line_num++;
672  cur_line_end = strchr(cur_line_start, '\n');
673  }
674 
675  return cur_line_num;
676 }
static int cur_line_num
Definition: pl_scanner.c:234
static void location_lineno_init(void)
Definition: pl_scanner.c:680
static const char * cur_line_start
Definition: pl_scanner.c:232
static const char * scanorig
Definition: pl_scanner.c:216
static const char * cur_line_end
Definition: pl_scanner.c:233

◆ plpgsql_peek()

int plpgsql_peek ( void  )

Definition at line 538 of file pl_scanner.c.

References internal_yylex(), and push_back_token().

539 {
540  int tok1;
541  TokenAuxData aux1;
542 
543  tok1 = internal_yylex(&aux1);
544  push_back_token(tok1, &aux1);
545  return tok1;
546 }
static int internal_yylex(TokenAuxData *auxdata)
Definition: pl_scanner.c:426
static void push_back_token(int token, TokenAuxData *auxdata)
Definition: pl_scanner.c:472

◆ plpgsql_peek2()

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

Definition at line 557 of file pl_scanner.c.

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

558 {
559  int tok1,
560  tok2;
561  TokenAuxData aux1,
562  aux2;
563 
564  tok1 = internal_yylex(&aux1);
565  tok2 = internal_yylex(&aux2);
566 
567  *tok1_p = tok1;
568  if (tok1_loc)
569  *tok1_loc = aux1.lloc;
570  *tok2_p = tok2;
571  if (tok2_loc)
572  *tok2_loc = aux2.lloc;
573 
574  push_back_token(tok2, &aux2);
575  push_back_token(tok1, &aux1);
576 }
YYLTYPE lloc
Definition: pl_scanner.c:200
static int internal_yylex(TokenAuxData *auxdata)
Definition: pl_scanner.c:426
static void push_back_token(int token, TokenAuxData *auxdata)
Definition: pl_scanner.c:472

◆ plpgsql_push_back_token()

void plpgsql_push_back_token ( int  token)

Definition at line 488 of file pl_scanner.c.

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

489 {
490  TokenAuxData auxdata;
491 
492  auxdata.lval = plpgsql_yylval;
493  auxdata.lloc = plpgsql_yylloc;
494  auxdata.leng = plpgsql_yyleng;
495  push_back_token(token, &auxdata);
496 }
YYLTYPE lloc
Definition: pl_scanner.c:200
YYSTYPE lval
Definition: pl_scanner.c:199
static int plpgsql_yyleng
Definition: pl_scanner.c:219
static void push_back_token(int token, TokenAuxData *auxdata)
Definition: pl_scanner.c:472

◆ plpgsql_scanner_errposition()

int plpgsql_scanner_errposition ( int  location)

Definition at line 590 of file pl_scanner.c.

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

Referenced by plpgsql_yyerror().

591 {
592  int pos;
593 
594  if (location < 0 || scanorig == NULL)
595  return 0; /* no-op if location is unknown */
596 
597  /* Convert byte offset to character number */
598  pos = pg_mbstrlen_with_len(scanorig, location) + 1;
599  /* And pass it to the ereport mechanism */
600  (void) internalerrposition(pos);
601  /* Also pass the function body string */
602  return internalerrquery(scanorig);
603 }
int pg_mbstrlen_with_len(const char *mbstr, int limit)
Definition: mbutils.c:794
static const char * scanorig
Definition: pl_scanner.c:216
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 731 of file pl_scanner.c.

References scanner_finish(), scanorig, and yyscanner.

Referenced by do_compile(), and plpgsql_compile_inline().

732 {
733  /* release storage */
735  /* avoid leaving any dangling pointers */
736  yyscanner = NULL;
737  scanorig = NULL;
738 }
static const char * scanorig
Definition: pl_scanner.c:216
static core_yyscan_t yyscanner
Definition: pl_scanner.c:212
void scanner_finish(core_yyscan_t yyscanner)

◆ plpgsql_scanner_init()

void plpgsql_scanner_init ( const char *  str)

Definition at line 704 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().

705 {
706  /* Start up the core scanner */
709 
710  /*
711  * scanorig points to the original string, which unlike the scanner's
712  * scanbuf won't be modified on-the-fly by flex. Notice that although
713  * yytext points into scanbuf, we rely on being able to apply locations
714  * (offsets from string start) to scanorig as well.
715  */
716  scanorig = str;
717 
718  /* Other setup */
720  plpgsql_yytoken = 0;
721 
722  num_pushbacks = 0;
723 
725 }
static const ScanKeyword reserved_keywords[]
Definition: pl_scanner.c:70
static void location_lineno_init(void)
Definition: pl_scanner.c:680
static int plpgsql_yytoken
Definition: pl_scanner.c:222
static const char * scanorig
Definition: pl_scanner.c:216
IdentifierLookup plpgsql_IdentifierLookup
Definition: pl_scanner.c:29
static int num_pushbacks
Definition: pl_scanner.c:227
static core_yy_extra_type core_yy
Definition: pl_scanner.c:213
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:212
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 505 of file pl_scanner.c.

References i, num_unreserved_keywords, and value.

506 {
507  int i;
508 
509  for (i = 0; i < num_unreserved_keywords; i++)
510  {
511  if (unreserved_keywords[i].value == token)
512  return true;
513  }
514  return false;
515 }
static struct @130 value
static const int num_unreserved_keywords
Definition: pl_scanner.c:180
static const ScanKeyword unreserved_keywords[]
Definition: pl_scanner.c:99
int i

◆ plpgsql_yyerror()

void plpgsql_yyerror ( const char *  message)

Definition at line 617 of file pl_scanner.c.

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

618 {
619  char *yytext = core_yy.scanbuf + plpgsql_yylloc;
620 
621  if (*yytext == '\0')
622  {
623  ereport(ERROR,
624  (errcode(ERRCODE_SYNTAX_ERROR),
625  /* translator: %s is typically the translation of "syntax error" */
626  errmsg("%s at end of input", _(message)),
627  plpgsql_scanner_errposition(plpgsql_yylloc)));
628  }
629  else
630  {
631  /*
632  * If we have done any lookahead then flex will have restored the
633  * character after the end-of-token. Zap it again so that we report
634  * only the single token here. This modifies scanbuf but we no longer
635  * care about that.
636  */
637  yytext[plpgsql_yyleng] = '\0';
638 
639  ereport(ERROR,
640  (errcode(ERRCODE_SYNTAX_ERROR),
641  /* translator: first %s is typically the translation of "syntax error" */
642  errmsg("%s at or near \"%s\"", _(message), yytext),
643  plpgsql_scanner_errposition(plpgsql_yylloc)));
644  }
645 }
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:213
static int plpgsql_yyleng
Definition: pl_scanner.c:219
int plpgsql_scanner_errposition(int location)
Definition: pl_scanner.c:590
int errmsg(const char *fmt,...)
Definition: elog.c:797
#define _(x)
Definition: elog.c:84

◆ plpgsql_yylex()

int plpgsql_yylex ( void  )

Definition at line 252 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.

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

◆ push_back_token()

static void push_back_token ( int  token,
TokenAuxData auxdata 
)
static

Definition at line 472 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().

473 {
475  elog(ERROR, "too many tokens pushed back");
476  pushback_token[num_pushbacks] = token;
477  pushback_auxdata[num_pushbacks] = *auxdata;
478  num_pushbacks++;
479 }
#define MAX_PUSHBACKS
Definition: pl_scanner.c:225
static TokenAuxData pushback_auxdata[MAX_PUSHBACKS]
Definition: pl_scanner.c:229
#define ERROR
Definition: elog.h:43
static int num_pushbacks
Definition: pl_scanner.c:227
static int pushback_token[MAX_PUSHBACKS]
Definition: pl_scanner.c:228
#define elog
Definition: elog.h:219

Variable Documentation

◆ core_yy

core_yy_extra_type core_yy
static

Definition at line 213 of file pl_scanner.c.

◆ cur_line_end

const char* cur_line_end
static

Definition at line 233 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 232 of file pl_scanner.c.

Referenced by location_lineno_init(), and plpgsql_location_to_lineno().

◆ num_pushbacks

int num_pushbacks
static

Definition at line 227 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 180 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 219 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 222 of file pl_scanner.c.

Referenced by plpgsql_scanner_init(), and plpgsql_yylex().

◆ pushback_auxdata

TokenAuxData pushback_auxdata[MAX_PUSHBACKS]
static

Definition at line 229 of file pl_scanner.c.

◆ pushback_token

int pushback_token[MAX_PUSHBACKS]
static

Definition at line 228 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