1 /* A Bison parser, made by GNU Bison 3.3.2.  */
2 
3 /* Bison interface for Yacc-like parsers in C
4 
5    Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2019 Free Software Foundation,
6    Inc.
7 
8    This program is free software: you can redistribute it and/or modify
9    it under the terms of the GNU General Public License as published by
10    the Free Software Foundation, either version 3 of the License, or
11    (at your option) any later version.
12 
13    This program is distributed in the hope that it will be useful,
14    but WITHOUT ANY WARRANTY; without even the implied warranty of
15    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16    GNU General Public License for more details.
17 
18    You should have received a copy of the GNU General Public License
19    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
20 
21 /* As a special exception, you may create a larger work that contains
22    part or all of the Bison parser skeleton and distribute that work
23    under terms of your choice, so long as that work isn't itself a
24    parser generator using the skeleton or a modified version thereof
25    as a parser skeleton.  Alternatively, if you modify or redistribute
26    the parser skeleton itself, you may (at your option) remove this
27    special exception, which will cause the skeleton and the resulting
28    Bison output files to be licensed under the GNU General Public
29    License without this special exception.
30 
31    This special exception was added by the Free Software Foundation in
32    version 2.2 of Bison.  */
33 
34 /* Undocumented macros, especially those whose name start with YY_,
35    are private implementation details.  Do not rely on them.  */
36 
37 #ifndef YY_PLPGSQL_YY_PL_GRAM_H_INCLUDED
38 # define YY_PLPGSQL_YY_PL_GRAM_H_INCLUDED
39 /* Debug traces.  */
40 #ifndef YYDEBUG
41 # define YYDEBUG 0
42 #endif
43 #if YYDEBUG
44 extern int plpgsql_yydebug;
45 #endif
46 
47 /* Token type.  */
48 #ifndef YYTOKENTYPE
49 # define YYTOKENTYPE
50   enum yytokentype
51   {
52     IDENT = 258,
53     UIDENT = 259,
54     FCONST = 260,
55     SCONST = 261,
56     USCONST = 262,
57     BCONST = 263,
58     XCONST = 264,
59     Op = 265,
60     ICONST = 266,
61     PARAM = 267,
62     TYPECAST = 268,
63     DOT_DOT = 269,
64     COLON_EQUALS = 270,
65     EQUALS_GREATER = 271,
66     LESS_EQUALS = 272,
67     GREATER_EQUALS = 273,
68     NOT_EQUALS = 274,
69     T_WORD = 275,
70     T_CWORD = 276,
71     T_DATUM = 277,
72     LESS_LESS = 278,
73     GREATER_GREATER = 279,
74     K_ABSOLUTE = 280,
75     K_ALIAS = 281,
76     K_ALL = 282,
77     K_AND = 283,
78     K_ARRAY = 284,
79     K_ASSERT = 285,
80     K_BACKWARD = 286,
81     K_BEGIN = 287,
82     K_BY = 288,
83     K_CALL = 289,
84     K_CASE = 290,
85     K_CHAIN = 291,
86     K_CLOSE = 292,
87     K_COLLATE = 293,
88     K_COLUMN = 294,
89     K_COLUMN_NAME = 295,
90     K_COMMIT = 296,
91     K_CONSTANT = 297,
92     K_CONSTRAINT = 298,
93     K_CONSTRAINT_NAME = 299,
94     K_CONTINUE = 300,
95     K_CURRENT = 301,
96     K_CURSOR = 302,
97     K_DATATYPE = 303,
98     K_DEBUG = 304,
99     K_DECLARE = 305,
100     K_DEFAULT = 306,
101     K_DETAIL = 307,
102     K_DIAGNOSTICS = 308,
103     K_DO = 309,
104     K_DUMP = 310,
105     K_ELSE = 311,
106     K_ELSIF = 312,
107     K_END = 313,
108     K_ERRCODE = 314,
109     K_ERROR = 315,
110     K_EXCEPTION = 316,
111     K_EXECUTE = 317,
112     K_EXIT = 318,
113     K_FETCH = 319,
114     K_FIRST = 320,
115     K_FOR = 321,
116     K_FOREACH = 322,
117     K_FORWARD = 323,
118     K_FROM = 324,
119     K_GET = 325,
120     K_HINT = 326,
121     K_IF = 327,
122     K_IMPORT = 328,
123     K_IN = 329,
124     K_INFO = 330,
125     K_INSERT = 331,
126     K_INTO = 332,
127     K_IS = 333,
128     K_LAST = 334,
129     K_LOG = 335,
130     K_LOOP = 336,
131     K_MESSAGE = 337,
132     K_MESSAGE_TEXT = 338,
133     K_MOVE = 339,
134     K_NEXT = 340,
135     K_NO = 341,
136     K_NOT = 342,
137     K_NOTICE = 343,
138     K_NULL = 344,
139     K_OPEN = 345,
140     K_OPTION = 346,
141     K_OR = 347,
142     K_PERFORM = 348,
143     K_PG_CONTEXT = 349,
144     K_PG_DATATYPE_NAME = 350,
145     K_PG_EXCEPTION_CONTEXT = 351,
146     K_PG_EXCEPTION_DETAIL = 352,
147     K_PG_EXCEPTION_HINT = 353,
148     K_PRINT_STRICT_PARAMS = 354,
149     K_PRIOR = 355,
150     K_QUERY = 356,
151     K_RAISE = 357,
152     K_RELATIVE = 358,
153     K_RESET = 359,
154     K_RETURN = 360,
155     K_RETURNED_SQLSTATE = 361,
156     K_REVERSE = 362,
157     K_ROLLBACK = 363,
158     K_ROW_COUNT = 364,
159     K_ROWTYPE = 365,
160     K_SCHEMA = 366,
161     K_SCHEMA_NAME = 367,
162     K_SCROLL = 368,
163     K_SET = 369,
164     K_SLICE = 370,
165     K_SQLSTATE = 371,
166     K_STACKED = 372,
167     K_STRICT = 373,
168     K_TABLE = 374,
169     K_TABLE_NAME = 375,
170     K_THEN = 376,
171     K_TO = 377,
172     K_TYPE = 378,
173     K_USE_COLUMN = 379,
174     K_USE_VARIABLE = 380,
175     K_USING = 381,
176     K_VARIABLE_CONFLICT = 382,
177     K_WARNING = 383,
178     K_WHEN = 384,
179     K_WHILE = 385
180   };
181 #endif
182 
183 /* Value type.  */
184 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
185 
186 union YYSTYPE
187 {
188 #line 120 "pl_gram.y" /* yacc.c:1921  */
189 
190 		core_YYSTYPE			core_yystype;
191 		/* these fields must match core_YYSTYPE: */
192 		int						ival;
193 		char					*str;
194 		const char				*keyword;
195 
196 		PLword					word;
197 		PLcword					cword;
198 		PLwdatum				wdatum;
199 		bool					boolean;
200 		Oid						oid;
201 		struct
202 		{
203 			char *name;
204 			int  lineno;
205 		}						varname;
206 		struct
207 		{
208 			char *name;
209 			int  lineno;
210 			PLpgSQL_datum   *scalar;
211 			PLpgSQL_datum   *row;
212 		}						forvariable;
213 		struct
214 		{
215 			char *label;
216 			int  n_initvars;
217 			int  *initvarnos;
218 		}						declhdr;
219 		struct
220 		{
221 			List *stmts;
222 			char *end_label;
223 			int   end_label_location;
224 		}						loop_body;
225 		List					*list;
226 		PLpgSQL_type			*dtype;
227 		PLpgSQL_datum			*datum;
228 		PLpgSQL_var				*var;
229 		PLpgSQL_expr			*expr;
230 		PLpgSQL_stmt			*stmt;
231 		PLpgSQL_condition		*condition;
232 		PLpgSQL_exception		*exception;
233 		PLpgSQL_exception_block	*exception_block;
234 		PLpgSQL_nsitem			*nsitem;
235 		PLpgSQL_diag_item		*diagitem;
236 		PLpgSQL_stmt_fetch		*fetch;
237 		PLpgSQL_case_when		*casewhen;
238 
239 #line 240 "pl_gram.h" /* yacc.c:1921  */
240 };
241 
242 typedef union YYSTYPE YYSTYPE;
243 # define YYSTYPE_IS_TRIVIAL 1
244 # define YYSTYPE_IS_DECLARED 1
245 #endif
246 
247 /* Location type.  */
248 #if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED
249 typedef struct YYLTYPE YYLTYPE;
250 struct YYLTYPE
251 {
252   int first_line;
253   int first_column;
254   int last_line;
255   int last_column;
256 };
257 # define YYLTYPE_IS_DECLARED 1
258 # define YYLTYPE_IS_TRIVIAL 1
259 #endif
260 
261 
262 extern YYSTYPE plpgsql_yylval;
263 extern YYLTYPE plpgsql_yylloc;
264 int plpgsql_yyparse (void);
265 
266 #endif /* !YY_PLPGSQL_YY_PL_GRAM_H_INCLUDED  */
267