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_ARRAY = 281,
76     K_ASSERT = 282,
77     K_BACKWARD = 283,
78     K_BEGIN = 284,
79     K_BY = 285,
80     K_CASE = 286,
81     K_CLOSE = 287,
82     K_COLLATE = 288,
83     K_COLUMN = 289,
84     K_COLUMN_NAME = 290,
85     K_CONSTANT = 291,
86     K_CONSTRAINT = 292,
87     K_CONSTRAINT_NAME = 293,
88     K_CONTINUE = 294,
89     K_CURRENT = 295,
90     K_CURSOR = 296,
91     K_DATATYPE = 297,
92     K_DEBUG = 298,
93     K_DECLARE = 299,
94     K_DEFAULT = 300,
95     K_DETAIL = 301,
96     K_DIAGNOSTICS = 302,
97     K_DUMP = 303,
98     K_ELSE = 304,
99     K_ELSIF = 305,
100     K_END = 306,
101     K_ERRCODE = 307,
102     K_ERROR = 308,
103     K_EXCEPTION = 309,
104     K_EXECUTE = 310,
105     K_EXIT = 311,
106     K_FETCH = 312,
107     K_FIRST = 313,
108     K_FOR = 314,
109     K_FOREACH = 315,
110     K_FORWARD = 316,
111     K_FROM = 317,
112     K_GET = 318,
113     K_HINT = 319,
114     K_IF = 320,
115     K_IMPORT = 321,
116     K_IN = 322,
117     K_INFO = 323,
118     K_INSERT = 324,
119     K_INTO = 325,
120     K_IS = 326,
121     K_LAST = 327,
122     K_LOG = 328,
123     K_LOOP = 329,
124     K_MESSAGE = 330,
125     K_MESSAGE_TEXT = 331,
126     K_MOVE = 332,
127     K_NEXT = 333,
128     K_NO = 334,
129     K_NOT = 335,
130     K_NOTICE = 336,
131     K_NULL = 337,
132     K_OPEN = 338,
133     K_OPTION = 339,
134     K_OR = 340,
135     K_PERFORM = 341,
136     K_PG_CONTEXT = 342,
137     K_PG_DATATYPE_NAME = 343,
138     K_PG_EXCEPTION_CONTEXT = 344,
139     K_PG_EXCEPTION_DETAIL = 345,
140     K_PG_EXCEPTION_HINT = 346,
141     K_PRINT_STRICT_PARAMS = 347,
142     K_PRIOR = 348,
143     K_QUERY = 349,
144     K_RAISE = 350,
145     K_RELATIVE = 351,
146     K_RESULT_OID = 352,
147     K_RETURN = 353,
148     K_RETURNED_SQLSTATE = 354,
149     K_REVERSE = 355,
150     K_ROW_COUNT = 356,
151     K_ROWTYPE = 357,
152     K_SCHEMA = 358,
153     K_SCHEMA_NAME = 359,
154     K_SCROLL = 360,
155     K_SLICE = 361,
156     K_SQLSTATE = 362,
157     K_STACKED = 363,
158     K_STRICT = 364,
159     K_TABLE = 365,
160     K_TABLE_NAME = 366,
161     K_THEN = 367,
162     K_TO = 368,
163     K_TYPE = 369,
164     K_USE_COLUMN = 370,
165     K_USE_VARIABLE = 371,
166     K_USING = 372,
167     K_VARIABLE_CONFLICT = 373,
168     K_WARNING = 374,
169     K_WHEN = 375,
170     K_WHILE = 376
171   };
172 #endif
173 
174 /* Value type.  */
175 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
176 
177 union YYSTYPE
178 {
179 #line 119 "pl_gram.y" /* yacc.c:1921  */
180 
181 		core_YYSTYPE			core_yystype;
182 		/* these fields must match core_YYSTYPE: */
183 		int						ival;
184 		char					*str;
185 		const char				*keyword;
186 
187 		PLword					word;
188 		PLcword					cword;
189 		PLwdatum				wdatum;
190 		bool					boolean;
191 		Oid						oid;
192 		struct
193 		{
194 			char *name;
195 			int  lineno;
196 		}						varname;
197 		struct
198 		{
199 			char *name;
200 			int  lineno;
201 			PLpgSQL_datum   *scalar;
202 			PLpgSQL_rec		*rec;
203 			PLpgSQL_row		*row;
204 		}						forvariable;
205 		struct
206 		{
207 			char *label;
208 			int  n_initvars;
209 			int  *initvarnos;
210 		}						declhdr;
211 		struct
212 		{
213 			List *stmts;
214 			char *end_label;
215 			int   end_label_location;
216 		}						loop_body;
217 		List					*list;
218 		PLpgSQL_type			*dtype;
219 		PLpgSQL_datum			*datum;
220 		PLpgSQL_var				*var;
221 		PLpgSQL_expr			*expr;
222 		PLpgSQL_stmt			*stmt;
223 		PLpgSQL_condition		*condition;
224 		PLpgSQL_exception		*exception;
225 		PLpgSQL_exception_block	*exception_block;
226 		PLpgSQL_nsitem			*nsitem;
227 		PLpgSQL_diag_item		*diagitem;
228 		PLpgSQL_stmt_fetch		*fetch;
229 		PLpgSQL_case_when		*casewhen;
230 
231 #line 232 "pl_gram.h" /* yacc.c:1921  */
232 };
233 
234 typedef union YYSTYPE YYSTYPE;
235 # define YYSTYPE_IS_TRIVIAL 1
236 # define YYSTYPE_IS_DECLARED 1
237 #endif
238 
239 /* Location type.  */
240 #if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED
241 typedef struct YYLTYPE YYLTYPE;
242 struct YYLTYPE
243 {
244   int first_line;
245   int first_column;
246   int last_line;
247   int last_column;
248 };
249 # define YYLTYPE_IS_DECLARED 1
250 # define YYLTYPE_IS_TRIVIAL 1
251 #endif
252 
253 
254 extern YYSTYPE plpgsql_yylval;
255 extern YYLTYPE plpgsql_yylloc;
256 int plpgsql_yyparse (void);
257 
258 #endif /* !YY_PLPGSQL_YY_PL_GRAM_H_INCLUDED  */
259