Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit70dfc8c

Browse files
author
Michael Meskes
committed
*** empty log message ***
1 parentcc08d05 commit70dfc8c

File tree

3 files changed

+47
-3
lines changed

3 files changed

+47
-3
lines changed

‎src/interfaces/ecpg/ChangeLog

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -590,5 +590,10 @@ Fri May 21 18:13:44 CEST 1999
590590
Sun May 23 11:19:32 CEST 1999
591591

592592
- Add braces around each statement so that a simple if/else works.
593+
594+
Thu Jun 10 21:09:12 CEST 1999
595+
596+
- Fixed typo in preproc.y.
597+
- Synced pgc.l with scan.l.
593598
- Set library version to 3.0.0
594599
- Set ecpg version to 2.6.0

‎src/interfaces/ecpg/preproc/pgc.l

Lines changed: 41 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,10 +146,11 @@ operator{op_and_self}+
146146
xmstop-
147147

148148
integer[\-]?{digit}+
149+
decimal[\-]?(({digit}*\.{digit}+)|({digit}+\.{digit}*))
150+
real[\-]?((({digit}*\.{digit}+)|({digit}+\.{digit}*)|({digit}+))([Ee][-+]?{digit}+))
149151
/*
150-
real[\-]?{digit}+\.{digit}+([Ee][-+]?{digit}+)?
151-
*/
152152
real[\-]?(((({digit}*\.{digit}+)|({digit}+\.{digit}*))([Ee][-+]?{digit}+)?)|({digit}+[Ee][-+]?{digit}+))
153+
*/
153154

154155
param\${integer}
155156

@@ -391,14 +392,34 @@ cppline{space}*#.*(\\{space}*\n)*\n*
391392
if (*endptr !='\0' || errno == ERANGE)
392393
{
393394
errno =0;
395+
#if0
394396
yylval.dval = strtod(((char *)yytext),&endptr);
395397
if (*endptr != '\0' || errno == ERANGE)
396398
yyerror("ERROR: Bad integer input");
397399
yyerror("WARNING: Integer input is out of range; promoted to float");
398400
return FCONST;
401+
#endif
402+
yylval.str =mm_strdup((char*)yytext);
403+
return SCONST;
399404
}
400405
return ICONST;
401406
}
407+
{decimal}/{space}*-{number} {
408+
char* endptr;
409+
410+
BEGIN(xm);
411+
if (strlen((char *)yytext) <=17)
412+
{
413+
errno =0;
414+
yylval.dval =strtod(((char *)yytext),&endptr);
415+
if (*endptr !='\0' || errno == ERANGE)
416+
yyerror("ERROR: Bad float8 input");
417+
return FCONST;
418+
}
419+
yylval.str =mm_strdup((char*)yytext);
420+
return SCONST;
421+
}
422+
402423
<C,SQL>{real}/{space}*-{number} {
403424
char* endptr;
404425

@@ -417,14 +438,32 @@ cppline{space}*#.*(\\{space}*\n)*\n*
417438
if (*endptr !='\0' || errno == ERANGE)
418439
{
419440
errno =0;
441+
#if0
420442
yylval.dval = strtod(((char *)yytext),&endptr);
421443
if (*endptr != '\0' || errno == ERANGE)
422444
yyerror("ERROR: Bad integer input");
423445
yyerror("WARNING: Integer input is out of range; promoted to float");
424446
return FCONST;
447+
#endif
448+
yylval.str =mm_strdup((char*)yytext);
449+
return SCONST;
425450
}
426451
return ICONST;
427452
}
453+
{decimal} {
454+
char* endptr;
455+
456+
if (strlen((char *)yytext) <=17)
457+
{
458+
errno =0;
459+
yylval.dval =strtod((char *)yytext,&endptr);
460+
if (*endptr !='\0' || errno == ERANGE)
461+
yyerror("ERROR: Bad float8 input");
462+
return FCONST;
463+
}
464+
yylval.str =mm_strdup((char*)yytext);
465+
return SCONST;
466+
}
428467
<C,SQL>{real}{
429468
char* endptr;
430469

‎src/interfaces/ecpg/preproc/preproc.y

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2918,7 +2918,7 @@ name_list: name
29182918
{$$ = cat3_str($1, make1_str(","),$3); }
29192919
;
29202920

2921-
group_clause:GROUPBYexpr_list{$$ = cat2_str(make1_str("groub by"),$3); }
2921+
group_clause:GROUPBYexpr_list{$$ = cat2_str(make1_str("group by"),$3); }
29222922
|/*EMPTY*/{$$ = make1_str(""); }
29232923
;
29242924

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp