1 /*-------------------------------------------------------------------------
4 * Shared definitions for the "raw" parser (flex and bison phases only)
6 * NOTE: this file is only meant to be included in the core parsing files,
7 * ie, parser.c, gram.y, scan.l, and keywords.c. Definitions that are needed
8 * outside the core parser should be in parser.h.
11 * Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group
12 * Portions Copyright (c) 1994, Regents of the University of California
14 * $PostgreSQL: pgsql/src/include/parser/gramparse.h,v 1.45 2009/07/12 17:12:34 tgl Exp $
16 *-------------------------------------------------------------------------
22 #include "nodes/parsenodes.h"
25 * We track token locations in terms of byte offsets from the start of the
26 * source string, not the column number/line number representation that
27 * bison uses by default. Also, to minimize overhead we track only one
28 * location (usually the first token location) for each construct, not
29 * the beginning and ending locations as bison does by default. It's
30 * therefore sufficient to make YYLTYPE an int.
35 * After defining YYLTYPE, it's safe to include gram.h.
37 #include "parser/gram.h"
41 extern int filtered_base_yylex(void);
44 extern void scanner_init(const char *str);
45 extern void scanner_finish(void);
46 extern int base_yylex(void);
47 extern int scanner_errposition(int location);
48 extern void base_yyerror(const char *message);
51 extern void parser_init(void);
52 extern int base_yyparse(void);
54 #endif /* GRAMPARSE_H */