From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1D0oHc-0006DC-Bs for mharc-grub-devel@gnu.org; Mon, 14 Feb 2005 17:01:32 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1D0oHU-00067P-QI for grub-devel@gnu.org; Mon, 14 Feb 2005 17:01:24 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1D0oHR-00064X-LM for grub-devel@gnu.org; Mon, 14 Feb 2005 17:01:23 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1D0oHP-00060O-Uy for grub-devel@gnu.org; Mon, 14 Feb 2005 17:01:20 -0500 Received: from [145.74.66.11] (helo=mail-cn.han.nl) by monty-python.gnu.org with esmtp (Exim 4.34) id 1D0o0f-0006eT-He for grub-devel@gnu.org; Mon, 14 Feb 2005 16:44:01 -0500 Received: from vscan-cn.han.nl (venus.han.nl [145.74.65.6]) by mail-cn.han.nl (Postfix) with ESMTP id D0E5A872C for ; Mon, 14 Feb 2005 22:39:28 +0100 (CET) Received: from mail-cn.han.nl ([145.74.66.11]) by vscan-cn.han.nl (venus.han.nl [145.74.65.6]) (amavisd-new, port 10024) with ESMTP id 26176-03 for ; Mon, 14 Feb 2005 22:39:26 +0100 (CET) Received: from mail1.han.nl (mail1.han.nl [145.74.103.11]) by mail-cn.han.nl (Postfix) with ESMTP id D98548924 for ; Mon, 14 Feb 2005 22:39:26 +0100 (CET) Received: from marco.marco-g.com (mgerards.xs4all.nl [82.92.27.129]) by mail1.han.nl (Postfix) with ESMTP id A4184C046 for ; Mon, 14 Feb 2005 22:39:26 +0100 (CET) Mail-Copies-To: metgerards@student.han.nl To: The development of GRUB 2 References: <20050207121011.GC1380@mjk.myfqdn.de> <42077EA1.5090403@list.ru> <200502081420.43561.okuji@enbug.org> <4208E717.9040205@list.ru> <87650yonaj.fsf@marco.marco-g.com> <420D2B3B.9040702@list.ru> <87ekfkthkf.fsf@marco.marco-g.com> From: Marco Gerards Date: Mon, 14 Feb 2005 21:39:41 +0000 In-Reply-To: (Hollis Blanchard's message of "Sun, 13 Feb 2005 13:54:57 -0600") Message-ID: <87ekfibz36.fsf@marco.marco-g.com> User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: by amavisd-new (2.2.0) at vscan-cn.han.nl Subject: Re: Scripting 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: Mon, 14 Feb 2005 22:01:28 -0000 Hollis Blanchard writes: > On Feb 13, 2005, at 12:56 PM, Marco Gerards wrote: > >> Serbinenko Vladimir writes: >>>> What kind of parser is it? >>>> >>> It's a direct parser with aritmetic subparser. Main parser is >>> grub_bash_execute, arithmetic subparser is grub_bash_eval_arith. >>> grub_bash_execute determinates the special cases (loops,conditions, >>> functions,...) for other cases (commands,assignments, function >>> calling) >>> it calls grub_bash_split_tokens, grub_bash_expand_braces and >>> grub_bash_expand_dollar >>> >>>> I have never seen this in a top-down or bottom-up parser I have >>>> studied. >>> I don't like to write the things reffering every time to algorithm. >>> Genereally I take some ideas and I write myself, at my own. >> >> What do you mean? >> >> The problem is that I like proven concepts. And when you use a >> commonly known parser design many people will be able to understand >> it. To me this is REALLY important. I wonder what other developers >> think of that. > > I agree. Hand-written parsers are very hairy to implement, with nasty > bugs and corner cases. Although I haven't studied the theory, I know > that there are traditional parsing/lexing/whatever techniques that are > well-understood. Right. But I would not have a problem with a hand written parser, as long as I can understand it. :) > In fact, there's a whole bunch of tools like flex and bison that we > could use to avoid hand-written errors. Why don't we use those? One thing that should be looked into before using flex and bison is how much the binary will grow. Another thing is how to integrate it with the command line. Thanks, Marco