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: a07f3367d7,50dfc152dc561349 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,UTF8 Path: g2news2.google.com!news2.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!feedme.ziplink.net!news.swapon.de!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: Asis.Text.Character_Position : inconsistency ? Date: Sun, 07 Nov 2010 12:34:56 +0000 Organization: A noiseless patient Spider Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: mx02.eternal-september.org; posting-host="dFCm8HWntFqmDIilBLqEJQ"; logging-data="3032"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/9orOUKvm7dWNqvGGqDlvP6CRDQjxeKq4=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (darwin) Cancel-Lock: sha1:ZUucQViSmYYy4tcFiAGs1TFQJlM= sha1:WRgfTu6ZjQABlxxW1/a7tgjrc1A= Xref: g2news2.google.com comp.lang.ada:16343 Date: 2010-11-07T12:34:56+00:00 List-Id: "Yannick DuchĂȘne (Hibou57)" writes: > What disturbs me, if I believe (as I feel it is) that Gela-ASIS > heavily stick on the ASIS standard: Asis.Text defines two types, > Character_Position and Line_Number. Character_Position is derived from > ASIS_Natural, which in turn is derived from ASIS_Integer, which, the > latter, is implementation defined. > > Also, Asis defines a type Asis.Program_Text, which is not > implementation defined, and which is explicitly an unconstrained > subtype of the Ada's type Standard.Wide_String. > > Shouldn't be Asis.Text.Character_Position be defined so that is can be > used as an index in Asis.Program_Text ? This would imply > Character_Position would be a derived from Standard.Positive, and due > to the way Character_Position is derived, as explained above, this > would imply the root implementation defined type, should be instead, > at least derived from Positive or an ancestor type of Positive. > > Which is wrong ? TenDRA with Gela-ASIS or the ASIS ISO reference > (which I do not own, so I cannot check). GNAT ASIS is pretty clear (at least from the copyright notice) that most of the public part of package specs is from the standard. ASIS.Text is about fragments of code -- the part of the source text corresponding to an element -- in type Span. Line_Number is the line in the source text, Character_Position is the position in the line. I suspect you're supposed to use Element_Image, Line_Image etc?