From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1ICe9t-0003lf-O4 for mharc-grub-devel@gnu.org; Sun, 22 Jul 2007 12:19:49 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1ICe9s-0003la-BE for grub-devel@gnu.org; Sun, 22 Jul 2007 12:19:48 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1ICe9q-0003lO-PJ for grub-devel@gnu.org; Sun, 22 Jul 2007 12:19:47 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ICe9q-0003lL-K5 for grub-devel@gnu.org; Sun, 22 Jul 2007 12:19:46 -0400 Received: from smtp-vbr9.xs4all.nl ([194.109.24.29]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1ICe9q-0006Ki-63 for grub-devel@gnu.org; Sun, 22 Jul 2007 12:19:46 -0400 Received: from localhost.localdomain (249-174.surfsnel.dsl.internl.net [145.99.174.249]) by smtp-vbr9.xs4all.nl (8.13.8/8.13.8) with ESMTP id l6MGJhbJ039558 for ; Sun, 22 Jul 2007 18:19:44 +0200 (CEST) (envelope-from mgerards@xs4all.nl) From: Marco Gerards To: The development of GRUB 2 References: <20070703175316.GA2306@ws3.vdp.com> <87ps2kfuza.fsf@xs4all.nl> <20070722155546.GB2272@ws3.vdp.com> Mail-Copies-To: mgerards@xs4all.nl Date: Sun, 22 Jul 2007 18:21:18 +0200 In-Reply-To: <20070722155546.GB2272@ws3.vdp.com> (bean123ch@gmail.com's message of "Sun, 22 Jul 2007 23:55:46 +0800") Message-ID: <87bqe4csu9.fsf@xs4all.nl> User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: by XS4ALL Virus Scanner X-detected-kernel: FreeBSD 4.6-4.9 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 16:19:48 -0000 Bean writes: > 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. The code already uses an AST. Or what do you mean? If I am not mistaken, you are going over parser.y to make it work with more situations and to introduce proper error handling. Or am I mistaken? > 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. In the tarball? -- Marco