From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1JOB2g-00039f-Gp for mharc-grub-devel@gnu.org; Sun, 10 Feb 2008 07:12:18 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JOB2d-00039P-NU for grub-devel@gnu.org; Sun, 10 Feb 2008 07:12:15 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JOB2c-00038w-2C for grub-devel@gnu.org; Sun, 10 Feb 2008 07:12:15 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JOB2b-00038t-Sc for grub-devel@gnu.org; Sun, 10 Feb 2008 07:12:13 -0500 Received: from aybabtu.com ([69.60.117.155]) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1JOB2b-0002yA-Il for grub-devel@gnu.org; Sun, 10 Feb 2008 07:12:13 -0500 Received: from [192.168.10.6] (helo=thorin) by aybabtu.com with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.63) (envelope-from ) id 1JOB2Z-0002p1-4o for grub-devel@gnu.org; Sun, 10 Feb 2008 13:12:12 +0100 Received: from rmh by thorin with local (Exim 4.63) (envelope-from ) id 1JOB0j-0000XV-UC for grub-devel@gnu.org; Sun, 10 Feb 2008 13:10:17 +0100 Date: Sun, 10 Feb 2008 13:10:17 +0100 From: Robert Millan To: The development of GRUB 2 Message-ID: <20080210121017.GB1828@thorin> References: <20080209211552.GA9582@thorin> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Organization: free as in freedom X-Message-Flag: Worried about Outlook viruses? Switch to Thunderbird! www.mozilla.com/thunderbird X-Debbugs-No-Ack: true User-Agent: Mutt/1.5.13 (2006-08-11) X-detected-kernel: by monty-python.gnu.org: Genre and OS details not recognized. Subject: Re: parser eats '=' after variable names 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: Sun, 10 Feb 2008 12:12:16 -0000 On Sun, Feb 10, 2008 at 05:55:25PM +0800, Bean wrote: > On Feb 10, 2008 5:15 AM, Robert Millan 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 I know my rights; I want my phone call! What use is a phone call… if you are unable to speak? (as seen on /.)