Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1D0QS2-0003ie-Qb for mharc-grub-devel@gnu.org; Sun, 13 Feb 2005 15:34:42 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1D0QIp-0001j6-Pu for grub-devel@gnu.org; Sun, 13 Feb 2005 15:25:15 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1D0QId-0001ee-V2 for grub-devel@gnu.org; Sun, 13 Feb 2005 15:25:02 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1D0QIc-0001X4-HO for grub-devel@gnu.org; Sun, 13 Feb 2005 15:24:58 -0500 Received: from [209.86.89.68] (helo=smtpauth08.mail.atl.earthlink.net) by monty-python.gnu.org with esmtp (Exim 4.34) id 1D0Ppb-0004qy-BD for grub-devel@gnu.org; Sun, 13 Feb 2005 14:54:59 -0500 Received: from [63.246.184.80] (helo=[192.168.0.100]) by smtpauth08.mail.atl.earthlink.net with asmtp (Exim 4.34) id 1D0Ppb-0006Bw-2T for grub-devel@gnu.org; Sun, 13 Feb 2005 14:54:59 -0500 Mime-Version: 1.0 (Apple Message framework v619.2) In-Reply-To: <87ekfkthkf.fsf@marco.marco-g.com> 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> Content-Type: text/plain; charset=US-ASCII; format=flowed Message-Id: Content-Transfer-Encoding: 7bit From: Hollis Blanchard Date: Sun, 13 Feb 2005 13:54:57 -0600 To: The development of GRUB 2 X-Mailer: Apple Mail (2.619.2) X-ELNK-Trace: 77a46389d001b1f223bcf3e39c2f8b5f1aa676d7e74259b7b3291a7d08dfec79836402348f493a5eda5dcd0228968322350badd9bab72f9c350badd9bab72f9c X-Originating-IP: 63.246.184.80 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: Sun, 13 Feb 2005 20:34:41 -0000 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. 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? -Hollis