Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1MFZdn-0007nV-8H for mharc-grub-devel@gnu.org; Sat, 13 Jun 2009 16:15:51 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MFZdl-0007nI-Fa for grub-devel@gnu.org; Sat, 13 Jun 2009 16:15:49 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MFZdg-0007n2-3X for grub-devel@gnu.org; Sat, 13 Jun 2009 16:15:48 -0400 Received: from [199.232.76.173] (port=54474 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MFZdf-0007mz-VP for grub-devel@gnu.org; Sat, 13 Jun 2009 16:15:43 -0400 Received: from c60.cesmail.net ([216.154.195.49]:27318) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_ARCFOUR_SHA1:16) (Exim 4.60) (envelope-from ) id 1MFZdf-0004P3-Iw for grub-devel@gnu.org; Sat, 13 Jun 2009 16:15:43 -0400 Received: from unknown (HELO smtprelay2.cesmail.net) ([192.168.1.112]) by c60.cesmail.net with ESMTP; 13 Jun 2009 16:15:42 -0400 Received: from [192.168.0.22] (static-72-92-88-10.phlapa.fios.verizon.net [72.92.88.10]) by smtprelay2.cesmail.net (Postfix) with ESMTPSA id F152534C6D for ; Sat, 13 Jun 2009 16:20:30 -0400 (EDT) From: Pavel Roskin To: The development of GRUB 2 In-Reply-To: References: <1244844600.15336.11.camel@mj> Content-Type: text/plain Date: Sat, 13 Jun 2009 16:15:39 -0400 Message-Id: <1244924139.10218.6.camel@mj> Mime-Version: 1.0 X-Mailer: Evolution 2.26.2 (2.26.2-1.fc11) Content-Transfer-Encoding: 7bit X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. 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: Sat, 13 Jun 2009 20:15:49 -0000 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. Parsing is hard to get right and easy to break, and we don't have a testsuite to catch breakage. 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. If 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