If the scanner indicates that we might have something which looks like a
map, but the parser in fact fails to create that map, we will try to
access the map regardless. Stop doing that.
testcase: 'xkb_keymap {' -> '#kb_keymap'
Signed-off-by: Daniel Stone <daniels@collabora.com>
*/
XkbFile : XkbCompositeMap
- { $$ = param->rtrn = $1; param->more_maps = true; }
+ { $$ = param->rtrn = $1; param->more_maps = !!param->rtrn; }
| XkbMapConfig
- { $$ = param->rtrn = $1; param->more_maps = true; YYACCEPT; }
+ { $$ = param->rtrn = $1; param->more_maps = !!param->rtrn; YYACCEPT; }
| END_OF_FILE
{ $$ = param->rtrn = NULL; param->more_maps = false; }
;
.scanner = scanner,
.ctx = ctx,
.rtrn = NULL,
+ .more_maps = false,
};
/*