some bug fixes
This commit is contained in:
parent
836727564e
commit
1a0c3b4809
2 changed files with 4 additions and 4 deletions
|
@ -139,7 +139,7 @@ append_newline (const char *src)
|
|||
grub_size_t len;
|
||||
|
||||
len = grub_strlen (src);
|
||||
line = grub_malloc (len + 1);
|
||||
line = grub_malloc (len + 2);
|
||||
if (!line)
|
||||
return 0;
|
||||
|
||||
|
|
|
@ -128,13 +128,13 @@ typedef grub_size_t yy_size_t;
|
|||
BLANK [ \t]
|
||||
COMMENT ^[ \t]*#.*$
|
||||
|
||||
CHAR [^|&;()<> \t\n\'\"]
|
||||
CHAR [^|&$;()<> \t\n\'\"\\]
|
||||
DIGITS [[:digit:]]+
|
||||
NAME [[:alpha:]_][[:alnum:][:digit:]_]*
|
||||
|
||||
ESC \\.
|
||||
VARIABLE ${NAME}|$\{{NAME}\}|${DIGITS}|$\{{DIGITS}\}|$\?|$\{\?\}
|
||||
DQSTR \"([^\"]|\\\")*\"
|
||||
DQSTR \"([^\\\"]|{ESC})*\"
|
||||
SQSTR \'[^\']*\'
|
||||
WORD ({CHAR}|{DQSTR}|{SQSTR}|{ESC}|{VARIABLE})+
|
||||
|
||||
|
@ -190,6 +190,7 @@ WORD ({CHAR}|{DQSTR}|{SQSTR}|{ESC}|{VARIABLE})+
|
|||
{WORD} {
|
||||
RECORD;
|
||||
/* resplit yytext */
|
||||
grub_dprintf ("lexer", "word: [%s]\n", yytext);
|
||||
yypush_buffer_state (YY_CURRENT_BUFFER, yyscanner);
|
||||
if (yy_scan_string (yytext, yyscanner))
|
||||
{
|
||||
|
@ -209,7 +210,6 @@ WORD ({CHAR}|{DQSTR}|{SQSTR}|{ESC}|{VARIABLE})+
|
|||
return GRUB_PARSER_TOKEN_BAD;
|
||||
}
|
||||
|
||||
|
||||
/* Split word into multiple args */
|
||||
|
||||
<SPLIT>{
|
||||
|
|
Loading…
Reference in a new issue