From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,4fd338e56f592cfb X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit X-Received: by 10.180.106.161 with SMTP id gv1mr10302460wib.4.1367331190628; Tue, 30 Apr 2013 07:13:10 -0700 (PDT) Path: hg5ni49024wib.1!nntp.google.com!proxad.net!feeder1-2.proxad.net!usenet-fr.net!gegeweb.org!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: LALR parser question Date: Tue, 30 Apr 2013 16:14:23 +0200 Organization: cbb software GmbH Message-ID: <1uackg2ciciue$.6lbhfehn2a69$.dlg@40tude.net> References: <85sj2aydwi.fsf@stephe-leake.org> <80d9c981-1487-4a2e-97a4-9965174e9cea@googlegroups.com> Reply-To: mailbox@dmitry-kazakov.de NNTP-Posting-Host: FbOMkhMtVLVmu7IwBnt1tw.user.speranza.aioe.org Mime-Version: 1.0 X-Complaints-To: abuse@aioe.org User-Agent: 40tude_Dialog/2.0.15.1 X-Notice: Filtered by postfilter v. 0.8.2 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Date: 2013-04-30T16:14:23+02:00 List-Id: On Tue, 30 Apr 2013 06:14:13 -0700 (PDT), john@peppermind.com wrote: > For a small home-brewn language based on a virtual machine written in Ada > I am currently investigating whether I should use a parser generator that > can generate Ada code or write the tokenizer/parser by hand. I'm currently > tending towards OpenToken but also looking for alternatives, An alternative to tokenizers and generators is table-driven parsers. E.g. http://www.dmitry-kazakov.de/ada/components.htm#Parsers_etc Advantages of table-driven parsers are simplicity, speed, good error messages, better software architecture. When the language is simple a table-driven parser can directly execute (interpret) code without generating any intermediate code, which is about a half of all cases I dealt with. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de