Bug fixes
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@245 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
1178e12873
commit
5f071d9adf
1 changed files with 3 additions and 12 deletions
|
|
@ -652,25 +652,16 @@ check_id(DOH *s)
|
||||||
Seek(s,0,SEEK_SET);
|
Seek(s,0,SEEK_SET);
|
||||||
while ((c = Getc(s)) != EOF) {
|
while ((c = Getc(s)) != EOF) {
|
||||||
switch(state) {
|
switch(state) {
|
||||||
|
|
||||||
case 0:
|
case 0:
|
||||||
if (isdigit(c)) state = 1;
|
if (isdigit(c)) state = 1;
|
||||||
else if (isidentifier(c)) return 1;
|
else if (isidentifier(c)) return 1;
|
||||||
else if (c == '\"') skip_tochar(s,'\"',0);
|
else if (c == '\"') skip_tochar(s,'\"',0);
|
||||||
else if (c == '\'') skip_tochar(s,'\'',0);
|
else if (c == '\'') skip_tochar(s,'\'',0);
|
||||||
else if (c == '/') state = 3;
|
else if (c == '/') state = 3;
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
if ((c == 'L') || (c == 'U') || (c == 'F') || (c == 'l') || (c == 'u')) state = 2;
|
if (isspace(c)) state = 0;
|
||||||
else if ((c == 'x') || (c == 'X')) state = 1;
|
|
||||||
else if (isidentifier(c)) return 1;
|
|
||||||
else if (!isdigit(c)) state = 0;
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
if ((c == 'L') || (c == 'U') || (c == 'F') || (c == 'l') || (c == 'u')) state = 2;
|
|
||||||
else {
|
|
||||||
Ungetc(c,s);
|
|
||||||
state = 0;
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
if (c == '*') state = 10;
|
if (c == '*') state = 10;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue