1 #include "pgAdmin3.h"
2 #if _MSC_VER > 1000
3 #pragma warning(disable: 4800)
4 #endif
5 
6 /* A Bison parser, made by GNU Bison 2.3.  */
7 
8 /* Skeleton implementation for Bison LALR(1) parsers in C++
9 
10    Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
11 
12    This program is free software; you can redistribute it and/or modify
13    it under the terms of the GNU General Public License as published by
14    the Free Software Foundation; either version 2, or (at your option)
15    any later version.
16 
17    This program is distributed in the hope that it will be useful,
18    but WITHOUT ANY WARRANTY; without even the implied warranty of
19    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
20    GNU General Public License for more details.
21 
22    You should have received a copy of the GNU General Public License
23    along with this program; if not, write to the Free Software
24    Foundation, Inc., 51 Franklin Street, Fifth Floor,
25    Boston, MA 02110-1301, USA.  */
26 
27 /* As a special exception, you may create a larger work that contains
28    part or all of the Bison parser skeleton and distribute that work
29    under terms of your choice, so long as that work isn't itself a
30    parser generator using the skeleton or a modified version thereof
31    as a parser skeleton.  Alternatively, if you modify or redistribute
32    the parser skeleton itself, you may (at your option) remove this
33    special exception, which will cause the skeleton and the resulting
34    Bison output files to be licensed under the GNU General Public
35    License without this special exception.
36 
37    This special exception was added by the Free Software Foundation in
38    version 2.2 of Bison.  */
39 
40 // Take the name prefix into account.
41 #define yylex   pgscriptlex
42 
43 #include "pgscript/parser.tab.hh"
44 
45 /* User implementation prologue.  */
46 #line 251 "pgscript/pgsParser.yy"
47 
48 
49 #include "pgscript/utilities/pgsDriver.h"
50 #include "pgscript/utilities/pgsScanner.h"
51 
52 /* This "connects" the bison parser in the driver to the flex scanner class
53  * object. It defines the yylex() function call to pull the next token from the
54  * current lexer object of the driver context. */
55 #undef  yylex
56 #define yylex driver.lexer->lex
57 
58 
59 
60 /* Line 317 of lalr1.cc.  */
61 #line 57 "pgscript/parser.tab.cc"
62 
63 #ifndef YY_
64 # if YYENABLE_NLS
65 #  if ENABLE_NLS
66 #   include <libintl.h> /* FIXME: INFRINGES ON USER NAME SPACE */
67 #   define YY_(msgid) dgettext ("bison-runtime", msgid)
68 #  endif
69 # endif
70 # ifndef YY_
71 #  define YY_(msgid) msgid
72 # endif
73 #endif
74 
75 /* Suppress unused-variable warnings by "using" E.  */
76 #define YYUSE(e) ((void) (e))
77 
78 /* A pseudo ostream that takes yydebug_ into account.  */
79 # define YYCDEBUG							\
80   for (bool yydebugcond_ = yydebug_; yydebugcond_; yydebugcond_ = false)	\
81     (*yycdebug_)
82 
83 /* Enable debugging if requested.  */
84 #if YYDEBUG
85 
86 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)	\
87 do {							\
88   if (yydebug_)						\
89     {							\
90       *yycdebug_ << Title << ' ';			\
91       yy_symbol_print_ ((Type), (Value), (Location));	\
92       *yycdebug_ << std::endl;				\
93     }							\
94 } while (false)
95 
96 # define YY_REDUCE_PRINT(Rule)		\
97 do {					\
98   if (yydebug_)				\
99     yy_reduce_print_ (Rule);		\
100 } while (false)
101 
102 # define YY_STACK_PRINT()		\
103 do {					\
104   if (yydebug_)				\
105     yystack_print_ ();			\
106 } while (false)
107 
108 #else /* !YYDEBUG */
109 
110 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
111 # define YY_REDUCE_PRINT(Rule)
112 # define YY_STACK_PRINT()
113 
114 #endif /* !YYDEBUG */
115 
116 #define YYACCEPT	goto yyacceptlab
117 #define YYABORT		goto yyabortlab
118 #define YYERROR		goto yyerrorlab
119 
120 namespace pgscript
121 {
122 #if YYERROR_VERBOSE
123 
124   /* Return YYSTR after stripping away unnecessary quotes and
125      backslashes, so that it's suitable for yyerror.  The heuristic is
126      that double-quoting is unnecessary unless the string contains an
127      apostrophe, a comma, or backslash (other than backslash-backslash).
128      YYSTR is taken from yytname.  */
129   std::string
yytnamerr_(const char * yystr)130   pgsParser::yytnamerr_ (const char *yystr)
131   {
132     if (*yystr == '"')
133       {
134         std::string yyr = "";
135         char const *yyp = yystr;
136 
137         for (;;)
138           switch (*++yyp)
139             {
140             case '\'':
141             case ',':
142               goto do_not_strip_quotes;
143 
144             case '\\':
145               if (*++yyp != '\\')
146                 goto do_not_strip_quotes;
147               /* Fall through.  */
148             default:
149               yyr += *yyp;
150               break;
151 
152             case '"':
153               return yyr;
154             }
155       do_not_strip_quotes: ;
156       }
157 
158     return yystr;
159   }
160 
161 #endif
162 
163   /// Build a parser object.
pgsParser(class pgsDriver & driver_yyarg)164   pgsParser::pgsParser (class pgsDriver & driver_yyarg)
165     : yydebug_ (false),
166       yycdebug_ (&std::cerr),
167       driver (driver_yyarg)
168   {
169   }
170 
~pgsParser()171   pgsParser::~pgsParser ()
172   {
173   }
174 
175 #if YYDEBUG
176   /*--------------------------------.
177   | Print this symbol on YYOUTPUT.  |
178   `--------------------------------*/
179 
180   inline void
yy_symbol_value_print_(int yytype,const semantic_type * yyvaluep,const location_type * yylocationp)181   pgsParser::yy_symbol_value_print_ (int yytype,
182 			   const semantic_type* yyvaluep, const location_type* yylocationp)
183   {
184     YYUSE (yylocationp);
185     YYUSE (yyvaluep);
186     switch (yytype)
187       {
188          default:
189 	  break;
190       }
191   }
192 
193 
194   void
yy_symbol_print_(int yytype,const semantic_type * yyvaluep,const location_type * yylocationp)195   pgsParser::yy_symbol_print_ (int yytype,
196 			   const semantic_type* yyvaluep, const location_type* yylocationp)
197   {
198     *yycdebug_ << (yytype < yyntokens_ ? "token" : "nterm")
199 	       << ' ' << yytname_[yytype] << " ("
200 	       << *yylocationp << ": ";
201     yy_symbol_value_print_ (yytype, yyvaluep, yylocationp);
202     *yycdebug_ << ')';
203   }
204 #endif /* ! YYDEBUG */
205 
206   void
yydestruct_(const char * yymsg,int yytype,semantic_type * yyvaluep,location_type * yylocationp)207   pgsParser::yydestruct_ (const char* yymsg,
208 			   int yytype, semantic_type* yyvaluep, location_type* yylocationp)
209   {
210     YYUSE (yylocationp);
211     YYUSE (yymsg);
212     YYUSE (yyvaluep);
213 
214     YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
215 
216     switch (yytype)
217       {
218         case 42: /* "\"ABORT\"" */
219 #line 167 "pgscript/pgsParser.yy"
220 	{ pdelete((yyvaluep->str)); };
221 #line 217 "pgscript/parser.tab.cc"
222 	break;
223       case 43: /* "\"ALTER\"" */
224 #line 168 "pgscript/pgsParser.yy"
225 	{ pdelete((yyvaluep->str)); };
226 #line 222 "pgscript/parser.tab.cc"
227 	break;
228       case 44: /* "\"ANALYZE\"" */
229 #line 169 "pgscript/pgsParser.yy"
230 	{ pdelete((yyvaluep->str)); };
231 #line 227 "pgscript/parser.tab.cc"
232 	break;
233       case 45: /* "\"BEGIN\"" */
234 #line 170 "pgscript/pgsParser.yy"
235 	{ pdelete((yyvaluep->str)); };
236 #line 232 "pgscript/parser.tab.cc"
237 	break;
238       case 46: /* "\"CHECKPOINT\"" */
239 #line 171 "pgscript/pgsParser.yy"
240 	{ pdelete((yyvaluep->str)); };
241 #line 237 "pgscript/parser.tab.cc"
242 	break;
243       case 47: /* "\"CLOSE\"" */
244 #line 172 "pgscript/pgsParser.yy"
245 	{ pdelete((yyvaluep->str)); };
246 #line 242 "pgscript/parser.tab.cc"
247 	break;
248       case 48: /* "\"CLUSTER\"" */
249 #line 173 "pgscript/pgsParser.yy"
250 	{ pdelete((yyvaluep->str)); };
251 #line 247 "pgscript/parser.tab.cc"
252 	break;
253       case 49: /* "\"COMMENT\"" */
254 #line 174 "pgscript/pgsParser.yy"
255 	{ pdelete((yyvaluep->str)); };
256 #line 252 "pgscript/parser.tab.cc"
257 	break;
258       case 50: /* "\"COMMIT\"" */
259 #line 175 "pgscript/pgsParser.yy"
260 	{ pdelete((yyvaluep->str)); };
261 #line 257 "pgscript/parser.tab.cc"
262 	break;
263       case 51: /* "\"COPY\"" */
264 #line 176 "pgscript/pgsParser.yy"
265 	{ pdelete((yyvaluep->str)); };
266 #line 262 "pgscript/parser.tab.cc"
267 	break;
268       case 52: /* "\"CREATE\"" */
269 #line 177 "pgscript/pgsParser.yy"
270 	{ pdelete((yyvaluep->str)); };
271 #line 267 "pgscript/parser.tab.cc"
272 	break;
273       case 53: /* "\"DEALLOCATE\"" */
274 #line 178 "pgscript/pgsParser.yy"
275 	{ pdelete((yyvaluep->str)); };
276 #line 272 "pgscript/parser.tab.cc"
277 	break;
278       case 54: /* "\"DECLARE\"" */
279 #line 179 "pgscript/pgsParser.yy"
280 	{ pdelete((yyvaluep->str)); };
281 #line 277 "pgscript/parser.tab.cc"
282 	break;
283       case 55: /* "\"DELETE\"" */
284 #line 180 "pgscript/pgsParser.yy"
285 	{ pdelete((yyvaluep->str)); };
286 #line 282 "pgscript/parser.tab.cc"
287 	break;
288       case 56: /* "\"DISCARD\"" */
289 #line 181 "pgscript/pgsParser.yy"
290 	{ pdelete((yyvaluep->str)); };
291 #line 287 "pgscript/parser.tab.cc"
292 	break;
293       case 57: /* "\"DROP\"" */
294 #line 182 "pgscript/pgsParser.yy"
295 	{ pdelete((yyvaluep->str)); };
296 #line 292 "pgscript/parser.tab.cc"
297 	break;
298       case 58: /* "\"END\"" */
299 #line 183 "pgscript/pgsParser.yy"
300 	{ pdelete((yyvaluep->str)); };
301 #line 297 "pgscript/parser.tab.cc"
302 	break;
303       case 59: /* "\"EXECUTE\"" */
304 #line 184 "pgscript/pgsParser.yy"
305 	{ pdelete((yyvaluep->str)); };
306 #line 302 "pgscript/parser.tab.cc"
307 	break;
308       case 60: /* "\"EXPLAIN\"" */
309 #line 185 "pgscript/pgsParser.yy"
310 	{ pdelete((yyvaluep->str)); };
311 #line 307 "pgscript/parser.tab.cc"
312 	break;
313       case 61: /* "\"FETCH\"" */
314 #line 186 "pgscript/pgsParser.yy"
315 	{ pdelete((yyvaluep->str)); };
316 #line 312 "pgscript/parser.tab.cc"
317 	break;
318       case 62: /* "\"GRANT\"" */
319 #line 187 "pgscript/pgsParser.yy"
320 	{ pdelete((yyvaluep->str)); };
321 #line 317 "pgscript/parser.tab.cc"
322 	break;
323       case 63: /* "\"INSERT\"" */
324 #line 188 "pgscript/pgsParser.yy"
325 	{ pdelete((yyvaluep->str)); };
326 #line 322 "pgscript/parser.tab.cc"
327 	break;
328       case 64: /* "\"LISTEN\"" */
329 #line 189 "pgscript/pgsParser.yy"
330 	{ pdelete((yyvaluep->str)); };
331 #line 327 "pgscript/parser.tab.cc"
332 	break;
333       case 65: /* "\"LOAD\"" */
334 #line 190 "pgscript/pgsParser.yy"
335 	{ pdelete((yyvaluep->str)); };
336 #line 332 "pgscript/parser.tab.cc"
337 	break;
338       case 66: /* "\"LOCK\"" */
339 #line 191 "pgscript/pgsParser.yy"
340 	{ pdelete((yyvaluep->str)); };
341 #line 337 "pgscript/parser.tab.cc"
342 	break;
343       case 67: /* "\"MOVE\"" */
344 #line 192 "pgscript/pgsParser.yy"
345 	{ pdelete((yyvaluep->str)); };
346 #line 342 "pgscript/parser.tab.cc"
347 	break;
348       case 68: /* "\"NOTIFY\"" */
349 #line 193 "pgscript/pgsParser.yy"
350 	{ pdelete((yyvaluep->str)); };
351 #line 347 "pgscript/parser.tab.cc"
352 	break;
353       case 69: /* "\"PREPARE\"" */
354 #line 194 "pgscript/pgsParser.yy"
355 	{ pdelete((yyvaluep->str)); };
356 #line 352 "pgscript/parser.tab.cc"
357 	break;
358       case 70: /* "\"REASSIGN\"" */
359 #line 195 "pgscript/pgsParser.yy"
360 	{ pdelete((yyvaluep->str)); };
361 #line 357 "pgscript/parser.tab.cc"
362 	break;
363       case 71: /* "\"REINDEX\"" */
364 #line 196 "pgscript/pgsParser.yy"
365 	{ pdelete((yyvaluep->str)); };
366 #line 362 "pgscript/parser.tab.cc"
367 	break;
368       case 72: /* "\"RELEASE\"" */
369 #line 197 "pgscript/pgsParser.yy"
370 	{ pdelete((yyvaluep->str)); };
371 #line 367 "pgscript/parser.tab.cc"
372 	break;
373       case 73: /* "\"RESET\"" */
374 #line 198 "pgscript/pgsParser.yy"
375 	{ pdelete((yyvaluep->str)); };
376 #line 372 "pgscript/parser.tab.cc"
377 	break;
378       case 74: /* "\"REVOKE\"" */
379 #line 199 "pgscript/pgsParser.yy"
380 	{ pdelete((yyvaluep->str)); };
381 #line 377 "pgscript/parser.tab.cc"
382 	break;
383       case 75: /* "\"ROLLBACK\"" */
384 #line 200 "pgscript/pgsParser.yy"
385 	{ pdelete((yyvaluep->str)); };
386 #line 382 "pgscript/parser.tab.cc"
387 	break;
388       case 76: /* "\"SAVEPOINT\"" */
389 #line 201 "pgscript/pgsParser.yy"
390 	{ pdelete((yyvaluep->str)); };
391 #line 387 "pgscript/parser.tab.cc"
392 	break;
393       case 77: /* "\"SELECT\"" */
394 #line 202 "pgscript/pgsParser.yy"
395 	{ pdelete((yyvaluep->str)); };
396 #line 392 "pgscript/parser.tab.cc"
397 	break;
398       case 78: /* "\"SET\"" */
399 #line 203 "pgscript/pgsParser.yy"
400 	{ pdelete((yyvaluep->str)); };
401 #line 397 "pgscript/parser.tab.cc"
402 	break;
403       case 79: /* "\"SHOW\"" */
404 #line 204 "pgscript/pgsParser.yy"
405 	{ pdelete((yyvaluep->str)); };
406 #line 402 "pgscript/parser.tab.cc"
407 	break;
408       case 80: /* "\"START\"" */
409 #line 205 "pgscript/pgsParser.yy"
410 	{ pdelete((yyvaluep->str)); };
411 #line 407 "pgscript/parser.tab.cc"
412 	break;
413       case 81: /* "\"TRUNCATE\"" */
414 #line 206 "pgscript/pgsParser.yy"
415 	{ pdelete((yyvaluep->str)); };
416 #line 412 "pgscript/parser.tab.cc"
417 	break;
418       case 82: /* "\"UNLISTEN\"" */
419 #line 207 "pgscript/pgsParser.yy"
420 	{ pdelete((yyvaluep->str)); };
421 #line 417 "pgscript/parser.tab.cc"
422 	break;
423       case 83: /* "\"UPDATE\"" */
424 #line 208 "pgscript/pgsParser.yy"
425 	{ pdelete((yyvaluep->str)); };
426 #line 422 "pgscript/parser.tab.cc"
427 	break;
428       case 84: /* "\"VACUUM\"" */
429 #line 209 "pgscript/pgsParser.yy"
430 	{ pdelete((yyvaluep->str)); };
431 #line 427 "pgscript/parser.tab.cc"
432 	break;
433       case 85: /* "\"VALUES\"" */
434 #line 210 "pgscript/pgsParser.yy"
435 	{ pdelete((yyvaluep->str)); };
436 #line 432 "pgscript/parser.tab.cc"
437 	break;
438       case 86: /* "\"IDENTIFIER\"" */
439 #line 212 "pgscript/pgsParser.yy"
440 	{ pdelete((yyvaluep->str)); };
441 #line 437 "pgscript/parser.tab.cc"
442 	break;
443       case 87: /* "\"INTEGER VALUE\"" */
444 #line 213 "pgscript/pgsParser.yy"
445 	{ pdelete((yyvaluep->str)); };
446 #line 442 "pgscript/parser.tab.cc"
447 	break;
448       case 88: /* "\"REAL VALUE\"" */
449 #line 214 "pgscript/pgsParser.yy"
450 	{ pdelete((yyvaluep->str)); };
451 #line 447 "pgscript/parser.tab.cc"
452 	break;
453       case 89: /* "\"STRING VALUE\"" */
454 #line 215 "pgscript/pgsParser.yy"
455 	{ pdelete((yyvaluep->str)); };
456 #line 452 "pgscript/parser.tab.cc"
457 	break;
458 
459 	default:
460 	  break;
461       }
462   }
463 
464   void
yypop_(unsigned int n)465   pgsParser::yypop_ (unsigned int n)
466   {
467     yystate_stack_.pop (n);
468     yysemantic_stack_.pop (n);
469     yylocation_stack_.pop (n);
470   }
471 
472   std::ostream&
debug_stream() const473   pgsParser::debug_stream () const
474   {
475     return *yycdebug_;
476   }
477 
478   void
set_debug_stream(std::ostream & o)479   pgsParser::set_debug_stream (std::ostream& o)
480   {
481     yycdebug_ = &o;
482   }
483 
484 
485   pgsParser::debug_level_type
debug_level() const486   pgsParser::debug_level () const
487   {
488     return yydebug_;
489   }
490 
491   void
set_debug_level(debug_level_type l)492   pgsParser::set_debug_level (debug_level_type l)
493   {
494     yydebug_ = l;
495   }
496 
497 
498   int
parse()499   pgsParser::parse ()
500   {
501     /// Look-ahead and look-ahead in internal form.
502     int yychar = yyempty_;
503     int yytoken = 0;
504 
505     /* State.  */
506     int yyn;
507     int yylen = 0;
508     int yystate = 0;
509 
510     /* Error handling.  */
511     int yynerrs_ = 0;
512     int yyerrstatus_ = 0;
513 
514     /// Semantic value of the look-ahead.
515     semantic_type yylval;
516     /// Location of the look-ahead.
517     location_type yylloc;
518     /// The locations where the error started and ended.
519     location yyerror_range[2];
520 
521     /// $$.
522     semantic_type yyval;
523     /// @$.
524     location_type yyloc;
525 
526     int yyresult;
527 
528     YYCDEBUG << "Starting parse" << std::endl;
529 
530 
531     /* User initialization code.  */
532     #line 43 "pgscript/pgsParser.yy"
533 {
534 	// Initialize the initial location object
535 	yylloc.begin.filename = yylloc.end.filename;
536 }
537   /* Line 547 of yacc.c.  */
538 #line 534 "pgscript/parser.tab.cc"
539     /* Initialize the stacks.  The initial state will be pushed in
540        yynewstate, since the latter expects the semantical and the
541        location values to have been already stored, initialize these
542        stacks with a primary value.  */
543     yystate_stack_ = state_stack_type (0);
544     yysemantic_stack_ = semantic_stack_type (0);
545     yylocation_stack_ = location_stack_type (0);
546     yysemantic_stack_.push (yylval);
547     yylocation_stack_.push (yylloc);
548 
549     /* New state.  */
550   yynewstate:
551     yystate_stack_.push (yystate);
552     YYCDEBUG << "Entering state " << yystate << std::endl;
553     goto yybackup;
554 
555     /* Backup.  */
556   yybackup:
557 
558     /* Try to take a decision without look-ahead.  */
559     yyn = yypact_[yystate];
560     if (yyn == yypact_ninf_)
561       goto yydefault;
562 
563     /* Read a look-ahead token.  */
564     if (yychar == yyempty_)
565       {
566 	YYCDEBUG << "Reading a token: ";
567 	yychar = yylex (&yylval, &yylloc);
568       }
569 
570 
571     /* Convert token to internal form.  */
572     if (yychar <= yyeof_)
573       {
574 	yychar = yytoken = yyeof_;
575 	YYCDEBUG << "Now at end of input." << std::endl;
576       }
577     else
578       {
579 	yytoken = yytranslate_ (yychar);
580 	YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
581       }
582 
583     /* If the proper action on seeing token YYTOKEN is to reduce or to
584        detect an error, take that action.  */
585     yyn += yytoken;
586     if (yyn < 0 || yylast_ < yyn || yycheck_[yyn] != yytoken)
587       goto yydefault;
588 
589     /* Reduce or error.  */
590     yyn = yytable_[yyn];
591     if (yyn <= 0)
592       {
593 	if (yyn == 0 || yyn == yytable_ninf_)
594 	goto yyerrlab;
595 	yyn = -yyn;
596 	goto yyreduce;
597       }
598 
599     /* Accept?  */
600     if (yyn == yyfinal_)
601       goto yyacceptlab;
602 
603     /* Shift the look-ahead token.  */
604     YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
605 
606     /* Discard the token being shifted unless it is eof.  */
607     if (yychar != yyeof_)
608       yychar = yyempty_;
609 
610     yysemantic_stack_.push (yylval);
611     yylocation_stack_.push (yylloc);
612 
613     /* Count tokens shifted since error; after three, turn off error
614        status.  */
615     if (yyerrstatus_)
616       --yyerrstatus_;
617 
618     yystate = yyn;
619     goto yynewstate;
620 
621   /*-----------------------------------------------------------.
622   | yydefault -- do the default action for the current state.  |
623   `-----------------------------------------------------------*/
624   yydefault:
625     yyn = yydefact_[yystate];
626     if (yyn == 0)
627       goto yyerrlab;
628     goto yyreduce;
629 
630   /*-----------------------------.
631   | yyreduce -- Do a reduction.  |
632   `-----------------------------*/
633   yyreduce:
634     yylen = yyr2_[yyn];
635     /* If YYLEN is nonzero, implement the default value of the action:
636        `$$ = $1'.  Otherwise, use the top of the stack.
637 
638        Otherwise, the following line sets YYVAL to garbage.
639        This behavior is undocumented and Bison
640        users should not rely upon it.  */
641     if (yylen)
642       yyval = yysemantic_stack_[yylen - 1];
643     else
644       yyval = yysemantic_stack_[0];
645 
646     {
647       slice<location_type, location_stack_type> slice (yylocation_stack_, yylen);
648       YYLLOC_DEFAULT (yyloc, slice, yylen);
649     }
650     YY_REDUCE_PRINT (yyn);
651     switch (yyn)
652       {
653 	  case 2:
654 #line 268 "pgscript/pgsParser.yy"
655     {
656 									(yyval.expr) = pnew pgsIdentRecord(*((yysemantic_stack_[(7) - (1)].str)), (yysemantic_stack_[(7) - (3)].expr), (yysemantic_stack_[(7) - (6)].expr));
657 									pdelete((yysemantic_stack_[(7) - (1)].str));
658 									driver.context.pop_var(); driver.context.pop_var(); // $3 & $6
659 									driver.context.push_var((yyval.expr));
660 								;}
661     break;
662 
663   case 3:
664 #line 275 "pgscript/pgsParser.yy"
665     {
666 									(yyval.expr) = pnew pgsIdentRecord(*((yysemantic_stack_[(4) - (1)].str)), (yysemantic_stack_[(4) - (3)].expr));
667 									pdelete((yysemantic_stack_[(4) - (1)].str));
668 									driver.context.pop_var(); // $3
669 									driver.context.push_var((yyval.expr));
670 								;}
671     break;
672 
673   case 4:
674 #line 282 "pgscript/pgsParser.yy"
675     {
676 									(yyval.expr) = pnew pgsLines(*((yysemantic_stack_[(4) - (3)].str)));
677 									pdelete((yysemantic_stack_[(4) - (3)].str));
678 									driver.context.push_var((yyval.expr));
679 								;}
680     break;
681 
682   case 5:
683 #line 288 "pgscript/pgsParser.yy"
684     {
685 									(yyval.expr) = pnew pgsColumns(*((yysemantic_stack_[(4) - (3)].str)));
686 									pdelete((yysemantic_stack_[(4) - (3)].str));
687 									driver.context.push_var((yyval.expr));
688 								;}
689     break;
690 
691   case 6:
692 #line 294 "pgscript/pgsParser.yy"
693     {
694 									(yyval.expr) = pnew pgsTrim((yysemantic_stack_[(4) - (3)].expr));
695 									driver.context.pop_var(); // $3
696 									driver.context.push_var((yyval.expr)); // assert
697 								;}
698     break;
699 
700   case 7:
701 #line 300 "pgscript/pgsParser.yy"
702     {
703 									(yyval.expr) = pnew pgsIdent(*((yysemantic_stack_[(1) - (1)].str)));
704 									pdelete((yysemantic_stack_[(1) - (1)].str));
705 									driver.context.push_var((yyval.expr));
706 								;}
707     break;
708 
709   case 8:
710 #line 306 "pgscript/pgsParser.yy"
711     {
712 									(yyval.expr) = pnew pgsNumber(*((yysemantic_stack_[(1) - (1)].str)), pgsInt);
713 									pdelete((yysemantic_stack_[(1) - (1)].str));
714 									driver.context.push_var((yyval.expr));
715 								;}
716     break;
717 
718   case 9:
719 #line 312 "pgscript/pgsParser.yy"
720     {
721 									(yyval.expr) = pnew pgsNumber(*((yysemantic_stack_[(1) - (1)].str)), pgsReal);
722 									pdelete((yysemantic_stack_[(1) - (1)].str));
723 									driver.context.push_var((yyval.expr));
724 								;}
725     break;
726 
727   case 10:
728 #line 318 "pgscript/pgsParser.yy"
729     {
730 									(yyval.expr) = pnew pgsString(*((yysemantic_stack_[(1) - (1)].str)));
731 									pdelete((yysemantic_stack_[(1) - (1)].str));
732 									driver.context.push_var((yyval.expr));
733 								;}
734     break;
735 
736   case 11:
737 #line 323 "pgscript/pgsParser.yy"
738     {
739 									(yyval.expr) = pnew pgsExecute(*((yysemantic_stack_[(3) - (2)].str)), &driver.context.m_cout,
740 											&(driver.thread));
741 									pdelete((yysemantic_stack_[(3) - (2)].str));
742 									driver.context.push_var((yyval.expr)); // SQL Expression statement
743 								;}
744     break;
745 
746   case 12:
747 #line 329 "pgscript/pgsParser.yy"
748     { (yyval.expr) = (yysemantic_stack_[(1) - (1)].expr); ;}
749     break;
750 
751   case 13:
752 #line 330 "pgscript/pgsParser.yy"
753     {
754 									(yyval.expr) = pnew pgsParenthesis((yysemantic_stack_[(3) - (2)].expr));
755 									driver.context.pop_var(); // $2
756 									driver.context.push_var((yyval.expr));
757 								;}
758     break;
759 
760   case 14:
761 #line 338 "pgscript/pgsParser.yy"
762     { (yyval.expr) = (yysemantic_stack_[(1) - (1)].expr); ;}
763     break;
764 
765   case 15:
766 #line 339 "pgscript/pgsParser.yy"
767     { (yyval.expr) = (yysemantic_stack_[(2) - (2)].expr); ;}
768     break;
769 
770   case 16:
771 #line 340 "pgscript/pgsParser.yy"
772     {
773 									(yyval.expr) = pnew pgsNegate((yysemantic_stack_[(2) - (2)].expr));
774 									driver.context.pop_var(); // $2
775 									driver.context.push_var((yyval.expr));
776 								;}
777     break;
778 
779   case 17:
780 #line 346 "pgscript/pgsParser.yy"
781     {
782 									(yyval.expr) = pnew pgsNot((yysemantic_stack_[(2) - (2)].expr));
783 									driver.context.pop_var(); // $2
784 									driver.context.push_var((yyval.expr));
785 								;}
786     break;
787 
788   case 18:
789 #line 354 "pgscript/pgsParser.yy"
790     { (yyval.expr) = (yysemantic_stack_[(1) - (1)].expr); ;}
791     break;
792 
793   case 19:
794 #line 356 "pgscript/pgsParser.yy"
795     {
796 									(yyval.expr) = pnew pgsCast((yysemantic_stack_[(6) - (5)].integer), (yysemantic_stack_[(6) - (3)].expr));
797 									driver.context.pop_var(); // $3
798 									driver.context.push_var((yyval.expr));
799 								;}
800     break;
801 
802   case 20:
803 #line 364 "pgscript/pgsParser.yy"
804     { (yyval.integer) = pgscript::pgsParser::token::PGS_INTEGER; ;}
805     break;
806 
807   case 21:
808 #line 365 "pgscript/pgsParser.yy"
809     { (yyval.integer) = pgscript::pgsParser::token::PGS_REAL; ;}
810     break;
811 
812   case 22:
813 #line 366 "pgscript/pgsParser.yy"
814     { (yyval.integer) = pgscript::pgsParser::token::PGS_STRING; ;}
815     break;
816 
817   case 23:
818 #line 367 "pgscript/pgsParser.yy"
819     { (yyval.integer) = pgscript::pgsParser::token::PGS_RECORD; ;}
820     break;
821 
822   case 24:
823 #line 371 "pgscript/pgsParser.yy"
824     { (yyval.expr) = (yysemantic_stack_[(1) - (1)].expr); ;}
825     break;
826 
827   case 25:
828 #line 373 "pgscript/pgsParser.yy"
829     {
830 									(yyval.expr) = pnew pgsTimes((yysemantic_stack_[(3) - (1)].expr), (yysemantic_stack_[(3) - (3)].expr));
831 									driver.context.pop_var();
832 									driver.context.pop_var(); // $1 & $3
833 									driver.context.push_var((yyval.expr));
834 								;}
835     break;
836 
837   case 26:
838 #line 380 "pgscript/pgsParser.yy"
839     {
840 									(yyval.expr) = pnew pgsOver((yysemantic_stack_[(3) - (1)].expr), (yysemantic_stack_[(3) - (3)].expr));
841 									driver.context.pop_var();
842 									driver.context.pop_var(); // $1 & $3
843 									driver.context.push_var((yyval.expr));
844 								;}
845     break;
846 
847   case 27:
848 #line 387 "pgscript/pgsParser.yy"
849     {
850 									(yyval.expr) = pnew pgsModulo((yysemantic_stack_[(3) - (1)].expr), (yysemantic_stack_[(3) - (3)].expr));
851 									driver.context.pop_var();
852 									driver.context.pop_var(); // $1 & $3
853 									driver.context.push_var((yyval.expr));
854 								;}
855     break;
856 
857   case 28:
858 #line 396 "pgscript/pgsParser.yy"
859     { (yyval.expr) = (yysemantic_stack_[(1) - (1)].expr); ;}
860     break;
861 
862   case 29:
863 #line 398 "pgscript/pgsParser.yy"
864     {
865 									(yyval.expr) = pnew pgsPlus((yysemantic_stack_[(3) - (1)].expr), (yysemantic_stack_[(3) - (3)].expr));
866 									driver.context.pop_var();
867 									driver.context.pop_var(); // $1 & $3
868 									driver.context.push_var((yyval.expr));
869 								;}
870     break;
871 
872   case 30:
873 #line 405 "pgscript/pgsParser.yy"
874     {
875 									(yyval.expr) = pnew pgsMinus((yysemantic_stack_[(3) - (1)].expr), (yysemantic_stack_[(3) - (3)].expr));
876 									driver.context.pop_var();
877 									driver.context.pop_var(); // $1 & $3
878 									driver.context.push_var((yyval.expr));
879 								;}
880     break;
881 
882   case 31:
883 #line 414 "pgscript/pgsParser.yy"
884     { (yyval.expr) = (yysemantic_stack_[(1) - (1)].expr); ;}
885     break;
886 
887   case 32:
888 #line 416 "pgscript/pgsParser.yy"
889     {
890 									(yyval.expr) = pnew pgsLower((yysemantic_stack_[(3) - (1)].expr), (yysemantic_stack_[(3) - (3)].expr));
891 									driver.context.pop_var();
892 									driver.context.pop_var(); // $1 & $3
893 									driver.context.push_var((yyval.expr));
894 								;}
895     break;
896 
897   case 33:
898 #line 423 "pgscript/pgsParser.yy"
899     {
900 									(yyval.expr) = pnew pgsGreater((yysemantic_stack_[(3) - (1)].expr), (yysemantic_stack_[(3) - (3)].expr));
901 									driver.context.pop_var();
902 									driver.context.pop_var(); // $1 & $3
903 									driver.context.push_var((yyval.expr));
904 								;}
905     break;
906 
907   case 34:
908 #line 430 "pgscript/pgsParser.yy"
909     {
910 									(yyval.expr) = pnew pgsLowerEqual((yysemantic_stack_[(3) - (1)].expr), (yysemantic_stack_[(3) - (3)].expr));
911 									driver.context.pop_var();
912 									driver.context.pop_var(); // $1 & $3
913 									driver.context.push_var((yyval.expr));
914 								;}
915     break;
916 
917   case 35:
918 #line 437 "pgscript/pgsParser.yy"
919     {
920 									(yyval.expr) = pnew pgsGreaterEqual((yysemantic_stack_[(3) - (1)].expr), (yysemantic_stack_[(3) - (3)].expr));
921 									driver.context.pop_var();
922 									driver.context.pop_var(); // $1 & $3
923 									driver.context.push_var((yyval.expr));
924 								;}
925     break;
926 
927   case 36:
928 #line 446 "pgscript/pgsParser.yy"
929     { (yyval.expr) = (yysemantic_stack_[(1) - (1)].expr); ;}
930     break;
931 
932   case 37:
933 #line 448 "pgscript/pgsParser.yy"
934     {
935 									(yyval.expr) = pnew pgsEqual((yysemantic_stack_[(3) - (1)].expr), (yysemantic_stack_[(3) - (3)].expr));
936 									driver.context.pop_var();
937 									driver.context.pop_var(); // $1 & $3
938 									driver.context.push_var((yyval.expr));
939 								;}
940     break;
941 
942   case 38:
943 #line 455 "pgscript/pgsParser.yy"
944     {
945 									(yyval.expr) = pnew pgsEqual((yysemantic_stack_[(3) - (1)].expr), (yysemantic_stack_[(3) - (3)].expr), false);
946 									driver.context.pop_var();
947 									driver.context.pop_var(); // $1 & $3
948 									driver.context.push_var((yyval.expr));
949 								;}
950     break;
951 
952   case 39:
953 #line 462 "pgscript/pgsParser.yy"
954     {
955 									(yyval.expr) = pnew pgsDifferent((yysemantic_stack_[(3) - (1)].expr), (yysemantic_stack_[(3) - (3)].expr));
956 									driver.context.pop_var();
957 									driver.context.pop_var(); // $1 & $3
958 									driver.context.push_var((yyval.expr));
959 								;}
960     break;
961 
962   case 40:
963 #line 471 "pgscript/pgsParser.yy"
964     { (yyval.expr) = (yysemantic_stack_[(1) - (1)].expr); ;}
965     break;
966 
967   case 41:
968 #line 473 "pgscript/pgsParser.yy"
969     {
970 									(yyval.expr) = pnew pgsAnd((yysemantic_stack_[(3) - (1)].expr), (yysemantic_stack_[(3) - (3)].expr));
971 									driver.context.pop_var();
972 									driver.context.pop_var(); // $1 & $3
973 									driver.context.push_var((yyval.expr));
974 								;}
975     break;
976 
977   case 42:
978 #line 482 "pgscript/pgsParser.yy"
979     { (yyval.expr) = (yysemantic_stack_[(1) - (1)].expr); ;}
980     break;
981 
982   case 43:
983 #line 484 "pgscript/pgsParser.yy"
984     {
985 									(yyval.expr) = pnew pgsOr((yysemantic_stack_[(3) - (1)].expr), (yysemantic_stack_[(3) - (3)].expr));
986 									driver.context.pop_var();
987 									driver.context.pop_var(); // $1 & $3
988 									driver.context.push_var((yyval.expr));
989 								;}
990     break;
991 
992   case 44:
993 #line 493 "pgscript/pgsParser.yy"
994     {
995 									wxLogScriptVerbose(wxT("%s"), (yysemantic_stack_[(1) - (1)].expr)->value().c_str());
996 									(yyval.expr) = (yysemantic_stack_[(1) - (1)].expr);
997 								;}
998     break;
999 
1000   case 45:
1001 #line 501 "pgscript/pgsParser.yy"
1002     {
1003 									(yyval.expr) = pnew pgsGenInt((yysemantic_stack_[(6) - (3)].expr), (yysemantic_stack_[(6) - (5)].expr), driver.context.zero(),
1004 											driver.context.seed());
1005 									driver.context.pop_var(); driver.context.pop_var();
1006 									driver.context.pop_var(); driver.context.pop_var();
1007 									driver.context.push_var((yyval.expr));
1008 								;}
1009     break;
1010 
1011   case 46:
1012 #line 509 "pgscript/pgsParser.yy"
1013     {
1014 									(yyval.expr) = pnew pgsGenInt((yysemantic_stack_[(8) - (3)].expr), (yysemantic_stack_[(8) - (5)].expr), (yysemantic_stack_[(8) - (7)].expr), driver.context.seed());
1015 									driver.context.pop_var(); driver.context.pop_var();
1016 									driver.context.pop_var(); driver.context.pop_var();
1017 									driver.context.push_var((yyval.expr));
1018 								;}
1019     break;
1020 
1021   case 47:
1022 #line 516 "pgscript/pgsParser.yy"
1023     {
1024 									(yyval.expr) = pnew pgsGenInt((yysemantic_stack_[(10) - (3)].expr), (yysemantic_stack_[(10) - (5)].expr), (yysemantic_stack_[(10) - (7)].expr), (yysemantic_stack_[(10) - (9)].expr));
1025 									driver.context.pop_var(); driver.context.pop_var();
1026 									driver.context.pop_var(); driver.context.pop_var();
1027 									driver.context.push_var((yyval.expr));
1028 								;}
1029     break;
1030 
1031   case 48:
1032 #line 523 "pgscript/pgsParser.yy"
1033     {
1034 									(yyval.expr) = pnew pgsGenReal((yysemantic_stack_[(8) - (3)].expr), (yysemantic_stack_[(8) - (5)].expr), (yysemantic_stack_[(8) - (7)].expr), driver.context.zero(),
1035 											driver.context.seed());
1036 									driver.context.pop_var(); driver.context.pop_var();
1037 									driver.context.pop_var(); driver.context.pop_var();
1038 									driver.context.pop_var();
1039 									driver.context.push_var((yyval.expr));
1040 								;}
1041     break;
1042 
1043   case 49:
1044 #line 532 "pgscript/pgsParser.yy"
1045     {
1046 									(yyval.expr) = pnew pgsGenReal((yysemantic_stack_[(10) - (3)].expr), (yysemantic_stack_[(10) - (5)].expr), (yysemantic_stack_[(10) - (7)].expr), (yysemantic_stack_[(10) - (9)].expr), driver.context.seed());
1047 									driver.context.pop_var(); driver.context.pop_var();
1048 									driver.context.pop_var(); driver.context.pop_var();
1049 									driver.context.pop_var();
1050 									driver.context.push_var((yyval.expr));
1051 								;}
1052     break;
1053 
1054   case 50:
1055 #line 540 "pgscript/pgsParser.yy"
1056     {
1057 									(yyval.expr) = pnew pgsGenReal((yysemantic_stack_[(12) - (3)].expr), (yysemantic_stack_[(12) - (5)].expr), (yysemantic_stack_[(12) - (7)].expr), (yysemantic_stack_[(12) - (9)].expr), (yysemantic_stack_[(12) - (11)].expr));
1058 									driver.context.pop_var(); driver.context.pop_var();
1059 									driver.context.pop_var(); driver.context.pop_var();
1060 									driver.context.pop_var();
1061 									driver.context.push_var((yyval.expr));
1062 								;}
1063     break;
1064 
1065   case 51:
1066 #line 548 "pgscript/pgsParser.yy"
1067     {
1068 									(yyval.expr) = pnew pgsGenString((yysemantic_stack_[(6) - (3)].expr), (yysemantic_stack_[(6) - (5)].expr), driver.context.one(),
1069 											driver.context.seed());
1070 									driver.context.pop_var(); driver.context.pop_var();
1071 									driver.context.pop_var(); driver.context.pop_var();
1072 									driver.context.push_var((yyval.expr));
1073 								;}
1074     break;
1075 
1076   case 52:
1077 #line 556 "pgscript/pgsParser.yy"
1078     {
1079 									(yyval.expr) = pnew pgsGenString((yysemantic_stack_[(8) - (3)].expr), (yysemantic_stack_[(8) - (5)].expr), (yysemantic_stack_[(8) - (7)].expr), driver.context.seed());
1080 									driver.context.pop_var(); driver.context.pop_var();
1081 									driver.context.pop_var(); driver.context.pop_var();
1082 									driver.context.push_var((yyval.expr));
1083 								;}
1084     break;
1085 
1086   case 53:
1087 #line 563 "pgscript/pgsParser.yy"
1088     {
1089 									(yyval.expr) = pnew pgsGenString((yysemantic_stack_[(10) - (3)].expr), (yysemantic_stack_[(10) - (5)].expr), (yysemantic_stack_[(10) - (7)].expr), (yysemantic_stack_[(10) - (9)].expr));
1090 									driver.context.pop_var(); driver.context.pop_var();
1091 									driver.context.pop_var(); driver.context.pop_var();
1092 									driver.context.push_var((yyval.expr));
1093 								;}
1094     break;
1095 
1096   case 54:
1097 #line 570 "pgscript/pgsParser.yy"
1098     {
1099 									(yyval.expr) = pnew pgsGenRegex((yysemantic_stack_[(4) - (3)].expr), driver.context.seed());
1100 									driver.context.pop_var(); driver.context.pop_var();
1101 									driver.context.push_var((yyval.expr));
1102 								;}
1103     break;
1104 
1105   case 55:
1106 #line 576 "pgscript/pgsParser.yy"
1107     {
1108 									(yyval.expr) = pnew pgsGenRegex((yysemantic_stack_[(6) - (3)].expr), (yysemantic_stack_[(6) - (5)].expr));
1109 									driver.context.pop_var(); driver.context.pop_var();
1110 									driver.context.push_var((yyval.expr));
1111 								;}
1112     break;
1113 
1114   case 56:
1115 #line 582 "pgscript/pgsParser.yy"
1116     {
1117 									(yyval.expr) = pnew pgsGenDictionary((yysemantic_stack_[(4) - (3)].expr), driver.context.zero(),
1118 											driver.context.seed(), driver.context.encoding());
1119 									driver.context.pop_var(); driver.context.pop_var();
1120 									driver.context.pop_var(); driver.context.pop_var();
1121 									driver.context.push_var((yyval.expr));
1122 								;}
1123     break;
1124 
1125   case 57:
1126 #line 590 "pgscript/pgsParser.yy"
1127     {
1128 									(yyval.expr) = pnew pgsGenDictionary((yysemantic_stack_[(6) - (3)].expr), (yysemantic_stack_[(6) - (5)].expr), driver.context.seed(),
1129 											driver.context.encoding());
1130 									driver.context.pop_var(); driver.context.pop_var();
1131 									driver.context.pop_var(); driver.context.pop_var();
1132 									driver.context.push_var((yyval.expr));
1133 								;}
1134     break;
1135 
1136   case 58:
1137 #line 598 "pgscript/pgsParser.yy"
1138     {
1139 									(yyval.expr) = pnew pgsGenDictionary((yysemantic_stack_[(8) - (3)].expr), (yysemantic_stack_[(8) - (5)].expr), (yysemantic_stack_[(8) - (7)].expr), driver.context.encoding());
1140 									driver.context.pop_var(); driver.context.pop_var();
1141 									driver.context.pop_var(); driver.context.pop_var();
1142 									driver.context.push_var((yyval.expr));
1143 								;}
1144     break;
1145 
1146   case 59:
1147 #line 605 "pgscript/pgsParser.yy"
1148     {
1149 									(yyval.expr) = pnew pgsGenDictionary((yysemantic_stack_[(10) - (3)].expr), (yysemantic_stack_[(10) - (5)].expr), (yysemantic_stack_[(10) - (7)].expr), (yysemantic_stack_[(10) - (9)].expr));
1150 									driver.context.pop_var(); driver.context.pop_var();
1151 									driver.context.pop_var(); driver.context.pop_var();
1152 									driver.context.push_var((yyval.expr));
1153 								;}
1154     break;
1155 
1156   case 60:
1157 #line 612 "pgscript/pgsParser.yy"
1158     {
1159 									(yyval.expr) = pnew pgsGenDate((yysemantic_stack_[(6) - (3)].expr), (yysemantic_stack_[(6) - (5)].expr), driver.context.zero(),
1160 											driver.context.seed());
1161 									driver.context.pop_var(); driver.context.pop_var();
1162 									driver.context.pop_var(); driver.context.pop_var();
1163 									driver.context.push_var((yyval.expr));
1164 								;}
1165     break;
1166 
1167   case 61:
1168 #line 620 "pgscript/pgsParser.yy"
1169     {
1170 									(yyval.expr) = pnew pgsGenDate((yysemantic_stack_[(8) - (3)].expr), (yysemantic_stack_[(8) - (5)].expr), (yysemantic_stack_[(8) - (7)].expr), driver.context.seed());
1171 									driver.context.pop_var(); driver.context.pop_var();
1172 									driver.context.pop_var(); driver.context.pop_var();
1173 									driver.context.push_var((yyval.expr));
1174 								;}
1175     break;
1176 
1177   case 62:
1178 #line 627 "pgscript/pgsParser.yy"
1179     {
1180 									(yyval.expr) = pnew pgsGenDate((yysemantic_stack_[(10) - (3)].expr), (yysemantic_stack_[(10) - (5)].expr), (yysemantic_stack_[(10) - (7)].expr), (yysemantic_stack_[(10) - (9)].expr));
1181 									driver.context.pop_var(); driver.context.pop_var();
1182 									driver.context.pop_var(); driver.context.pop_var();
1183 									driver.context.push_var((yyval.expr));
1184 								;}
1185     break;
1186 
1187   case 63:
1188 #line 634 "pgscript/pgsParser.yy"
1189     {
1190 									(yyval.expr) = pnew pgsGenTime((yysemantic_stack_[(6) - (3)].expr), (yysemantic_stack_[(6) - (5)].expr), driver.context.zero(),
1191 											driver.context.seed());
1192 									driver.context.pop_var(); driver.context.pop_var();
1193 									driver.context.pop_var(); driver.context.pop_var();
1194 									driver.context.push_var((yyval.expr));
1195 								;}
1196     break;
1197 
1198   case 64:
1199 #line 642 "pgscript/pgsParser.yy"
1200     {
1201 									(yyval.expr) = pnew pgsGenTime((yysemantic_stack_[(8) - (3)].expr), (yysemantic_stack_[(8) - (5)].expr), (yysemantic_stack_[(8) - (7)].expr), driver.context.seed());
1202 									driver.context.pop_var(); driver.context.pop_var();
1203 									driver.context.pop_var(); driver.context.pop_var();
1204 									driver.context.push_var((yyval.expr));
1205 								;}
1206     break;
1207 
1208   case 65:
1209 #line 649 "pgscript/pgsParser.yy"
1210     {
1211 									(yyval.expr) = pnew pgsGenTime((yysemantic_stack_[(10) - (3)].expr), (yysemantic_stack_[(10) - (5)].expr), (yysemantic_stack_[(10) - (7)].expr), (yysemantic_stack_[(10) - (9)].expr));
1212 									driver.context.pop_var(); driver.context.pop_var();
1213 									driver.context.pop_var(); driver.context.pop_var();
1214 									driver.context.push_var((yyval.expr));
1215 								;}
1216     break;
1217 
1218   case 66:
1219 #line 656 "pgscript/pgsParser.yy"
1220     {
1221 									(yyval.expr) = pnew pgsGenDateTime((yysemantic_stack_[(6) - (3)].expr), (yysemantic_stack_[(6) - (5)].expr), driver.context.zero(),
1222 											driver.context.seed());
1223 									driver.context.pop_var(); driver.context.pop_var();
1224 									driver.context.pop_var(); driver.context.pop_var();
1225 									driver.context.push_var((yyval.expr));
1226 								;}
1227     break;
1228 
1229   case 67:
1230 #line 664 "pgscript/pgsParser.yy"
1231     {
1232 									(yyval.expr) = pnew pgsGenDateTime((yysemantic_stack_[(8) - (3)].expr), (yysemantic_stack_[(8) - (5)].expr), (yysemantic_stack_[(8) - (7)].expr), driver.context.seed());
1233 									driver.context.pop_var(); driver.context.pop_var();
1234 									driver.context.pop_var(); driver.context.pop_var();
1235 									driver.context.push_var((yyval.expr));
1236 								;}
1237     break;
1238 
1239   case 68:
1240 #line 671 "pgscript/pgsParser.yy"
1241     {
1242 									(yyval.expr) = pnew pgsGenDateTime((yysemantic_stack_[(10) - (3)].expr), (yysemantic_stack_[(10) - (5)].expr), (yysemantic_stack_[(10) - (7)].expr), (yysemantic_stack_[(10) - (9)].expr));
1243 									driver.context.pop_var(); driver.context.pop_var();
1244 									driver.context.pop_var(); driver.context.pop_var();
1245 									driver.context.push_var((yyval.expr));
1246 								;}
1247     break;
1248 
1249   case 69:
1250 #line 678 "pgscript/pgsParser.yy"
1251     {
1252 									(yyval.expr) = pnew pgsGenReference((yysemantic_stack_[(6) - (3)].expr), (yysemantic_stack_[(6) - (5)].expr), driver.context.zero(),
1253 											driver.context.seed(), &(driver.thread));
1254 									driver.context.pop_var(); driver.context.pop_var();
1255 									driver.context.pop_var(); driver.context.pop_var();
1256 									driver.context.push_var((yyval.expr));
1257 								;}
1258     break;
1259 
1260   case 70:
1261 #line 686 "pgscript/pgsParser.yy"
1262     {
1263 									(yyval.expr) = pnew pgsGenReference((yysemantic_stack_[(8) - (3)].expr), (yysemantic_stack_[(8) - (5)].expr), (yysemantic_stack_[(8) - (7)].expr), driver.context.seed(),
1264 											&(driver.thread));
1265 									driver.context.pop_var(); driver.context.pop_var();
1266 									driver.context.pop_var(); driver.context.pop_var();
1267 									driver.context.push_var((yyval.expr));
1268 								;}
1269     break;
1270 
1271   case 71:
1272 #line 694 "pgscript/pgsParser.yy"
1273     {
1274 									(yyval.expr) = pnew pgsGenReference((yysemantic_stack_[(10) - (3)].expr), (yysemantic_stack_[(10) - (5)].expr), (yysemantic_stack_[(10) - (7)].expr), (yysemantic_stack_[(10) - (9)].expr), &(driver.thread));
1275 									driver.context.pop_var(); driver.context.pop_var();
1276 									driver.context.pop_var(); driver.context.pop_var();
1277 									driver.context.push_var((yyval.expr));
1278 								;}
1279     break;
1280 
1281   case 72:
1282 #line 703 "pgscript/pgsParser.yy"
1283     { (yyval.stmt) = (yysemantic_stack_[(1) - (1)].stmt); ;}
1284     break;
1285 
1286   case 73:
1287 #line 704 "pgscript/pgsParser.yy"
1288     { (yyval.stmt) = (yysemantic_stack_[(1) - (1)].stmt); ;}
1289     break;
1290 
1291   case 74:
1292 #line 705 "pgscript/pgsParser.yy"
1293     { (yyval.stmt) = (yysemantic_stack_[(1) - (1)].stmt); ;}
1294     break;
1295 
1296   case 75:
1297 #line 706 "pgscript/pgsParser.yy"
1298     { (yyval.stmt) = (yysemantic_stack_[(2) - (1)].stmt); ;}
1299     break;
1300 
1301   case 76:
1302 #line 707 "pgscript/pgsParser.yy"
1303     { (yyval.stmt) = (yysemantic_stack_[(2) - (1)].stmt); ;}
1304     break;
1305 
1306   case 77:
1307 #line 708 "pgscript/pgsParser.yy"
1308     { (yyval.stmt) = (yysemantic_stack_[(2) - (1)].stmt); ;}
1309     break;
1310 
1311   case 78:
1312 #line 709 "pgscript/pgsParser.yy"
1313     { (yyval.stmt) = (yysemantic_stack_[(2) - (1)].stmt); ;}
1314     break;
1315 
1316   case 79:
1317 #line 710 "pgscript/pgsParser.yy"
1318     { (yyval.stmt) = (yysemantic_stack_[(2) - (1)].stmt); ;}
1319     break;
1320 
1321   case 80:
1322 #line 714 "pgscript/pgsParser.yy"
1323     {
1324 									driver.context.pop_stmt(); // $1
1325 									(yyval.stmt_list) = driver.context.stmt_list(&(driver.thread));
1326 									(yyval.stmt_list)->insert_back((yysemantic_stack_[(1) - (1)].stmt));
1327 								;}
1328     break;
1329 
1330   case 81:
1331 #line 719 "pgscript/pgsParser.yy"
1332     {
1333 									driver.context.pop_stmt(); // $2
1334 									(yyval.stmt_list) = (yysemantic_stack_[(2) - (1)].stmt_list);
1335 									(yyval.stmt_list)->insert_back((yysemantic_stack_[(2) - (2)].stmt));
1336 								;}
1337     break;
1338 
1339   case 82:
1340 #line 727 "pgscript/pgsParser.yy"
1341     {
1342 									wxLogScriptVerbose(wxT("BEGIN END"));
1343 									(yyval.stmt) = driver.context.stmt_list(&(driver.thread));
1344 								;}
1345     break;
1346 
1347   case 83:
1348 #line 732 "pgscript/pgsParser.yy"
1349     {
1350 									wxLogScriptVerbose(wxT("BEGIN ... END"));
1351 									(yyval.stmt) = (yysemantic_stack_[(3) - (2)].stmt_list);
1352 								;}
1353     break;
1354 
1355   case 84:
1356 #line 739 "pgscript/pgsParser.yy"
1357     {
1358 									wxLogScriptVerbose(wxT("%s"), (yysemantic_stack_[(1) - (1)].expr)->value().c_str());
1359 									(yyval.stmt) = pnew pgsExpressionStmt((yysemantic_stack_[(1) - (1)].expr), &(driver.thread));
1360 									driver.context.pop_var(); // $1
1361 									driver.context.push_stmt((yyval.stmt)); // pgsExpressionStmt
1362 									(yyval.stmt)->set_position(yyloc.begin.line);
1363 								;}
1364     break;
1365 
1366   case 85:
1367 #line 749 "pgscript/pgsParser.yy"
1368     {
1369 									(yyval.expr) = pnew pgsExecute(*((yysemantic_stack_[(1) - (1)].str)), &driver.context.m_cout,
1370 											&(driver.thread));
1371 									pdelete((yysemantic_stack_[(1) - (1)].str));
1372 									driver.context.push_var((yyval.expr)); // pgsExecute
1373 								;}
1374     break;
1375 
1376   case 86:
1377 #line 758 "pgscript/pgsParser.yy"
1378     { (yyval.str) = (yysemantic_stack_[(1) - (1)].str); ;}
1379     break;
1380 
1381   case 87:
1382 #line 759 "pgscript/pgsParser.yy"
1383     { (yyval.str) = (yysemantic_stack_[(1) - (1)].str); ;}
1384     break;
1385 
1386   case 88:
1387 #line 760 "pgscript/pgsParser.yy"
1388     { (yyval.str) = (yysemantic_stack_[(1) - (1)].str); ;}
1389     break;
1390 
1391   case 89:
1392 #line 761 "pgscript/pgsParser.yy"
1393     { (yyval.str) = (yysemantic_stack_[(1) - (1)].str); ;}
1394     break;
1395 
1396   case 90:
1397 #line 762 "pgscript/pgsParser.yy"
1398     { (yyval.str) = (yysemantic_stack_[(1) - (1)].str); ;}
1399     break;
1400 
1401   case 91:
1402 #line 763 "pgscript/pgsParser.yy"
1403     { (yyval.str) = (yysemantic_stack_[(1) - (1)].str); ;}
1404     break;
1405 
1406   case 92:
1407 #line 764 "pgscript/pgsParser.yy"
1408     { (yyval.str) = (yysemantic_stack_[(1) - (1)].str); ;}
1409     break;
1410 
1411   case 93:
1412 #line 765 "pgscript/pgsParser.yy"
1413     { (yyval.str) = (yysemantic_stack_[(1) - (1)].str); ;}
1414     break;
1415 
1416   case 94:
1417 #line 766 "pgscript/pgsParser.yy"
1418     { (yyval.str) = (yysemantic_stack_[(1) - (1)].str); ;}
1419     break;
1420 
1421   case 95:
1422 #line 767 "pgscript/pgsParser.yy"
1423     { (yyval.str) = (yysemantic_stack_[(1) - (1)].str); ;}
1424     break;
1425 
1426   case 96:
1427 #line 768 "pgscript/pgsParser.yy"
1428     { (yyval.str) = (yysemantic_stack_[(1) - (1)].str); ;}
1429     break;
1430 
1431   case 97:
1432 #line 769 "pgscript/pgsParser.yy"
1433     { (yyval.str) = (yysemantic_stack_[(1) - (1)].str); ;}
1434     break;
1435 
1436   case 98:
1437 #line 770 "pgscript/pgsParser.yy"
1438     { (yyval.str) = (yysemantic_stack_[(1) - (1)].str); ;}
1439     break;
1440 
1441   case 99:
1442 #line 771 "pgscript/pgsParser.yy"
1443     { (yyval.str) = (yysemantic_stack_[(1) - (1)].str); ;}
1444     break;
1445 
1446   case 100:
1447 #line 772 "pgscript/pgsParser.yy"
1448     { (yyval.str) = (yysemantic_stack_[(1) - (1)].str); ;}
1449     break;
1450 
1451   case 101:
1452 #line 773 "pgscript/pgsParser.yy"
1453     { (yyval.str) = (yysemantic_stack_[(1) - (1)].str); ;}
1454     break;
1455 
1456   case 102:
1457 #line 774 "pgscript/pgsParser.yy"
1458     { (yyval.str) = (yysemantic_stack_[(1) - (1)].str); ;}
1459     break;
1460 
1461   case 103:
1462 #line 775 "pgscript/pgsParser.yy"
1463     { (yyval.str) = (yysemantic_stack_[(1) - (1)].str); ;}
1464     break;
1465 
1466   case 104:
1467 #line 776 "pgscript/pgsParser.yy"
1468     { (yyval.str) = (yysemantic_stack_[(1) - (1)].str); ;}
1469     break;
1470 
1471   case 105:
1472 #line 777 "pgscript/pgsParser.yy"
1473     { (yyval.str) = (yysemantic_stack_[(1) - (1)].str); ;}
1474     break;
1475 
1476   case 106:
1477 #line 778 "pgscript/pgsParser.yy"
1478     { (yyval.str) = (yysemantic_stack_[(1) - (1)].str); ;}
1479     break;
1480 
1481   case 107:
1482 #line 779 "pgscript/pgsParser.yy"
1483     { (yyval.str) = (yysemantic_stack_[(1) - (1)].str); ;}
1484     break;
1485 
1486   case 108:
1487 #line 780 "pgscript/pgsParser.yy"
1488     { (yyval.str) = (yysemantic_stack_[(1) - (1)].str); ;}
1489     break;
1490 
1491   case 109:
1492 #line 781 "pgscript/pgsParser.yy"
1493     { (yyval.str) = (yysemantic_stack_[(1) - (1)].str); ;}
1494     break;
1495 
1496   case 110:
1497 #line 782 "pgscript/pgsParser.yy"
1498     { (yyval.str) = (yysemantic_stack_[(1) - (1)].str); ;}
1499     break;
1500 
1501   case 111:
1502 #line 783 "pgscript/pgsParser.yy"
1503     { (yyval.str) = (yysemantic_stack_[(1) - (1)].str); ;}
1504     break;
1505 
1506   case 112:
1507 #line 784 "pgscript/pgsParser.yy"
1508     { (yyval.str) = (yysemantic_stack_[(1) - (1)].str); ;}
1509     break;
1510 
1511   case 113:
1512 #line 785 "pgscript/pgsParser.yy"
1513     { (yyval.str) = (yysemantic_stack_[(1) - (1)].str); ;}
1514     break;
1515 
1516   case 114:
1517 #line 786 "pgscript/pgsParser.yy"
1518     { (yyval.str) = (yysemantic_stack_[(1) - (1)].str); ;}
1519     break;
1520 
1521   case 115:
1522 #line 787 "pgscript/pgsParser.yy"
1523     { (yyval.str) = (yysemantic_stack_[(1) - (1)].str); ;}
1524     break;
1525 
1526   case 116:
1527 #line 788 "pgscript/pgsParser.yy"
1528     { (yyval.str) = (yysemantic_stack_[(1) - (1)].str); ;}
1529     break;
1530 
1531   case 117:
1532 #line 789 "pgscript/pgsParser.yy"
1533     { (yyval.str) = (yysemantic_stack_[(1) - (1)].str); ;}
1534     break;
1535 
1536   case 118:
1537 #line 790 "pgscript/pgsParser.yy"
1538     { (yyval.str) = (yysemantic_stack_[(1) - (1)].str); ;}
1539     break;
1540 
1541   case 119:
1542 #line 791 "pgscript/pgsParser.yy"
1543     { (yyval.str) = (yysemantic_stack_[(1) - (1)].str); ;}
1544     break;
1545 
1546   case 120:
1547 #line 792 "pgscript/pgsParser.yy"
1548     { (yyval.str) = (yysemantic_stack_[(1) - (1)].str); ;}
1549     break;
1550 
1551   case 121:
1552 #line 793 "pgscript/pgsParser.yy"
1553     { (yyval.str) = (yysemantic_stack_[(1) - (1)].str); ;}
1554     break;
1555 
1556   case 122:
1557 #line 794 "pgscript/pgsParser.yy"
1558     { (yyval.str) = (yysemantic_stack_[(1) - (1)].str); ;}
1559     break;
1560 
1561   case 123:
1562 #line 795 "pgscript/pgsParser.yy"
1563     { (yyval.str) = (yysemantic_stack_[(1) - (1)].str); ;}
1564     break;
1565 
1566   case 124:
1567 #line 796 "pgscript/pgsParser.yy"
1568     { (yyval.str) = (yysemantic_stack_[(1) - (1)].str); ;}
1569     break;
1570 
1571   case 125:
1572 #line 797 "pgscript/pgsParser.yy"
1573     { (yyval.str) = (yysemantic_stack_[(1) - (1)].str); ;}
1574     break;
1575 
1576   case 126:
1577 #line 798 "pgscript/pgsParser.yy"
1578     { (yyval.str) = (yysemantic_stack_[(1) - (1)].str); ;}
1579     break;
1580 
1581   case 127:
1582 #line 799 "pgscript/pgsParser.yy"
1583     { (yyval.str) = (yysemantic_stack_[(1) - (1)].str); ;}
1584     break;
1585 
1586   case 128:
1587 #line 800 "pgscript/pgsParser.yy"
1588     { (yyval.str) = (yysemantic_stack_[(1) - (1)].str); ;}
1589     break;
1590 
1591   case 129:
1592 #line 801 "pgscript/pgsParser.yy"
1593     { (yyval.str) = (yysemantic_stack_[(1) - (1)].str); ;}
1594     break;
1595 
1596   case 130:
1597 #line 806 "pgscript/pgsParser.yy"
1598     {
1599 									(yyval.stmt) = (yysemantic_stack_[(2) - (2)].stmt_list);
1600 								;}
1601     break;
1602 
1603   case 131:
1604 #line 812 "pgscript/pgsParser.yy"
1605     {
1606 									driver.context.pop_stmt(); // $1
1607 									(yyval.stmt_list) = driver.context.stmt_list(&(driver.thread));
1608 									(yyval.stmt_list)->insert_back((yysemantic_stack_[(1) - (1)].stmt));
1609 
1610 								;}
1611     break;
1612 
1613   case 132:
1614 #line 819 "pgscript/pgsParser.yy"
1615     {
1616 									driver.context.pop_stmt(); // $3
1617 									(yyval.stmt_list) = (yysemantic_stack_[(3) - (1)].stmt_list);
1618 									(yyval.stmt_list)->insert_back((yysemantic_stack_[(3) - (3)].stmt));
1619 								;}
1620     break;
1621 
1622   case 133:
1623 #line 827 "pgscript/pgsParser.yy"
1624     {
1625 									wxLogScriptVerbose(wxT("DECLARE %s"), (yysemantic_stack_[(1) - (1)].str)->c_str());
1626 
1627 									(yyval.stmt) = pnew pgsExpressionStmt(pnew pgsAssign(*((yysemantic_stack_[(1) - (1)].str)),
1628 											pnew pgsString(wxT(""))), &(driver.thread));
1629 									driver.context.push_stmt((yyval.stmt)); // pgsExpressionStmt
1630 									(yyval.stmt)->set_position(yyloc.begin.line);
1631 
1632 									pdelete((yysemantic_stack_[(1) - (1)].str));
1633 								;}
1634     break;
1635 
1636   case 134:
1637 #line 838 "pgscript/pgsParser.yy"
1638     {
1639 									wxLogScriptVerbose(wxT("DECLARE %s"), (yysemantic_stack_[(4) - (1)].str)->c_str());
1640 
1641 									(yyval.stmt) = pnew pgsDeclareRecordStmt(*((yysemantic_stack_[(4) - (1)].str)), driver.context.columns(),
1642 											&(driver.thread));
1643 									driver.context.push_stmt((yyval.stmt)); // pgsDeclareRecordStmt
1644 									(yyval.stmt)->set_position(yyloc.begin.line);
1645 
1646 									driver.context.clear_columns();
1647 									pdelete((yysemantic_stack_[(4) - (1)].str));
1648 								;}
1649     break;
1650 
1651   case 135:
1652 #line 853 "pgscript/pgsParser.yy"
1653     {
1654 									(yyval.stmt) = (yysemantic_stack_[(2) - (2)].stmt_list);
1655 								;}
1656     break;
1657 
1658   case 136:
1659 #line 859 "pgscript/pgsParser.yy"
1660     {
1661 									driver.context.pop_stmt(); // $1
1662 									(yyval.stmt_list) = driver.context.stmt_list(&(driver.thread));
1663 									(yyval.stmt_list)->insert_back((yysemantic_stack_[(1) - (1)].stmt));
1664 								;}
1665     break;
1666 
1667   case 137:
1668 #line 865 "pgscript/pgsParser.yy"
1669     {
1670 									driver.context.pop_stmt(); // $3
1671 									(yyval.stmt_list) = (yysemantic_stack_[(3) - (1)].stmt_list);
1672 									(yyval.stmt_list)->insert_back((yysemantic_stack_[(3) - (3)].stmt));
1673 								;}
1674     break;
1675 
1676   case 138:
1677 #line 874 "pgscript/pgsParser.yy"
1678     {
1679 									wxLogScriptVerbose(wxT("SET %s = %s"), (yysemantic_stack_[(3) - (1)].str)->c_str(),
1680 											(yysemantic_stack_[(3) - (3)].expr)->value().c_str());
1681 
1682 									(yyval.stmt) = pnew pgsExpressionStmt(pnew pgsAssign(*((yysemantic_stack_[(3) - (1)].str)), (yysemantic_stack_[(3) - (3)].expr)),
1683 											&(driver.thread));
1684 									driver.context.pop_var(); // $3
1685 									driver.context.push_stmt((yyval.stmt)); // pgsExpressionStmt
1686 									(yyval.stmt)->set_position(yyloc.begin.line);
1687 
1688 									pdelete((yysemantic_stack_[(3) - (1)].str));
1689 								;}
1690     break;
1691 
1692   case 139:
1693 #line 887 "pgscript/pgsParser.yy"
1694     {
1695 									wxLogScriptVerbose(wxT("SET %s[%s][%s] = %s"),
1696 											(yysemantic_stack_[(9) - (1)].str)->c_str(), (yysemantic_stack_[(9) - (3)].expr)->value().c_str(),
1697 											(yysemantic_stack_[(9) - (6)].expr)->value().c_str(), (yysemantic_stack_[(9) - (9)].expr)->value().c_str());
1698 
1699 									(yyval.stmt) = pnew pgsExpressionStmt(pnew pgsAssignToRecord(*((yysemantic_stack_[(9) - (1)].str)),
1700 											(yysemantic_stack_[(9) - (3)].expr), (yysemantic_stack_[(9) - (6)].expr), (yysemantic_stack_[(9) - (9)].expr)), &(driver.thread));
1701 									driver.context.pop_var(); driver.context.pop_var();
1702 									driver.context.pop_var(); // $3 & $6 & $9
1703 									driver.context.push_stmt((yyval.stmt)); // pgsExpressionStmt
1704 									(yyval.stmt)->set_position(yyloc.begin.line);
1705 
1706 									pdelete((yysemantic_stack_[(9) - (1)].str));
1707 								;}
1708     break;
1709 
1710   case 140:
1711 #line 902 "pgscript/pgsParser.yy"
1712     {
1713 									wxLogScriptVerbose(wxT("SET %s = %s"), (yysemantic_stack_[(3) - (1)].str)->c_str(),
1714 											(yysemantic_stack_[(3) - (3)].expr)->value().c_str());
1715 
1716 									(yyval.stmt) = pnew pgsExpressionStmt(pnew pgsAssign(*((yysemantic_stack_[(3) - (1)].str)), (yysemantic_stack_[(3) - (3)].expr)),
1717 											&(driver.thread));
1718 									driver.context.pop_var(); // $3
1719 									driver.context.push_stmt((yyval.stmt)); // pgsExpressionStmt
1720 									(yyval.stmt)->set_position(yyloc.begin.line);
1721 
1722 									pdelete((yysemantic_stack_[(3) - (1)].str));
1723 								;}
1724     break;
1725 
1726   case 141:
1727 #line 918 "pgscript/pgsParser.yy"
1728     {
1729 									wxLogScriptVerbose(wxT("IF %s"), (yysemantic_stack_[(3) - (2)].expr)->value().c_str());
1730 
1731 									(yyval.stmt) = pnew pgsIfStmt((yysemantic_stack_[(3) - (2)].expr), (yysemantic_stack_[(3) - (3)].stmt), driver.context
1732 											.stmt_list(&(driver.thread)), &(driver.thread));
1733 									driver.context.pop_var(); // $2
1734 									driver.context.pop_stmt(); // $3
1735 									driver.context.pop_stmt(); // stmt_list
1736 									driver.context.push_stmt((yyval.stmt)); // pgsIfStmt
1737 									(yyval.stmt)->set_position(yyloc.begin.line);
1738 								;}
1739     break;
1740 
1741   case 142:
1742 #line 930 "pgscript/pgsParser.yy"
1743     {
1744 									wxLogScriptVerbose(wxT("IF %s"), (yysemantic_stack_[(5) - (2)].expr)->value().c_str());
1745 
1746 									(yyval.stmt) = pnew pgsIfStmt((yysemantic_stack_[(5) - (2)].expr), (yysemantic_stack_[(5) - (3)].stmt), (yysemantic_stack_[(5) - (5)].stmt), &(driver.thread));
1747 									driver.context.pop_var(); // $2
1748 									driver.context.pop_stmt(); // $3
1749 									driver.context.pop_stmt(); // $5
1750 									driver.context.push_stmt((yyval.stmt)); // pgsIfStmt
1751 									(yyval.stmt)->set_position(yyloc.begin.line);
1752 								;}
1753     break;
1754 
1755   case 143:
1756 #line 944 "pgscript/pgsParser.yy"
1757     {
1758 									wxLogScriptVerbose(wxT("WHILE %s"), (yysemantic_stack_[(3) - (2)].expr)->value().c_str());
1759 
1760 									(yyval.stmt) = pnew pgsWhileStmt((yysemantic_stack_[(3) - (2)].expr), (yysemantic_stack_[(3) - (3)].stmt), &(driver.thread));
1761 									driver.context.pop_var(); // $2
1762 									driver.context.pop_stmt(); // $3
1763 									driver.context.push_stmt((yyval.stmt)); // pgsWhileStmt
1764 									(yyval.stmt)->set_position(yyloc.begin.line);
1765 								;}
1766     break;
1767 
1768   case 144:
1769 #line 956 "pgscript/pgsParser.yy"
1770     {
1771 									wxLogScriptVerbose(wxT("BREAK"));
1772 
1773 									(yyval.stmt) = pnew pgsBreakStmt(&(driver.thread));
1774 									driver.context.push_stmt((yyval.stmt)); // pgsBreakStmt
1775 									(yyval.stmt)->set_position(yyloc.begin.line);
1776 								;}
1777     break;
1778 
1779   case 145:
1780 #line 963 "pgscript/pgsParser.yy"
1781     {
1782 									wxLogScriptVerbose(wxT("RETURN"));
1783 
1784 									(yyval.stmt) = pnew pgsBreakStmt(&(driver.thread));
1785 									driver.context.push_stmt((yyval.stmt)); // pgsBreakStmt
1786 									(yyval.stmt)->set_position(yyloc.begin.line);
1787 								;}
1788     break;
1789 
1790   case 146:
1791 #line 970 "pgscript/pgsParser.yy"
1792     {
1793 									wxLogScriptVerbose(wxT("CONTINUE"));
1794 
1795 									(yyval.stmt) = pnew pgsContinueStmt(&(driver.thread));
1796 									driver.context.push_stmt((yyval.stmt)); // pgsContinueStmt
1797 									(yyval.stmt)->set_position(yyloc.begin.line);
1798 								;}
1799     break;
1800 
1801   case 147:
1802 #line 981 "pgscript/pgsParser.yy"
1803     {
1804 									wxLogScriptVerbose(wxT("PRINT %s"), (yysemantic_stack_[(2) - (2)].expr)->value().c_str());
1805 
1806 									(yyval.stmt) = pnew pgsPrintStmt((yysemantic_stack_[(2) - (2)].expr), driver.context.m_cout,
1807 											&(driver.thread));
1808 									driver.context.pop_var(); // $2
1809 									driver.context.push_stmt((yyval.stmt)); // pgsPrintStmt
1810 									(yyval.stmt)->set_position(yyloc.begin.line);
1811 								;}
1812     break;
1813 
1814   case 148:
1815 #line 991 "pgscript/pgsParser.yy"
1816     {
1817 									wxLogScriptVerbose(wxT("ASSERT %s"), (yysemantic_stack_[(2) - (2)].expr)->value().c_str());
1818 
1819 									(yyval.stmt) = pnew pgsAssertStmt((yysemantic_stack_[(2) - (2)].expr), &(driver.thread));
1820 									driver.context.pop_var(); // $2
1821 									driver.context.push_stmt((yyval.stmt)); // pgsAssertStmt
1822 									(yyval.stmt)->set_position(yyloc.begin.line);
1823 								;}
1824     break;
1825 
1826   case 149:
1827 #line 1000 "pgscript/pgsParser.yy"
1828     {
1829 									wxLogScriptVerbose(wxT("RMLINE %s[%s]"), (yysemantic_stack_[(7) - (3)].str)->c_str(),
1830 											(yysemantic_stack_[(7) - (5)].expr)->value().c_str());
1831 
1832 									(yyval.stmt) = pnew pgsExpressionStmt(pnew pgsRemoveLine(*((yysemantic_stack_[(7) - (3)].str)), (yysemantic_stack_[(7) - (5)].expr)),
1833 											&(driver.thread));
1834 									driver.context.pop_var(); // $5
1835 									driver.context.push_stmt((yyval.stmt)); // pgsExpressionStmt
1836 									(yyval.stmt)->set_position(yyloc.begin.line);
1837 
1838 									pdelete((yysemantic_stack_[(7) - (3)].str));
1839 								;}
1840     break;
1841 
1842   case 150:
1843 #line 1015 "pgscript/pgsParser.yy"
1844     {
1845 									driver.context.add_column(*(yysemantic_stack_[(1) - (1)].str));
1846 									pdelete((yysemantic_stack_[(1) - (1)].str));
1847 								;}
1848     break;
1849 
1850   case 151:
1851 #line 1020 "pgscript/pgsParser.yy"
1852     {
1853 									driver.context.add_column(*(yysemantic_stack_[(3) - (3)].str));
1854 									pdelete((yysemantic_stack_[(3) - (3)].str));
1855 								;}
1856     break;
1857 
1858   case 153:
1859 #line 1028 "pgscript/pgsParser.yy"
1860     {
1861 									driver.program.eval((yysemantic_stack_[(2) - (1)].stmt_list));
1862 
1863 									driver.context.pop_stmt();
1864 									pdelete((yysemantic_stack_[(2) - (1)].stmt_list)); // delete root statement $1
1865 								;}
1866     break;
1867 
1868 
1869     /* Line 675 of lalr1.cc.  */
1870 #line 1866 "pgscript/parser.tab.cc"
1871 	default: break;
1872       }
1873     YY_SYMBOL_PRINT ("-> $$ =", yyr1_[yyn], &yyval, &yyloc);
1874 
1875     yypop_ (yylen);
1876     yylen = 0;
1877     YY_STACK_PRINT ();
1878 
1879     yysemantic_stack_.push (yyval);
1880     yylocation_stack_.push (yyloc);
1881 
1882     /* Shift the result of the reduction.  */
1883     yyn = yyr1_[yyn];
1884     yystate = yypgoto_[yyn - yyntokens_] + yystate_stack_[0];
1885     if (0 <= yystate && yystate <= yylast_
1886 	&& yycheck_[yystate] == yystate_stack_[0])
1887       yystate = yytable_[yystate];
1888     else
1889       yystate = yydefgoto_[yyn - yyntokens_];
1890     goto yynewstate;
1891 
1892   /*------------------------------------.
1893   | yyerrlab -- here on detecting error |
1894   `------------------------------------*/
1895   yyerrlab:
1896     /* If not already recovering from an error, report this error.  */
1897     if (!yyerrstatus_)
1898       {
1899 	++yynerrs_;
1900 	error (yylloc, yysyntax_error_ (yystate, yytoken));
1901       }
1902 
1903     yyerror_range[0] = yylloc;
1904     if (yyerrstatus_ == 3)
1905       {
1906 	/* If just tried and failed to reuse look-ahead token after an
1907 	 error, discard it.  */
1908 
1909 	if (yychar <= yyeof_)
1910 	  {
1911 	  /* Return failure if at end of input.  */
1912 	  if (yychar == yyeof_)
1913 	    YYABORT;
1914 	  }
1915 	else
1916 	  {
1917 	    yydestruct_ ("Error: discarding", yytoken, &yylval, &yylloc);
1918 	    yychar = yyempty_;
1919 	  }
1920       }
1921 
1922     /* Else will try to reuse look-ahead token after shifting the error
1923        token.  */
1924     goto yyerrlab1;
1925 
1926 
1927   /*---------------------------------------------------.
1928   | yyerrorlab -- error raised explicitly by YYERROR.  |
1929   `---------------------------------------------------*/
1930   yyerrorlab:
1931 
1932     /* Pacify compilers like GCC when the user code never invokes
1933        YYERROR and the label yyerrorlab therefore never appears in user
1934        code.  */
1935     if (false)
1936       goto yyerrorlab;
1937 
1938     yyerror_range[0] = yylocation_stack_[yylen - 1];
1939     /* Do not reclaim the symbols of the rule which action triggered
1940        this YYERROR.  */
1941     yypop_ (yylen);
1942     yylen = 0;
1943     yystate = yystate_stack_[0];
1944     goto yyerrlab1;
1945 
1946   /*-------------------------------------------------------------.
1947   | yyerrlab1 -- common code for both syntax error and YYERROR.  |
1948   `-------------------------------------------------------------*/
1949   yyerrlab1:
1950     yyerrstatus_ = 3;	/* Each real token shifted decrements this.  */
1951 
1952     for (;;)
1953       {
1954 	yyn = yypact_[yystate];
1955 	if (yyn != yypact_ninf_)
1956 	{
1957 	  yyn += yyterror_;
1958 	  if (0 <= yyn && yyn <= yylast_ && yycheck_[yyn] == yyterror_)
1959 	    {
1960 	      yyn = yytable_[yyn];
1961 	      if (0 < yyn)
1962 		break;
1963 	    }
1964 	}
1965 
1966 	/* Pop the current state because it cannot handle the error token.  */
1967 	if (yystate_stack_.height () == 1)
1968 	YYABORT;
1969 
1970 	yyerror_range[0] = yylocation_stack_[0];
1971 	yydestruct_ ("Error: popping",
1972 		     yystos_[yystate],
1973 		     &yysemantic_stack_[0], &yylocation_stack_[0]);
1974 	yypop_ ();
1975 	yystate = yystate_stack_[0];
1976 	YY_STACK_PRINT ();
1977       }
1978 
1979     if (yyn == yyfinal_)
1980       goto yyacceptlab;
1981 
1982     yyerror_range[1] = yylloc;
1983     // Using YYLLOC is tempting, but would change the location of
1984     // the look-ahead.  YYLOC is available though.
1985     YYLLOC_DEFAULT (yyloc, (yyerror_range - 1), 2);
1986     yysemantic_stack_.push (yylval);
1987     yylocation_stack_.push (yyloc);
1988 
1989     /* Shift the error token.  */
1990     YY_SYMBOL_PRINT ("Shifting", yystos_[yyn],
1991 		   &yysemantic_stack_[0], &yylocation_stack_[0]);
1992 
1993     yystate = yyn;
1994     goto yynewstate;
1995 
1996     /* Accept.  */
1997   yyacceptlab:
1998     yyresult = 0;
1999     goto yyreturn;
2000 
2001     /* Abort.  */
2002   yyabortlab:
2003     yyresult = 1;
2004     goto yyreturn;
2005 
2006   yyreturn:
2007     if (yychar != yyeof_ && yychar != yyempty_)
2008       yydestruct_ ("Cleanup: discarding lookahead", yytoken, &yylval, &yylloc);
2009 
2010     /* Do not reclaim the symbols of the rule which action triggered
2011        this YYABORT or YYACCEPT.  */
2012     yypop_ (yylen);
2013     while (yystate_stack_.height () != 1)
2014       {
2015 	yydestruct_ ("Cleanup: popping",
2016 		   yystos_[yystate_stack_[0]],
2017 		   &yysemantic_stack_[0],
2018 		   &yylocation_stack_[0]);
2019 	yypop_ ();
2020       }
2021 
2022     return yyresult;
2023   }
2024 
2025   // Generate an error message.
2026   std::string
yysyntax_error_(int yystate,int tok)2027   pgsParser::yysyntax_error_ (int yystate, int tok)
2028   {
2029     std::string res;
2030     YYUSE (yystate);
2031 #if YYERROR_VERBOSE
2032     int yyn = yypact_[yystate];
2033     if (yypact_ninf_ < yyn && yyn <= yylast_)
2034       {
2035 	/* Start YYX at -YYN if negative to avoid negative indexes in
2036 	   YYCHECK.  */
2037 	int yyxbegin = yyn < 0 ? -yyn : 0;
2038 
2039 	/* Stay within bounds of both yycheck and yytname.  */
2040 	int yychecklim = yylast_ - yyn + 1;
2041 	int yyxend = yychecklim < yyntokens_ ? yychecklim : yyntokens_;
2042 	int count = 0;
2043 	for (int x = yyxbegin; x < yyxend; ++x)
2044 	  if (yycheck_[x + yyn] == x && x != yyterror_)
2045 	    ++count;
2046 
2047 	// FIXME: This method of building the message is not compatible
2048 	// with internationalization.  It should work like yacc.c does it.
2049 	// That is, first build a string that looks like this:
2050 	// "syntax error, unexpected %s or %s or %s"
2051 	// Then, invoke YY_ on this string.
2052 	// Finally, use the string as a format to output
2053 	// yytname_[tok], etc.
2054 	// Until this gets fixed, this message appears in English only.
2055 	res = "syntax error, unexpected ";
2056 	res += yytnamerr_ (yytname_[tok]);
2057 	if (count < 5)
2058 	  {
2059 	    count = 0;
2060 	    for (int x = yyxbegin; x < yyxend; ++x)
2061 	      if (yycheck_[x + yyn] == x && x != yyterror_)
2062 		{
2063 		  res += (!count++) ? ", expecting " : " or ";
2064 		  res += yytnamerr_ (yytname_[x]);
2065 		}
2066 	  }
2067       }
2068     else
2069 #endif
2070       res = YY_("syntax error");
2071     return res;
2072   }
2073 
2074 
2075   /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
2076      STATE-NUM.  */
2077   const signed char pgsParser::yypact_ninf_ = -93;
2078   const short int
2079   pgsParser::yypact_[] =
2080   {
2081        284,   -93,     6,   -93,   -93,   -93,     6,   453,     6,     6,
2082      -88,   -76,   -61,   -93,   -93,   -93,   -93,   -93,   -93,   -93,
2083      -93,   -93,   -93,   -93,   -93,   -93,   -93,   -93,   -93,   -93,
2084      -93,   -93,   -93,   -93,   -93,   -93,   -93,   -93,   -93,   -93,
2085      -93,   -93,   -93,   -93,   -93,   -93,   -93,   -93,   -93,   -93,
2086      -93,   -93,   -93,   -93,   -93,   -93,   -93,   -93,   370,   -93,
2087      -65,   -93,   -93,   -56,   -45,   -93,   -93,   -44,   -28,    73,
2088       12,    13,    23,    27,    37,    42,    44,    50,    63,    65,
2089       66,    67,    68,     6,     0,   -93,   -93,   -93,   -11,     6,
2090        6,   -93,   -93,   -93,    51,   -74,     7,   117,   120,   124,
2091      619,   -93,   619,   -93,   536,   -93,   -93,    76,   -25,    62,
2092      -93,    61,    69,   -93,   -93,   -93,   -93,   -93,   -93,   -93,
2093      -93,   -93,    79,    80,     6,     6,     6,     6,     6,     6,
2094        6,     6,     6,     6,     6,   -93,     6,    74,    75,   -93,
2095      -93,     6,     6,     6,     6,     6,     6,     6,     6,     6,
2096        6,     6,     6,     6,     6,   -93,   161,   -93,    81,   689,
2097        6,   -76,    86,   -61,    82,    83,    84,   163,    77,    78,
2098       85,   -53,   -52,    87,    89,    90,    91,    92,   -93,   -93,
2099      -93,   -93,   -93,    51,    51,   -74,   -74,   -74,   -74,     7,
2100        7,     7,   117,   120,   619,     6,   -93,   -93,    93,   -93,
2101      -93,    34,   -93,   -93,   -93,   -93,    64,     6,     6,     6,
2102      -93,     6,   -93,     6,     6,     6,     6,     6,    95,   -93,
2103       96,   103,    88,   -93,   -93,   -93,   -93,   -93,   101,   -51,
2104       94,   -42,   104,   -38,   -37,   -31,   -22,   -21,     6,   105,
2105        6,   -93,   -93,   -93,     6,     6,   -93,     6,   -93,   -93,
2106        6,   -93,     6,   -93,     6,   -93,     6,   -93,     6,   108,
2107      -93,   109,    -4,    -2,     9,    10,    15,    16,    38,    39,
2108      -93,   147,   -93,     6,   -93,     6,   -93,     6,   -93,     6,
2109      -93,     6,   -93,     6,   -93,     6,   -93,     6,     6,   111,
2110       40,   113,   119,   121,   122,   123,   125,   -93,   -93,   -93,
2111        6,   -93,   -93,   -93,   -93,   -93,   -93,   126,   -93
2112   };
2113 
2114   /* YYDEFACT[S] -- default rule to reduce with in state S when YYTABLE
2115      doesn't specify something else to do.  Zero means the default is an
2116      error.  */
2117   const unsigned char
2118   pgsParser::yydefact_[] =
2119   {
2120          0,   152,     0,   144,   145,   146,     0,     0,     0,     0,
2121        0,     0,     0,    86,    87,    88,    89,    90,    91,    92,
2122       93,    94,    95,    96,    97,    98,    99,   100,   101,   102,
2123      103,   104,   105,   106,   107,   108,   109,   110,   111,   112,
2124      113,   114,   115,   116,   117,   118,   119,   120,   121,   122,
2125      123,   124,   125,   126,   127,   128,   129,    80,     0,    72,
2126        0,    84,    85,     0,     0,    73,    74,     0,     0,     0,
2127        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
2128        0,     0,     0,     0,     7,     8,     9,    10,     0,     0,
2129        0,    14,    18,    24,    28,    31,    36,    40,    42,    44,
2130        0,    12,     0,    82,     0,   148,   147,     0,     0,   135,
2131      136,   133,   130,   131,   153,    81,    75,    78,    79,    77,
2132       76,     1,     0,     0,     0,     0,     0,     0,     0,     0,
2133        0,     0,     0,     0,     0,    17,     0,     0,     0,    15,
2134       16,     0,     0,     0,     0,     0,     0,     0,     0,     0,
2135        0,     0,     0,     0,     0,   143,   141,    83,     0,     0,
2136        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
2137        0,     0,     0,     0,     0,     0,     0,     0,    11,    13,
2138       25,    26,    27,    29,    30,    34,    35,    32,    33,    37,
2139       38,    39,    41,    43,     0,     0,   138,   140,     0,   137,
2140      150,     0,   132,     5,     4,     6,     0,     0,     0,     0,
2141       54,     0,    56,     0,     0,     0,     0,     0,     3,   142,
2142        0,     0,     0,   134,    23,    20,    21,    22,     0,     0,
2143        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
2144        0,   151,    19,    45,     0,     0,    51,     0,    55,    57,
2145        0,    60,     0,    63,     0,    66,     0,    69,     0,     0,
2146      149,     0,     0,     0,     0,     0,     0,     0,     0,     0,
2147        2,     0,    46,     0,    48,     0,    52,     0,    58,     0,
2148       61,     0,    64,     0,    67,     0,    70,     0,     0,     0,
2149        0,     0,     0,     0,     0,     0,     0,   139,    47,    49,
2150        0,    53,    59,    62,    65,    68,    71,     0,    50
2151   };
2152 
2153   /* YYPGOTO[NTERM-NUM].  */
2154   const short int
2155   pgsParser::yypgoto_[] =
2156   {
2157        -93,   -93,   -93,   -29,   -93,   -92,    -3,   -83,    28,    59,
2158      -93,    -6,   -93,   -57,   175,   -93,   -93,    58,   -93,   -93,
2159      -93,    33,   -93,   -93,    60,   -93,   -93,   -93,   -93,   -93,
2160      -93
2161   };
2162 
2163   /* YYDEFGOTO[NTERM-NUM].  */
2164   const short int
2165   pgsParser::yydefgoto_[] =
2166   {
2167         -1,    91,    92,    93,   228,    94,    95,    96,    97,    98,
2168       99,   100,   101,    57,    58,    59,    60,    61,    62,    63,
2169      112,   113,    64,   109,   110,    65,    66,    67,    68,   201,
2170       69
2171   };
2172 
2173   /* YYTABLE[YYPACT[STATE-NUM]].  What to do in state STATE-NUM.  If
2174      positive, shift that token.  If negative, reduce the rule which
2175      number is the opposite.  If zero, do what YYDEFACT says.  */
2176   const signed char pgsParser::yytable_ninf_ = -1;
2177   const unsigned short int
2178   pgsParser::yytable_[] =
2179   {
2180        102,   115,   105,   106,   107,    70,    71,    72,   159,    73,
2181      108,    74,    75,    76,    77,    78,    79,    80,    81,    82,
2182      144,   145,    70,    71,    72,   111,    73,    83,    74,    75,
2183       76,    77,    78,    79,    80,    81,    82,   116,   146,   147,
2184      210,   212,   243,   155,    83,   156,   117,   115,   211,   213,
2185      244,   246,   183,   184,   135,   249,   251,   118,   119,   247,
2186      139,   140,   253,   250,   252,   160,   137,   189,   190,   191,
2187      254,   255,   257,   121,   120,    84,    85,    86,    87,   256,
2188      258,    88,   138,    89,    90,   224,   225,   226,   227,   272,
2189      136,   274,    84,    85,    86,    87,   167,   273,    88,   275,
2190       89,    90,   276,   278,   122,   123,   148,   149,   280,   282,
2191      277,   279,   180,   181,   182,   124,   281,   283,   166,   125,
2192      168,   169,   170,   171,   172,   173,   174,   175,   176,   126,
2193      177,   284,   286,   299,   127,   222,   128,   219,   223,   285,
2194      287,   300,   129,   185,   186,   187,   188,   141,   142,   143,
2195      150,   151,   152,   196,   198,   130,   153,   131,   132,   133,
2196      134,   154,   158,   161,   162,   164,   165,   178,   179,   194,
2197      163,   195,   200,   206,   241,   203,   204,   205,   207,   208,
2198      288,   192,   104,   218,   221,   238,   209,   239,   214,   220,
2199      215,   216,   217,   240,   242,   245,   202,   248,   260,   270,
2200      271,   229,   230,   231,   298,   232,   301,   233,   234,   235,
2201      236,   237,   302,   193,   303,   304,   305,   197,   306,   308,
2202        0,   199,     0,     0,     0,     0,     0,     0,     0,     0,
2203        0,     0,   259,     0,   261,     0,     0,     0,   262,   263,
2204        0,   264,     0,     0,   265,     0,   266,     0,   267,     0,
2205      268,     0,   269,     0,     0,     0,     0,     0,     0,     0,
2206        0,     0,     0,     0,     0,     0,     0,   289,     0,   290,
2207        0,   291,     0,   292,     0,   293,     0,   294,     0,   295,
2208        0,   296,   297,     0,     1,     0,     0,     2,     3,     4,
2209        5,     6,     0,     0,   307,     7,     0,     8,     9,     0,
2210        0,     0,     0,    10,     0,     0,     0,     0,     0,     0,
2211        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
2212        0,     0,     0,     0,    11,    12,    13,    14,    15,    16,
2213       17,    18,    19,    20,    21,    22,    23,    24,    25,    26,
2214       27,    28,    29,    30,    31,    32,    33,    34,    35,    36,
2215       37,    38,    39,    40,    41,    42,    43,    44,    45,    46,
2216       47,    48,    49,    50,    51,    52,    53,    54,    55,    56,
2217      114,     0,     0,     2,     3,     4,     5,     6,     0,     0,
2218        0,     7,     0,     8,     9,     0,     0,     0,     0,    10,
2219        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
2220        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
2221       11,    12,    13,    14,    15,    16,    17,    18,    19,    20,
2222       21,    22,    23,    24,    25,    26,    27,    28,    29,    30,
2223       31,    32,    33,    34,    35,    36,    37,    38,    39,    40,
2224       41,    42,    43,    44,    45,    46,    47,    48,    49,    50,
2225       51,    52,    53,    54,    55,    56,     2,     3,     4,     5,
2226        6,     0,     0,     0,     7,   103,     8,     9,     0,     0,
2227        0,     0,    10,     0,     0,     0,     0,     0,     0,     0,
2228        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
2229        0,     0,     0,    11,    12,    13,    14,    15,    16,    17,
2230       18,    19,    20,    21,    22,    23,    24,    25,    26,    27,
2231       28,    29,    30,    31,    32,    33,    34,    35,    36,    37,
2232       38,    39,    40,    41,    42,    43,    44,    45,    46,    47,
2233       48,    49,    50,    51,    52,    53,    54,    55,    56,     2,
2234        3,     4,     5,     6,     0,     0,     0,     7,   157,     8,
2235        9,     0,     0,     0,     0,    10,     0,     0,     0,     0,
2236        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
2237        0,     0,     0,     0,     0,     0,    11,    12,    13,    14,
2238       15,    16,    17,    18,    19,    20,    21,    22,    23,    24,
2239       25,    26,    27,    28,    29,    30,    31,    32,    33,    34,
2240       35,    36,    37,    38,    39,    40,    41,    42,    43,    44,
2241       45,    46,    47,    48,    49,    50,    51,    52,    53,    54,
2242       55,    56,     2,     3,     4,     5,     6,     0,     0,     0,
2243        7,     0,     8,     9,     0,     0,     0,     0,    10,     0,
2244        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
2245        0,     0,     0,     0,     0,     0,     0,     0,     0,    11,
2246       12,    13,    14,    15,    16,    17,    18,    19,    20,    21,
2247       22,    23,    24,    25,    26,    27,    28,    29,    30,    31,
2248       32,    33,    34,    35,    36,    37,    38,    39,    40,    41,
2249       42,    43,    44,    45,    46,    47,    48,    49,    50,    51,
2250       52,    53,    54,    55,    56,    70,    71,    72,     0,    73,
2251        0,    74,    75,    76,    77,    78,    79,    80,    81,    82,
2252        0,     0,     0,     0,     0,     0,     0,    83,     0,     0,
2253        0,    13,    14,    15,    16,    17,    18,    19,    20,    21,
2254       22,    23,    24,    25,    26,    27,    28,    29,    30,    31,
2255       32,    33,    34,    35,    36,    37,    38,    39,    40,    41,
2256       42,    43,    44,    45,    46,    47,    48,    49,    50,    51,
2257       52,    53,    54,    55,    56,    84,    85,    86,    87,     0,
2258        0,    88,     0,    89,    90
2259   };
2260 
2261   /* YYCHECK.  */
2262   const short int
2263   pgsParser::yycheck_[] =
2264   {
2265          6,    58,     8,     9,    92,    16,    17,    18,    33,    20,
2266       86,    22,    23,    24,    25,    26,    27,    28,    29,    30,
2267       94,    95,    16,    17,    18,    86,    20,    38,    22,    23,
2268       24,    25,    26,    27,    28,    29,    30,   102,    31,    32,
2269       93,    93,    93,   100,    38,   102,   102,   104,   101,   101,
2270      101,    93,   144,   145,    83,    93,    93,   102,   102,   101,
2271       89,    90,    93,   101,   101,    90,    77,   150,   151,   152,
2272      101,    93,    93,     0,   102,    86,    87,    88,    89,   101,
2273      101,    92,    88,    94,    95,    21,    22,    23,    24,    93,
2274       90,    93,    86,    87,    88,    89,   125,   101,    92,   101,
2275       94,    95,    93,    93,    92,    92,    99,   100,    93,    93,
2276      101,   101,   141,   142,   143,    92,   101,   101,   124,    92,
2277      126,   127,   128,   129,   130,   131,   132,   133,   134,    92,
2278      136,    93,    93,    93,    92,   101,    92,   194,   104,   101,
2279      101,   101,    92,   146,   147,   148,   149,    96,    97,    98,
2280       33,    34,    35,   159,   160,    92,    36,    92,    92,    92,
2281       92,    37,    86,   101,   103,    86,    86,    93,    93,     8,
2282      101,    90,    86,    10,    86,    93,    93,    93,   101,   101,
2283       33,   153,     7,    91,    91,    90,   101,    91,   101,   195,
2284      101,   101,   101,    90,    93,   101,   163,    93,    93,    91,
2285       91,   207,   208,   209,    93,   211,    93,   213,   214,   215,
2286      216,   217,    93,   154,    93,    93,    93,   159,    93,    93,
2287       -1,   161,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
2288       -1,    -1,   238,    -1,   240,    -1,    -1,    -1,   244,   245,
2289       -1,   247,    -1,    -1,   250,    -1,   252,    -1,   254,    -1,
2290      256,    -1,   258,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
2291       -1,    -1,    -1,    -1,    -1,    -1,    -1,   273,    -1,   275,
2292       -1,   277,    -1,   279,    -1,   281,    -1,   283,    -1,   285,
2293       -1,   287,   288,    -1,     0,    -1,    -1,     3,     4,     5,
2294        6,     7,    -1,    -1,   300,    11,    -1,    13,    14,    -1,
2295       -1,    -1,    -1,    19,    -1,    -1,    -1,    -1,    -1,    -1,
2296       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
2297       -1,    -1,    -1,    -1,    40,    41,    42,    43,    44,    45,
2298       46,    47,    48,    49,    50,    51,    52,    53,    54,    55,
2299       56,    57,    58,    59,    60,    61,    62,    63,    64,    65,
2300       66,    67,    68,    69,    70,    71,    72,    73,    74,    75,
2301       76,    77,    78,    79,    80,    81,    82,    83,    84,    85,
2302        0,    -1,    -1,     3,     4,     5,     6,     7,    -1,    -1,
2303       -1,    11,    -1,    13,    14,    -1,    -1,    -1,    -1,    19,
2304       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
2305       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
2306       40,    41,    42,    43,    44,    45,    46,    47,    48,    49,
2307       50,    51,    52,    53,    54,    55,    56,    57,    58,    59,
2308       60,    61,    62,    63,    64,    65,    66,    67,    68,    69,
2309       70,    71,    72,    73,    74,    75,    76,    77,    78,    79,
2310       80,    81,    82,    83,    84,    85,     3,     4,     5,     6,
2311        7,    -1,    -1,    -1,    11,    12,    13,    14,    -1,    -1,
2312       -1,    -1,    19,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
2313       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
2314       -1,    -1,    -1,    40,    41,    42,    43,    44,    45,    46,
2315       47,    48,    49,    50,    51,    52,    53,    54,    55,    56,
2316       57,    58,    59,    60,    61,    62,    63,    64,    65,    66,
2317       67,    68,    69,    70,    71,    72,    73,    74,    75,    76,
2318       77,    78,    79,    80,    81,    82,    83,    84,    85,     3,
2319        4,     5,     6,     7,    -1,    -1,    -1,    11,    12,    13,
2320       14,    -1,    -1,    -1,    -1,    19,    -1,    -1,    -1,    -1,
2321       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
2322       -1,    -1,    -1,    -1,    -1,    -1,    40,    41,    42,    43,
2323       44,    45,    46,    47,    48,    49,    50,    51,    52,    53,
2324       54,    55,    56,    57,    58,    59,    60,    61,    62,    63,
2325       64,    65,    66,    67,    68,    69,    70,    71,    72,    73,
2326       74,    75,    76,    77,    78,    79,    80,    81,    82,    83,
2327       84,    85,     3,     4,     5,     6,     7,    -1,    -1,    -1,
2328       11,    -1,    13,    14,    -1,    -1,    -1,    -1,    19,    -1,
2329       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
2330       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    40,
2331       41,    42,    43,    44,    45,    46,    47,    48,    49,    50,
2332       51,    52,    53,    54,    55,    56,    57,    58,    59,    60,
2333       61,    62,    63,    64,    65,    66,    67,    68,    69,    70,
2334       71,    72,    73,    74,    75,    76,    77,    78,    79,    80,
2335       81,    82,    83,    84,    85,    16,    17,    18,    -1,    20,
2336       -1,    22,    23,    24,    25,    26,    27,    28,    29,    30,
2337       -1,    -1,    -1,    -1,    -1,    -1,    -1,    38,    -1,    -1,
2338       -1,    42,    43,    44,    45,    46,    47,    48,    49,    50,
2339       51,    52,    53,    54,    55,    56,    57,    58,    59,    60,
2340       61,    62,    63,    64,    65,    66,    67,    68,    69,    70,
2341       71,    72,    73,    74,    75,    76,    77,    78,    79,    80,
2342       81,    82,    83,    84,    85,    86,    87,    88,    89,    -1,
2343       -1,    92,    -1,    94,    95
2344   };
2345 
2346   /* STOS_[STATE-NUM] -- The (internal number of the) accessing
2347      symbol of state STATE-NUM.  */
2348   const unsigned char
2349   pgsParser::yystos_[] =
2350   {
2351          0,     0,     3,     4,     5,     6,     7,    11,    13,    14,
2352       19,    40,    41,    42,    43,    44,    45,    46,    47,    48,
2353       49,    50,    51,    52,    53,    54,    55,    56,    57,    58,
2354       59,    60,    61,    62,    63,    64,    65,    66,    67,    68,
2355       69,    70,    71,    72,    73,    74,    75,    76,    77,    78,
2356       79,    80,    81,    82,    83,    84,    85,   118,   119,   120,
2357      121,   122,   123,   124,   127,   130,   131,   132,   133,   135,
2358       16,    17,    18,    20,    22,    23,    24,    25,    26,    27,
2359       28,    29,    30,    38,    86,    87,    88,    89,    92,    94,
2360       95,   106,   107,   108,   110,   111,   112,   113,   114,   115,
2361      116,   117,   116,    12,   119,   116,   116,    92,    86,   128,
2362      129,    86,   125,   126,     0,   118,   102,   102,   102,   102,
2363      102,     0,    92,    92,    92,    92,    92,    92,    92,    92,
2364       92,    92,    92,    92,    92,   108,    90,    77,   116,   108,
2365      108,    96,    97,    98,    94,    95,    31,    32,    99,   100,
2366       33,    34,    35,    36,    37,   118,   118,    12,    86,    33,
2367       90,   101,   103,   101,    86,    86,   116,   108,   116,   116,
2368      116,   116,   116,   116,   116,   116,   116,   116,    93,    93,
2369      108,   108,   108,   110,   110,   111,   111,   111,   111,   112,
2370      112,   112,   113,   114,     8,    90,   116,   122,   116,   129,
2371       86,   134,   126,    93,    93,    93,    10,   101,   101,   101,
2372       93,   101,    93,   101,   101,   101,   101,   101,    91,   118,
2373      116,    91,   101,   104,    21,    22,    23,    24,   109,   116,
2374      116,   116,   116,   116,   116,   116,   116,   116,    90,    91,
2375       90,    86,    93,    93,   101,   101,    93,   101,    93,    93,
2376      101,    93,   101,    93,   101,    93,   101,    93,   101,   116,
2377       93,   116,   116,   116,   116,   116,   116,   116,   116,   116,
2378       91,    91,    93,   101,    93,   101,    93,   101,    93,   101,
2379       93,   101,    93,   101,    93,   101,    93,   101,    33,   116,
2380      116,   116,   116,   116,   116,   116,   116,   116,    93,    93,
2381      101,    93,    93,    93,    93,    93,    93,   116,    93
2382   };
2383 
2384 #if YYDEBUG
2385   /* TOKEN_NUMBER_[YYLEX-NUM] -- Internal symbol number corresponding
2386      to YYLEX-NUM.  */
2387   const unsigned short int
2388   pgsParser::yytoken_number_[] =
2389   {
2390          0,   256,   257,   258,   259,   260,   261,   262,   263,   264,
2391      265,   266,   267,   268,   269,   270,   271,   272,   273,   274,
2392      275,   276,   277,   278,   279,   280,   281,   282,   283,   284,
2393      285,   286,   287,   288,   289,   290,   291,   292,   293,   294,
2394      295,   296,   297,   298,   299,   300,   301,   302,   303,   304,
2395      305,   306,   307,   308,   309,   310,   311,   312,   313,   314,
2396      315,   316,   317,   318,   319,   320,   321,   322,   323,   324,
2397      325,   326,   327,   328,   329,   330,   331,   332,   333,   334,
2398      335,   336,   337,   338,   339,   340,   341,   342,   343,   344,
2399       91,    93,    40,    41,    43,    45,    42,    47,    37,    60,
2400       62,    44,    59,   123,   125
2401   };
2402 #endif
2403 
2404   /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */
2405   const unsigned char
2406   pgsParser::yyr1_[] =
2407   {
2408          0,   105,   106,   106,   106,   106,   106,   106,   106,   106,
2409      106,   106,   106,   106,   107,   107,   107,   107,   108,   108,
2410      109,   109,   109,   109,   110,   110,   110,   110,   111,   111,
2411      111,   112,   112,   112,   112,   112,   113,   113,   113,   113,
2412      114,   114,   115,   115,   116,   117,   117,   117,   117,   117,
2413      117,   117,   117,   117,   117,   117,   117,   117,   117,   117,
2414      117,   117,   117,   117,   117,   117,   117,   117,   117,   117,
2415      117,   117,   118,   118,   118,   118,   118,   118,   118,   118,
2416      119,   119,   120,   120,   121,   122,   123,   123,   123,   123,
2417      123,   123,   123,   123,   123,   123,   123,   123,   123,   123,
2418      123,   123,   123,   123,   123,   123,   123,   123,   123,   123,
2419      123,   123,   123,   123,   123,   123,   123,   123,   123,   123,
2420      123,   123,   123,   123,   123,   123,   123,   123,   123,   123,
2421      124,   125,   125,   126,   126,   127,   128,   128,   129,   129,
2422      129,   130,   130,   131,   132,   132,   132,   133,   133,   133,
2423      134,   134,   135,   135
2424   };
2425 
2426   /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN.  */
2427   const unsigned char
2428   pgsParser::yyr2_[] =
2429   {
2430          0,     2,     7,     4,     4,     4,     4,     1,     1,     1,
2431        1,     3,     1,     3,     1,     2,     2,     2,     1,     6,
2432        1,     1,     1,     1,     1,     3,     3,     3,     1,     3,
2433        3,     1,     3,     3,     3,     3,     1,     3,     3,     3,
2434        1,     3,     1,     3,     1,     6,     8,    10,     8,    10,
2435       12,     6,     8,    10,     4,     6,     4,     6,     8,    10,
2436        6,     8,    10,     6,     8,    10,     6,     8,    10,     6,
2437        8,    10,     1,     1,     1,     2,     2,     2,     2,     2,
2438        1,     2,     2,     3,     1,     1,     1,     1,     1,     1,
2439        1,     1,     1,     1,     1,     1,     1,     1,     1,     1,
2440        1,     1,     1,     1,     1,     1,     1,     1,     1,     1,
2441        1,     1,     1,     1,     1,     1,     1,     1,     1,     1,
2442        1,     1,     1,     1,     1,     1,     1,     1,     1,     1,
2443        2,     1,     3,     1,     4,     2,     1,     3,     3,     9,
2444        3,     3,     5,     3,     1,     1,     1,     2,     2,     7,
2445        1,     3,     1,     2
2446   };
2447 
2448 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
2449   /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
2450      First, the terminals, then, starting at \a yyntokens_, nonterminals.  */
2451   const char*
2452   const pgsParser::yytname_[] =
2453   {
2454     "\"END OF FILE\"", "error", "$undefined", "\"WHILE\"", "\"BREAK\"",
2455   "\"RETURN\"", "\"CONTINUE\"", "\"IF\"", "\"ELSE\"", "\"WAITFOR\"",
2456   "\"AS\"", "\"BEGIN (BLOCK)\"", "\"END (BLOCK)\"", "\"ASSERT\"",
2457   "\"PRINT\"", "\"LOG\"", "\"COLUMNS\"", "\"LINES\"", "\"TRIM\"",
2458   "\"RMLINE\"", "\"CAST\"", "\"RECORD\"", "\"INTEGER\"", "\"REAL\"",
2459   "\"STRING\"", "\"REGEX\"", "\"FILE\"", "\"DATE\"", "\"TIME\"",
2460   "\"DATETIME\"", "\"REFERENCE\"", "\"<=\"", "\">=\"", "\"=\"", "\"~=\"",
2461   "\"<>\"", "\"AND\"", "\"OR\"", "\"NOT\"", "\"character\"",
2462   "\"SET @VARIABLE\"", "\"DECLARE @VARIABLE\"", "\"ABORT\"", "\"ALTER\"",
2463   "\"ANALYZE\"", "\"BEGIN\"", "\"CHECKPOINT\"", "\"CLOSE\"", "\"CLUSTER\"",
2464   "\"COMMENT\"", "\"COMMIT\"", "\"COPY\"", "\"CREATE\"", "\"DEALLOCATE\"",
2465   "\"DECLARE\"", "\"DELETE\"", "\"DISCARD\"", "\"DROP\"", "\"END\"",
2466   "\"EXECUTE\"", "\"EXPLAIN\"", "\"FETCH\"", "\"GRANT\"", "\"INSERT\"",
2467   "\"LISTEN\"", "\"LOAD\"", "\"LOCK\"", "\"MOVE\"", "\"NOTIFY\"",
2468   "\"PREPARE\"", "\"REASSIGN\"", "\"REINDEX\"", "\"RELEASE\"", "\"RESET\"",
2469   "\"REVOKE\"", "\"ROLLBACK\"", "\"SAVEPOINT\"", "\"SELECT\"", "\"SET\"",
2470   "\"SHOW\"", "\"START\"", "\"TRUNCATE\"", "\"UNLISTEN\"", "\"UPDATE\"",
2471   "\"VACUUM\"", "\"VALUES\"", "\"IDENTIFIER\"", "\"INTEGER VALUE\"",
2472   "\"REAL VALUE\"", "\"STRING VALUE\"", "'['", "']'", "'('", "')'", "'+'",
2473   "'-'", "'*'", "'/'", "'%'", "'<'", "'>'", "','", "';'", "'{'", "'}'",
2474   "$accept", "postfix_expression", "unary_expression", "cast_expression",
2475   "type_name", "multiplicative_expression", "additive_expression",
2476   "relational_expression", "equality_expression", "logical_and_expression",
2477   "logical_or_expression", "expression", "random_generator", "statement",
2478   "statement_list", "compound_statement", "sql_statement",
2479   "sql_expression", "sql_query", "declaration_statement",
2480   "declaration_list", "declaration_element", "assign_statement",
2481   "assign_list", "assign_element", "selection_statement",
2482   "iteration_statement", "jump_statement", "procedure_statement",
2483   "record_declaration_list", "translation_unit", 0
2484   };
2485 #endif
2486 
2487 #if YYDEBUG
2488   /* YYRHS -- A `-1'-separated list of the rules' RHS.  */
2489   const pgsParser::rhs_number_type
2490   pgsParser::yyrhs_[] =
2491   {
2492        135,     0,    -1,    86,    90,   116,    91,    90,   116,    91,
2493       -1,    86,    90,   116,    91,    -1,    17,    92,    86,    93,
2494       -1,    16,    92,    86,    93,    -1,    18,    92,   116,    93,
2495       -1,    86,    -1,    87,    -1,    88,    -1,    89,    -1,    92,
2496       77,    93,    -1,   117,    -1,    92,   116,    93,    -1,   106,
2497       -1,    94,   108,    -1,    95,   108,    -1,    38,   108,    -1,
2498      107,    -1,    20,    92,   108,    10,   109,    93,    -1,    22,
2499       -1,    23,    -1,    24,    -1,    21,    -1,   108,    -1,   110,
2500       96,   108,    -1,   110,    97,   108,    -1,   110,    98,   108,
2501       -1,   110,    -1,   111,    94,   110,    -1,   111,    95,   110,
2502       -1,   111,    -1,   112,    99,   111,    -1,   112,   100,   111,
2503       -1,   112,    31,   111,    -1,   112,    32,   111,    -1,   112,
2504       -1,   113,    33,   112,    -1,   113,    34,   112,    -1,   113,
2505       35,   112,    -1,   113,    -1,   114,    36,   113,    -1,   114,
2506       -1,   115,    37,   114,    -1,   115,    -1,    22,    92,   116,
2507      101,   116,    93,    -1,    22,    92,   116,   101,   116,   101,
2508      116,    93,    -1,    22,    92,   116,   101,   116,   101,   116,
2509      101,   116,    93,    -1,    23,    92,   116,   101,   116,   101,
2510      116,    93,    -1,    23,    92,   116,   101,   116,   101,   116,
2511      101,   116,    93,    -1,    23,    92,   116,   101,   116,   101,
2512      116,   101,   116,   101,   116,    93,    -1,    24,    92,   116,
2513      101,   116,    93,    -1,    24,    92,   116,   101,   116,   101,
2514      116,    93,    -1,    24,    92,   116,   101,   116,   101,   116,
2515      101,   116,    93,    -1,    25,    92,   116,    93,    -1,    25,
2516       92,   116,   101,   116,    93,    -1,    26,    92,   116,    93,
2517       -1,    26,    92,   116,   101,   116,    93,    -1,    26,    92,
2518      116,   101,   116,   101,   116,    93,    -1,    26,    92,   116,
2519      101,   116,   101,   116,   101,   116,    93,    -1,    27,    92,
2520      116,   101,   116,    93,    -1,    27,    92,   116,   101,   116,
2521      101,   116,    93,    -1,    27,    92,   116,   101,   116,   101,
2522      116,   101,   116,    93,    -1,    28,    92,   116,   101,   116,
2523       93,    -1,    28,    92,   116,   101,   116,   101,   116,    93,
2524       -1,    28,    92,   116,   101,   116,   101,   116,   101,   116,
2525       93,    -1,    29,    92,   116,   101,   116,    93,    -1,    29,
2526       92,   116,   101,   116,   101,   116,    93,    -1,    29,    92,
2527      116,   101,   116,   101,   116,   101,   116,    93,    -1,    30,
2528       92,   116,   101,   116,    93,    -1,    30,    92,   116,   101,
2529      116,   101,   116,    93,    -1,    30,    92,   116,   101,   116,
2530      101,   116,   101,   116,    93,    -1,   120,    -1,   130,    -1,
2531      131,    -1,   121,   102,    -1,   133,   102,    -1,   132,   102,
2532       -1,   124,   102,    -1,   127,   102,    -1,   118,    -1,   119,
2533      118,    -1,    11,    12,    -1,    11,   119,    12,    -1,   122,
2534       -1,   123,    -1,    42,    -1,    43,    -1,    44,    -1,    45,
2535       -1,    46,    -1,    47,    -1,    48,    -1,    49,    -1,    50,
2536       -1,    51,    -1,    52,    -1,    53,    -1,    54,    -1,    55,
2537       -1,    56,    -1,    57,    -1,    58,    -1,    59,    -1,    60,
2538       -1,    61,    -1,    62,    -1,    63,    -1,    64,    -1,    65,
2539       -1,    66,    -1,    67,    -1,    68,    -1,    69,    -1,    70,
2540       -1,    71,    -1,    72,    -1,    73,    -1,    74,    -1,    75,
2541       -1,    76,    -1,    77,    -1,    78,    -1,    79,    -1,    80,
2542       -1,    81,    -1,    82,    -1,    83,    -1,    84,    -1,    85,
2543       -1,    41,   125,    -1,   126,    -1,   125,   101,   126,    -1,
2544       86,    -1,    86,   103,   134,   104,    -1,    40,   128,    -1,
2545      129,    -1,   128,   101,   129,    -1,    86,    33,   116,    -1,
2546       86,    90,   116,    91,    90,   116,    91,    33,   116,    -1,
2547       86,    33,   122,    -1,     7,   116,   118,    -1,     7,   116,
2548      118,     8,   118,    -1,     3,   116,   118,    -1,     4,    -1,
2549        5,    -1,     6,    -1,    14,   116,    -1,    13,   116,    -1,
2550       19,    92,    86,    90,   116,    91,    93,    -1,    86,    -1,
2551      134,   101,    86,    -1,     0,    -1,   119,     0,    -1
2552   };
2553 
2554   /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
2555      YYRHS.  */
2556   const unsigned short int
2557   pgsParser::yyprhs_[] =
2558   {
2559          0,     0,     3,    11,    16,    21,    26,    31,    33,    35,
2560       37,    39,    43,    45,    49,    51,    54,    57,    60,    62,
2561       69,    71,    73,    75,    77,    79,    83,    87,    91,    93,
2562       97,   101,   103,   107,   111,   115,   119,   121,   125,   129,
2563      133,   135,   139,   141,   145,   147,   154,   163,   174,   183,
2564      194,   207,   214,   223,   234,   239,   246,   251,   258,   267,
2565      278,   285,   294,   305,   312,   321,   332,   339,   348,   359,
2566      366,   375,   386,   388,   390,   392,   395,   398,   401,   404,
2567      407,   409,   412,   415,   419,   421,   423,   425,   427,   429,
2568      431,   433,   435,   437,   439,   441,   443,   445,   447,   449,
2569      451,   453,   455,   457,   459,   461,   463,   465,   467,   469,
2570      471,   473,   475,   477,   479,   481,   483,   485,   487,   489,
2571      491,   493,   495,   497,   499,   501,   503,   505,   507,   509,
2572      511,   514,   516,   520,   522,   527,   530,   532,   536,   540,
2573      550,   554,   558,   564,   568,   570,   572,   574,   577,   580,
2574      588,   590,   594,   596
2575   };
2576 
2577   /* YYRLINE[YYN] -- Source line where rule number YYN was defined.  */
2578   const unsigned short int
2579   pgsParser::yyrline_[] =
2580   {
2581          0,   267,   267,   274,   281,   287,   293,   299,   305,   311,
2582      317,   323,   329,   330,   338,   339,   340,   345,   354,   355,
2583      364,   365,   366,   367,   371,   372,   379,   386,   396,   397,
2584      404,   414,   415,   422,   429,   436,   446,   447,   454,   461,
2585      471,   472,   482,   483,   493,   500,   508,   515,   522,   531,
2586      539,   547,   555,   562,   569,   575,   581,   589,   597,   604,
2587      611,   619,   626,   633,   641,   648,   655,   663,   670,   677,
2588      685,   693,   703,   704,   705,   706,   707,   708,   709,   710,
2589      714,   719,   727,   731,   739,   749,   758,   759,   760,   761,
2590      762,   763,   764,   765,   766,   767,   768,   769,   770,   771,
2591      772,   773,   774,   775,   776,   777,   778,   779,   780,   781,
2592      782,   783,   784,   785,   786,   787,   788,   789,   790,   791,
2593      792,   793,   794,   795,   796,   797,   798,   799,   800,   801,
2594      805,   812,   818,   827,   837,   852,   859,   864,   873,   886,
2595      901,   917,   929,   943,   956,   963,   970,   980,   990,   999,
2596     1015,  1019,  1027,  1028
2597   };
2598 
2599   // Print the state stack on the debug stream.
2600   void
yystack_print_()2601   pgsParser::yystack_print_ ()
2602   {
2603     *yycdebug_ << "Stack now";
2604     for (state_stack_type::const_iterator i = yystate_stack_.begin ();
2605 	 i != yystate_stack_.end (); ++i)
2606       *yycdebug_ << ' ' << *i;
2607     *yycdebug_ << std::endl;
2608   }
2609 
2610   // Report on the debug stream that the rule \a yyrule is going to be reduced.
2611   void
yy_reduce_print_(int yyrule)2612   pgsParser::yy_reduce_print_ (int yyrule)
2613   {
2614     unsigned int yylno = yyrline_[yyrule];
2615     int yynrhs = yyr2_[yyrule];
2616     /* Print the symbols being reduced, and their result.  */
2617     *yycdebug_ << "Reducing stack by rule " << yyrule - 1
2618 	       << " (line " << yylno << "), ";
2619     /* The symbols being reduced.  */
2620     for (int yyi = 0; yyi < yynrhs; yyi++)
2621       YY_SYMBOL_PRINT ("   $" << yyi + 1 << " =",
2622 		       yyrhs_[yyprhs_[yyrule] + yyi],
2623 		       &(yysemantic_stack_[(yynrhs) - (yyi + 1)]),
2624 		       &(yylocation_stack_[(yynrhs) - (yyi + 1)]));
2625   }
2626 #endif // YYDEBUG
2627 
2628   /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX.  */
2629   pgsParser::token_number_type
yytranslate_(int t)2630   pgsParser::yytranslate_ (int t)
2631   {
2632     static
2633     const token_number_type
2634     translate_table[] =
2635     {
2636            0,     2,     2,     2,     2,     2,     2,     2,     2,     2,
2637        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
2638        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
2639        2,     2,     2,     2,     2,     2,     2,    98,     2,     2,
2640       92,    93,    96,    94,   101,    95,     2,    97,     2,     2,
2641        2,     2,     2,     2,     2,     2,     2,     2,     2,   102,
2642       99,     2,   100,     2,     2,     2,     2,     2,     2,     2,
2643        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
2644        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
2645        2,    90,     2,    91,     2,     2,     2,     2,     2,     2,
2646        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
2647        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
2648        2,     2,     2,   103,     2,   104,     2,     2,     2,     2,
2649        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
2650        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
2651        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
2652        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
2653        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
2654        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
2655        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
2656        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
2657        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
2658        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
2659        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
2660        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
2661        2,     2,     2,     2,     2,     2,     1,     2,     3,     4,
2662        5,     6,     7,     8,     9,    10,    11,    12,    13,    14,
2663       15,    16,    17,    18,    19,    20,    21,    22,    23,    24,
2664       25,    26,    27,    28,    29,    30,    31,    32,    33,    34,
2665       35,    36,    37,    38,    39,    40,    41,    42,    43,    44,
2666       45,    46,    47,    48,    49,    50,    51,    52,    53,    54,
2667       55,    56,    57,    58,    59,    60,    61,    62,    63,    64,
2668       65,    66,    67,    68,    69,    70,    71,    72,    73,    74,
2669       75,    76,    77,    78,    79,    80,    81,    82,    83,    84,
2670       85,    86,    87,    88,    89
2671     };
2672     if ((unsigned int) t <= yyuser_token_number_max_)
2673       return translate_table[t];
2674     else
2675       return yyundef_token_;
2676   }
2677 
2678   const int pgsParser::yyeof_ = 0;
2679   const int pgsParser::yylast_ = 784;
2680   const int pgsParser::yynnts_ = 31;
2681   const int pgsParser::yyempty_ = -2;
2682   const int pgsParser::yyfinal_ = 121;
2683   const int pgsParser::yyterror_ = 1;
2684   const int pgsParser::yyerrcode_ = 256;
2685   const int pgsParser::yyntokens_ = 105;
2686 
2687   const unsigned int pgsParser::yyuser_token_number_max_ = 344;
2688   const pgsParser::token_number_type pgsParser::yyundef_token_ = 2;
2689 
2690 } // namespace pgscript
2691 
2692 #line 1036 "pgscript/pgsParser.yy"
2693  /*** Additional Code ***/
2694 
error(const pgsParser::location_type & l,const std::string & m)2695 void pgscript::pgsParser::error(const pgsParser::location_type & l,
2696 		const std::string & m)
2697 {
2698 	wxLogScriptVerbose(wxT("EXPR STACK SIZE = %u"), driver.context.size_vars());
2699 	wxLogScriptVerbose(wxT("STMT STACK SIZE = %u"), driver.context.size_stmts());
2700 	driver.context.clear_stacks();
2701 	driver.error(l, wxString(m.c_str(), wxConvUTF8));
2702 }
2703 
2704