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_RETURN = 359,
154     K_RETURNED_SQLSTATE = 360,
155     K_REVERSE = 361,
156     K_ROLLBACK = 362,
157     K_ROW_COUNT = 363,
158     K_ROWTYPE = 364,
159     K_SCHEMA = 365,
160     K_SCHEMA_NAME = 366,
161     K_SCROLL = 367,
162     K_SLICE = 368,
163     K_SQLSTATE = 369,
164     K_STACKED = 370,
165     K_STRICT = 371,
166     K_TABLE = 372,
167     K_TABLE_NAME = 373,
168     K_THEN = 374,
169     K_TO = 375,
170     K_TYPE = 376,
171     K_USE_COLUMN = 377,
172     K_USE_VARIABLE = 378,
173     K_USING = 379,
174     K_VARIABLE_CONFLICT = 380,
175     K_WARNING = 381,
176     K_WHEN = 382,
177     K_WHILE = 383
178   };
179 #endif
180 
181 /* Value type.  */
182 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
183 
184 union YYSTYPE
185 {
186 #line 119 "pl_gram.y" /* yacc.c:1921  */
187 
188 		core_YYSTYPE			core_yystype;
189 		/* these fields must match core_YYSTYPE: */
190 		int						ival;
191 		char					*str;
192 		const char				*keyword;
193 
194 		PLword					word;
195 		PLcword					cword;
196 		PLwdatum				wdatum;
197 		bool					boolean;
198 		Oid						oid;
199 		struct
200 		{
201 			char *name;
202 			int  lineno;
203 		}						varname;
204 		struct
205 		{
206 			char *name;
207 			int  lineno;
208 			PLpgSQL_datum   *scalar;
209 			PLpgSQL_datum   *row;
210 		}						forvariable;
211 		struct
212 		{
213 			char *label;
214 			int  n_initvars;
215 			int  *initvarnos;
216 		}						declhdr;
217 		struct
218 		{
219 			List *stmts;
220 			char *end_label;
221 			int   end_label_location;
222 		}						loop_body;
223 		List					*list;
224 		PLpgSQL_type			*dtype;
225 		PLpgSQL_datum			*datum;
226 		PLpgSQL_var				*var;
227 		PLpgSQL_expr			*expr;
228 		PLpgSQL_stmt			*stmt;
229 		PLpgSQL_condition		*condition;
230 		PLpgSQL_exception		*exception;
231 		PLpgSQL_exception_block	*exception_block;
232 		PLpgSQL_nsitem			*nsitem;
233 		PLpgSQL_diag_item		*diagitem;
234 		PLpgSQL_stmt_fetch		*fetch;
235 		PLpgSQL_case_when		*casewhen;
236 
237 #line 238 "pl_gram.h" /* yacc.c:1921  */
238 };
239 
240 typedef union YYSTYPE YYSTYPE;
241 # define YYSTYPE_IS_TRIVIAL 1
242 # define YYSTYPE_IS_DECLARED 1
243 #endif
244 
245 /* Location type.  */
246 #if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED
247 typedef struct YYLTYPE YYLTYPE;
248 struct YYLTYPE
249 {
250   int first_line;
251   int first_column;
252   int last_line;
253   int last_column;
254 };
255 # define YYLTYPE_IS_DECLARED 1
256 # define YYLTYPE_IS_TRIVIAL 1
257 #endif
258 
259 
260 extern YYSTYPE plpgsql_yylval;
261 extern YYLTYPE plpgsql_yylloc;
262 int plpgsql_yyparse (void);
263 
264 #endif /* !YY_PLPGSQL_YY_PL_GRAM_H_INCLUDED  */
265