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 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,287f73fa8b0c840d X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Date: Tue, 26 Apr 2005 10:17:17 -0400 From: James Alan Farrell Organization: GrammaTech, Inc. User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317) X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Syntax question: new with a constrained subtype indication References: <426d10d1$1_2@newsfeed.slurp.net> <426D15D1.703@mailinator.com> <426d1c5e_3@newsfeed.slurp.net> <1274636.7TPvRdpl6B@linux1.krischik.com> In-Reply-To: <1274636.7TPvRdpl6B@linux1.krischik.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit NNTP-Posting-Host: fw.grammatech.com Message-ID: <426e4dc2$1_2@newsfeed.slurp.net> X-Trace: newsfeed.slurp.net 1114525122 209.4.89.67 (26 Apr 2005 09:18:42 -0500) X-Original-NNTP-Posting-Host: 209.4.89.67 Path: g2news1.google.com!news4.google.com!news2.google.com!newsread.com!newsprint.newsread.com!news-feed01.roc.ny.frontiernet.net!nntp.frontiernet.net!newscon06.news.prodigy.com!prodigy.net!border1.nntp.dca.giganews.com!nntp.giganews.com!novia!diablo.voicenet.com!209.242.86.15.MISMATCH!newsfeed.slurp.net!not-for-mail Xref: g2news1.google.com comp.lang.ada:10718 Date: 2005-04-26T10:17:17-04:00 List-Id: Martin Krischik wrote: > James Alan Farrell wrote: > > >>>> V := new Vector range 1 .. 10; >>> >>> >>>What I've done quite frequently is >>> >>>V := new Vector (1 .. 10); >>> >> >>Yes, but the problem is I need to account for the WHOLE EBNF, not just >>what I would do. (ie, I need to account for ANYTHING my customers MIGHT >>do) > > > How is he going to do it when the compiler won't compile it? > > Martin You mean as a result of syntax errors? We only need to worry about syntactically correct programs, but we still need to worry about any syntactically correct program. So the question was, why was the compiler not compiling it? Is it some caveat in the gnat compiler, and other compilers would handle it? And the answer to the question (as we've found) is that words in 3.2.2 show that this sort of constraint is inappropriate for an array. Ie, it is incorrect, not because of something in the EBNF, but because of someting outside of the EBNF. BTW, it SHOULD be that all Ada compilers compile the same stuff in the same way. But compilation is a subtle process. We always run our software through ACATS to ensure we can handle anything the user might throw our way. And yet, in the past we have come up with examples that crash the program. Or to put it another way, the example contained something ACATS did not. Therefore there are things certified compilers are not tested for. (sorry don't have an example handy. Once that problem was corrected we moved on and I don't recall what it was) J.