aboutsummaryrefslogtreecommitdiff
path: root/src/include/parser/gramparse.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/parser/gramparse.h')
-rw-r--r--src/include/parser/gramparse.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/include/parser/gramparse.h b/src/include/parser/gramparse.h
index a8c2f407e4b..4b061e0504b 100644
--- a/src/include/parser/gramparse.h
+++ b/src/include/parser/gramparse.h
@@ -11,7 +11,7 @@
* Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/parser/gramparse.h,v 1.46 2009/07/13 02:02:20 tgl Exp $
+ * $PostgreSQL: pgsql/src/include/parser/gramparse.h,v 1.47 2009/07/14 20:24:10 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -20,6 +20,7 @@
#define GRAMPARSE_H
#include "nodes/parsenodes.h"
+#include "parser/keywords.h"
/*
* We track token locations in terms of byte offsets from the start of the
@@ -50,6 +51,12 @@ typedef struct base_yy_extra_type
Size scanbuflen;
/*
+ * The keyword list to use.
+ */
+ const ScanKeyword *keywords;
+ int num_keywords;
+
+ /*
* literalbuf is used to accumulate literal values when multiple rules
* are needed to parse a single literal. Call startlit() to reset buffer
* to empty, addlit() to add text. NOTE: the string in literalbuf is
@@ -106,7 +113,10 @@ extern int filtered_base_yylex(YYSTYPE *lvalp, YYLTYPE *llocp,
base_yyscan_t yyscanner);
/* from scan.l */
-extern base_yyscan_t scanner_init(const char *str, base_yy_extra_type *yyext);
+extern base_yyscan_t scanner_init(const char *str,
+ base_yy_extra_type *yyext,
+ const ScanKeyword *keywords,
+ int num_keywords);
extern void scanner_finish(base_yyscan_t yyscanner);
extern int base_yylex(YYSTYPE *lvalp, YYLTYPE *llocp,
base_yyscan_t yyscanner);