grub-devel
[Top][All Lists]
Advanced

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

Re: parser eats '=' after variable names


From: Robert Millan
Subject: Re: parser eats '=' after variable names
Date: Sun, 10 Feb 2008 13:10:17 +0100
User-agent: Mutt/1.5.13 (2006-08-11)

On Sun, Feb 10, 2008 at 05:55:25PM +0800, Bean wrote:
> On Feb 10, 2008 5:15 AM, Robert Millan <address@hidden> wrote:
> >
> > It seems that the parser eats the extra '=' when used after a variable
> > evaluation:
> >
> > grub> set a=a
> > grub> echo $a
> > a
> > grub> echo $a=
> >
> > grub>
> >
> > This breaks e.g. variable comparison via "test $a=b".  Does someone have an
> > idea on how to fix it?  I assume it involves the bison stuff which is highly
> > confusing to me... :-/
> 
> This problem is caused by the lexer, the token is broken when a
> variable is found. so $a will be a token, and =b will be another one.
> I have written a patch some time ago, it works by constructing a
> GRUB_PARSER_TOKEN_VAR inside grub_script_yylex2, and return it to the
> parser.

Ah, I thought all your lexer changes had been committed.  Do you remember
the mail subject?

-- 
Robert Millan

<GPLv2> I know my rights; I want my phone call!
<DRM> What use is a phone call… if you are unable to speak?
(as seen on /.)




reply via email to

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