All of lore.kernel.org
 help / color / mirror / Atom feed
From: Robert Millan <rmh@aybabtu.com>
To: The development of GRUB 2 <grub-devel@gnu.org>
Subject: Re: parser eats '=' after variable names
Date: Sun, 10 Feb 2008 13:10:17 +0100	[thread overview]
Message-ID: <20080210121017.GB1828@thorin> (raw)
In-Reply-To: <ca0f59980802100155l32db655l24c96c096402ced2@mail.gmail.com>

On Sun, Feb 10, 2008 at 05:55:25PM +0800, Bean wrote:
> On Feb 10, 2008 5:15 AM, Robert Millan <rmh@aybabtu.com> 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	other threads:[~2008-02-10 12:12 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-09 21:15 parser eats '=' after variable names Robert Millan
2008-02-10  9:55 ` Bean
2008-02-10 12:10   ` Robert Millan [this message]
2008-02-10 12:16     ` Bean

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080210121017.GB1828@thorin \
    --to=rmh@aybabtu.com \
    --cc=grub-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.