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 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!feeder.eternal-september.org!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: Parsing Ada? Date: Thu, 4 Jun 2015 09:45:32 +0200 Organization: cbb software GmbH Message-ID: <19o2f2rsij73e.19w7vlz9w1jfm$.dlg@40tude.net> References: <87pp5es5u4.fsf@adaheads.sparre-andersen.dk> <7cpxfz18lg2r$.ymcopru7qn8x.dlg@40tude.net> Reply-To: mailbox@dmitry-kazakov.de NNTP-Posting-Host: enOx0b+nfqkc2k+TNpOejg.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org User-Agent: 40tude_Dialog/2.0.15.1 X-Notice: Filtered by postfilter v. 0.8.2 Xref: news.eternal-september.org comp.lang.ada:26171 Date: 2015-06-04T09:45:32+02:00 List-Id: On Wed, 3 Jun 2015 17:39:40 -0500, Randy Brukardt wrote: > "Dmitry A. Kazakov" wrote in message > news:7cpxfz18lg2r$.ymcopru7qn8x.dlg@40tude.net... >> On Tue, 02 Jun 2015 13:33:07 +0200, Jacob Sparre Andersen wrote: >> >>> I would prefer to compile the grammar to Ada source text, >>> which I then could compile into the program. >> >> That is the core of the problem, then. Why would you do such thing? To >> parse Ada you only need a recursive descent parser which is a couple of >> hours to write. > > There's a lot more to the equation than a parse, though. And if you can > write a correct recursive descent parser for all of Ada in a "couple of > hours", you're a genius *and* can type at an inhuman rate. No for all Ada of course, only for the things which are neither expressions (including fully qualified names) nor comments. It would be insane to use a recursive descent parser for expressions. But the result would be a full Ada parser. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de