Ignore ordinal suffixes on numbers (bug #15210)

This commit is contained in:
Marko Karppinen 2002-01-24 22:24:58 +00:00
parent fd7ff95fde
commit 449b53e34a

View file

@ -862,6 +862,16 @@ yylex ()
yyInput--;
if (sign < 0)
yylval.Number = -yylval.Number;
/* Ignore ordinal suffixes on numbers */
c = *yyInput;
if (c == 's' || c == 'n' || c == 'r' || c == 't') {
c = *++yyInput;
if (c == 't' || c == 'd' || c == 'h') {
yyInput++;
} else {
yyInput--;
}
}
return sign ? tSNUMBER : tUNUMBER;
}
if (ISALPHA (c))