Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1MGE14-0003PD-7X for mharc-grub-devel@gnu.org; Mon, 15 Jun 2009 11:22:34 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MGE12-0003Nd-W7 for grub-devel@gnu.org; Mon, 15 Jun 2009 11:22:33 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MGE0x-0003IW-EQ for grub-devel@gnu.org; Mon, 15 Jun 2009 11:22:32 -0400 Received: from [199.232.76.173] (port=40002 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MGE0w-0003Hs-Ur for grub-devel@gnu.org; Mon, 15 Jun 2009 11:22:27 -0400 Received: from mail-bw0-f216.google.com ([209.85.218.216]:49049) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MGE0w-0000Ha-Id for grub-devel@gnu.org; Mon, 15 Jun 2009 11:22:26 -0400 Received: by bwz12 with SMTP id 12so643409bwz.42 for ; Mon, 15 Jun 2009 08:22:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=qlEIWiK10rpt9/+mK3ot8eg+mqSv8XPbGaOk1Pd9P74=; b=JiyH41z4KX3EEQE+x/ryQGGecrhwC0qx6bji3RwQKNkWg6O50aTp1WeytBdRU7R0T+ 64RbYPJ1+5jtHMKV2/b/+z2S/PxB9SM1/kx7ujwahA48zTr/Krtl/pg3OkRaeT2Ubp2d iUF8KhJMXWvyvuiAuYYDGKa3vqGAMhdok22fQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=bl8dHLI8nS+jPtEKo4Ye4D3YiAUNM/Dp1/1WlI4/AsadJrYc/bN0GY/OGb+F8fM+/T 8KpfTVVr6PRM0Ur5YzMZFbdxeiCVLd/JQCeg1UgenB2Kn+r163nrDZZ7Du3ZKG6duLQG Ch/cDZ/A4DGs7leSDCprMM1vdF5ja43fOZ4f4= MIME-Version: 1.0 Received: by 10.204.55.140 with SMTP id u12mr7110223bkg.127.1245079344692; Mon, 15 Jun 2009 08:22:24 -0700 (PDT) In-Reply-To: <1244924139.10218.6.camel@mj> References: <1244844600.15336.11.camel@mj> <1244924139.10218.6.camel@mj> Date: Mon, 15 Jun 2009 17:22:21 +0200 Message-ID: From: "Vladimir 'phcoder' Serbinenko" To: The development of GRUB 2 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Subject: Re: [PATCH] more scripting fixes X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Jun 2009 15:22:33 -0000 On Sat, Jun 13, 2009 at 10:15 PM, Pavel Roskin wrote: > On Sat, 2009-06-13 at 00:34 +0200, Vladimir 'phcoder' Serbinenko wrote: > >> > It looks like \" cancels quoting for the subsequent characters, but it >> > shouldn't. >> Actually the problem is different: escaping in quoting isn't parsed at >> all. For first step lexer uses rescue mode parser which isn't that >> easy to extend compactly. I think that we should leave rescue mode >> parser as it is now and put a better first-step parser in sh.mod. I'll >> do it when my todo list scrols to this point > > I see. > > I have no objections against your patch, but it would be better if you > split it into logical pieces. =A0Parsing is hard to get right and easy to > break, and we don't have a testsuite to catch breakage. Good idea will do it when comitting > > Some changes are trivial, such as replacing > > while (!state->script || ! grub_strlen (state->script)) > > with > > while (! state->script || ! *state->script) > > Other changes actually change the behavior. =A0If you can split the fix > for escaped quotes from the fix for quoted newlines, it would be good. > This way, if any breakage is found, it could be traced to a smaller > change. > > -- > Regards, > Pavel Roskin > > > _______________________________________________ > Grub-devel mailing list > Grub-devel@gnu.org > http://lists.gnu.org/mailman/listinfo/grub-devel > --=20 Regards Vladimir 'phcoder' Serbinenko