Allow more variations on valid floating point numbers (e.g. ".1", "1e6").
Reintroduce fixes for unary minus parsing with leading spaces.
This commit is contained in:
parent
dc9a9cdfb9
commit
d4a95fd7ab
@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/parser/scan.l,v 1.38 1998/04/08 06:35:00 thomas Exp $
|
* $Header: /cvsroot/pgsql/src/backend/parser/scan.l,v 1.39 1998/05/09 23:15:20 thomas Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -148,12 +148,13 @@ 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}+)?
|
||||||
|
*/
|
||||||
|
real [\-]?(((({digit}*\.{digit}+)|({digit}+\.{digit}*))([Ee][-+]?{digit}+)?)|({digit}+[Ee][-+]?{digit}+))
|
||||||
|
|
||||||
param \${integer}
|
param \${integer}
|
||||||
|
|
||||||
@ -291,7 +292,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 +313,7 @@ other .
|
|||||||
return (PARAM);
|
return (PARAM);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
{identifier}/{space}*-{number} {
|
{identifier}/{space}*-{number} {
|
||||||
int i;
|
int i;
|
||||||
ScanKeyword *keyword;
|
ScanKeyword *keyword;
|
||||||
@ -386,6 +389,8 @@ other .
|
|||||||
CheckFloat8Val(yylval.dval);
|
CheckFloat8Val(yylval.dval);
|
||||||
return (FCONST);
|
return (FCONST);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
{identifier} {
|
{identifier} {
|
||||||
int i;
|
int i;
|
||||||
ScanKeyword *keyword;
|
ScanKeyword *keyword;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user