comp.lang.ada
 help / color / mirror / Atom feed
From: Simon Wright <simon@pushface.org>
Subject: Re: Asis.Text.Character_Position : inconsistency ?
Date: Sun, 07 Nov 2010 12:34:56 +0000
Date: 2010-11-07T12:34:56+00:00	[thread overview]
Message-ID: <m2k4kpxqfj.fsf@pushface.org> (raw)
In-Reply-To: op.vlsjc9q2ule2fv@garhos

"Yannick Duchêne (Hibou57)" <yannick_duchene@yahoo.fr> 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?



  reply	other threads:[~2010-11-07 12:34 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-07  8:04 Asis.Text.Character_Position : inconsistency ? Yannick Duchêne (Hibou57)
2010-11-07 12:34 ` Simon Wright [this message]
2010-11-07 19:03   ` Yannick Duchêne (Hibou57)
2010-11-07 19:18     ` Simon Wright
2010-11-07 19:35       ` J-P. Rosen
2010-11-12 19:35         ` Randy Brukardt
2010-11-07 19:20     ` Simon Wright
2010-11-07 20:44       ` Yannick Duchêne (Hibou57)
2010-11-09 14:18 ` Vadim Godunko
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox