PostgreSQL Source Code  git master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
pl_scanner.c File Reference
#include "plpgsql.h"
#include "mb/pg_wchar.h"
#include "parser/scanner.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 184 of file pl_scanner.c.

Referenced by plpgsql_yylex().

#define MAX_PUSHBACKS   4

Definition at line 221 of file pl_scanner.c.

Referenced by push_back_token().

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

Definition at line 23 of file pl_scanner.c.

Function Documentation

static int internal_yylex ( TokenAuxData auxdata)
static

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

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

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

677 {
679  cur_line_num = 1;
680 
681  cur_line_end = strchr(cur_line_start, '\n');
682 }
static int cur_line_num
Definition: pl_scanner.c:230
static const char * cur_line_start
Definition: pl_scanner.c:228
static const char * scanorig
Definition: pl_scanner.c:212
static const char * cur_line_end
Definition: pl_scanner.c:229
void plpgsql_append_source_text ( StringInfo  buf,
int  startlocation,
int  endlocation 
)

Definition at line 518 of file pl_scanner.c.

References appendBinaryStringInfo(), Assert, and scanorig.

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

Definition at line 686 of file pl_scanner.c.

References cur_line_num.

Referenced by plpgsql_compile_error_callback().

687 {
688  return cur_line_num;
689 }
static int cur_line_num
Definition: pl_scanner.c:230
int plpgsql_location_to_lineno ( int  location)

Definition at line 652 of file pl_scanner.c.

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

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

Definition at line 534 of file pl_scanner.c.

References internal_yylex(), and push_back_token().

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

Definition at line 553 of file pl_scanner.c.

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

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

Definition at line 484 of file pl_scanner.c.

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

485 {
486  TokenAuxData auxdata;
487 
488  auxdata.lval = plpgsql_yylval;
489  auxdata.lloc = plpgsql_yylloc;
490  auxdata.leng = plpgsql_yyleng;
491  push_back_token(token, &auxdata);
492 }
YYLTYPE lloc
Definition: pl_scanner.c:196
YYSTYPE lval
Definition: pl_scanner.c:195
static int plpgsql_yyleng
Definition: pl_scanner.c:215
static void push_back_token(int token, TokenAuxData *auxdata)
Definition: pl_scanner.c:468
int plpgsql_scanner_errposition ( int  location)

Definition at line 586 of file pl_scanner.c.

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

Referenced by plpgsql_yyerror().

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

Definition at line 727 of file pl_scanner.c.

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

Referenced by do_compile(), and plpgsql_compile_inline().

728 {
729  /* release storage */
731  /* avoid leaving any dangling pointers */
732  yyscanner = NULL;
733  scanorig = NULL;
734 }
static const char * scanorig
Definition: pl_scanner.c:212
#define NULL
Definition: c.h:226
static core_yyscan_t yyscanner
Definition: pl_scanner.c:208
void scanner_finish(core_yyscan_t yyscanner)
void plpgsql_scanner_init ( const char *  str)

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

701 {
702  /* Start up the core scanner */
705 
706  /*
707  * scanorig points to the original string, which unlike the scanner's
708  * scanbuf won't be modified on-the-fly by flex. Notice that although
709  * yytext points into scanbuf, we rely on being able to apply locations
710  * (offsets from string start) to scanorig as well.
711  */
712  scanorig = str;
713 
714  /* Other setup */
716  plpgsql_yytoken = 0;
717 
718  num_pushbacks = 0;
719 
721 }
static const ScanKeyword reserved_keywords[]
Definition: pl_scanner.c:68
static void location_lineno_init(void)
Definition: pl_scanner.c:676
static int plpgsql_yytoken
Definition: pl_scanner.c:218
static const char * scanorig
Definition: pl_scanner.c:212
IdentifierLookup plpgsql_IdentifierLookup
Definition: pl_scanner.c:27
static int num_pushbacks
Definition: pl_scanner.c:223
static core_yy_extra_type core_yy
Definition: pl_scanner.c:209
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:208
static const int num_reserved_keywords
Definition: pl_scanner.c:95
bool plpgsql_token_is_unreserved_keyword ( int  token)

Definition at line 501 of file pl_scanner.c.

References i, num_unreserved_keywords, and value.

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

Definition at line 613 of file pl_scanner.c.

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

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

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

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

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

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

Variable Documentation

core_yy_extra_type core_yy
static

Definition at line 209 of file pl_scanner.c.

const char* cur_line_end
static

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

Referenced by location_lineno_init(), and plpgsql_location_to_lineno().

int num_pushbacks
static

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

Referenced by plpgsql_scanner_init().

const int num_unreserved_keywords = lengthof(unreserved_keywords)
static

Definition at line 176 of file pl_scanner.c.

Referenced by plpgsql_token_is_unreserved_keyword(), and plpgsql_yylex().

int plpgsql_yyleng
static

Definition at line 215 of file pl_scanner.c.

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

int plpgsql_yytoken
static

Definition at line 218 of file pl_scanner.c.

Referenced by plpgsql_scanner_init(), and plpgsql_yylex().

TokenAuxData pushback_auxdata[MAX_PUSHBACKS]
static

Definition at line 225 of file pl_scanner.c.

int pushback_token[MAX_PUSHBACKS]
static

Definition at line 224 of file pl_scanner.c.

Referenced by internal_yylex(), and push_back_token().

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

Definition at line 68 of file pl_scanner.c.

const ScanKeyword unreserved_keywords[]
static

Definition at line 97 of file pl_scanner.c.