Fix pg_dump bug in the database-level collation patch. "datcollate" and
[PostgreSQL.git] / src / include / parser / gramparse.h
blob8890ebce7a224812dff69d056905974a7721b8b4
1 /*-------------------------------------------------------------------------
3 * gramparse.h
4 * Declarations for routines exported from lexer and parser files.
7 * Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
8 * Portions Copyright (c) 1994, Regents of the University of California
10 * $PostgreSQL$
12 *-------------------------------------------------------------------------
15 #ifndef GRAMPARSE_H
16 #define GRAMPARSE_H
18 #include "nodes/parsenodes.h"
21 * We track token locations in terms of byte offsets from the start of the
22 * source string, not the column number/line number representation that
23 * bison uses by default. Also, to minimize overhead we track only one
24 * location (usually the first token location) for each construct, not
25 * the beginning and ending locations as bison does by default. It's
26 * therefore sufficient to make YYLTYPE an int.
28 #define YYLTYPE int
30 typedef enum
32 BACKSLASH_QUOTE_OFF,
33 BACKSLASH_QUOTE_ON,
34 BACKSLASH_QUOTE_SAFE_ENCODING
35 } BackslashQuoteType;
37 /* GUC variables in scan.l (every one of these is a bad idea :-() */
38 extern int backslash_quote;
39 extern bool escape_string_warning;
40 extern bool standard_conforming_strings;
43 /* from parser.c */
44 extern int filtered_base_yylex(void);
46 /* from scan.l */
47 extern void scanner_init(const char *str);
48 extern void scanner_finish(void);
49 extern int base_yylex(void);
50 extern int scanner_errposition(int location);
51 extern void base_yyerror(const char *message);
53 /* from gram.y */
54 extern void parser_init(void);
55 extern int base_yyparse(void);
56 extern List *SystemFuncName(char *name);
57 extern TypeName *SystemTypeName(char *name);
59 #endif /* GRAMPARSE_H */