PostgreSQL Source Code  git master
ecpg_keywords.c File Reference
#include "postgres_fe.h"
#include <ctype.h>
#include "ecpg_kwlist_d.h"
#include "preproc_extern.h"
#include "preproc.h"
#include "ecpg_kwlist.h"
Include dependency graph for ecpg_keywords.c:

Go to the source code of this file.

Macros

#define PG_KEYWORD(kwname, value)   value,
 

Functions

int ScanECPGKeywordLookup (const char *text)
 

Variables

static const uint16 ECPGScanKeywordTokens []
 

Macro Definition Documentation

◆ PG_KEYWORD

#define PG_KEYWORD (   kwname,
  value 
)    value,

Definition at line 22 of file ecpg_keywords.c.

Function Documentation

◆ ScanECPGKeywordLookup()

int ScanECPGKeywordLookup ( const char *  text)

Definition at line 39 of file ecpg_keywords.c.

40 {
41  int kwnum;
42 
43  /* First check SQL symbols defined by the backend. */
45  if (kwnum >= 0)
46  return SQLScanKeywordTokens[kwnum];
47 
48  /* Try ECPG-specific keywords. */
49  kwnum = ScanKeywordLookup(text, &ScanECPGKeywords);
50  if (kwnum >= 0)
51  return ECPGScanKeywordTokens[kwnum];
52 
53  return -1;
54 }
static const uint16 ECPGScanKeywordTokens[]
Definition: ecpg_keywords.c:24
const uint16 SQLScanKeywordTokens[]
Definition: keywords.c:34
PGDLLIMPORT const ScanKeywordList ScanKeywords
int ScanKeywordLookup(const char *str, const ScanKeywordList *keywords)
Definition: kwlookup.c:38
Definition: c.h:687

References ECPGScanKeywordTokens, ScanKeywordLookup(), ScanKeywords, and SQLScanKeywordTokens.

Variable Documentation

◆ ECPGScanKeywordTokens

const uint16 ECPGScanKeywordTokens[]
static
Initial value:
= {
}

Definition at line 24 of file ecpg_keywords.c.

Referenced by ScanECPGKeywordLookup().