grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] more scripting fixes


From: Pavel Roskin
Subject: Re: [PATCH] more scripting fixes
Date: Sat, 13 Jun 2009 16:15:39 -0400

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]