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     FCONST = 259,
54     SCONST = 260,
55     BCONST = 261,
56     XCONST = 262,
57     Op = 263,
58     ICONST = 264,
59     PARAM = 265,
60     TYPECAST = 266,
61     DOT_DOT = 267,
62     COLON_EQUALS = 268,
63     EQUALS_GREATER = 269,
64     LESS_EQUALS = 270,
65     GREATER_EQUALS = 271,
66     NOT_EQUALS = 272,
67     T_WORD = 273,
68     T_CWORD = 274,
69     T_DATUM = 275,
70     LESS_LESS = 276,
71     GREATER_GREATER = 277,
72     K_ABSOLUTE = 278,
73     K_ALIAS = 279,
74     K_ALL = 280,
75     K_AND = 281,
76     K_ARRAY = 282,
77     K_ASSERT = 283,
78     K_BACKWARD = 284,
79     K_BEGIN = 285,
80     K_BY = 286,
81     K_CALL = 287,
82     K_CASE = 288,
83     K_CHAIN = 289,
84     K_CLOSE = 290,
85     K_COLLATE = 291,
86     K_COLUMN = 292,
87     K_COLUMN_NAME = 293,
88     K_COMMIT = 294,
89     K_CONSTANT = 295,
90     K_CONSTRAINT = 296,
91     K_CONSTRAINT_NAME = 297,
92     K_CONTINUE = 298,
93     K_CURRENT = 299,
94     K_CURSOR = 300,
95     K_DATATYPE = 301,
96     K_DEBUG = 302,
97     K_DECLARE = 303,
98     K_DEFAULT = 304,
99     K_DETAIL = 305,
100     K_DIAGNOSTICS = 306,
101     K_DO = 307,
102     K_DUMP = 308,
103     K_ELSE = 309,
104     K_ELSIF = 310,
105     K_END = 311,
106     K_ERRCODE = 312,
107     K_ERROR = 313,
108     K_EXCEPTION = 314,
109     K_EXECUTE = 315,
110     K_EXIT = 316,
111     K_FETCH = 317,
112     K_FIRST = 318,
113     K_FOR = 319,
114     K_FOREACH = 320,
115     K_FORWARD = 321,
116     K_FROM = 322,
117     K_GET = 323,
118     K_HINT = 324,
119     K_IF = 325,
120     K_IMPORT = 326,
121     K_IN = 327,
122     K_INFO = 328,
123     K_INSERT = 329,
124     K_INTO = 330,
125     K_IS = 331,
126     K_LAST = 332,
127     K_LOG = 333,
128     K_LOOP = 334,
129     K_MESSAGE = 335,
130     K_MESSAGE_TEXT = 336,
131     K_MOVE = 337,
132     K_NEXT = 338,
133     K_NO = 339,
134     K_NOT = 340,
135     K_NOTICE = 341,
136     K_NULL = 342,
137     K_OPEN = 343,
138     K_OPTION = 344,
139     K_OR = 345,
140     K_PERFORM = 346,
141     K_PG_CONTEXT = 347,
142     K_PG_DATATYPE_NAME = 348,
143     K_PG_EXCEPTION_CONTEXT = 349,
144     K_PG_EXCEPTION_DETAIL = 350,
145     K_PG_EXCEPTION_HINT = 351,
146     K_PRINT_STRICT_PARAMS = 352,
147     K_PRIOR = 353,
148     K_QUERY = 354,
149     K_RAISE = 355,
150     K_RELATIVE = 356,
151     K_RESET = 357,
152     K_RETURN = 358,
153     K_RETURNED_SQLSTATE = 359,
154     K_REVERSE = 360,
155     K_ROLLBACK = 361,
156     K_ROW_COUNT = 362,
157     K_ROWTYPE = 363,
158     K_SCHEMA = 364,
159     K_SCHEMA_NAME = 365,
160     K_SCROLL = 366,
161     K_SET = 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 120 "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