Cosmetic changes to previous (unicode literals) commit
This commit is contained in:
parent
144e2ab7b4
commit
4b869de2e8
1 changed files with 53 additions and 53 deletions
|
|
@ -953,6 +953,28 @@ static int look(Scanner * s) {
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case 75: /* Special identifier $ */
|
||||||
|
if ((c = nextchar(s)) == 0)
|
||||||
|
return SWIG_TOKEN_DOLLAR;
|
||||||
|
if (isalnum(c) || (c == '_') || (c == '*') || (c == '&')) {
|
||||||
|
state = 70;
|
||||||
|
} else {
|
||||||
|
retract(s,1);
|
||||||
|
if (Len(s->text) == 1) return SWIG_TOKEN_DOLLAR;
|
||||||
|
state = 76;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 76: /* Identifier or true/false */
|
||||||
|
if (cparse_cplusplus) {
|
||||||
|
if (Strcmp(s->text, "true") == 0)
|
||||||
|
return SWIG_TOKEN_BOOL;
|
||||||
|
else if (Strcmp(s->text, "false") == 0)
|
||||||
|
return SWIG_TOKEN_BOOL;
|
||||||
|
}
|
||||||
|
return SWIG_TOKEN_ID;
|
||||||
|
break;
|
||||||
|
|
||||||
case 77: /*identifier or wide string literal*/
|
case 77: /*identifier or wide string literal*/
|
||||||
if ((c = nextchar(s)) == 0)
|
if ((c = nextchar(s)) == 0)
|
||||||
return SWIG_TOKEN_ID;
|
return SWIG_TOKEN_ID;
|
||||||
|
|
@ -992,7 +1014,7 @@ static int look(Scanner * s) {
|
||||||
|
|
||||||
case 79: /* Processing a wide char literal */
|
case 79: /* Processing a wide char literal */
|
||||||
if ((c = nextchar(s)) == 0) {
|
if ((c = nextchar(s)) == 0) {
|
||||||
Swig_error(cparse_file, cparse_start_line, "Unterminated character constant\n");
|
Swig_error(cparse_file, cparse_start_line, "Unterminated wide character constant\n");
|
||||||
return SWIG_TOKEN_ERROR;
|
return SWIG_TOKEN_ERROR;
|
||||||
}
|
}
|
||||||
if (c == '\'') {
|
if (c == '\'') {
|
||||||
|
|
@ -1000,34 +1022,12 @@ static int look(Scanner * s) {
|
||||||
return (SWIG_TOKEN_WCHAR);
|
return (SWIG_TOKEN_WCHAR);
|
||||||
} else if (c == '\\') {
|
} else if (c == '\\') {
|
||||||
if ((c = nextchar(s)) == 0) {
|
if ((c = nextchar(s)) == 0) {
|
||||||
Swig_error(cparse_file, cparse_start_line, "Unterminated wide char literal\n");
|
Swig_error(cparse_file, cparse_start_line, "Unterminated wide character literal\n");
|
||||||
return SWIG_TOKEN_ERROR;
|
return SWIG_TOKEN_ERROR;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 75: /* Special identifier $ */
|
|
||||||
if ((c = nextchar(s)) == 0)
|
|
||||||
return SWIG_TOKEN_DOLLAR;
|
|
||||||
if (isalnum(c) || (c == '_') || (c == '*') || (c == '&')) {
|
|
||||||
state = 70;
|
|
||||||
} else {
|
|
||||||
retract(s,1);
|
|
||||||
if (Len(s->text) == 1) return SWIG_TOKEN_DOLLAR;
|
|
||||||
state = 76;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 76: /* Identifier or true/false */
|
|
||||||
if (cparse_cplusplus) {
|
|
||||||
if (Strcmp(s->text, "true") == 0)
|
|
||||||
return SWIG_TOKEN_BOOL;
|
|
||||||
else if (Strcmp(s->text, "false") == 0)
|
|
||||||
return SWIG_TOKEN_BOOL;
|
|
||||||
}
|
|
||||||
return SWIG_TOKEN_ID;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 8: /* A numerical digit */
|
case 8: /* A numerical digit */
|
||||||
if ((c = nextchar(s)) == 0)
|
if ((c = nextchar(s)) == 0)
|
||||||
return SWIG_TOKEN_INT;
|
return SWIG_TOKEN_INT;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue