src/sql/dmlyacc.cxx File Reference

#include <CSql.h>
#include <stdlib.h>
#include "Parser.h"

Include dependency graph for dmlyacc.cxx:

Go to the source code of this file.

Data Structures

union  YYSTYPE

Defines

#define YYBYACC   1
#define YYMAJOR   1
#define YYMINOR   9
#define yyclearin   (yychar=(-1))
#define yyerrok   (yyerrflag=0)
#define YYRECOVERING   (yyerrflag!=0)
#define YYPREFIX   "yy"
#define STRING   257
#define FIELD   258
#define NUMBER_STRING   259
#define BINARY_STRING   260
#define DOUBLE   261
#define OPERATOR   262
#define PARAMETER   263
#define SELECT   264
#define FROM   265
#define WHERE   266
#define BETWEEN   267
#define IN   268
#define AND   269
#define OR   270
#define NOT   271
#define STAR   272
#define INSERT   273
#define INTO   274
#define VALUES   275
#define DELETE   276
#define UPDATE   277
#define SET   278
#define NULL_VALUE   279
#define CREATE   280
#define TABLE   281
#define PRIMARY   282
#define KEY   283
#define DEFAULT   284
#define INDEX   285
#define ON   286
#define HASH   287
#define TREE   288
#define UNIQUE   289
#define DROP   290
#define INT_TYPE   291
#define LONG_TYPE   292
#define SHORT_TYPE   293
#define DOUBLE_TYPE   294
#define TIMESTAMP_TYPE   295
#define DATE_TYPE   296
#define CHAR_TYPE   297
#define TIME_TYPE   298
#define BIGINT_TYPE   299
#define FLOAT_TYPE   300
#define TINYINT_TYPE   301
#define YYERRCODE   256
#define YYTABLESIZE   289
#define YYFINAL   7
#define YYDEBUG   0
#define YYMAXTOKEN   301
#define YYSTACKSIZE   500
#define YYMAXDEPTH   500
#define yystacksize   YYSTACKSIZE
#define YYABORT   goto yyabort
#define YYREJECT   goto yyabort
#define YYACCEPT   goto yyaccept
#define YYERROR   goto yyerrlab

Functions

int yylex (void)
void yyerror (const char *Msg)
int yyparse ()

Variables

static char yysccsid [] = "@(#)yaccpar 1.9 (Berkeley) 02/21/93"
ParsedDataparsedData
char yytext []
short yylhs []
short yylen []
short yydefred []
short yydgoto []
short yysindex []
short yyrindex []
short yygindex []
short yytable []
short yycheck []
int yydebug
int yynerrs
int yyerrflag
int yychar
short * yyssp
YYSTYPEyyvsp
YYSTYPE yyval
YYSTYPE yylval
short yyss [YYSTACKSIZE]
YYSTYPE yyvs [YYSTACKSIZE]
int lexEof


Define Documentation

#define AND   269

Definition at line 41 of file dmlyacc.cxx.

#define BETWEEN   267

Definition at line 39 of file dmlyacc.cxx.

#define BIGINT_TYPE   299

Definition at line 71 of file dmlyacc.cxx.

#define BINARY_STRING   260

Definition at line 32 of file dmlyacc.cxx.

#define CHAR_TYPE   297

Definition at line 69 of file dmlyacc.cxx.

#define CREATE   280

Definition at line 52 of file dmlyacc.cxx.

#define DATE_TYPE   296

Definition at line 68 of file dmlyacc.cxx.

#define DEFAULT   284

Definition at line 56 of file dmlyacc.cxx.

#define DELETE   276

Definition at line 48 of file dmlyacc.cxx.

#define DOUBLE   261

Definition at line 33 of file dmlyacc.cxx.

#define DOUBLE_TYPE   294

Definition at line 66 of file dmlyacc.cxx.

#define DROP   290

Definition at line 62 of file dmlyacc.cxx.

#define FIELD   258

Definition at line 30 of file dmlyacc.cxx.

#define FLOAT_TYPE   300

Definition at line 72 of file dmlyacc.cxx.

#define FROM   265

Definition at line 37 of file dmlyacc.cxx.

#define HASH   287

Definition at line 59 of file dmlyacc.cxx.

#define IN   268

Definition at line 40 of file dmlyacc.cxx.

#define INDEX   285

Definition at line 57 of file dmlyacc.cxx.

#define INSERT   273

Definition at line 45 of file dmlyacc.cxx.

#define INT_TYPE   291

Definition at line 63 of file dmlyacc.cxx.

#define INTO   274

Definition at line 46 of file dmlyacc.cxx.

#define KEY   283

Definition at line 55 of file dmlyacc.cxx.

#define LONG_TYPE   292

Definition at line 64 of file dmlyacc.cxx.

#define NOT   271

Definition at line 43 of file dmlyacc.cxx.

#define NULL_VALUE   279

Definition at line 51 of file dmlyacc.cxx.

#define NUMBER_STRING   259

Definition at line 31 of file dmlyacc.cxx.

#define ON   286

Definition at line 58 of file dmlyacc.cxx.

#define OPERATOR   262

Definition at line 34 of file dmlyacc.cxx.

#define OR   270

Definition at line 42 of file dmlyacc.cxx.

#define PARAMETER   263

Definition at line 35 of file dmlyacc.cxx.

#define PRIMARY   282

Definition at line 54 of file dmlyacc.cxx.

#define SELECT   264

Definition at line 36 of file dmlyacc.cxx.

#define SET   278

Definition at line 50 of file dmlyacc.cxx.

#define SHORT_TYPE   293

Definition at line 65 of file dmlyacc.cxx.

#define STAR   272

Definition at line 44 of file dmlyacc.cxx.

#define STRING   257

Definition at line 29 of file dmlyacc.cxx.

#define TABLE   281

Definition at line 53 of file dmlyacc.cxx.

#define TIME_TYPE   298

Definition at line 70 of file dmlyacc.cxx.

#define TIMESTAMP_TYPE   295

Definition at line 67 of file dmlyacc.cxx.

#define TINYINT_TYPE   301

Definition at line 73 of file dmlyacc.cxx.

#define TREE   288

Definition at line 60 of file dmlyacc.cxx.

#define UNIQUE   289

Definition at line 61 of file dmlyacc.cxx.

#define UPDATE   277

Definition at line 49 of file dmlyacc.cxx.

#define VALUES   275

Definition at line 47 of file dmlyacc.cxx.

#define WHERE   266

Definition at line 38 of file dmlyacc.cxx.

#define YYABORT   goto yyabort

Definition at line 369 of file dmlyacc.cxx.

#define YYACCEPT   goto yyaccept

Definition at line 371 of file dmlyacc.cxx.

Referenced by yyparse().

#define YYBYACC   1

Definition at line 4 of file dmlyacc.cxx.

#define yyclearin   (yychar=(-1))

Definition at line 7 of file dmlyacc.cxx.

#define YYDEBUG   0

Definition at line 228 of file dmlyacc.cxx.

Referenced by yyparse().

#define YYERRCODE   256

Definition at line 74 of file dmlyacc.cxx.

#define yyerrok   (yyerrflag=0)

Definition at line 8 of file dmlyacc.cxx.

#define YYERROR   goto yyerrlab

Definition at line 372 of file dmlyacc.cxx.

#define YYFINAL   7

Definition at line 226 of file dmlyacc.cxx.

Referenced by yyparse().

#define YYMAJOR   1

Definition at line 5 of file dmlyacc.cxx.

#define YYMAXDEPTH   500

Definition at line 345 of file dmlyacc.cxx.

#define YYMAXTOKEN   301

Definition at line 230 of file dmlyacc.cxx.

Referenced by yyparse().

#define YYMINOR   9

Definition at line 6 of file dmlyacc.cxx.

#define YYPREFIX   "yy"

Definition at line 10 of file dmlyacc.cxx.

Referenced by yyparse().

#define YYRECOVERING   (yyerrflag!=0)

Definition at line 9 of file dmlyacc.cxx.

#define YYREJECT   goto yyabort

Definition at line 370 of file dmlyacc.cxx.

#define yystacksize   YYSTACKSIZE

Definition at line 358 of file dmlyacc.cxx.

Referenced by yyparse().

#define YYSTACKSIZE   500

Definition at line 344 of file dmlyacc.cxx.

#define YYTABLESIZE   289

Definition at line 163 of file dmlyacc.cxx.

Referenced by yyparse().


Function Documentation

void yyerror ( const char *  Msg  ) 

Definition at line 362 of file dmlyacc.cxx.

References lexEof, and yytext.

Referenced by yyparse().

00362                               { 
00363     if( lexEof == 0 )
00364         fprintf(stderr, "[Parser: %s] %s\n", Msg, yytext);
00365 
00366     return;
00367 }

Here is the caller graph for this function:

int yylex ( void   ) 

int yyparse (  ) 

Definition at line 374 of file dmlyacc.cxx.

References CreateIndexStatement, CreateTableStatement, DeleteStatement, DropIndexStatement, DropTableStatement, AllDataType::getComparisionOperator(), ParsedData::getInValueList(), List::getIterator(), ListIterator::hasElement(), hashIndex, ParsedData::insertCondValueAndGetPtr(), ParsedData::insertField(), ParsedData::insertFldDef(), ParsedData::insertInValue(), ParsedData::insertPredicate(), InsertStatement, ParsedData::insertUpdateValue(), ParsedData::insertValue(), ListIterator::nextElement(), OpAnd, OpEquals, OpGreaterThanEquals, OpLessThanEquals, OpNot, OpOr, parsedData, FieldValue::parsedString, YYSTYPE::predicate, SelectStatement, ParsedData::setCondition(), ParsedData::setDefaultValue(), ParsedData::setFldLength(), ParsedData::setFldName(), ParsedData::setFldNotNull(), ParsedData::setFldType(), ParsedData::setIndexName(), ParsedData::setIndexType(), ParsedData::setPrimary(), ParsedData::setStmtType(), ParsedData::setTableName(), ParsedData::setUnique(), YYSTYPE::stringval, treeIndex, typeByteInt, typeDate, typeDouble, typeFloat, typeInt, typeLong, typeLongLong, typeShort, typeString, typeTime, typeTimeStamp, UpdateStatement, YYACCEPT, yychar, yycheck, yydebug, YYDEBUG, yydefred, yydgoto, YYERRCODE, yyerrflag, yyerror(), YYFINAL, yygindex, yylen, yylex(), yylhs, yylval, YYMAXTOKEN, yynerrs, YYPREFIX, yyrindex, yysindex, yyss, yyssp, yystacksize, yytable, YYTABLESIZE, yyval, yyvs, and yyvsp.

Referenced by SqlStatement::prepare().

00375 {
00376     register int yym, yyn, yystate;
00377 #if YYDEBUG
00378     register char *yys;
00379     extern char *getenv();
00380 
00381     if (yys = getenv("YYDEBUG"))
00382     {
00383         yyn = *yys;
00384         if (yyn >= '0' && yyn <= '9')
00385             yydebug = yyn - '0';
00386     }
00387 #endif
00388 
00389     yynerrs = 0;
00390     yyerrflag = 0;
00391     yychar = (-1);
00392 
00393     yyssp = yyss;
00394     yyvsp = yyvs;
00395     *yyssp = yystate = 0;
00396 
00397 yyloop:
00398     if (yyn = yydefred[yystate]) goto yyreduce;
00399     if (yychar < 0)
00400     {
00401         if ((yychar = yylex()) < 0) yychar = 0;
00402 #if YYDEBUG
00403         if (yydebug)
00404         {
00405             yys = 0;
00406             if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
00407             if (!yys) yys = "illegal-symbol";
00408             printf("%sdebug: state %d, reading %d (%s)\n",
00409                     YYPREFIX, yystate, yychar, yys);
00410         }
00411 #endif
00412     }
00413     if ((yyn = yysindex[yystate]) && (yyn += yychar) >= 0 &&
00414             yyn <= YYTABLESIZE && yycheck[yyn] == yychar)
00415     {
00416 #if YYDEBUG
00417         if (yydebug)
00418             printf("%sdebug: state %d, shifting to state %d\n",
00419                     YYPREFIX, yystate, yytable[yyn]);
00420 #endif
00421         if (yyssp >= yyss + yystacksize - 1)
00422         {
00423             goto yyoverflow;
00424         }
00425         *++yyssp = yystate = yytable[yyn];
00426         *++yyvsp = yylval;
00427         yychar = (-1);
00428         if (yyerrflag > 0)  --yyerrflag;
00429         goto yyloop;
00430     }
00431     if ((yyn = yyrindex[yystate]) && (yyn += yychar) >= 0 &&
00432             yyn <= YYTABLESIZE && yycheck[yyn] == yychar)
00433     {
00434         yyn = yytable[yyn];
00435         goto yyreduce;
00436     }
00437     if (yyerrflag) goto yyinrecovery;
00438 #ifdef lint
00439     goto yynewerror;
00440 #endif
00441 yynewerror:
00442     yyerror("syntax error");
00443 #ifdef lint
00444     goto yyerrlab;
00445 #endif
00446 yyerrlab:
00447     ++yynerrs;
00448 yyinrecovery:
00449     if (yyerrflag < 3)
00450     {
00451         yyerrflag = 3;
00452         for (;;)
00453         {
00454             if ((yyn = yysindex[*yyssp]) && (yyn += YYERRCODE) >= 0 &&
00455                     yyn <= YYTABLESIZE && yycheck[yyn] == YYERRCODE)
00456             {
00457 #if YYDEBUG
00458                 if (yydebug)
00459                     printf("%sdebug: state %d, error recovery shifting\
00460  to state %d\n", YYPREFIX, *yyssp, yytable[yyn]);
00461 #endif
00462                 if (yyssp >= yyss + yystacksize - 1)
00463                 {
00464                     goto yyoverflow;
00465                 }
00466                 *++yyssp = yystate = yytable[yyn];
00467                 *++yyvsp = yylval;
00468                 goto yyloop;
00469             }
00470             else
00471             {
00472 #if YYDEBUG
00473                 if (yydebug)
00474                     printf("%sdebug: error recovery discarding state %d\n",
00475                             YYPREFIX, *yyssp);
00476 #endif
00477                 if (yyssp <= yyss) goto yyabort;
00478                 --yyssp;
00479                 --yyvsp;
00480             }
00481         }
00482     }
00483     else
00484     {
00485         if (yychar == 0) goto yyabort;
00486 #if YYDEBUG
00487         if (yydebug)
00488         {
00489             yys = 0;
00490             if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
00491             if (!yys) yys = "illegal-symbol";
00492             printf("%sdebug: state %d, error recovery discards token %d (%s)\n",
00493                     YYPREFIX, yystate, yychar, yys);
00494         }
00495 #endif
00496         yychar = (-1);
00497         goto yyloop;
00498     }
00499 yyreduce:
00500 #if YYDEBUG
00501     if (yydebug)
00502         printf("%sdebug: state %d, reducing by rule %d (%s)\n",
00503                 YYPREFIX, yystate, yyn, yyrule[yyn]);
00504 #endif
00505     yym = yylen[yyn];
00506     yyval = yyvsp[1-yym];
00507     switch (yyn)
00508     {
00509 case 1:
00510 #line 33 "dmlyacc.yxx"
00511 { YYACCEPT; }
00512 break;
00513 case 2:
00514 #line 34 "dmlyacc.yxx"
00515 { YYACCEPT; }
00516 break;
00517 case 3:
00518 #line 35 "dmlyacc.yxx"
00519 { YYACCEPT; }
00520 break;
00521 case 4:
00522 #line 36 "dmlyacc.yxx"
00523 { YYACCEPT; }
00524 break;
00525 case 5:
00526 #line 37 "dmlyacc.yxx"
00527 { YYACCEPT; }
00528 break;
00529 case 6:
00530 #line 41 "dmlyacc.yxx"
00531 {
00532             parsedData->setStmtType(SelectStatement);
00533             parsedData->setTableName(yyvsp[-2].stringval); 
00534             free(yyvsp[-2].stringval);
00535         }
00536 break;
00537 case 10:
00538 #line 55 "dmlyacc.yxx"
00539 {
00540             parsedData->setStmtType(InsertStatement);
00541             parsedData->setTableName(yyvsp[-6].stringval); 
00542             free(yyvsp[-6].stringval);
00543         }
00544 break;
00545 case 14:
00546 #line 68 "dmlyacc.yxx"
00547 {
00548             parsedData->insertValue((char*)yyvsp[0].stringval);
00549             free(yyvsp[0].stringval);
00550         }
00551 break;
00552 case 15:
00553 #line 74 "dmlyacc.yxx"
00554 {
00555             parsedData->insertValue((char*)yyvsp[0].stringval);
00556             free(yyvsp[0].stringval);
00557         }
00558 break;
00559 case 17:
00560 #line 82 "dmlyacc.yxx"
00561 {
00562             parsedData->insertInValue((char*)yyvsp[0].stringval);
00563             free(yyvsp[0].stringval);
00564         }
00565 break;
00566 case 18:
00567 #line 88 "dmlyacc.yxx"
00568 {
00569             parsedData->insertInValue((char*)yyvsp[0].stringval);
00570             free(yyvsp[0].stringval);
00571         }
00572 break;
00573 case 19:
00574 #line 95 "dmlyacc.yxx"
00575 {
00576             parsedData->setStmtType(DeleteStatement);
00577             parsedData->setTableName(yyvsp[-2].stringval); 
00578             free(yyvsp[-2].stringval);
00579         }
00580 break;
00581 case 20:
00582 #line 103 "dmlyacc.yxx"
00583 {
00584             parsedData->setStmtType(UpdateStatement);
00585             parsedData->setTableName(yyvsp[-4].stringval); 
00586             free( yyvsp[-4].stringval );
00587         }
00588 break;
00589 case 26:
00590 #line 121 "dmlyacc.yxx"
00591 { 
00592             parsedData->insertUpdateValue( (char*) yyvsp[-2].stringval, (char*) yyvsp[0].stringval);
00593             free( yyvsp[-2].stringval ); free(yyvsp[-1].stringval);free( yyvsp[0].stringval ); 
00594         }
00595 break;
00596 case 29:
00597 #line 132 "dmlyacc.yxx"
00598 {
00599             Predicate *pred;
00600             pred = parsedData->insertPredicate((Predicate*) yyvsp[-2].predicate, OpAnd, (Predicate*) yyvsp[0].predicate);
00601             parsedData->setCondition((Predicate*)pred);
00602             yyval.predicate= pred;
00603 
00604         }
00605 break;
00606 case 30:
00607 #line 140 "dmlyacc.yxx"
00608 {
00609             Predicate *pred;
00610             pred = parsedData->insertPredicate((Predicate*) yyvsp[-2].predicate, OpOr, (Predicate*) yyvsp[0].predicate);
00611             parsedData->setCondition((Predicate*)pred);
00612             yyval.predicate= pred;
00613         }
00614 break;
00615 case 31:
00616 #line 147 "dmlyacc.yxx"
00617 {
00618             Predicate *pred;
00619             pred = parsedData->insertPredicate((Predicate*) yyvsp[0].predicate, OpNot, NULL);
00620             parsedData->setCondition((Predicate*)pred);
00621             yyval.predicate= pred;
00622         }
00623 break;
00624 case 32:
00625 #line 153 "dmlyacc.yxx"
00626 { }
00627 break;
00628 case 33:
00629 #line 155 "dmlyacc.yxx"
00630 {
00631             parsedData->setCondition((Predicate*)yyvsp[0].predicate);
00632             /*((Predicate*)$1)->print();*/
00633             yyval.predicate=yyvsp[0].predicate;
00634         }
00635 break;
00636 case 34:
00637 #line 162 "dmlyacc.yxx"
00638 {
00639             ComparisionOp  op = AllDataType::getComparisionOperator((char*)yyvsp[-1].stringval);
00640             Predicate *pred;
00641             void **ptr = parsedData->insertCondValueAndGetPtr((char*)yyvsp[-2].stringval, (char*)yyvsp[0].stringval);
00642             pred = parsedData->insertPredicate((char*) yyvsp[-2].stringval, op, ptr);
00643             free( yyvsp[-2].stringval ); free(yyvsp[-1].stringval); free( yyvsp[0].stringval ); 
00644             yyval.predicate=pred;
00645         }
00646 break;
00647 case 35:
00648 #line 171 "dmlyacc.yxx"
00649 {
00650             ComparisionOp  op = AllDataType::getComparisionOperator((char*)yyvsp[-1].stringval);
00651             Predicate *pred;
00652             pred = parsedData->insertPredicate((char*) yyvsp[-2].stringval, op, (char*) yyvsp[0].stringval);
00653             free( yyvsp[-2].stringval ); free(yyvsp[-1].stringval); free( yyvsp[0].stringval );
00654             yyval.predicate=pred;
00655         }
00656 break;
00657 case 36:
00658 #line 180 "dmlyacc.yxx"
00659 {
00660             void **ptr1 = parsedData->insertCondValueAndGetPtr((char*)yyvsp[-5].stringval, (char*)yyvsp[-2].stringval);
00661             void **ptr2 = parsedData->insertCondValueAndGetPtr((char*)yyvsp[-5].stringval, (char*)yyvsp[0].stringval);
00662             Predicate *pred1, *pred2, *pred3, *finalPred;
00663             pred1 = parsedData->insertPredicate((char*) yyvsp[-5].stringval, OpGreaterThanEquals, ptr1);
00664             pred2 = parsedData->insertPredicate((char*) yyvsp[-5].stringval, OpLessThanEquals, ptr2);
00665             finalPred = parsedData->insertPredicate(pred1, OpAnd, pred2);
00666             if( yyvsp[-4].stringval == (char*) 1 )
00667                 finalPred = parsedData->insertPredicate(finalPred, OpNot, NULL);
00668             free( yyvsp[-5].stringval );  free( yyvsp[-2].stringval );  free( yyvsp[0].stringval );
00669             yyval.predicate= finalPred;
00670         }
00671 break;
00672 case 37:
00673 #line 193 "dmlyacc.yxx"
00674 {
00675             ListIterator valIter = parsedData->getInValueList().getIterator();
00676             FieldValue *value1, *value2;
00677             Predicate *pred1, *pred2, *finalPred;
00678             void **ptr1, **ptr2;
00679             if (valIter.hasElement()) {
00680                value1 = (FieldValue*) valIter.nextElement();
00681                ptr1 = parsedData->insertCondValueAndGetPtr((char*)yyvsp[-5].stringval, value1->parsedString);
00682                pred1 = parsedData->insertPredicate((char*) yyvsp[-5].stringval, OpEquals, ptr1);
00683                finalPred=pred1;
00684             }
00685             while (valIter.hasElement()) {
00686                value2 = (FieldValue*) valIter.nextElement();
00687                ptr2 = parsedData->insertCondValueAndGetPtr((char*)yyvsp[-5].stringval, value2->parsedString);
00688                pred2 = parsedData->insertPredicate((char*) yyvsp[-5].stringval, OpEquals, ptr2);
00689                finalPred = parsedData->insertPredicate(pred1, OpOr, pred2);
00690                pred1= finalPred;     
00691             }
00692             if( yyvsp[-4].stringval == (char*)1)
00693                 finalPred = parsedData->insertPredicate(finalPred, OpNot, NULL);
00694 
00695             free( yyvsp[-5].stringval );  
00696             yyval.predicate= finalPred;
00697         }
00698 break;
00699 case 38:
00700 #line 219 "dmlyacc.yxx"
00701 { yyval.stringval=(char*) 1;
00702         }
00703 break;
00704 case 39:
00705 #line 222 "dmlyacc.yxx"
00706 { yyval.stringval=(char*) 0; }
00707 break;
00708 case 40:
00709 #line 225 "dmlyacc.yxx"
00710 {
00711             parsedData->insertField((char*)yyvsp[0].stringval);
00712             free( yyvsp[0].stringval );
00713         }
00714 break;
00715 case 41:
00716 #line 230 "dmlyacc.yxx"
00717 { 
00718             parsedData->insertField((char*)yyvsp[0].stringval);
00719             free( yyvsp[0].stringval );
00720         }
00721 break;
00722 case 42:
00723 #line 235 "dmlyacc.yxx"
00724 { yyval.stringval = yyvsp[0].stringval; }
00725 break;
00726 case 43:
00727 #line 237 "dmlyacc.yxx"
00728 { yyval.stringval = yyvsp[0].stringval; }
00729 break;
00730 case 44:
00731 #line 238 "dmlyacc.yxx"
00732 { yyval.stringval = yyvsp[0].stringval; }
00733 break;
00734 case 45:
00735 #line 239 "dmlyacc.yxx"
00736 { yyval.stringval = yyvsp[0].stringval; }
00737 break;
00738 case 46:
00739 #line 240 "dmlyacc.yxx"
00740 { yyval.stringval = yyvsp[0].stringval; }
00741 break;
00742 case 47:
00743 #line 241 "dmlyacc.yxx"
00744 { yyval.stringval = yyvsp[0].stringval; }
00745 break;
00746 case 48:
00747 #line 242 "dmlyacc.yxx"
00748 { yyval.stringval = (char*) 0; }
00749 break;
00750 case 49:
00751 #line 246 "dmlyacc.yxx"
00752 {
00753             parsedData->setStmtType(CreateTableStatement);
00754             parsedData->setTableName(yyvsp[-4].stringval); 
00755             free(yyvsp[-4].stringval);
00756         }
00757 break;
00758 case 50:
00759 #line 252 "dmlyacc.yxx"
00760 {
00761             parsedData->setStmtType(CreateIndexStatement);
00762             parsedData->setIndexName(yyvsp[-8].stringval); 
00763             parsedData->setTableName(yyvsp[-6].stringval); 
00764             free(yyvsp[-8].stringval);
00765             free(yyvsp[-6].stringval);
00766         }
00767 break;
00768 case 51:
00769 #line 260 "dmlyacc.yxx"
00770 {
00771             parsedData->setStmtType(DropTableStatement);
00772             parsedData->setTableName(yyvsp[0].stringval); 
00773             free(yyvsp[0].stringval);
00774         }
00775 break;
00776 case 52:
00777 #line 266 "dmlyacc.yxx"
00778 {
00779             parsedData->setStmtType(DropIndexStatement);
00780             parsedData->setIndexName(yyvsp[0].stringval); 
00781             free(yyvsp[0].stringval);
00782         }
00783 break;
00784 case 54:
00785 #line 274 "dmlyacc.yxx"
00786 {
00787             parsedData->setIndexType(hashIndex);
00788         }
00789 break;
00790 case 55:
00791 #line 278 "dmlyacc.yxx"
00792 {
00793             parsedData->setIndexType(treeIndex);
00794         }
00795 break;
00796 case 56:
00797 #line 282 "dmlyacc.yxx"
00798 {
00799             parsedData->setIndexType(hashIndex);
00800         }
00801 break;
00802 case 58:
00803 #line 288 "dmlyacc.yxx"
00804 {
00805             parsedData->setUnique(true);
00806         }
00807 break;
00808 case 59:
00809 #line 292 "dmlyacc.yxx"
00810 {
00811             parsedData->setUnique(true);
00812             parsedData->setPrimary(true);
00813         }
00814 break;
00815 case 60:
00816 #line 297 "dmlyacc.yxx"
00817 {
00818             parsedData->setUnique(false);
00819             parsedData->setPrimary(false);
00820         }
00821 break;
00822 case 64:
00823 #line 310 "dmlyacc.yxx"
00824 {
00825             parsedData->insertFldDef();
00826         }
00827 break;
00828 case 67:
00829 #line 320 "dmlyacc.yxx"
00830 {
00831             parsedData->setFldName(yyvsp[0].stringval);
00832             free(yyvsp[0].stringval);
00833         }
00834 break;
00835 case 69:
00836 #line 326 "dmlyacc.yxx"
00837 {
00838             parsedData->setFldLength(atoi(yyvsp[-1].stringval)+1);
00839             free(yyvsp[-1].stringval);
00840         }
00841 break;
00842 case 71:
00843 #line 334 "dmlyacc.yxx"
00844 {
00845             parsedData->setDefaultValue(yyvsp[0].stringval);
00846             free(yyvsp[0].stringval);
00847         }
00848 break;
00849 case 73:
00850 #line 342 "dmlyacc.yxx"
00851 {
00852             parsedData->setFldNotNull(true);
00853         }
00854 break;
00855 case 75:
00856 #line 350 "dmlyacc.yxx"
00857 {
00858             parsedData->setPrimary(true);
00859         }
00860 break;
00861 case 76:
00862 #line 356 "dmlyacc.yxx"
00863 {
00864             parsedData->setFldType(typeInt);
00865         }
00866 break;
00867 case 77:
00868 #line 360 "dmlyacc.yxx"
00869 {
00870             parsedData->setFldType(typeLong);
00871         }
00872 break;
00873 case 78:
00874 #line 364 "dmlyacc.yxx"
00875 {
00876             parsedData->setFldType(typeShort);
00877         }
00878 break;
00879 case 79:
00880 #line 368 "dmlyacc.yxx"
00881 {
00882             parsedData->setFldType(typeLongLong);
00883         }
00884 break;
00885 case 80:
00886 #line 372 "dmlyacc.yxx"
00887 {
00888             parsedData->setFldType(typeByteInt);
00889         }
00890 break;
00891 case 81:
00892 #line 376 "dmlyacc.yxx"
00893 {
00894             parsedData->setFldType(typeFloat);
00895         }
00896 break;
00897 case 82:
00898 #line 380 "dmlyacc.yxx"
00899 {
00900             parsedData->setFldType(typeDouble);
00901         }
00902 break;
00903 case 83:
00904 #line 385 "dmlyacc.yxx"
00905 {
00906             parsedData->setFldType(typeDate);
00907         }
00908 break;
00909 case 84:
00910 #line 390 "dmlyacc.yxx"
00911 {
00912             parsedData->setFldType(typeTime);
00913         }
00914 break;
00915 case 85:
00916 #line 395 "dmlyacc.yxx"
00917 {
00918             parsedData->setFldType(typeTimeStamp);
00919         }
00920 break;
00921 case 86:
00922 #line 400 "dmlyacc.yxx"
00923 {
00924             parsedData->setFldType(typeString);
00925             parsedData->setFldLength(2);
00926         }
00927 break;
00928 #line 929 "dmlyacc.cxx"
00929     }
00930     yyssp -= yym;
00931     yystate = *yyssp;
00932     yyvsp -= yym;
00933     yym = yylhs[yyn];
00934     if (yystate == 0 && yym == 0)
00935     {
00936 #if YYDEBUG
00937         if (yydebug)
00938             printf("%sdebug: after reduction, shifting from state 0 to\
00939  state %d\n", YYPREFIX, YYFINAL);
00940 #endif
00941         yystate = YYFINAL;
00942         *++yyssp = YYFINAL;
00943         *++yyvsp = yyval;
00944         if (yychar < 0)
00945         {
00946             if ((yychar = yylex()) < 0) yychar = 0;
00947 #if YYDEBUG
00948             if (yydebug)
00949             {
00950                 yys = 0;
00951                 if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
00952                 if (!yys) yys = "illegal-symbol";
00953                 printf("%sdebug: state %d, reading %d (%s)\n",
00954                         YYPREFIX, YYFINAL, yychar, yys);
00955             }
00956 #endif
00957         }
00958         if (yychar == 0) goto yyaccept;
00959         goto yyloop;
00960     }
00961     if ((yyn = yygindex[yym]) && (yyn += yystate) >= 0 &&
00962             yyn <= YYTABLESIZE && yycheck[yyn] == yystate)
00963         yystate = yytable[yyn];
00964     else
00965         yystate = yydgoto[yym];
00966 #if YYDEBUG
00967     if (yydebug)
00968         printf("%sdebug: after reduction, shifting from state %d \
00969 to state %d\n", YYPREFIX, *yyssp, yystate);
00970 #endif
00971     if (yyssp >= yyss + yystacksize - 1)
00972     {
00973         goto yyoverflow;
00974     }
00975     *++yyssp = yystate;
00976     *++yyvsp = yyval;
00977     goto yyloop;
00978 yyoverflow:
00979     yyerror("yacc stack overflow");
00980 yyabort:
00981     return (1);
00982 yyaccept:
00983     return (0);
00984 }

Here is the call graph for this function:

Here is the caller graph for this function:


Variable Documentation

int lexEof

Definition at line 445 of file dmllex.cxx.

Referenced by yyerror().

ParsedData* parsedData

Definition at line 16 of file dmlyacc.cxx.

Referenced by SqlStatement::prepare(), and yyparse().

int yychar

Definition at line 351 of file dmlyacc.cxx.

Referenced by yyparse().

short yycheck[]

Definition at line 195 of file dmlyacc.cxx.

Referenced by yyparse().

int yydebug

Definition at line 348 of file dmlyacc.cxx.

Referenced by yyparse().

short yydefred[]

Initial value:

 {                                      0,
    0,    0,    0,    0,    0,    0,    0,    1,    2,    3,
    4,    5,   42,   41,   40,    8,    0,    0,    0,    0,
    0,    0,    0,    0,    0,    0,    7,    0,    0,    0,
    0,    0,   51,   52,    0,    9,    0,    0,    0,    0,
    0,    0,   24,    0,    0,    0,    0,    0,    0,    0,
    0,    0,   33,   21,   19,    0,    0,    0,   23,    0,
   67,    0,   62,   64,   65,    0,   74,    0,    6,   12,
    0,    0,    0,    0,   38,    0,    0,    0,   43,   44,
   45,   46,   47,   48,   26,   25,   20,    0,    0,    0,
   61,   76,   77,   78,   82,   85,   83,   86,   84,   79,
   81,   80,    0,    0,   14,    0,   32,   35,   34,    0,
    0,    0,    0,    0,   63,   49,    0,    0,    0,    0,
    0,   13,    0,    0,    0,    0,    0,    0,    0,   15,
   10,    0,   17,    0,   75,   69,   73,    0,   66,   59,
   58,    0,   36,    0,   37,   16,   71,    0,    0,    0,
   18,   54,   55,   50,
}

Definition at line 97 of file dmlyacc.cxx.

Referenced by yyparse().

short yydgoto[]

Initial value:

 {                                       7,
   15,   16,   85,   76,   52,   53,    8,    9,   10,   11,
   12,   17,   40,   55,   27,   38,  106,  122,  134,  146,
   42,   59,   43,   62,  142,  150,   91,   63,   64,   65,
   66,  103,  118,  128,  139,   67,
}

Definition at line 115 of file dmlyacc.cxx.

Referenced by yyparse().

int yyerrflag

Definition at line 350 of file dmlyacc.cxx.

Referenced by yyparse().

short yygindex[]

Initial value:

 {                                      0,
   12,  133,  -47,    0,  -31,    0,    0,    0,    0,    0,
    0,  -26,   10,  -37,    0,    0,    0,    0,    0,    0,
    0,    0,  103,    0,    2,    0,    0,   72,    0,    0,
    0,    0,    0,    0,    0,    0,
}

Definition at line 157 of file dmlyacc.cxx.

Referenced by yyparse().

short yylen[]

Initial value:

 {                                         2,
    1,    1,    1,    1,    1,    6,    2,    1,    2,    9,
    0,    3,    2,    1,    2,    2,    1,    2,    5,    6,
    1,    0,    2,    1,    2,    3,    2,    0,    3,    3,
    2,    3,    1,    3,    3,    6,    6,    1,    0,    1,
    1,    1,    1,    1,    1,    1,    1,    1,    7,   11,
    3,    3,    0,    2,    2,    0,    0,    1,    1,    0,
    2,    1,    2,    1,    1,    5,    1,    0,    3,    0,
    2,    0,    2,    1,    5,    1,    1,    1,    1,    1,
    1,    1,    1,    1,    1,    1,
}

Definition at line 86 of file dmlyacc.cxx.

Referenced by yyparse().

short yylhs[]

Initial value:

 {                                        -1,
    0,    0,    0,    0,    0,    7,   12,   12,   15,    8,
   16,   16,   17,   17,   18,   19,   19,   20,    9,   10,
   14,   14,   21,   21,   22,   23,   13,   13,    5,    5,
    5,    5,    5,    6,    6,    6,    6,    4,    4,    2,
    2,    1,    3,    3,    3,    3,    3,    3,   11,   11,
   11,   11,   26,   26,   26,   26,   25,   25,   25,   25,
   24,   24,   27,   28,   28,   29,   31,   33,   33,   35,
   35,   34,   34,   30,   36,   32,   32,   32,   32,   32,
   32,   32,   32,   32,   32,   32,
}

Definition at line 75 of file dmlyacc.cxx.

Referenced by yyparse().

YYSTYPE yylval

Definition at line 355 of file dmlyacc.cxx.

int yynerrs

Definition at line 349 of file dmlyacc.cxx.

Referenced by yyparse().

short yyrindex[]

Initial value:

 {                                      0,
    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
    0,    0,    0,    0,    0,    0,    0, -118,   15,    0,
    0,    0,    0,    0,   15,    0,    0,    0,    0,  158,
    0,   15,    0,    0,    0,  158,    0,    0,    0,    0,
 -136,   20,    0,    0,    0,    0,    0,  158,    0,    0,
    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
    0,    7,    0,    0,    0,    0,    0,    0,    0,    0,
    0,    0,    0,    0,    0,    0,    0,    0,    0,  158,
    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
    0,    0,  -41,    0,    0,    0,    0,    0,    0,    0,
    0,   13,   17,    0,    0,    0,    0,  -39,    0,    0,
  158,    0,    0,    0,    0,    0,    0,   84,    1,    0,
    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
    0,   22,    0,    0,    0,    0,    0,   23,   23,  158,
    0,    0,    0,    0,
}

Definition at line 139 of file dmlyacc.cxx.

Referenced by yyparse().

char yysccsid[] = "@(#)yaccpar 1.9 (Berkeley) 02/21/93" [static]

Definition at line 2 of file dmlyacc.cxx.

short yysindex[]

Initial value:

 {                                   -181,
 -246, -235, -237, -209, -256, -241,    0,    0,    0,    0,
    0,    0,    0,    0,    0,    0,  -34, -209, -209, -223,
 -209, -209, -209, -209, -209, -246,    0,   19, -202, -209,
   31, -211,    0,    0, -202,    0, -246, -195,  -36,   28,
 -164,  -38,    0, -244, -209,   28,   24,   60,  -36,  -36,
 -230, -176,    0,    0,    0, -145, -209,   28,    0, -172,
    0,   26,    0,    0,    0, -156,    0,   81,    0,    0,
 -145, -176,  -33, -155,    0, -138,  -36,  -36,    0,    0,
    0,    0,    0,    0,    0,    0,    0,   87, -244,   28,
    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
    0,    0,   93, -246,    0,   66,    0,    0,    0, -145,
  108, -176, -176, -246,    0,    0, -110, -119,   76, -145,
   28,    0, -116, -145,   78,  113, -124, -128, -239,    0,
    0, -145,    0,   82,    0,    0,    0, -145,    0,    0,
    0, -141,    0, -145,    0,    0,    0, -239, -239,   28,
    0,    0,    0,    0,
}

Definition at line 121 of file dmlyacc.cxx.

Referenced by yyparse().

short yyss[YYSTACKSIZE]

Definition at line 356 of file dmlyacc.cxx.

Referenced by yyparse().

short* yyssp

Definition at line 352 of file dmlyacc.cxx.

Referenced by yyparse().

short yytable[]

Definition at line 164 of file dmlyacc.cxx.

Referenced by yyparse().

char yytext[]

YYSTYPE yyval

Definition at line 354 of file dmlyacc.cxx.

Referenced by yyparse().

YYSTYPE yyvs[YYSTACKSIZE]

Definition at line 357 of file dmlyacc.cxx.

Referenced by yyparse().

YYSTYPE* yyvsp

Definition at line 353 of file dmlyacc.cxx.

Referenced by yyparse().


Generated on Mon Jun 9 22:42:04 2008 for csql by  doxygen 1.4.7