[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[2325] 2009-06-15 Vladimir Serbinenko <address@hidden>
From: |
Vladimir Serbinenko |
Subject: |
[2325] 2009-06-15 Vladimir Serbinenko <address@hidden> |
Date: |
Mon, 15 Jun 2009 21:05:50 +0000 |
Revision: 2325
http://svn.sv.gnu.org/viewvc/?view=rev&root=grub&revision=2325
Author: phcoder
Date: 2009-06-15 21:05:50 +0000 (Mon, 15 Jun 2009)
Log Message:
-----------
2009-06-15 Vladimir Serbinenko <address@hidden>
Fix handling of string like \"hello\" and "a
b"
* script/sh/lexer.c (check_textstate): accept GRUB_PARSER_STATE_ESC
(grub_script_yylex): fix parsing of quoting, escaping and newline
Modified Paths:
--------------
trunk/grub2/script/sh/lexer.c
Modified: trunk/grub2/script/sh/lexer.c
===================================================================
--- trunk/grub2/script/sh/lexer.c 2009-06-15 21:04:17 UTC (rev 2324)
+++ trunk/grub2/script/sh/lexer.c 2009-06-15 21:05:50 UTC (rev 2325)
@@ -185,11 +185,18 @@
break;
grub_dprintf ("scripting", "token=`\\n'\n");
recordchar (state, '\n');
- if (state->state != GRUB_PARSER_STATE_ESC)
+ if (state->state != GRUB_PARSER_STATE_ESC
+ && state->state != GRUB_PARSER_STATE_DQUOTE
+ && state->state != GRUB_PARSER_STATE_QUOTE)
{
state->tokenonhold = '\n';
break;
}
+ if (state->state == GRUB_PARSER_STATE_DQUOTE
+ || state->state == GRUB_PARSER_STATE_QUOTE)
+ yylval->arg = grub_script_arg_add (parsestate, yylval->arg,
+ GRUB_SCRIPT_ARG_TYPE_STR,
+ "\n");
}
else
{
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [2325] 2009-06-15 Vladimir Serbinenko <address@hidden>,
Vladimir Serbinenko <=