|
|
|
@ -1,7 +1,7 @@ |
|
|
|
|
/* A lexical scanner generated by flex */ |
|
|
|
|
|
|
|
|
|
/* Scanner skeleton version:
|
|
|
|
|
* $Header: /cvsroot/pgsql/src/backend/parser/Attic/scan.c,v 1.6 1998/01/05 03:32:34 momjian Exp $ |
|
|
|
|
* $Header: /cvsroot/pgsql/src/backend/parser/Attic/scan.c,v 1.7 1998/01/13 19:28:29 scrappy Exp $ |
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
#define FLEX_SCANNER |
|
|
|
@ -539,7 +539,7 @@ char *yytext; |
|
|
|
|
* |
|
|
|
|
* |
|
|
|
|
* IDENTIFICATION |
|
|
|
|
* $Header: /cvsroot/pgsql/src/backend/parser/Attic/scan.c,v 1.6 1998/01/05 03:32:34 momjian Exp $ |
|
|
|
|
* $Header: /cvsroot/pgsql/src/backend/parser/Attic/scan.c,v 1.7 1998/01/13 19:28:29 scrappy Exp $ |
|
|
|
|
* |
|
|
|
|
*------------------------------------------------------------------------- |
|
|
|
|
*/ |
|
|
|
@ -954,7 +954,7 @@ YY_RULE_SETUP |
|
|
|
|
errno = 0; |
|
|
|
|
yylval.ival = strtol((char *)literal,&endptr,2); |
|
|
|
|
if (*endptr != '\0' || errno == ERANGE) |
|
|
|
|
elog(ABORT,"Bad binary integer input '%s'",literal); |
|
|
|
|
elog(ERROR,"Bad binary integer input '%s'",literal); |
|
|
|
|
return (ICONST); |
|
|
|
|
} |
|
|
|
|
YY_BREAK |
|
|
|
@ -965,7 +965,7 @@ YY_RULE_SETUP |
|
|
|
|
#line 206 "scan.l" |
|
|
|
|
{ |
|
|
|
|
if ((llen+yyleng) > (MAX_PARSE_BUFFER - 1)) |
|
|
|
|
elog(ABORT,"quoted string parse buffer of %d chars exceeded",MAX_PARSE_BUFFER); |
|
|
|
|
elog(ERROR,"quoted string parse buffer of %d chars exceeded",MAX_PARSE_BUFFER); |
|
|
|
|
memcpy(literal+llen, yytext, yyleng+1); |
|
|
|
|
llen += yyleng; |
|
|
|
|
} |
|
|
|
@ -997,7 +997,7 @@ YY_RULE_SETUP |
|
|
|
|
errno = 0; |
|
|
|
|
yylval.ival = strtol((char *)literal,&endptr,16); |
|
|
|
|
if (*endptr != '\0' || errno == ERANGE) |
|
|
|
|
elog(ABORT,"Bad hexadecimal integer input '%s'",literal); |
|
|
|
|
elog(ERROR,"Bad hexadecimal integer input '%s'",literal); |
|
|
|
|
return (ICONST); |
|
|
|
|
} |
|
|
|
|
YY_BREAK |
|
|
|
@ -1026,7 +1026,7 @@ YY_RULE_SETUP |
|
|
|
|
#line 243 "scan.l" |
|
|
|
|
{ |
|
|
|
|
if ((llen+yyleng) > (MAX_PARSE_BUFFER - 1)) |
|
|
|
|
elog(ABORT,"quoted string parse buffer of %d chars exceeded",MAX_PARSE_BUFFER); |
|
|
|
|
elog(ERROR,"quoted string parse buffer of %d chars exceeded",MAX_PARSE_BUFFER); |
|
|
|
|
memcpy(literal+llen, yytext, yyleng+1); |
|
|
|
|
llen += yyleng; |
|
|
|
|
} |
|
|
|
@ -1036,7 +1036,7 @@ YY_RULE_SETUP |
|
|
|
|
#line 249 "scan.l" |
|
|
|
|
{ |
|
|
|
|
if ((llen+yyleng-1) > (MAX_PARSE_BUFFER - 1)) |
|
|
|
|
elog(ABORT,"quoted string parse buffer of %d chars exceeded",MAX_PARSE_BUFFER); |
|
|
|
|
elog(ERROR,"quoted string parse buffer of %d chars exceeded",MAX_PARSE_BUFFER); |
|
|
|
|
memcpy(literal+llen, yytext, yyleng+1); |
|
|
|
|
*(literal+llen) = '\''; |
|
|
|
|
llen += yyleng; |
|
|
|
@ -1047,7 +1047,7 @@ YY_RULE_SETUP |
|
|
|
|
#line 257 "scan.l" |
|
|
|
|
{ |
|
|
|
|
if ((llen+yyleng-1) > (MAX_PARSE_BUFFER - 1)) |
|
|
|
|
elog(ABORT,"quoted string parse buffer of %d chars exceeded",MAX_PARSE_BUFFER); |
|
|
|
|
elog(ERROR,"quoted string parse buffer of %d chars exceeded",MAX_PARSE_BUFFER); |
|
|
|
|
memcpy(literal+llen, yytext, yyleng+1); |
|
|
|
|
llen += yyleng; |
|
|
|
|
} |
|
|
|
@ -1081,7 +1081,7 @@ YY_RULE_SETUP |
|
|
|
|
#line 277 "scan.l" |
|
|
|
|
{ |
|
|
|
|
if ((llen+yyleng) > (MAX_PARSE_BUFFER - 1)) |
|
|
|
|
elog(ABORT,"quoted string parse buffer of %d chars exceeded",MAX_PARSE_BUFFER); |
|
|
|
|
elog(ERROR,"quoted string parse buffer of %d chars exceeded",MAX_PARSE_BUFFER); |
|
|
|
|
memcpy(literal+llen, yytext, yyleng+1); |
|
|
|
|
llen += yyleng; |
|
|
|
|
} |
|
|
|
@ -1159,7 +1159,7 @@ YY_RULE_SETUP |
|
|
|
|
errno = 0; |
|
|
|
|
yylval.ival = strtol((char *)yytext,&endptr,10); |
|
|
|
|
if (*endptr != '\0' || errno == ERANGE) |
|
|
|
|
elog(ABORT,"Bad integer input '%s'",yytext); |
|
|
|
|
elog(ERROR,"Bad integer input '%s'",yytext); |
|
|
|
|
return (ICONST); |
|
|
|
|
} |
|
|
|
|
YY_BREAK |
|
|
|
@ -1173,7 +1173,7 @@ YY_RULE_SETUP |
|
|
|
|
errno = 0; |
|
|
|
|
yylval.dval = strtod(((char *)yytext),&endptr); |
|
|
|
|
if (*endptr != '\0' || errno == ERANGE) |
|
|
|
|
elog(ABORT,"Bad float8 input '%s'",yytext); |
|
|
|
|
elog(ERROR,"Bad float8 input '%s'",yytext); |
|
|
|
|
CheckFloat8Val(yylval.dval); |
|
|
|
|
return (FCONST); |
|
|
|
|
} |
|
|
|
@ -1187,7 +1187,7 @@ YY_RULE_SETUP |
|
|
|
|
errno = 0; |
|
|
|
|
yylval.ival = strtol((char *)yytext,&endptr,10); |
|
|
|
|
if (*endptr != '\0' || errno == ERANGE) |
|
|
|
|
elog(ABORT,"Bad integer input '%s'",yytext); |
|
|
|
|
elog(ERROR,"Bad integer input '%s'",yytext); |
|
|
|
|
return (ICONST); |
|
|
|
|
} |
|
|
|
|
YY_BREAK |
|
|
|
@ -1200,7 +1200,7 @@ YY_RULE_SETUP |
|
|
|
|
errno = 0; |
|
|
|
|
yylval.dval = strtod((char *)yytext,&endptr); |
|
|
|
|
if (*endptr != '\0' || errno == ERANGE) |
|
|
|
|
elog(ABORT,"Bad float input '%s'",yytext); |
|
|
|
|
elog(ERROR,"Bad float input '%s'",yytext); |
|
|
|
|
CheckFloat8Val(yylval.dval); |
|
|
|
|
return (FCONST); |
|
|
|
|
} |
|
|
|
@ -2133,7 +2133,7 @@ int main() |
|
|
|
|
|
|
|
|
|
void yyerror(char message[]) |
|
|
|
|
{ |
|
|
|
|
elog(ABORT, "parser: %s at or near \"%s\"", message, yytext); |
|
|
|
|
elog(ERROR, "parser: %s at or near \"%s\"", message, yytext); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
int yywrap() |
|
|
|
|