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=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.58.54.97 with SMTP id i1mr1575198vep.40.1382653741182; Thu, 24 Oct 2013 15:29:01 -0700 (PDT) X-Received: by 10.49.27.168 with SMTP id u8mr137992qeg.11.1382653740662; Thu, 24 Oct 2013 15:29:00 -0700 (PDT) Path: border1.nntp.ams.giganews.com!nntp.giganews.com!feeder.erje.net!us.feeder.erje.net!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!npeer03.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!nx02.iad01.newshosting.com!newshosting.com!news-out.readnews.com!transit4.readnews.com!209.85.216.87.MISMATCH!o2no24753372qas.0!news-out.google.com!z6ni90012pbu.0!nntp.google.com!o2no24753353qas.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Thu, 24 Oct 2013 15:29:00 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=144.64.29.158; posting-account=qOKjyQoAAACkueA1sEk2JOzdoAkAN1Qg NNTP-Posting-Host: 144.64.29.158 References: User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <849989b3-a161-42ce-84d1-e194a6cac3f8@googlegroups.com> Subject: Re: Ada 2012 grammar From: David Pereira Injection-Date: Thu, 24 Oct 2013 22:29:00 +0000 Content-Type: text/plain; charset=ISO-8859-1 X-Received-Bytes: 2400 Xref: number.nntp.dca.giganews.com comp.lang.ada:183726 Date: 2013-10-24T15:29:00-07:00 List-Id: Quinta-feira, 24 de Outubro de 2013 21:19:28 UTC+1, Dmitry A. Kazakov escreveu: > On Thu, 24 Oct 2013 08:01:13 -0700 (PDT), David Pereira wrote: > > > > > I would like to extend it to some new contract constructs, but writing a > > > complete parser is a huge (and extremely time-consuming) task that I would > > > like to avoid :). > > > > Difficult for parsing are only expressions. The language itself is very > > simple to parse using recursive descent parser, e.g. to generate an AST. To > > write a table-driven parse would be one-day work or so. > > > > Ada expressions parser can be found here: > > > > http://www.dmitry-kazakov.de/ada/components.htm#12.9 > > > > However it is Ada 95. The difference AFAIK to Ada 2005 is reserved words > > like "interface" to filter out from identifiers. To Ada 2012 it is > > conditional expressions. Not difficult to add. > > > > I would not bother either with grammars. > > > > -- > > Regards, > > Dmitry A. Kazakov > > http://www.dmitry-kazakov.de Hi Dmitry, Thanks for the pointer. I will carefully look at it. Regards, David