Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1JO8uK-0002TE-F6 for mharc-grub-devel@gnu.org; Sun, 10 Feb 2008 04:55:32 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JO8uI-0002Sq-41 for grub-devel@gnu.org; Sun, 10 Feb 2008 04:55:30 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JO8uG-0002Se-R1 for grub-devel@gnu.org; Sun, 10 Feb 2008 04:55:29 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JO8uG-0002Sa-Fi for grub-devel@gnu.org; Sun, 10 Feb 2008 04:55:28 -0500 Received: from ti-out-0910.google.com ([209.85.142.185]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JO8uG-0001C8-1E for grub-devel@gnu.org; Sun, 10 Feb 2008 04:55:28 -0500 Received: by ti-out-0910.google.com with SMTP id a20so182326tia.10 for ; Sun, 10 Feb 2008 01:55:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=AOVxr2RYeaEb8G5iafYCZad6eDRGM5QVPgxJXqn9wOE=; b=shZGjUsWirHN2J//o7BxUoJtnPy8Cy2MvYq7CX4PfaC2lOEB0xbcPZ2pCx2AJllbvlr8bO/WiXWLm9BEBIBoqORoWCgmVqjv5zGEBJpM5b78Ir6xINTPjZCvyDoyGlPMO/qgwA53vzRxTm8VCTjB5lRSDNWOiu4bbI5KhcmxV6Y= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=nmFhWsUWvciSV3gEP2Huz1xWxbt8lr+8EcAloUZAiwxPC4YcLQKBbFwq65v53eVhLx01yFRsyPs7boQLozpCm/0M2Fsf2pHNzDbllBI9Q5/CbGZq9oWdBXpivZWm8O7RMJQKCh4M+z8gCpmnJ46oH+Kt61JsjH8gQKALd0eGdlY= Received: by 10.110.47.17 with SMTP id u17mr7937646tiu.6.1202637325936; Sun, 10 Feb 2008 01:55:25 -0800 (PST) Received: by 10.110.62.19 with HTTP; Sun, 10 Feb 2008 01:55:25 -0800 (PST) Message-ID: Date: Sun, 10 Feb 2008 17:55:25 +0800 From: Bean To: "The development of GRUB 2" In-Reply-To: <20080209211552.GA9582@thorin> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20080209211552.GA9582@thorin> X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 2) 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 09:55:30 -0000 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. -- Bean