PostgreSQL Source Code  git master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
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

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

Referenced by plpgsql_yylex().

#define MAX_PUSHBACKS   4

Definition at line 223 of file pl_scanner.c.

Referenced by push_back_token().

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

Definition at line 25 of file pl_scanner.c.

Function Documentation

static int internal_yylex ( TokenAuxData auxdata)
static

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

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

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

679 {
681  cur_line_num = 1;
682 
683  cur_line_end = strchr(cur_line_start, '\n');
684 }
static int cur_line_num
Definition: pl_scanner.c:232
static const char * cur_line_start
Definition: pl_scanner.c:230
static const char * scanorig
Definition: pl_scanner.c:214
static const char * cur_line_end
Definition: pl_scanner.c:231
void plpgsql_append_source_text ( StringInfo  buf,
int  startlocation,
int  endlocation 
)

Definition at line 520 of file pl_scanner.c.

References appendBinaryStringInfo(), Assert, and scanorig.

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

Definition at line 688 of file pl_scanner.c.

References cur_line_num.

Referenced by plpgsql_compile_error_callback().

689 {
690  return cur_line_num;
691 }
static int cur_line_num
Definition: pl_scanner.c:232
int plpgsql_location_to_lineno ( int  location)

Definition at line 654 of file pl_scanner.c.

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

655 {
656  const char *loc;
657 
658  if (location < 0 || scanorig == NULL)
659  return 0; /* garbage in, garbage out */
660  loc = scanorig + location;
661 
662  /* be correct, but not fast, if input location goes backwards */
663  if (loc < cur_line_start)
665 
666  while (cur_line_end != NULL && loc > cur_line_end)
667  {
669  cur_line_num++;
670  cur_line_end = strchr(cur_line_start, '\n');
671  }
672 
673  return cur_line_num;
674 }
static int cur_line_num
Definition: pl_scanner.c:232
static void location_lineno_init(void)
Definition: pl_scanner.c:678
static const char * cur_line_start
Definition: pl_scanner.c:230
static const char * scanorig
Definition: pl_scanner.c:214
#define NULL
Definition: c.h:229
static const char * cur_line_end
Definition: pl_scanner.c:231
int plpgsql_peek ( void  )

Definition at line 536 of file pl_scanner.c.

References internal_yylex(), and push_back_token().

537 {
538  int tok1;
539  TokenAuxData aux1;
540 
541  tok1 = internal_yylex(&aux1);
542  push_back_token(tok1, &aux1);
543  return tok1;
544 }
static int internal_yylex(TokenAuxData *auxdata)
Definition: pl_scanner.c:424
static void push_back_token(int token, TokenAuxData *auxdata)
Definition: pl_scanner.c:470
void plpgsql_peek2 ( int *  tok1_p,
int *  tok2_p,
int *  tok1_loc,
int *  tok2_loc 
)

Definition at line 555 of file pl_scanner.c.

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

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

Definition at line 486 of file pl_scanner.c.

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

487 {
488  TokenAuxData auxdata;
489 
490  auxdata.lval = plpgsql_yylval;
491  auxdata.lloc = plpgsql_yylloc;
492  auxdata.leng = plpgsql_yyleng;
493  push_back_token(token, &auxdata);
494 }
YYLTYPE lloc
Definition: pl_scanner.c:198
YYSTYPE lval
Definition: pl_scanner.c:197
static int plpgsql_yyleng
Definition: pl_scanner.c:217
static void push_back_token(int token, TokenAuxData *auxdata)
Definition: pl_scanner.c:470
int plpgsql_scanner_errposition ( int  location)

Definition at line 588 of file pl_scanner.c.

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

Referenced by plpgsql_yyerror().

589 {
590  int pos;
591 
592  if (location < 0 || scanorig == NULL)
593  return 0; /* no-op if location is unknown */
594 
595  /* Convert byte offset to character number */
596  pos = pg_mbstrlen_with_len(scanorig, location) + 1;
597  /* And pass it to the ereport mechanism */
598  (void) internalerrposition(pos);
599  /* Also pass the function body string */
600  return internalerrquery(scanorig);
601 }
int pg_mbstrlen_with_len(const char *mbstr, int limit)
Definition: mbutils.c:805
static const char * scanorig
Definition: pl_scanner.c:214
int internalerrquery(const char *query)
Definition: elog.c:1161
#define NULL
Definition: c.h:229
int internalerrposition(int cursorpos)
Definition: elog.c:1141
void plpgsql_scanner_finish ( void  )

Definition at line 729 of file pl_scanner.c.

References NULL, scanner_finish(), scanorig, and yyscanner.

Referenced by do_compile(), and plpgsql_compile_inline().

730 {
731  /* release storage */
733  /* avoid leaving any dangling pointers */
734  yyscanner = NULL;
735  scanorig = NULL;
736 }
static const char * scanorig
Definition: pl_scanner.c:214
#define NULL
Definition: c.h:229
static core_yyscan_t yyscanner
Definition: pl_scanner.c:210
void scanner_finish(core_yyscan_t yyscanner)
void plpgsql_scanner_init ( const char *  str)

Definition at line 702 of file pl_scanner.c.

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

Referenced by do_compile(), and plpgsql_compile_inline().

703 {
704  /* Start up the core scanner */
707 
708  /*
709  * scanorig points to the original string, which unlike the scanner's
710  * scanbuf won't be modified on-the-fly by flex. Notice that although
711  * yytext points into scanbuf, we rely on being able to apply locations
712  * (offsets from string start) to scanorig as well.
713  */
714  scanorig = str;
715 
716  /* Other setup */
718  plpgsql_yytoken = 0;
719 
720  num_pushbacks = 0;
721 
723 }
static const ScanKeyword reserved_keywords[]
Definition: pl_scanner.c:70
static void location_lineno_init(void)
Definition: pl_scanner.c:678
static int plpgsql_yytoken
Definition: pl_scanner.c:220
static const char * scanorig
Definition: pl_scanner.c:214
IdentifierLookup plpgsql_IdentifierLookup
Definition: pl_scanner.c:29
static int num_pushbacks
Definition: pl_scanner.c:225
static core_yy_extra_type core_yy
Definition: pl_scanner.c:211
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:210
static const int num_reserved_keywords
Definition: pl_scanner.c:97
bool plpgsql_token_is_unreserved_keyword ( int  token)

Definition at line 503 of file pl_scanner.c.

References i, num_unreserved_keywords, and value.

504 {
505  int i;
506 
507  for (i = 0; i < num_unreserved_keywords; i++)
508  {
509  if (unreserved_keywords[i].value == token)
510  return true;
511  }
512  return false;
513 }
static const int num_unreserved_keywords
Definition: pl_scanner.c:178
static const ScanKeyword unreserved_keywords[]
Definition: pl_scanner.c:99
int i
static struct @121 value
void plpgsql_yyerror ( const char *  message)

Definition at line 615 of file pl_scanner.c.

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

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

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

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

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

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

Variable Documentation

core_yy_extra_type core_yy
static

Definition at line 211 of file pl_scanner.c.

const char* cur_line_end
static

Definition at line 231 of file pl_scanner.c.

Referenced by location_lineno_init(), and plpgsql_location_to_lineno().

int cur_line_num
static
const char* cur_line_start
static

Definition at line 230 of file pl_scanner.c.

Referenced by location_lineno_init(), and plpgsql_location_to_lineno().

int num_pushbacks
static

Definition at line 225 of file pl_scanner.c.

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

const int num_reserved_keywords = lengthof(reserved_keywords)
static

Definition at line 97 of file pl_scanner.c.

Referenced by plpgsql_scanner_init().

const int num_unreserved_keywords = lengthof(unreserved_keywords)
static

Definition at line 178 of file pl_scanner.c.

Referenced by plpgsql_token_is_unreserved_keyword(), and plpgsql_yylex().

int plpgsql_yyleng
static

Definition at line 217 of file pl_scanner.c.

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

int plpgsql_yytoken
static

Definition at line 220 of file pl_scanner.c.

Referenced by plpgsql_scanner_init(), and plpgsql_yylex().

TokenAuxData pushback_auxdata[MAX_PUSHBACKS]
static

Definition at line 227 of file pl_scanner.c.

int pushback_token[MAX_PUSHBACKS]
static

Definition at line 226 of file pl_scanner.c.

Referenced by internal_yylex(), and push_back_token().

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

Definition at line 70 of file pl_scanner.c.

const ScanKeyword unreserved_keywords[]
static

Definition at line 99 of file pl_scanner.c.