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,3a1c64628a09855b X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!wn13feed!worldnet.att.net!bgtnsc04-news.ops.worldnet.att.net.POSTED!53ab2750!not-for-mail Newsgroups: comp.lang.ada From: anon@anon.org (anon) Subject: Re: Lack of formal syntax undermines Ada Reply-To: anon@anon.org (anon) References: X-Newsreader: IBM NewsReader/2 2.0 Message-ID: Date: Sun, 13 Apr 2008 09:46:01 GMT NNTP-Posting-Host: 12.64.24.195 X-Complaints-To: abuse@worldnet.att.net X-Trace: bgtnsc04-news.ops.worldnet.att.net 1208079961 12.64.24.195 (Sun, 13 Apr 2008 09:46:01 GMT) NNTP-Posting-Date: Sun, 13 Apr 2008 09:46:01 GMT Organization: AT&T Worldnet Xref: g2news1.google.com comp.lang.ada:20906 Date: 2008-04-13T09:46:01+00:00 List-Id: Ada was design in a similar concept a COBOL. Where COBOL was design for business people to be able to read and understand what is happening, Ada was design for government scientist to be able to read and modify the algorithm. As for BNF for some language includind Ada-95, there is a web site, see: http://cui.unige.ch/db-research/Enseignement/analyseinfo/BNFweb.html and the direct link to "BNF of the Ada Programming Language": http://cui.unige.ch/db-research/Enseignement/analyseinfo/Ada95/BNFindex.html As for your code: YES, it is legal! In , usenet@leapheap.co.uk writes: >Ada does not have a formal syntax. The LRM provides "syntax rules" >section by section, then collectively in Annex P. The resulting >woolly grammar is well-known to be ambiguous (e.g. is X:=Y(Z) an >assignment from a function call, array indexing or something >else?). It mixes lexical and syntactical information. It cannot >be used as the input to a parser generator. The interpretation >necessary via other sections of the LRM risks making the language >as a whole indefinite. > >Ada is designed for the construction of high-integrity software >by validated compilers. Would it not be better to have formal >Ada lexical and syntactic rules, expressed in regular expression >and BNF format respectively, even if such rules turn out to be >not particularly readable? > >As an example, my parser is having trouble with the fragment: >task type TT is > pragma priority(12); >end TT; >Is this legal Ada95 syntax or not? > >Regards, >Chris Noonan