File: pl_gram.h

package info (click to toggle)
ruby-pg-query 5.1.0-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 18,248 kB
  • sloc: ansic: 149,767; ruby: 865; makefile: 3
file content (385 lines) | stat: -rw-r--r-- 9,001 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
/* A Bison parser, made by GNU Bison 2.3.  */

/* Skeleton interface for Bison's Yacc-like parsers in C

   Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
   Free Software Foundation, Inc.

   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation; either version 2, or (at your option)
   any later version.

   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.

   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software
   Foundation, Inc., 51 Franklin Street, Fifth Floor,
   Boston, MA 02110-1301, USA.  */

/* As a special exception, you may create a larger work that contains
   part or all of the Bison parser skeleton and distribute that work
   under terms of your choice, so long as that work isn't itself a
   parser generator using the skeleton or a modified version thereof
   as a parser skeleton.  Alternatively, if you modify or redistribute
   the parser skeleton itself, you may (at your option) remove this
   special exception, which will cause the skeleton and the resulting
   Bison output files to be licensed under the GNU General Public
   License without this special exception.

   This special exception was added by the Free Software Foundation in
   version 2.2 of Bison.  */

/* Tokens.  */
#ifndef YYTOKENTYPE
# define YYTOKENTYPE
   /* Put the tokens into the symbol table, so that GDB and other debuggers
      know about them.  */
   enum yytokentype {
     IDENT = 258,
     UIDENT = 259,
     FCONST = 260,
     SCONST = 261,
     USCONST = 262,
     BCONST = 263,
     XCONST = 264,
     Op = 265,
     ICONST = 266,
     PARAM = 267,
     TYPECAST = 268,
     DOT_DOT = 269,
     COLON_EQUALS = 270,
     EQUALS_GREATER = 271,
     LESS_EQUALS = 272,
     GREATER_EQUALS = 273,
     NOT_EQUALS = 274,
     SQL_COMMENT = 275,
     C_COMMENT = 276,
     T_WORD = 277,
     T_CWORD = 278,
     T_DATUM = 279,
     LESS_LESS = 280,
     GREATER_GREATER = 281,
     K_ABSOLUTE = 282,
     K_ALIAS = 283,
     K_ALL = 284,
     K_AND = 285,
     K_ARRAY = 286,
     K_ASSERT = 287,
     K_BACKWARD = 288,
     K_BEGIN = 289,
     K_BY = 290,
     K_CALL = 291,
     K_CASE = 292,
     K_CHAIN = 293,
     K_CLOSE = 294,
     K_COLLATE = 295,
     K_COLUMN = 296,
     K_COLUMN_NAME = 297,
     K_COMMIT = 298,
     K_CONSTANT = 299,
     K_CONSTRAINT = 300,
     K_CONSTRAINT_NAME = 301,
     K_CONTINUE = 302,
     K_CURRENT = 303,
     K_CURSOR = 304,
     K_DATATYPE = 305,
     K_DEBUG = 306,
     K_DECLARE = 307,
     K_DEFAULT = 308,
     K_DETAIL = 309,
     K_DIAGNOSTICS = 310,
     K_DO = 311,
     K_DUMP = 312,
     K_ELSE = 313,
     K_ELSIF = 314,
     K_END = 315,
     K_ERRCODE = 316,
     K_ERROR = 317,
     K_EXCEPTION = 318,
     K_EXECUTE = 319,
     K_EXIT = 320,
     K_FETCH = 321,
     K_FIRST = 322,
     K_FOR = 323,
     K_FOREACH = 324,
     K_FORWARD = 325,
     K_FROM = 326,
     K_GET = 327,
     K_HINT = 328,
     K_IF = 329,
     K_IMPORT = 330,
     K_IN = 331,
     K_INFO = 332,
     K_INSERT = 333,
     K_INTO = 334,
     K_IS = 335,
     K_LAST = 336,
     K_LOG = 337,
     K_LOOP = 338,
     K_MERGE = 339,
     K_MESSAGE = 340,
     K_MESSAGE_TEXT = 341,
     K_MOVE = 342,
     K_NEXT = 343,
     K_NO = 344,
     K_NOT = 345,
     K_NOTICE = 346,
     K_NULL = 347,
     K_OPEN = 348,
     K_OPTION = 349,
     K_OR = 350,
     K_PERFORM = 351,
     K_PG_CONTEXT = 352,
     K_PG_DATATYPE_NAME = 353,
     K_PG_EXCEPTION_CONTEXT = 354,
     K_PG_EXCEPTION_DETAIL = 355,
     K_PG_EXCEPTION_HINT = 356,
     K_PG_ROUTINE_OID = 357,
     K_PRINT_STRICT_PARAMS = 358,
     K_PRIOR = 359,
     K_QUERY = 360,
     K_RAISE = 361,
     K_RELATIVE = 362,
     K_RETURN = 363,
     K_RETURNED_SQLSTATE = 364,
     K_REVERSE = 365,
     K_ROLLBACK = 366,
     K_ROW_COUNT = 367,
     K_ROWTYPE = 368,
     K_SCHEMA = 369,
     K_SCHEMA_NAME = 370,
     K_SCROLL = 371,
     K_SLICE = 372,
     K_SQLSTATE = 373,
     K_STACKED = 374,
     K_STRICT = 375,
     K_TABLE = 376,
     K_TABLE_NAME = 377,
     K_THEN = 378,
     K_TO = 379,
     K_TYPE = 380,
     K_USE_COLUMN = 381,
     K_USE_VARIABLE = 382,
     K_USING = 383,
     K_VARIABLE_CONFLICT = 384,
     K_WARNING = 385,
     K_WHEN = 386,
     K_WHILE = 387
   };
#endif
/* Tokens.  */
#define IDENT 258
#define UIDENT 259
#define FCONST 260
#define SCONST 261
#define USCONST 262
#define BCONST 263
#define XCONST 264
#define Op 265
#define ICONST 266
#define PARAM 267
#define TYPECAST 268
#define DOT_DOT 269
#define COLON_EQUALS 270
#define EQUALS_GREATER 271
#define LESS_EQUALS 272
#define GREATER_EQUALS 273
#define NOT_EQUALS 274
#define SQL_COMMENT 275
#define C_COMMENT 276
#define T_WORD 277
#define T_CWORD 278
#define T_DATUM 279
#define LESS_LESS 280
#define GREATER_GREATER 281
#define K_ABSOLUTE 282
#define K_ALIAS 283
#define K_ALL 284
#define K_AND 285
#define K_ARRAY 286
#define K_ASSERT 287
#define K_BACKWARD 288
#define K_BEGIN 289
#define K_BY 290
#define K_CALL 291
#define K_CASE 292
#define K_CHAIN 293
#define K_CLOSE 294
#define K_COLLATE 295
#define K_COLUMN 296
#define K_COLUMN_NAME 297
#define K_COMMIT 298
#define K_CONSTANT 299
#define K_CONSTRAINT 300
#define K_CONSTRAINT_NAME 301
#define K_CONTINUE 302
#define K_CURRENT 303
#define K_CURSOR 304
#define K_DATATYPE 305
#define K_DEBUG 306
#define K_DECLARE 307
#define K_DEFAULT 308
#define K_DETAIL 309
#define K_DIAGNOSTICS 310
#define K_DO 311
#define K_DUMP 312
#define K_ELSE 313
#define K_ELSIF 314
#define K_END 315
#define K_ERRCODE 316
#define K_ERROR 317
#define K_EXCEPTION 318
#define K_EXECUTE 319
#define K_EXIT 320
#define K_FETCH 321
#define K_FIRST 322
#define K_FOR 323
#define K_FOREACH 324
#define K_FORWARD 325
#define K_FROM 326
#define K_GET 327
#define K_HINT 328
#define K_IF 329
#define K_IMPORT 330
#define K_IN 331
#define K_INFO 332
#define K_INSERT 333
#define K_INTO 334
#define K_IS 335
#define K_LAST 336
#define K_LOG 337
#define K_LOOP 338
#define K_MERGE 339
#define K_MESSAGE 340
#define K_MESSAGE_TEXT 341
#define K_MOVE 342
#define K_NEXT 343
#define K_NO 344
#define K_NOT 345
#define K_NOTICE 346
#define K_NULL 347
#define K_OPEN 348
#define K_OPTION 349
#define K_OR 350
#define K_PERFORM 351
#define K_PG_CONTEXT 352
#define K_PG_DATATYPE_NAME 353
#define K_PG_EXCEPTION_CONTEXT 354
#define K_PG_EXCEPTION_DETAIL 355
#define K_PG_EXCEPTION_HINT 356
#define K_PG_ROUTINE_OID 357
#define K_PRINT_STRICT_PARAMS 358
#define K_PRIOR 359
#define K_QUERY 360
#define K_RAISE 361
#define K_RELATIVE 362
#define K_RETURN 363
#define K_RETURNED_SQLSTATE 364
#define K_REVERSE 365
#define K_ROLLBACK 366
#define K_ROW_COUNT 367
#define K_ROWTYPE 368
#define K_SCHEMA 369
#define K_SCHEMA_NAME 370
#define K_SCROLL 371
#define K_SLICE 372
#define K_SQLSTATE 373
#define K_STACKED 374
#define K_STRICT 375
#define K_TABLE 376
#define K_TABLE_NAME 377
#define K_THEN 378
#define K_TO 379
#define K_TYPE 380
#define K_USE_COLUMN 381
#define K_USE_VARIABLE 382
#define K_USING 383
#define K_VARIABLE_CONFLICT 384
#define K_WARNING 385
#define K_WHEN 386
#define K_WHILE 387




#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
typedef union YYSTYPE
#line 117 "pl_gram.y"
{
	core_YYSTYPE core_yystype;
	/* these fields must match core_YYSTYPE: */
	int			ival;
	char	   *str;
	const char *keyword;

	PLword		word;
	PLcword		cword;
	PLwdatum	wdatum;
	bool		boolean;
	Oid			oid;
	struct
	{
		char	   *name;
		int			lineno;
	}			varname;
	struct
	{
		char	   *name;
		int			lineno;
		PLpgSQL_datum *scalar;
		PLpgSQL_datum *row;
	}			forvariable;
	struct
	{
		char	   *label;
		int			n_initvars;
		int		   *initvarnos;
	}			declhdr;
	struct
	{
		List	   *stmts;
		char	   *end_label;
		int			end_label_location;
	}			loop_body;
	List	   *list;
	PLpgSQL_type *dtype;
	PLpgSQL_datum *datum;
	PLpgSQL_var	*var;
	PLpgSQL_expr *expr;
	PLpgSQL_stmt *stmt;
	PLpgSQL_condition *condition;
	PLpgSQL_exception *exception;
	PLpgSQL_exception_block	*exception_block;
	PLpgSQL_nsitem *nsitem;
	PLpgSQL_diag_item *diagitem;
	PLpgSQL_stmt_fetch *fetch;
	PLpgSQL_case_when *casewhen;
}
/* Line 1529 of yacc.c.  */
#line 364 "pl_gram.h"
	YYSTYPE;
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1
# define YYSTYPE_IS_TRIVIAL 1
#endif

extern __thread YYSTYPE plpgsql_yylval;

#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED
typedef struct YYLTYPE
{
  int first_line;
  int first_column;
  int last_line;
  int last_column;
} YYLTYPE;
# define yyltype YYLTYPE /* obsolescent; will be withdrawn */
# define YYLTYPE_IS_DECLARED 1
# define YYLTYPE_IS_TRIVIAL 1
#endif

extern __thread YYLTYPE plpgsql_yylloc;