Fixed parsing of character constants.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@560 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
28d6c32dce
commit
d56f8f02f1
1 changed files with 7 additions and 1 deletions
|
|
@ -1042,12 +1042,18 @@ int yylook(void) {
|
|||
|
||||
case 9:
|
||||
if ((c = nextchar()) == 0) return (0);
|
||||
if (c == '\'') {
|
||||
if (c == '\\') state = 91;
|
||||
else if (c == '\'') {
|
||||
yytext[yylen-1] = 0;
|
||||
yylval.id = copy_string(yytext+1);
|
||||
return(CHARCONST);
|
||||
}
|
||||
break;
|
||||
case 91:
|
||||
if ((c = nextchar()) == 0) return 0;
|
||||
state = 9;
|
||||
break;
|
||||
|
||||
|
||||
case 100:
|
||||
if ((c = nextchar()) == 0) return (0);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue