mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +00:00
(_AT_TEST_GLR_CXXTYPES): Work even with
overly-picky compilers that reject 'char *foo = "bar";'.
This commit is contained in:
@@ -82,7 +82,7 @@ prog :
|
|||||||
|
|
||||||
stmt : expr ';' $2 { $$ = ]$[1; }
|
stmt : expr ';' $2 { $$ = ]$[1; }
|
||||||
| decl $3
|
| decl $3
|
||||||
| error ';' { $$ = "<error>"; }
|
| error ';' { static char error_msg[] = "<error>"; $$ = error_msg; }
|
||||||
| '@' { YYACCEPT; }
|
| '@' { YYACCEPT; }
|
||||||
;
|
;
|
||||||
|
|
||||||
@@ -178,9 +178,10 @@ yylex (LEX_PARAMETERS)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
static char empty_string[] = "";
|
||||||
colNum += 1;
|
colNum += 1;
|
||||||
tok = c;
|
tok = c;
|
||||||
yylval = "";
|
yylval = empty_string;
|
||||||
}
|
}
|
||||||
#if YYLSP_NEEDED
|
#if YYLSP_NEEDED
|
||||||
yylloc.last_column = colNum-1;
|
yylloc.last_column = colNum-1;
|
||||||
|
|||||||
Reference in New Issue
Block a user