diff options
Diffstat (limited to 'discover')
-rw-r--r-- | discover/grub2/grub2-lexer.l | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/discover/grub2/grub2-lexer.l b/discover/grub2/grub2-lexer.l index 52575e3..81dc5fe 100644 --- a/discover/grub2/grub2-lexer.l +++ b/discover/grub2/grub2-lexer.l @@ -23,6 +23,7 @@ void yyerror(struct grub2_parser *parser, const char *fmt, ...); WORD [^{}|&$;<> \t\n'"#]+ DELIM [ \t]+ +BLANK ["]{2}|[']{2} VARNAME ([[:alpha:]][_[:alnum:]]*|[0-9]|[\?@\*#]) %% @@ -52,6 +53,12 @@ VARNAME ([[:alpha:]][_[:alnum:]]*|[0-9]|[\?@\*#]) "until" return TOKEN_UTIL; "while" return TOKEN_WHILE; + /* ignore quoted empty strings */ +{BLANK} { + yylval->word = create_word_text(yyget_extra(yyscanner), ""); + yyget_extra(yyscanner)->inter_word = true; + return TOKEN_WORD; + } /* anything that's not a metachar: return as a plain word */ {WORD} { yylval->word = create_word_text(yyget_extra(yyscanner), yytext); |