Fix some rejections of valid floating-point literals
Some valid floating-point literals were giving "Error: Syntax error in input(1)".
This commit is contained in:
parent
32b963ef1c
commit
1c03af9b96
3 changed files with 13 additions and 0 deletions
|
|
@ -7,6 +7,9 @@ the issue number to the end of the URL: https://github.com/swig/swig/issues/
|
||||||
Version 4.0.0 (in progress)
|
Version 4.0.0 (in progress)
|
||||||
===========================
|
===========================
|
||||||
|
|
||||||
|
2019-02-21: ZackerySpytz
|
||||||
|
#1480 Fix some rejections of valid floating-point literals.
|
||||||
|
|
||||||
2019-02-19: wsfulton
|
2019-02-19: wsfulton
|
||||||
#1475 Fix regression parsing gcc preprocessor linemarkers in the form:
|
#1475 Fix regression parsing gcc preprocessor linemarkers in the form:
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -630,6 +630,10 @@ macro(size_t, pfx, sizet)
|
||||||
float val_float(float x) {
|
float val_float(float x) {
|
||||||
return x;
|
return x;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
float val_float_3(float f = 0e1f, float f2 = 020e0f, float f3 = 0.3e4f) {
|
||||||
|
return f + f2 + f3;
|
||||||
|
}
|
||||||
%}
|
%}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1160,6 +1160,8 @@ static int look(Scanner *s) {
|
||||||
return SWIG_TOKEN_INT;
|
return SWIG_TOKEN_INT;
|
||||||
if (isdigit(c))
|
if (isdigit(c))
|
||||||
state = 84;
|
state = 84;
|
||||||
|
else if ((c == 'e') || (c == 'E'))
|
||||||
|
state = 82;
|
||||||
else if ((c == 'x') || (c == 'X'))
|
else if ((c == 'x') || (c == 'X'))
|
||||||
state = 85;
|
state = 85;
|
||||||
else if ((c == 'b') || (c == 'B'))
|
else if ((c == 'b') || (c == 'B'))
|
||||||
|
|
@ -1181,6 +1183,10 @@ static int look(Scanner *s) {
|
||||||
return SWIG_TOKEN_INT;
|
return SWIG_TOKEN_INT;
|
||||||
if (isdigit(c))
|
if (isdigit(c))
|
||||||
state = 84;
|
state = 84;
|
||||||
|
else if (c == '.')
|
||||||
|
state = 81;
|
||||||
|
else if ((c == 'e') || (c == 'E'))
|
||||||
|
state = 82;
|
||||||
else if ((c == 'l') || (c == 'L')) {
|
else if ((c == 'l') || (c == 'L')) {
|
||||||
state = 87;
|
state = 87;
|
||||||
} else if ((c == 'u') || (c == 'U')) {
|
} else if ((c == 'u') || (c == 'U')) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue