Commit 561aead3 authored by Thomas G. Lockhart's avatar Thomas G. Lockhart

Allow parsing expressions with ") -" (scan.l, scan.c only).

Make "TABLE" optional in "LOCK TABLE" command
 and "... INTO TABLE..." clause.
Explicitly parse CREATE SEQUENCE options to allow a negative integer
 as an argument; this is an artifact of unary minus handling in scan.l.
Add "PASSWORD" as an allowed column identifier.
These fixes will require a "make clean install" but not a dump/reload.
parent c530fbfb
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.6 1998/03/07 06:04:59 thomas Exp $ * $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.7 1998/03/18 16:50:19 thomas Exp $
* *
* HISTORY * HISTORY
* AUTHOR DATE MAJOR EVENT * AUTHOR DATE MAJOR EVENT
...@@ -170,6 +170,7 @@ Oid param_type(int t); /* used in parse_expr.c */ ...@@ -170,6 +170,7 @@ Oid param_type(int t); /* used in parse_expr.c */
%type <sortgroupby> %type <sortgroupby>
join_using join_using
%type <boolean> opt_union %type <boolean> opt_union
%type <boolean> opt_table
%type <node> position_expr %type <node> position_expr
%type <list> extract_list, position_list %type <list> extract_list, position_list
...@@ -202,6 +203,7 @@ Oid param_type(int t); /* used in parse_expr.c */ ...@@ -202,6 +203,7 @@ Oid param_type(int t); /* used in parse_expr.c */
%type <list> OptCreateAs, CreateAsList %type <list> OptCreateAs, CreateAsList
%type <node> CreateAsElement %type <node> CreateAsElement
%type <value> NumConst %type <value> NumConst
%type <value> IntegerOnly
%type <attr> event_object, attr %type <attr> event_object, attr
%type <sortgroupby> groupby %type <sortgroupby> groupby
%type <sortgroupby> sortby %type <sortgroupby> sortby
...@@ -277,14 +279,14 @@ Oid param_type(int t); /* used in parse_expr.c */ ...@@ -277,14 +279,14 @@ Oid param_type(int t); /* used in parse_expr.c */
/* Keywords for Postgres support (not in SQL92 reserved words) */ /* Keywords for Postgres support (not in SQL92 reserved words) */
%token ABORT_TRANS, AFTER, AGGREGATE, ANALYZE, %token ABORT_TRANS, AFTER, AGGREGATE, ANALYZE,
BACKWARD, BEFORE, BINARY, CLUSTER, COPY, BACKWARD, BEFORE, BINARY, CACHE, CLUSTER, COPY, CYCLE,
DATABASE, DELIMITERS, DO, EACH, EXPLAIN, EXTEND, DATABASE, DELIMITERS, DO, EACH, EXPLAIN, EXTEND,
FORWARD, FUNCTION, HANDLER, FORWARD, FUNCTION, HANDLER,
INDEX, INHERITS, INSTEAD, ISNULL, INCREMENT, INDEX, INHERITS, INSTEAD, ISNULL,
LANCOMPILER, LISTEN, LOAD, LOCK_P, LOCATION, MOVE, LANCOMPILER, LISTEN, LOAD, LOCK_P, LOCATION, MAXVALUE, MINVALUE, MOVE,
NEW, NONE, NOTHING, NOTNULL, OIDS, OPERATOR, PROCEDURAL, NEW, NONE, NOTHING, NOTNULL, OIDS, OPERATOR, PROCEDURAL,
RECIPE, RENAME, RESET, RETURNS, ROW, RULE, RECIPE, RENAME, RESET, RETURNS, ROW, RULE,
SEQUENCE, SETOF, SHOW, STATEMENT, STDIN, STDOUT, TRUSTED, SEQUENCE, SETOF, SHOW, START, STATEMENT, STDIN, STDOUT, TRUSTED,
VACUUM, VERBOSE, VERSION VACUUM, VERBOSE, VERSION
/* Keywords (obsolete; retain through next version for parser - thomas 1997-12-04) */ /* Keywords (obsolete; retain through next version for parser - thomas 1997-12-04) */
...@@ -1094,7 +1096,7 @@ CreateAsElement: ColId ...@@ -1094,7 +1096,7 @@ CreateAsElement: ColId
* *
*****************************************************************************/ *****************************************************************************/
CreateSeqStmt: CREATE SEQUENCE relation_name OptSeqList CreateSeqStmt: CREATE SEQUENCE relation_name OptSeqList
{ {
CreateSeqStmt *n = makeNode(CreateSeqStmt); CreateSeqStmt *n = makeNode(CreateSeqStmt);
n->seqname = $3; n->seqname = $3;
...@@ -1103,24 +1105,58 @@ CreateSeqStmt: CREATE SEQUENCE relation_name OptSeqList ...@@ -1103,24 +1105,58 @@ CreateSeqStmt: CREATE SEQUENCE relation_name OptSeqList
} }
; ;
OptSeqList: OptSeqList: OptSeqList OptSeqElem
OptSeqList OptSeqElem
{ $$ = lappend($1, $2); } { $$ = lappend($1, $2); }
| { $$ = NIL; } | { $$ = NIL; }
; ;
OptSeqElem: IDENT NumConst OptSeqElem: CACHE IntegerOnly
{ {
$$ = makeNode(DefElem); $$ = makeNode(DefElem);
$$->defname = $1; $$->defname = "cache";
$$->arg = (Node *)$2; $$->arg = (Node *)$2;
} }
| IDENT | CYCLE
{ {
$$ = makeNode(DefElem); $$ = makeNode(DefElem);
$$->defname = $1; $$->defname = "cycle";
$$->arg = (Node *)NULL; $$->arg = (Node *)NULL;
} }
| INCREMENT IntegerOnly
{
$$ = makeNode(DefElem);
$$->defname = "increment";
$$->arg = (Node *)$2;
}
| MAXVALUE IntegerOnly
{
$$ = makeNode(DefElem);
$$->defname = "maxvalue";
$$->arg = (Node *)$2;
}
| MINVALUE IntegerOnly
{
$$ = makeNode(DefElem);
$$->defname = "minvalue";
$$->arg = (Node *)$2;
}
| START IntegerOnly
{
$$ = makeNode(DefElem);
$$->defname = "start";
$$->arg = (Node *)$2;
}
;
IntegerOnly: Iconst
{
$$ = makeInteger($1);
}
| '-' Iconst
{
$$ = makeInteger($2);
$$->val.ival = - $$->val.ival;
}
; ;
/***************************************************************************** /*****************************************************************************
...@@ -1856,7 +1892,7 @@ event: SELECT { $$ = CMD_SELECT; } ...@@ -1856,7 +1892,7 @@ event: SELECT { $$ = CMD_SELECT; }
; ;
opt_instead: INSTEAD { $$ = TRUE; } opt_instead: INSTEAD { $$ = TRUE; }
| /*EMPTY*/ { $$ = FALSE; } | /*EMPTY*/ { $$ = FALSE; }
; ;
...@@ -2101,10 +2137,8 @@ opt_analyze: ANALYZE { $$ = TRUE; } ...@@ -2101,10 +2137,8 @@ opt_analyze: ANALYZE { $$ = TRUE; }
| /*EMPTY*/ { $$ = FALSE; } | /*EMPTY*/ { $$ = FALSE; }
; ;
opt_va_list: '(' va_list ')' opt_va_list: '(' va_list ')' { $$ = $2; }
{ $$ = $2; } | /*EMPTY*/ { $$ = NIL; }
| /* EMPTY */
{ $$ = NIL; }
; ;
va_list: name va_list: name
...@@ -2236,7 +2270,7 @@ DeleteStmt: DELETE FROM relation_name ...@@ -2236,7 +2270,7 @@ DeleteStmt: DELETE FROM relation_name
* Is it worth making this a separate command, with * Is it worth making this a separate command, with
* its own node type and file. I don't think so. bjm 1998/1/22 * its own node type and file. I don't think so. bjm 1998/1/22
*/ */
LockStmt: LOCK_P relation_name LockStmt: LOCK_P opt_table relation_name
{ {
DeleteStmt *n = makeNode(DeleteStmt); DeleteStmt *n = makeNode(DeleteStmt);
A_Const *c = makeNode(A_Const); A_Const *c = makeNode(A_Const);
...@@ -2247,7 +2281,7 @@ LockStmt: LOCK_P relation_name ...@@ -2247,7 +2281,7 @@ LockStmt: LOCK_P relation_name
c->typename->name = xlateSqlType("bool"); c->typename->name = xlateSqlType("bool");
c->typename->typmod = -1; c->typename->typmod = -1;
n->relname = $2; n->relname = $3;
n->whereClause = (Node *)c; n->whereClause = (Node *)c;
$$ = (Node *)n; $$ = (Node *)n;
} }
...@@ -2378,10 +2412,12 @@ SubSelect: SELECT opt_unique res_target_list2 ...@@ -2378,10 +2412,12 @@ SubSelect: SELECT opt_unique res_target_list2
} }
; ;
result: INTO TABLE relation_name result: INTO opt_table relation_name { $$= $3; }
{ $$= $3; } | /*EMPTY*/ { $$ = NULL; }
| /*EMPTY*/ ;
{ $$ = NULL; }
opt_table: TABLE { $$ = TRUE; }
| /*EMPTY*/ { $$ = FALSE; }
; ;
opt_union: ALL { $$ = TRUE; } opt_union: ALL { $$ = TRUE; }
...@@ -4603,18 +4639,24 @@ TypeId: ColId ...@@ -4603,18 +4639,24 @@ TypeId: ColId
ColId: IDENT { $$ = $1; } ColId: IDENT { $$ = $1; }
| datetime { $$ = $1; } | datetime { $$ = $1; }
| ACTION { $$ = "action"; } | ACTION { $$ = "action"; }
| CACHE { $$ = "cache"; }
| CYCLE { $$ = "cycle"; }
| DATABASE { $$ = "database"; } | DATABASE { $$ = "database"; }
| DELIMITERS { $$ = "delimiters"; } | DELIMITERS { $$ = "delimiters"; }
| DOUBLE { $$ = "double"; } | DOUBLE { $$ = "double"; }
| EACH { $$ = "each"; } | EACH { $$ = "each"; }
| FUNCTION { $$ = "function"; } | FUNCTION { $$ = "function"; }
| INCREMENT { $$ = "increment"; }
| INDEX { $$ = "index"; } | INDEX { $$ = "index"; }
| KEY { $$ = "key"; } | KEY { $$ = "key"; }
| LANGUAGE { $$ = "language"; } | LANGUAGE { $$ = "language"; }
| LOCATION { $$ = "location"; } | LOCATION { $$ = "location"; }
| MATCH { $$ = "match"; } | MATCH { $$ = "match"; }
| MAXVALUE { $$ = "maxvalue"; }
| MINVALUE { $$ = "minvalue"; }
| OPERATOR { $$ = "operator"; } | OPERATOR { $$ = "operator"; }
| OPTION { $$ = "option"; } | OPTION { $$ = "option"; }
| PASSWORD { $$ = "password"; }
| PRIVILEGES { $$ = "privileges"; } | PRIVILEGES { $$ = "privileges"; }
| RECIPE { $$ = "recipe"; } | RECIPE { $$ = "recipe"; }
| ROW { $$ = "row"; } | ROW { $$ = "row"; }
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/parser/keywords.c,v 1.35 1998/02/11 04:09:54 thomas Exp $ * $Header: /cvsroot/pgsql/src/backend/parser/keywords.c,v 1.36 1998/03/18 16:50:21 thomas Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -49,6 +49,7 @@ static ScanKeyword ScanKeywords[] = { ...@@ -49,6 +49,7 @@ static ScanKeyword ScanKeywords[] = {
{"binary", BINARY}, {"binary", BINARY},
{"both", BOTH}, {"both", BOTH},
{"by", BY}, {"by", BY},
{"cache", CACHE},
{"cascade", CASCADE}, {"cascade", CASCADE},
{"cast", CAST}, {"cast", CAST},
{"char", CHAR}, {"char", CHAR},
...@@ -71,6 +72,7 @@ static ScanKeyword ScanKeywords[] = { ...@@ -71,6 +72,7 @@ static ScanKeyword ScanKeywords[] = {
{"current_timestamp", CURRENT_TIMESTAMP}, {"current_timestamp", CURRENT_TIMESTAMP},
{"current_user", CURRENT_USER}, {"current_user", CURRENT_USER},
{"cursor", CURSOR}, {"cursor", CURSOR},
{"cycle", CYCLE},
{"database", DATABASE}, {"database", DATABASE},
{"day", DAY_P}, {"day", DAY_P},
{"decimal", DECIMAL}, {"decimal", DECIMAL},
...@@ -105,6 +107,7 @@ static ScanKeyword ScanKeywords[] = { ...@@ -105,6 +107,7 @@ static ScanKeyword ScanKeywords[] = {
{"having", HAVING}, {"having", HAVING},
{"hour", HOUR_P}, {"hour", HOUR_P},
{"in", IN}, {"in", IN},
{"increment", INCREMENT},
{"index", INDEX}, {"index", INDEX},
{"inherits", INHERITS}, {"inherits", INHERITS},
{"inner", INNER_P}, {"inner", INNER_P},
...@@ -127,7 +130,9 @@ static ScanKeyword ScanKeywords[] = { ...@@ -127,7 +130,9 @@ static ScanKeyword ScanKeywords[] = {
{"location", LOCATION}, {"location", LOCATION},
{"lock", LOCK_P}, {"lock", LOCK_P},
{"match", MATCH}, {"match", MATCH},
{"maxvalue", MAXVALUE},
{"minute", MINUTE_P}, {"minute", MINUTE_P},
{"minvalue", MINVALUE},
{"month", MONTH_P}, {"month", MONTH_P},
{"move", MOVE}, {"move", MOVE},
{"national", NATIONAL}, {"national", NATIONAL},
...@@ -176,6 +181,7 @@ static ScanKeyword ScanKeywords[] = { ...@@ -176,6 +181,7 @@ static ScanKeyword ScanKeywords[] = {
{"set", SET}, {"set", SET},
{"setof", SETOF}, {"setof", SETOF},
{"show", SHOW}, {"show", SHOW},
{"start", START},
{"statement", STATEMENT}, {"statement", STATEMENT},
{"stdin", STDIN}, {"stdin", STDIN},
{"stdout", STDOUT}, {"stdout", STDOUT},
......
...@@ -156,69 +156,75 @@ typedef union ...@@ -156,69 +156,75 @@ typedef union
#define BACKWARD 383 #define BACKWARD 383
#define BEFORE 384 #define BEFORE 384
#define BINARY 385 #define BINARY 385
#define CLUSTER 386 #define CACHE 386
#define COPY 387 #define CLUSTER 387
#define DATABASE 388 #define COPY 388
#define DELIMITERS 389 #define CYCLE 389
#define DO 390 #define DATABASE 390
#define EACH 391 #define DELIMITERS 391
#define EXPLAIN 392 #define DO 392
#define EXTEND 393 #define EACH 393
#define FORWARD 394 #define EXPLAIN 394
#define FUNCTION 395 #define EXTEND 395
#define HANDLER 396 #define FORWARD 396
#define INDEX 397 #define FUNCTION 397
#define INHERITS 398 #define HANDLER 398
#define INSTEAD 399 #define INCREMENT 399
#define ISNULL 400 #define INDEX 400
#define LANCOMPILER 401 #define INHERITS 401
#define LISTEN 402 #define INSTEAD 402
#define LOAD 403 #define ISNULL 403
#define LOCK_P 404 #define LANCOMPILER 404
#define LOCATION 405 #define LISTEN 405
#define MOVE 406 #define LOAD 406
#define NEW 407 #define LOCK_P 407
#define NONE 408 #define LOCATION 408
#define NOTHING 409 #define MAXVALUE 409
#define NOTNULL 410 #define MINVALUE 410
#define OIDS 411 #define MOVE 411
#define OPERATOR 412 #define NEW 412
#define PROCEDURAL 413 #define NONE 413
#define RECIPE 414 #define NOTHING 414
#define RENAME 415 #define NOTNULL 415
#define RESET 416 #define OIDS 416
#define RETURNS 417 #define OPERATOR 417
#define ROW 418 #define PROCEDURAL 418
#define RULE 419 #define RECIPE 419
#define SEQUENCE 420 #define RENAME 420
#define SETOF 421 #define RESET 421
#define SHOW 422 #define RETURNS 422
#define STATEMENT 423 #define ROW 423
#define STDIN 424 #define RULE 424
#define STDOUT 425 #define SEQUENCE 425
#define TRUSTED 426 #define SETOF 426
#define VACUUM 427 #define SHOW 427
#define VERBOSE 428 #define START 428
#define VERSION 429 #define STATEMENT 429
#define ARCHIVE 430 #define STDIN 430
#define USER 431 #define STDOUT 431
#define PASSWORD 432 #define TRUSTED 432
#define CREATEDB 433 #define VACUUM 433
#define NOCREATEDB 434 #define VERBOSE 434
#define CREATEUSER 435 #define VERSION 435
#define NOCREATEUSER 436 #define ARCHIVE 436
#define VALID 437 #define USER 437
#define UNTIL 438 #define PASSWORD 438
#define IDENT 439 #define CREATEDB 439
#define SCONST 440 #define NOCREATEDB 440
#define Op 441 #define CREATEUSER 441
#define ICONST 442 #define NOCREATEUSER 442
#define PARAM 443 #define VALID 443
#define FCONST 444 #define UNTIL 444
#define OP 445 #define IDENT 445
#define UMINUS 446 #define SCONST 446
#define TYPECAST 447 #define Op 447
#define REDUCE 448 #define ICONST 448
#define PARAM 449
#define FCONST 450
#define OP 451
#define UMINUS 452
#define TYPECAST 453
#define REDUCE 454
extern YYSTYPE yylval; extern YYSTYPE yylval;
/* A lexical scanner generated by flex */ /* A lexical scanner generated by flex */
/* Scanner skeleton version: /* Scanner skeleton version:
* $Header: /cvsroot/pgsql/src/backend/parser/Attic/scan.c,v 1.15 1998/02/21 06:31:52 scrappy Exp $ * $Header: /cvsroot/pgsql/src/backend/parser/Attic/scan.c,v 1.16 1998/03/18 16:50:24 thomas Exp $
*/ */
#define FLEX_SCANNER #define FLEX_SCANNER
...@@ -308,22 +308,22 @@ static yyconst short int yy_acclist[168] = ...@@ -308,22 +308,22 @@ static yyconst short int yy_acclist[168] =
2, 2, 2, 8227, 37,16419, 2 2, 2, 2, 8227, 37,16419, 2
} ; } ;
static yyconst short int yy_accept[128] = static yyconst short int yy_accept[129] =
{ 0, { 0,
1, 1, 1, 2, 3, 4, 5, 6, 7, 8, 1, 1, 1, 2, 3, 4, 5, 6, 7, 8,
9, 10, 11, 12, 13, 14, 16, 19, 21, 24, 9, 10, 11, 12, 13, 14, 16, 19, 21, 24,
27, 31, 34, 37, 41, 45, 49, 53, 57, 61, 27, 31, 34, 37, 41, 45, 49, 53, 57, 61,
65, 69, 71, 73, 76, 79, 81, 83, 85, 87, 65, 69, 71, 73, 76, 79, 81, 83, 85, 87,
89, 91, 92, 94, 96, 98, 100, 101, 102, 103, 89, 91, 92, 94, 96, 98, 100, 101, 102, 103,
104, 105, 105, 106, 107, 109, 111, 112, 112, 112, 103, 104, 105, 105, 106, 107, 109, 111, 112, 112,
112, 114, 114, 114, 116, 117, 118, 119, 119, 119, 112, 112, 114, 114, 114, 116, 117, 118, 119, 119,
120, 121, 121, 121, 122, 123, 124, 124, 124, 125, 119, 120, 121, 121, 121, 122, 123, 124, 124, 124,
126, 126, 126, 127, 128, 130, 131, 133, 136, 137, 125, 126, 126, 126, 127, 128, 130, 131, 133, 136,
137, 138, 139, 140, 142, 142, 144, 146, 148, 149, 137, 137, 138, 139, 140, 142, 142, 144, 146, 148,
151, 152, 152, 152, 153, 154, 154, 154, 155, 155, 149, 151, 152, 152, 152, 153, 154, 154, 154, 155,
155, 156, 157, 157, 160, 161, 161, 161, 161, 162, 155, 155, 156, 157, 157, 160, 161, 161, 161, 161,
163, 164, 165, 165, 167, 168, 168 162, 163, 164, 165, 165, 167, 168, 168
} ; } ;
static yyconst int yy_ec[256] = static yyconst int yy_ec[256] =
...@@ -365,152 +365,154 @@ static yyconst int yy_meta[22] = ...@@ -365,152 +365,154 @@ static yyconst int yy_meta[22] =
12 12
} ; } ;
static yyconst short int yy_base[146] = static yyconst short int yy_base[147] =
{ 0, { 0,
0, 0, 332, 325, 18, 31, 325, 324, 321, 320, 0, 0, 331, 330, 18, 31, 326, 325, 228, 220,
46, 48, 18, 31, 326, 435, 435, 435, 309, 435, 46, 48, 18, 31, 224, 446, 446, 446, 209, 446,
12, 435, 308, 213, 42, 49, 61, 21, 63, 74, 58, 446, 51, 12, 44, 23, 71, 198, 64, 84,
209, 0, 52, 0, 82, 58, 0, 0, 435, 0, 197, 0, 61, 0, 92, 67, 0, 0, 446, 0,
66, 435, 76, 435, 0, 80, 206, 198, 88, 31, 68, 446, 75, 446, 0, 86, 193, 180, 98, 111,
188, 82, 179, 102, 0, 120, 113, 135, 0, 175, 31, 147, 67, 138, 122, 0, 140, 78, 155, 0,
169, 137, 0, 149, 435, 435, 0, 87, 140, 0, 131, 100, 157, 0, 90, 446, 446, 0, 97, 113,
0, 71, 132, 142, 0, 0, 147, 150, 152, 0, 0, 0, 108, 85, 145, 0, 0, 116, 160, 162,
156, 158, 435, 435, 435, 435, 435, 114, 435, 162, 0, 167, 169, 446, 446, 446, 446, 446, 70, 446,
435, 175, 120, 0, 92, 188, 57, 150, 435, 203, 173, 446, 186, 92, 0, 59, 199, 52, 161, 446,
435, 180, 193, 435, 167, 205, 208, 435, 216, 218, 214, 446, 191, 204, 446, 178, 216, 219, 446, 227,
435, 0, 154, 224, 52, 226, 0, 220, 230, 233, 229, 446, 0, 165, 235, 47, 237, 0, 231, 241,
238, 435, 16, 224, 242, 435, 245, 257, 269, 281, 244, 249, 446, 16, 235, 253, 446, 256, 268, 280,
293, 305, 314, 322, 333, 345, 354, 363, 375, 387, 292, 304, 316, 325, 333, 344, 356, 365, 374, 386,
398, 410, 415, 419, 423 398, 409, 421, 426, 430, 434
} ; } ;
static yyconst short int yy_def[146] = static yyconst short int yy_def[147] =
{ 0, { 0,
126, 1, 127, 127, 128, 128, 129, 129, 130, 130, 127, 1, 128, 128, 129, 129, 130, 130, 131, 131,
131, 131, 132, 132, 126, 126, 126, 126, 133, 126, 132, 132, 133, 133, 127, 127, 127, 127, 134, 127,
133, 126, 126, 133, 133, 133, 126, 133, 134, 134, 134, 127, 127, 21, 21, 24, 127, 24, 135, 135,
30, 135, 126, 136, 136, 137, 35, 138, 126, 139, 30, 136, 127, 137, 137, 138, 35, 139, 127, 140,
126, 126, 126, 126, 140, 126, 141, 133, 133, 49, 127, 127, 127, 127, 141, 127, 142, 134, 134, 127,
126, 126, 50, 126, 27, 142, 54, 126, 143, 126, 49, 127, 127, 51, 127, 27, 143, 55, 127, 144,
133, 126, 144, 30, 126, 126, 135, 126, 126, 136, 127, 134, 127, 145, 30, 127, 127, 136, 127, 127,
35, 137, 137, 137, 138, 139, 126, 126, 126, 140, 137, 35, 138, 138, 138, 139, 140, 127, 127, 127,
126, 126, 126, 126, 126, 126, 126, 126, 126, 54, 141, 127, 127, 127, 127, 127, 127, 127, 127, 127,
126, 90, 92, 90, 142, 142, 96, 96, 126, 126, 55, 127, 91, 93, 91, 143, 143, 97, 97, 127,
126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127,
126, 90, 142, 96, 142, 126, 145, 126, 142, 142, 127, 127, 91, 143, 97, 143, 127, 146, 127, 143,
126, 126, 126, 100, 126, 0, 126, 126, 126, 126, 143, 127, 127, 127, 101, 127, 0, 127, 127, 127,
126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127,
126, 126, 126, 126, 126 127, 127, 127, 127, 127, 127
} ; } ;
static yyconst short int yy_nxt[457] = static yyconst short int yy_nxt[468] =
{ 0, { 0,
16, 17, 18, 19, 20, 21, 22, 23, 24, 24, 16, 17, 18, 19, 20, 21, 22, 23, 24, 24,
25, 23, 26, 27, 28, 24, 29, 30, 29, 31, 25, 23, 26, 27, 28, 24, 29, 30, 29, 31,
16, 35, 50, 35, 46, 51, 36, 35, 35, 124, 16, 35, 54, 35, 46, 127, 36, 35, 35, 125,
37, 53, 35, 35, 35, 61, 35, 46, 47, 36, 37, 57, 35, 35, 35, 58, 35, 46, 47, 36,
35, 35, 87, 37, 88, 35, 35, 43, 43, 43, 35, 35, 88, 37, 89, 35, 35, 43, 43, 43,
43, 47, 54, 68, 69, 55, 44, 56, 44, 53, 43, 47, 50, 50, 55, 114, 44, 56, 44, 50,
113, 57, 58, 58, 62, 62, 72, 77, 78, 114, 50, 53, 69, 70, 115, 63, 63, 114, 51, 78,
74, 59, 60, 63, 55, 62, 62, 79, 79, 72, 79, 52, 59, 59, 64, 73, 80, 80, 90, 75,
65, 81, 82, 74, 63, 71, 83, 71, 68, 69, 90, 60, 61, 52, 56, 63, 63, 82, 83, 91,
72, 71, 71, 89, 71, 89, 71, 71, 49, 86, 66, 91, 84, 73, 64, 72, 127, 72, 69, 70,
113, 86, 90, 90, 91, 92, 90, 92, 90, 90, 73, 72, 72, 113, 72, 113, 72, 72, 49, 87,
92, 92, 93, 94, 92, 94, 92, 92, 90, 90, 49, 87, 50, 50, 103, 104, 73, 78, 79, 105,
90, 90, 90, 96, 90, 96, 90, 51, 97, 96, 75, 53, 91, 91, 92, 93, 91, 93, 91, 91,
98, 112, 96, 112, 96, 96, 58, 58, 62, 62, 93, 93, 94, 95, 93, 95, 93, 93, 91, 91,
72, 102, 103, 105, 105, 59, 104, 63, 77, 78, 91, 91, 91, 97, 101, 97, 106, 106, 98, 97,
72, 106, 107, 79, 79, 126, 108, 81, 82, 109, 99, 88, 97, 73, 97, 97, 59, 59, 63, 63,
110, 115, 113, 115, 111, 90, 119, 90, 105, 105, 52, 107, 108, 80, 80, 60, 109, 64, 82, 83,
90, 90, 90, 90, 90, 90, 90, 90, 92, 49, 110, 111, 116, 114, 116, 112, 91, 120, 91, 106,
92, 102, 103, 92, 92, 93, 104, 92, 100, 92, 106, 91, 91, 91, 91, 91, 91, 91, 91, 93,
92, 96, 87, 96, 102, 103, 97, 96, 98, 104, 49, 93, 103, 104, 93, 93, 94, 105, 93, 86,
96, 51, 96, 96, 116, 116, 106, 107, 49, 106, 93, 93, 97, 67, 97, 103, 104, 98, 97, 99,
107, 108, 85, 117, 108, 66, 100, 109, 110, 109, 105, 97, 62, 97, 97, 117, 117, 107, 108, 49,
110, 118, 111, 53, 111, 120, 121, 116, 116, 123, 107, 108, 109, 127, 118, 109, 41, 101, 110, 111,
123, 120, 121, 124, 120, 121, 117, 124, 113, 125, 110, 111, 119, 112, 41, 112, 121, 122, 117, 117,
121, 113, 126, 125, 121, 32, 32, 32, 32, 32, 124, 124, 121, 122, 125, 121, 122, 118, 125, 114,
32, 32, 32, 32, 32, 32, 32, 34, 34, 34, 126, 122, 114, 127, 126, 122, 32, 32, 32, 32,
34, 34, 34, 34, 34, 34, 34, 34, 34, 38, 32, 32, 32, 32, 32, 32, 32, 32, 34, 34,
34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38,
38, 40, 40, 40, 40, 40, 40, 40, 40, 40, 38, 38, 40, 40, 40, 40, 40, 40, 40, 40,
40, 40, 40, 42, 42, 42, 42, 42, 42, 42,
40, 40, 40, 40, 42, 42, 42, 42, 42, 42,
42, 42, 42, 42, 42, 45, 45, 45, 45, 45, 42, 42, 42, 42, 42, 42, 45, 45, 45, 45,
45, 45, 45, 45, 45, 45, 45, 48, 52, 49, 45, 45, 45, 45, 45, 45, 45, 45, 48, 39,
48, 48, 48, 64, 64, 126, 41, 41, 39, 39, 39, 48, 48, 48, 65, 65, 33, 33, 127, 127,
64, 33, 64, 67, 67, 67, 67, 67, 33, 67, 127, 65, 127, 65, 68, 68, 68, 68, 68, 127,
67, 67, 67, 67, 67, 70, 70, 70, 70, 70, 68, 68, 68, 68, 68, 68, 71, 71, 71, 71,
70, 126, 70, 70, 70, 70, 70, 73, 126, 126, 71, 71, 127, 71, 71, 71, 71, 71, 74, 127,
73, 73, 73, 75, 75, 75, 75, 126, 75, 75, 127, 74, 74, 74, 76, 76, 76, 76, 127, 76,
75, 75, 75, 75, 75, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 77, 77, 77, 77,
126, 76, 76, 76, 76, 76, 76, 80, 80, 80, 77, 127, 77, 77, 77, 77, 77, 77, 81, 81,
80, 80, 126, 80, 80, 80, 80, 80, 84, 84,
81, 81, 81, 127, 81, 81, 81, 81, 81, 85,
84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85,
95, 95, 126, 95, 95, 95, 95, 95, 95, 95, 85, 96, 96, 127, 96, 96, 96, 96, 96, 96,
95, 95, 99, 99, 99, 99, 101, 101, 101, 101, 96, 96, 96, 100, 100, 100, 100, 102, 102, 102,
122, 122, 122, 122, 15, 126, 126, 126, 126, 126, 102, 123, 123, 123, 123, 15, 127, 127, 127, 127,
126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127,
126, 126, 126, 126, 126, 126 127, 127, 127, 127, 127, 127, 127
} ; } ;
static yyconst short int yy_chk[457] = static yyconst short int yy_chk[468] =
{ 0, { 0,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 5, 21, 5, 13, 21, 5, 5, 5, 123, 1, 5, 24, 5, 13, 24, 5, 5, 5, 124,
5, 28, 5, 5, 6, 28, 6, 14, 13, 6, 5, 26, 5, 5, 6, 26, 6, 14, 13, 6,
6, 6, 50, 6, 50, 6, 6, 11, 11, 12, 6, 6, 51, 6, 51, 6, 6, 11, 11, 12,
12, 14, 25, 33, 33, 25, 11, 26, 12, 26, 12, 14, 23, 23, 25, 116, 11, 25, 12, 21,
115, 26, 27, 27, 29, 29, 36, 41, 41, 97, 21, 23, 33, 33, 98, 29, 29, 96, 21, 41,
36, 27, 27, 29, 27, 30, 30, 43, 43, 72, 41, 21, 27, 27, 29, 36, 43, 43, 53, 36,
30, 46, 46, 72, 30, 35, 46, 35, 68, 68, 53, 27, 27, 89, 27, 30, 30, 46, 46, 58,
35, 35, 35, 52, 35, 52, 35, 35, 49, 49, 30, 58, 46, 74, 30, 35, 65, 35, 69, 69,
95, 49, 54, 54, 54, 54, 54, 54, 54, 54, 35, 35, 35, 94, 35, 94, 35, 35, 49, 49,
54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 62, 49, 50, 50, 70, 70, 73, 78, 78, 70,
54, 54, 54, 56, 57, 56, 57, 88, 56, 56, 73, 50, 55, 55, 55, 55, 55, 55, 55, 55,
56, 93, 56, 93, 56, 56, 58, 58, 62, 62, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
73, 69, 69, 74, 74, 58, 69, 62, 77, 77, 55, 55, 55, 57, 61, 57, 75, 75, 57, 57,
74, 78, 78, 79, 79, 64, 78, 81, 81, 82, 57, 54, 57, 75, 57, 57, 59, 59, 63, 63,
82, 98, 113, 98, 82, 90, 113, 90, 105, 105, 52, 79, 79, 80, 80, 59, 79, 63, 82, 82,
90, 90, 90, 90, 90, 90, 90, 90, 92, 61, 83, 83, 99, 114, 99, 83, 91, 114, 91, 106,
92, 102, 102, 92, 92, 92, 102, 92, 60, 92, 106, 91, 91, 91, 91, 91, 91, 91, 91, 93,
92, 96, 53, 96, 103, 103, 96, 96, 96, 103, 48, 93, 103, 103, 93, 93, 93, 103, 93, 47,
96, 51, 96, 96, 100, 100, 106, 106, 48, 107, 93, 93, 97, 31, 97, 104, 104, 97, 97, 97,
107, 106, 47, 100, 107, 31, 100, 109, 109, 110, 104, 97, 28, 97, 97, 101, 101, 107, 107, 19,
110, 100, 109, 24, 110, 114, 114, 116, 116, 118, 108, 108, 107, 15, 101, 108, 10, 101, 110, 110,
118, 119, 119, 118, 120, 120, 116, 124, 119, 121, 111, 111, 101, 110, 9, 111, 115, 115, 117, 117,
121, 120, 124, 125, 125, 127, 127, 127, 127, 127, 119, 119, 120, 120, 119, 121, 121, 117, 125, 120,
127, 127, 127, 127, 127, 127, 127, 128, 128, 128, 122, 122, 121, 125, 126, 126, 128, 128, 128, 128,
128, 128, 128, 128, 128, 128, 128, 128, 128, 129, 128, 128, 128, 128, 128, 128, 128, 128, 129, 129,
129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129,
129, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130,
130, 130, 130, 131, 131, 131, 131, 131, 131, 131, 130, 130, 131, 131, 131, 131, 131, 131, 131, 131,
131, 131, 131, 131, 131, 132, 132, 132, 132, 132, 131, 131, 131, 131, 132, 132, 132, 132, 132, 132,
132, 132, 132, 132, 132, 132, 132, 133, 23, 19, 132, 132, 132, 132, 132, 132, 133, 133, 133, 133,
133, 133, 133, 134, 134, 15, 10, 9, 8, 7, 133, 133, 133, 133, 133, 133, 133, 133, 134, 8,
134, 4, 134, 135, 135, 135, 135, 135, 3, 135, 7, 134, 134, 134, 135, 135, 4, 3, 0, 0,
135, 135, 135, 135, 135, 136, 136, 136, 136, 136, 0, 135, 0, 135, 136, 136, 136, 136, 136, 0,
136, 0, 136, 136, 136, 136, 136, 137, 0, 0, 136, 136, 136, 136, 136, 136, 137, 137, 137, 137,
137, 137, 137, 138, 138, 138, 138, 0, 138, 138, 137, 137, 0, 137, 137, 137, 137, 137, 138, 0,
138, 138, 138, 138, 138, 139, 139, 139, 139, 139, 0, 138, 138, 138, 139, 139, 139, 139, 0, 139,
0, 139, 139, 139, 139, 139, 139, 140, 140, 140, 139, 139, 139, 139, 139, 139, 140, 140, 140, 140,
140, 140, 0, 140, 140, 140, 140, 140, 141, 141, 140, 0, 140, 140, 140, 140, 140, 140, 141, 141,
141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 0, 141, 141, 141, 141, 141, 142,
142, 142, 0, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142,
142, 142, 143, 143, 143, 143, 144, 144, 144, 144, 142, 143, 143, 0, 143, 143, 143, 143, 143, 143,
145, 145, 145, 145, 126, 126, 126, 126, 126, 126, 143, 143, 143, 144, 144, 144, 144, 145, 145, 145,
126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 145, 146, 146, 146, 146, 127, 127, 127, 127, 127,
126, 126, 126, 126, 126, 126 127, 127, 127, 127, 127, 127, 127, 127, 127, 127,
127, 127, 127, 127, 127, 127, 127
} ; } ;
static yy_state_type yy_state_buf[YY_BUF_SIZE + 2], *yy_state_ptr; static yy_state_type yy_state_buf[YY_BUF_SIZE + 2], *yy_state_ptr;
...@@ -547,7 +549,7 @@ char *yytext; ...@@ -547,7 +549,7 @@ char *yytext;
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/parser/Attic/scan.c,v 1.15 1998/02/21 06:31:52 scrappy Exp $ * $Header: /cvsroot/pgsql/src/backend/parser/Attic/scan.c,v 1.16 1998/03/18 16:50:24 thomas Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -659,7 +661,7 @@ char literal[MAX_PARSE_BUFFER]; ...@@ -659,7 +661,7 @@ char literal[MAX_PARSE_BUFFER];
* Other embedded escaped characters are matched explicitly and the leading * Other embedded escaped characters are matched explicitly and the leading
* backslash is dropped from the string. - thomas 1997-09-24 * backslash is dropped from the string. - thomas 1997-09-24
*/ */
#line 663 "lex.yy.c" #line 665 "lex.yy.c"
/* Macros after this point can all be overridden by user definitions in /* Macros after this point can all be overridden by user definitions in
* section 1. * section 1.
...@@ -810,9 +812,9 @@ YY_DECL ...@@ -810,9 +812,9 @@ YY_DECL
register char *yy_cp, *yy_bp; register char *yy_cp, *yy_bp;
register int yy_act; register int yy_act;
#line 178 "scan.l" #line 176 "scan.l"
#line 816 "lex.yy.c" #line 818 "lex.yy.c"
if ( yy_init ) if ( yy_init )
{ {
...@@ -860,14 +862,14 @@ yy_match: ...@@ -860,14 +862,14 @@ yy_match:
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{ {
yy_current_state = (int) yy_def[yy_current_state]; yy_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 127 ) if ( yy_current_state >= 128 )
yy_c = yy_meta[(unsigned int) yy_c]; yy_c = yy_meta[(unsigned int) yy_c];
} }
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
*yy_state_ptr++ = yy_current_state; *yy_state_ptr++ = yy_current_state;
++yy_cp; ++yy_cp;
} }
while ( yy_base[yy_current_state] != 435 ); while ( yy_base[yy_current_state] != 446 );
yy_find_action: yy_find_action:
yy_current_state = *--yy_state_ptr; yy_current_state = *--yy_state_ptr;
...@@ -918,34 +920,34 @@ do_action: /* This label is used only to access EOF actions. */ ...@@ -918,34 +920,34 @@ do_action: /* This label is used only to access EOF actions. */
{ /* beginning of action switch */ { /* beginning of action switch */
case 1: case 1:
YY_RULE_SETUP YY_RULE_SETUP
#line 179 "scan.l" #line 177 "scan.l"
{ /* ignore */ } { /* ignore */ }
YY_BREAK YY_BREAK
case 2: case 2:
YY_RULE_SETUP YY_RULE_SETUP
#line 181 "scan.l" #line 179 "scan.l"
{ /* ignore */ } { /* ignore */ }
YY_BREAK YY_BREAK
case 3: case 3:
#line 184 "scan.l" #line 182 "scan.l"
case 4: case 4:
YY_RULE_SETUP YY_RULE_SETUP
#line 184 "scan.l" #line 182 "scan.l"
{ BEGIN(xc); } { BEGIN(xc); }
YY_BREAK YY_BREAK
case 5: case 5:
YY_RULE_SETUP YY_RULE_SETUP
#line 186 "scan.l" #line 184 "scan.l"
{ BEGIN(INITIAL); } { BEGIN(INITIAL); }
YY_BREAK YY_BREAK
case 6: case 6:
YY_RULE_SETUP YY_RULE_SETUP
#line 188 "scan.l" #line 186 "scan.l"
{ /* ignore */ } { /* ignore */ }
YY_BREAK YY_BREAK
case 7: case 7:
YY_RULE_SETUP YY_RULE_SETUP
#line 190 "scan.l" #line 188 "scan.l"
{ {
BEGIN(xb); BEGIN(xb);
llen = 0; llen = 0;
...@@ -954,7 +956,7 @@ YY_RULE_SETUP ...@@ -954,7 +956,7 @@ YY_RULE_SETUP
YY_BREAK YY_BREAK
case 8: case 8:
YY_RULE_SETUP YY_RULE_SETUP
#line 195 "scan.l" #line 193 "scan.l"
{ {
char* endptr; char* endptr;
...@@ -967,10 +969,10 @@ YY_RULE_SETUP ...@@ -967,10 +969,10 @@ YY_RULE_SETUP
} }
YY_BREAK YY_BREAK
case 9: case 9:
#line 206 "scan.l" #line 204 "scan.l"
case 10: case 10:
YY_RULE_SETUP YY_RULE_SETUP
#line 206 "scan.l" #line 204 "scan.l"
{ {
if ((llen+yyleng) > (MAX_PARSE_BUFFER - 1)) if ((llen+yyleng) > (MAX_PARSE_BUFFER - 1))
elog(ERROR,"quoted string parse buffer of %d chars exceeded",MAX_PARSE_BUFFER); elog(ERROR,"quoted string parse buffer of %d chars exceeded",MAX_PARSE_BUFFER);
...@@ -979,16 +981,16 @@ YY_RULE_SETUP ...@@ -979,16 +981,16 @@ YY_RULE_SETUP
} }
YY_BREAK YY_BREAK
case 11: case 11:
#line 213 "scan.l" #line 211 "scan.l"
case 12: case 12:
YY_RULE_SETUP YY_RULE_SETUP
#line 213 "scan.l" #line 211 "scan.l"
{ {
} }
YY_BREAK YY_BREAK
case 13: case 13:
YY_RULE_SETUP YY_RULE_SETUP
#line 216 "scan.l" #line 214 "scan.l"
{ {
BEGIN(xh); BEGIN(xh);
llen = 0; llen = 0;
...@@ -997,7 +999,7 @@ YY_RULE_SETUP ...@@ -997,7 +999,7 @@ YY_RULE_SETUP
YY_BREAK YY_BREAK
case 14: case 14:
YY_RULE_SETUP YY_RULE_SETUP
#line 221 "scan.l" #line 219 "scan.l"
{ {
char* endptr; char* endptr;
...@@ -1011,7 +1013,7 @@ YY_RULE_SETUP ...@@ -1011,7 +1013,7 @@ YY_RULE_SETUP
YY_BREAK YY_BREAK
case 15: case 15:
YY_RULE_SETUP YY_RULE_SETUP
#line 232 "scan.l" #line 230 "scan.l"
{ {
BEGIN(xq); BEGIN(xq);
llen = 0; llen = 0;
...@@ -1020,7 +1022,7 @@ YY_RULE_SETUP ...@@ -1020,7 +1022,7 @@ YY_RULE_SETUP
YY_BREAK YY_BREAK
case 16: case 16:
YY_RULE_SETUP YY_RULE_SETUP
#line 237 "scan.l" #line 235 "scan.l"
{ {
BEGIN(INITIAL); BEGIN(INITIAL);
yylval.str = pstrdup(scanstr(literal)); yylval.str = pstrdup(scanstr(literal));
...@@ -1028,10 +1030,10 @@ YY_RULE_SETUP ...@@ -1028,10 +1030,10 @@ YY_RULE_SETUP
} }
YY_BREAK YY_BREAK
case 17: case 17:
#line 243 "scan.l" #line 241 "scan.l"
case 18: case 18:
YY_RULE_SETUP YY_RULE_SETUP
#line 243 "scan.l" #line 241 "scan.l"
{ {
if ((llen+yyleng) > (MAX_PARSE_BUFFER - 1)) if ((llen+yyleng) > (MAX_PARSE_BUFFER - 1))
elog(ERROR,"quoted string parse buffer of %d chars exceeded",MAX_PARSE_BUFFER); elog(ERROR,"quoted string parse buffer of %d chars exceeded",MAX_PARSE_BUFFER);
...@@ -1041,7 +1043,7 @@ YY_RULE_SETUP ...@@ -1041,7 +1043,7 @@ YY_RULE_SETUP
YY_BREAK YY_BREAK
case 19: case 19:
YY_RULE_SETUP YY_RULE_SETUP
#line 249 "scan.l" #line 247 "scan.l"
{ {
if ((llen+yyleng-1) > (MAX_PARSE_BUFFER - 1)) if ((llen+yyleng-1) > (MAX_PARSE_BUFFER - 1))
elog(ERROR,"quoted string parse buffer of %d chars exceeded",MAX_PARSE_BUFFER); elog(ERROR,"quoted string parse buffer of %d chars exceeded",MAX_PARSE_BUFFER);
...@@ -1052,7 +1054,7 @@ YY_RULE_SETUP ...@@ -1052,7 +1054,7 @@ YY_RULE_SETUP
YY_BREAK YY_BREAK
case 20: case 20:
YY_RULE_SETUP YY_RULE_SETUP
#line 257 "scan.l" #line 255 "scan.l"
{ {
if ((llen+yyleng-1) > (MAX_PARSE_BUFFER - 1)) if ((llen+yyleng-1) > (MAX_PARSE_BUFFER - 1))
elog(ERROR,"quoted string parse buffer of %d chars exceeded",MAX_PARSE_BUFFER); elog(ERROR,"quoted string parse buffer of %d chars exceeded",MAX_PARSE_BUFFER);
...@@ -1062,13 +1064,13 @@ YY_RULE_SETUP ...@@ -1062,13 +1064,13 @@ YY_RULE_SETUP
YY_BREAK YY_BREAK
case 21: case 21:
YY_RULE_SETUP YY_RULE_SETUP
#line 263 "scan.l" #line 261 "scan.l"
{ {
} }
YY_BREAK YY_BREAK
case 22: case 22:
YY_RULE_SETUP YY_RULE_SETUP
#line 267 "scan.l" #line 265 "scan.l"
{ {
BEGIN(xd); BEGIN(xd);
llen = 0; llen = 0;
...@@ -1077,7 +1079,7 @@ YY_RULE_SETUP ...@@ -1077,7 +1079,7 @@ YY_RULE_SETUP
YY_BREAK YY_BREAK
case 23: case 23:
YY_RULE_SETUP YY_RULE_SETUP
#line 272 "scan.l" #line 270 "scan.l"
{ {
BEGIN(INITIAL); BEGIN(INITIAL);
yylval.str = pstrdup(literal); yylval.str = pstrdup(literal);
...@@ -1086,7 +1088,7 @@ YY_RULE_SETUP ...@@ -1086,7 +1088,7 @@ YY_RULE_SETUP
YY_BREAK YY_BREAK
case 24: case 24:
YY_RULE_SETUP YY_RULE_SETUP
#line 277 "scan.l" #line 275 "scan.l"
{ {
if ((llen+yyleng) > (MAX_PARSE_BUFFER - 1)) if ((llen+yyleng) > (MAX_PARSE_BUFFER - 1))
elog(ERROR,"quoted string parse buffer of %d chars exceeded",MAX_PARSE_BUFFER); elog(ERROR,"quoted string parse buffer of %d chars exceeded",MAX_PARSE_BUFFER);
...@@ -1096,12 +1098,12 @@ YY_RULE_SETUP ...@@ -1096,12 +1098,12 @@ YY_RULE_SETUP
YY_BREAK YY_BREAK
case 25: case 25:
YY_RULE_SETUP YY_RULE_SETUP
#line 285 "scan.l" #line 283 "scan.l"
{ /* ignore */ } { /* ignore */ }
YY_BREAK YY_BREAK
case 26: case 26:
YY_RULE_SETUP YY_RULE_SETUP
#line 286 "scan.l" #line 284 "scan.l"
{ {
BEGIN(INITIAL); BEGIN(INITIAL);
return (yytext[0]); return (yytext[0]);
...@@ -1109,7 +1111,7 @@ YY_RULE_SETUP ...@@ -1109,7 +1111,7 @@ YY_RULE_SETUP
YY_BREAK YY_BREAK
case 27: case 27:
YY_RULE_SETUP YY_RULE_SETUP
#line 292 "scan.l" #line 290 "scan.l"
{ return TYPECAST; } { return TYPECAST; }
YY_BREAK YY_BREAK
case 28: case 28:
...@@ -1117,14 +1119,15 @@ case 28: ...@@ -1117,14 +1119,15 @@ case 28:
yy_c_buf_p = yy_cp = yy_bp + 1; yy_c_buf_p = yy_cp = yy_bp + 1;
YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP YY_RULE_SETUP
#line 294 "scan.l" #line 292 "scan.l"
{ {
BEGIN(xm);
return (yytext[0]); return (yytext[0]);
} }
YY_BREAK YY_BREAK
case 29: case 29:
YY_RULE_SETUP YY_RULE_SETUP
#line 297 "scan.l" #line 296 "scan.l"
{ return (yytext[0]); } { return (yytext[0]); }
YY_BREAK YY_BREAK
case 30: case 30:
...@@ -1132,7 +1135,7 @@ case 30: ...@@ -1132,7 +1135,7 @@ case 30:
yy_c_buf_p = yy_cp -= 2; yy_c_buf_p = yy_cp -= 2;
YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP YY_RULE_SETUP
#line 298 "scan.l" #line 297 "scan.l"
{ {
yylval.str = pstrdup((char*)yytext); yylval.str = pstrdup((char*)yytext);
return (Op); return (Op);
...@@ -1140,7 +1143,7 @@ YY_RULE_SETUP ...@@ -1140,7 +1143,7 @@ YY_RULE_SETUP
YY_BREAK YY_BREAK
case 31: case 31:
YY_RULE_SETUP YY_RULE_SETUP
#line 302 "scan.l" #line 301 "scan.l"
{ {
if (strcmp((char*)yytext,"!=") == 0) if (strcmp((char*)yytext,"!=") == 0)
yylval.str = pstrdup("<>"); /* compatability */ yylval.str = pstrdup("<>"); /* compatability */
...@@ -1151,7 +1154,7 @@ YY_RULE_SETUP ...@@ -1151,7 +1154,7 @@ YY_RULE_SETUP
YY_BREAK YY_BREAK
case 32: case 32:
YY_RULE_SETUP YY_RULE_SETUP
#line 309 "scan.l" #line 308 "scan.l"
{ {
yylval.ival = atoi((char*)&yytext[1]); yylval.ival = atoi((char*)&yytext[1]);
return (PARAM); return (PARAM);
...@@ -1254,7 +1257,7 @@ YY_RULE_SETUP ...@@ -1254,7 +1257,7 @@ YY_RULE_SETUP
YY_BREAK YY_BREAK
case 38: case 38:
YY_RULE_SETUP YY_RULE_SETUP
#line 389 "scan.l" #line 391 "scan.l"
{ {
int i; int i;
ScanKeyword *keyword; ScanKeyword *keyword;
...@@ -1276,20 +1279,20 @@ YY_RULE_SETUP ...@@ -1276,20 +1279,20 @@ YY_RULE_SETUP
YY_BREAK YY_BREAK
case 39: case 39:
YY_RULE_SETUP YY_RULE_SETUP
#line 407 "scan.l" #line 409 "scan.l"
{ /* ignore */ } { /* ignore */ }
YY_BREAK YY_BREAK
case 40: case 40:
YY_RULE_SETUP YY_RULE_SETUP
#line 409 "scan.l" #line 411 "scan.l"
{ return (yytext[0]); } { return (yytext[0]); }
YY_BREAK YY_BREAK
case 41: case 41:
YY_RULE_SETUP YY_RULE_SETUP
#line 411 "scan.l" #line 413 "scan.l"
ECHO; ECHO;
YY_BREAK YY_BREAK
#line 1293 "lex.yy.c" #line 1296 "lex.yy.c"
case YY_STATE_EOF(INITIAL): case YY_STATE_EOF(INITIAL):
case YY_STATE_EOF(xb): case YY_STATE_EOF(xb):
case YY_STATE_EOF(xc): case YY_STATE_EOF(xc):
...@@ -1584,7 +1587,7 @@ static yy_state_type yy_get_previous_state() ...@@ -1584,7 +1587,7 @@ static yy_state_type yy_get_previous_state()
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{ {
yy_current_state = (int) yy_def[yy_current_state]; yy_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 127 ) if ( yy_current_state >= 128 )
yy_c = yy_meta[(unsigned int) yy_c]; yy_c = yy_meta[(unsigned int) yy_c];
} }
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
...@@ -1614,11 +1617,11 @@ yy_state_type yy_current_state; ...@@ -1614,11 +1617,11 @@ yy_state_type yy_current_state;
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{ {
yy_current_state = (int) yy_def[yy_current_state]; yy_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 127 ) if ( yy_current_state >= 128 )
yy_c = yy_meta[(unsigned int) yy_c]; yy_c = yy_meta[(unsigned int) yy_c];
} }
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
yy_is_jam = (yy_current_state == 126); yy_is_jam = (yy_current_state == 127);
if ( ! yy_is_jam ) if ( ! yy_is_jam )
*yy_state_ptr++ = yy_current_state; *yy_state_ptr++ = yy_current_state;
...@@ -2175,7 +2178,7 @@ int main() ...@@ -2175,7 +2178,7 @@ int main()
return 0; return 0;
} }
#endif #endif
#line 411 "scan.l" #line 413 "scan.l"
void yyerror(char message[]) void yyerror(char message[])
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/parser/scan.l,v 1.36 1998/02/18 07:22:40 thomas Exp $ * $Header: /cvsroot/pgsql/src/backend/parser/scan.l,v 1.37 1998/03/18 16:50:25 thomas Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -148,12 +148,10 @@ self [,()\[\].;$\:\+\-\*\/\<\>\=\|] ...@@ -148,12 +148,10 @@ self [,()\[\].;$\:\+\-\*\/\<\>\=\|]
op_and_self [\~\!\@\#\%\^\&\|\`\?\$\:\+\-\*\/\<\>\=] op_and_self [\~\!\@\#\%\^\&\|\`\?\$\:\+\-\*\/\<\>\=]
operator {op_and_self}+ operator {op_and_self}+
xminteger {integer}/-
xmreal {real}/{space}*-{digit}
xmstop - xmstop -
integer -?{digit}+ integer [\-]?{digit}+
real -?{digit}+\.{digit}+([Ee][-+]?{digit}+)? real [\-]?{digit}+\.{digit}+([Ee][-+]?{digit}+)?
param \${integer} param \${integer}
...@@ -291,7 +289,8 @@ other . ...@@ -291,7 +289,8 @@ other .
{typecast} { return TYPECAST; } {typecast} { return TYPECAST; }
{self}/-[\.0-9] { {self}/{space}*-[\.0-9] {
BEGIN(xm);
return (yytext[0]); return (yytext[0]);
} }
{self} { return (yytext[0]); } {self} { return (yytext[0]); }
...@@ -311,6 +310,7 @@ other . ...@@ -311,6 +310,7 @@ other .
return (PARAM); return (PARAM);
} }
{identifier}/{space}*-{number} { {identifier}/{space}*-{number} {
int i; int i;
ScanKeyword *keyword; ScanKeyword *keyword;
...@@ -386,6 +386,8 @@ other . ...@@ -386,6 +386,8 @@ other .
CheckFloat8Val(yylval.dval); CheckFloat8Val(yylval.dval);
return (FCONST); return (FCONST);
} }
{identifier} { {identifier} {
int i; int i;
ScanKeyword *keyword; ScanKeyword *keyword;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment