Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1ICdnJ-0003y7-BG for mharc-grub-devel@gnu.org; Sun, 22 Jul 2007 11:56:29 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1ICdnH-0003xd-A3 for grub-devel@gnu.org; Sun, 22 Jul 2007 11:56:27 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1ICdnF-0003xK-Bz for grub-devel@gnu.org; Sun, 22 Jul 2007 11:56:27 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ICdnF-0003xF-5u for grub-devel@gnu.org; Sun, 22 Jul 2007 11:56:25 -0400 Received: from qb-out-0506.google.com ([72.14.204.235]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1ICdnE-0001mS-Ri for grub-devel@gnu.org; Sun, 22 Jul 2007 11:56:24 -0400 Received: by qb-out-0506.google.com with SMTP id f9so515173qba for ; Sun, 22 Jul 2007 08:56:24 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:date:from:to:subject:message-id:references:mime-version:content-type:content-disposition:in-reply-to:user-agent; b=hTbYaa9/k2/SuvyV9zo1TpJLbP/Y2V9wWqZ+26FPNDFy6YGQw3/Yc8em3fgp9vFLrq0upu1m67u1/NaTmrw2C3EYJnF8uUgSKrPEfsLlcCrSr/5ElN1zXfkzSlE7PUpAy+zi2DBE3J8y9V6EokKWEyJtotPmD9kI9iFXkyFwvSE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:date:from:to:subject:message-id:references:mime-version:content-type:content-disposition:in-reply-to:user-agent; b=dm1glaryXR5UofcPxn3RU7IxdoNsuOiCXiXuhE0ZiB8jRtvwZ+FKPZpqAD3kq4M8mMEN+MKEAoImy0p01Tku70nyQ5EuUBddDZH1u5VUjZv+Dkldhi0pJoa9BhmsAKqBtGJzrUxG88IOKmOfcp6533GW+s3F/1/LxLYrsxO4nIk= Received: by 10.140.132.5 with SMTP id f5mr685852rvd.1185119783199; Sun, 22 Jul 2007 08:56:23 -0700 (PDT) Received: from localhost ( [218.240.200.106]) by mx.google.com with ESMTPS id k19sm5543246rvb.2007.07.22.08.56.20 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 22 Jul 2007 08:56:21 -0700 (PDT) Date: Sun, 22 Jul 2007 23:55:46 +0800 From: Bean To: The development of GRUB 2 Message-ID: <20070722155546.GB2272@ws3.vdp.com> References: <20070703175316.GA2306@ws3.vdp.com> <87ps2kfuza.fsf@xs4all.nl> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87ps2kfuza.fsf@xs4all.nl> User-Agent: Mutt/1.5.13 (2006-08-11) X-detected-kernel: Linux 2.6 (newer, 2) Subject: Re: Standalone problem to test syntax rules 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, 22 Jul 2007 15:56:27 -0000 On Sun, Jul 22, 2007 at 03:06:49PM +0200, Marco Gerards wrote: > You are right that it has advantages. But I prefer using an Abstract > Syntax Tree. It is used a lot in most literature on parsers, clean > and easy to understand. > > The disadvantage is that you need a separate free routine for each > kind of node. But heck, we can even generalize this! > > I agree there is a lot of room for improvement. But stepping away > from using ASTs is not the way to go in my opinion. Using AST or binary tree is only a matter of choice. If you think AST is better, I will modify the code to use AST. Would you take a look at the program, especially the error recover rules. I think it can handle all situation, but you never know until it's fully tested. -- Bean