From rybin@possum.srcc.msu.su Sun Jan 12 11:19:15 1997 Return-Path: Received: from ida.org by cronus.csed.ida.org (SMI-8.6/SMI-SVR4) id LAA14709; Sun, 12 Jan 1997 11:19:15 -0500 Received: from sw-eng.falls-church.va.us (ns1.sw-eng.falls-church.va.us) by ida.org (4.1/SMI-4.1) id AA14576; Sun, 12 Jan 97 11:19:28 EST Received: from crocus.gamma.ru by sw-eng.falls-church.va.us (8.7.1/) id QAA22038; Sun, 12 Jan 1997 16:13:49 GMT Received: from srcc.UUCP (uucp@localhost) by crocus.gamma.ru (8.7.6/8.7.3) with UUCP id TAA05351 for asis-officers@sw-eng.falls-church.va.us; Sun, 12 Jan 1997 19:16:21 +0300 (MSK) Received: by gamma.srcc.msu.su; Sun, 12 Jan 1997 19:15:42 +0300 Received: by possum.srcc.msu.su (UUPC/@ v5.09gamma, 14Mar93); Sun, 12 Jan 1997 19:06:54 +0300 To: asis-officers@sw-eng.falls-church.va.us Message-Id: Organization: Information Systems, SRCC, MSU From: "Sergey I. Rybin" Date: Sun, 12 Jan 97 19:06:54 +0300 X-Mailer: BML [MS/DOS Beauty Mail v.1.36] Subject: Comments on Lines - 1 Lines: 58 Content-Length: 2228 Status: OR The comment on this Lines function is appended to its definition. Sergey. ------------------------------------------------------------------------------ -- Section 20.19 function Lines ------------------------------------------------------------------------------ function Lines (Element : in Asis.Element; The_Span : in Span) return Line_List; ------------------------------------------------------------------------------ -- Element - Specifies the element to query -- The_Span - Specifies the textual span to return -- -- Returns a list of lines covering the given span from the compilation -- containing the given program element. -- -- Returns a Nil_Line_List if not Is_Text_Available(Element). -- -- This operation can be used to access lines from text outside the span of an -- element, but still within the compilation. For example, lines containing -- preceding comments or lines between two elements. -- -- Line lists can be indexed to obtain individual lines. The bounds of each -- list correspond to the lines with those same numbers in the compilation -- text. -- -- The first Line of the result contains text from the compilation starting at -- line Span.First_Line and column Span.First_Column. The last Line of the -- result contains text from the compilation ending at line Span.Last_Line and -- column Span.Last_Column. Text before or after those limits is not -- reflected in the returned list. -- -- Raises Asis_Inappropriate_Line_Number if the Span defines a Nil_Span or a -- line whose number is outside the range of text lines that can be accessed -- through the element. Comments: ======== 1. What does "if the Span defines a Nil_Span" mean here? Nil_Span is defined as Nil_Span : constant Span := (First_Line => 1, First_Column => 1, Last_Line => 0, Last_Column => 0); But the span like: My_Nil_Span : constant Span := (First_Line => 100, First_Column => 100, Last_Line => 99, Last_Column => 99); is also nil, is not it? From rybin@possum.srcc.msu.su Sun Jan 12 11:19:16 1997 Return-Path: Received: from ida.org by cronus.csed.ida.org (SMI-8.6/SMI-SVR4) id LAA14715; Sun, 12 Jan 1997 11:19:15 -0500 Received: from sw-eng.falls-church.va.us (ns1.sw-eng.falls-church.va.us) by ida.org (4.1/SMI-4.1) id AA14578; Sun, 12 Jan 97 11:19:28 EST Received: from crocus.gamma.ru by sw-eng.falls-church.va.us (8.7.1/) id QAA22039; Sun, 12 Jan 1997 16:13:49 GMT Received: from srcc.UUCP (uucp@localhost) by crocus.gamma.ru (8.7.6/8.7.3) with UUCP id TAA05354 for asis-officers@sw-eng.falls-church.va.us; Sun, 12 Jan 1997 19:16:23 +0300 (MSK) Received: by gamma.srcc.msu.su; Sun, 12 Jan 1997 19:15:55 +0300 Received: by possum.srcc.msu.su (UUPC/@ v5.09gamma, 14Mar93); Sun, 12 Jan 1997 19:07:19 +0300 To: asis-officers@sw-eng.falls-church.va.us Message-Id: Organization: Information Systems, SRCC, MSU From: "Sergey I. Rybin" Date: Sun, 12 Jan 97 19:07:19 +0300 X-Mailer: BML [MS/DOS Beauty Mail v.1.36] Subject: Comments on Lines - 2 Lines: 45 Content-Length: 1934 Status: OR Comments are after the definition of this Lines function. Sergey. ------------------------------------------------------------------------------ -- Section 20.20 function Lines ------------------------------------------------------------------------------ function Lines (Element : in Asis.Element; First_Line : in Line_Number; Last_Line : in Line_Number) return Line_List; ------------------------------------------------------------------------------ -- Element - Specifies the element to query -- First_Line - Specifies the first line to return -- Last_Line - Specifies the last line to return -- -- Returns a list of Lines covering the full text for each of the indicated -- lines from the compilation containing the given element. This operation -- can be used to access lines from text outside the span of an element, but -- still within the compilation. -- -- Returns a Nil_Line_List if not Is_Text_Available(Element). -- -- Line lists can be indexed to obtain individual lines. The bounds of each -- list correspond to the lines with those same numbers in the compilation -- text. -- -- Raises Asis_Inappropriate_Line_Number if the Span defines a Nil_Span or a -- line whose number is outside the range of text lines that can be accessed -- through the element. Comments: ======== 1. It looks like "Raises Asis_Inappropriate_Line_Number if the Span defines a Nil_Span" came from the previous Lines function, and this statement about Span is irrelevant to this function (this is the oversight came from "copy-and-past" technology). 2. What happens if First_Line or Last_Line is eqial to 0? Asis.Text says: -- Line_Number = 0 is reserved to act as an "invalid" Line_Number value. No -- unit text line will ever have a Line_Number of zero. 3. What heppens if Last_Line < First_Line? (It looks like Asis_Inappropriate_Line_Number should be raised). From alainlg@student.DoCS.UU.SE Fri Mar 7 10:45:37 1997 Return-Path: Received: from ida.org by cronus.csed.ida.org (SMI-8.6/SMI-SVR4) id KAA21654; Fri, 7 Mar 1997 10:45:37 -0500 Received: from sw-eng.falls-church.va.us (ns1.sw-eng.falls-church.va.us) by ida.org (4.1/SMI-4.1) id AA26239; Fri, 7 Mar 97 10:45:05 EST Received: from veda.DoCS.UU.SE by sw-eng.falls-church.va.us (8.7.1/) id PAA22403; Fri, 7 Mar 1997 15:16:30 GMT Received: from Xantia.DoCS.UU.SE (Xantia.DoCS.UU.SE [130.238.8.76]) by veda.DoCS.UU.SE (8.6.12/8.6.12) with ESMTP id QAA15265; Fri, 7 Mar 1997 16:19:10 +0100 Received: (alainlg@localhost) by Xantia.DoCS.UU.SE (8.6.12/8.6.12) id QAA27957; Fri, 7 Mar 1997 16:19:08 +0100 Date: Fri, 7 Mar 1997 16:19:08 +0100 Message-Id: <199703071519.QAA27957@Xantia.DoCS.UU.SE> From: Alain Le Guennec To: Peter.Hermann@csv.ICA.Uni-Stuttgart.DE Cc: asis-technical@sw-eng.falls-church.va.us In-Reply-To: <199703071434.OAA15937@iris14.csv.ica.uni-stuttgart.de> (Peter.Hermann@csv.ICA.Uni-Stuttgart.DE) Subject: Re: A comment about Asis.Text.Lines (ASIS-2.0.L) Content-Length: 1973 Status: OR : What about a null range given intentionally from a : machine-generated "customer"? : I always tend to prefer omission of special handling of : "special cases". This makes many applications much much easier. A null range could not be given with a First_Line equal to zero. Only Last_Line could potentially be 0 in a null range (this is consistent with the way a Span and a Nil_Span are defined.) Now this is true that with this change, the exception raised in case the First_Line parameter is zero changes from Asis_Inappropriate_Line_Number to Constraint_Error, which may or may not be desirable, I don't know. : > The specification for one of the Asis.Text.Lines functions reads : : > ------------------------------------------------------------------- : > -- Section 20.20 function Lines : > ------------------------------------------------------------------- : > function Lines (Element : in Asis.Element; : > First_Line : in Line_Number; : > Last_Line : in Line_Number) return Line_List; : > : > ------------------------------------------------------------------- : > -- Element - Specifies the element to query : > -- First_Line - Specifies the first line to return : > -- Last_Line - Specifies the last line to return : > : > : > Shouldn't First_Line be of type Line_Number_Positive : > instead of simply Line_Number, since a line number equal to 0 : > is supposed to be an invalid line number by definition ? : > Section 20.2 says : : > -- : > -- Line_Number = 0 is reserved to act as an "invalid" Line_Number value. No : > -- unit text line will ever have a Line_Number of zero. -- Alain Le Guennec, 3rd year student at ENST de Bretagne (Telecom Bretagne). ENST de Bretagne (France) : Uppsala University (SWEDEN) : mailto:Alain.LeGuennec@enst-bretagne.fr mailto:alainlg@Kay.docs.uu.se http://www-eleves.enst-bretagne.fr/~leguenne http://www.docs.uu.se/~alainlg From Alain.LeGuennec@enst-bretagne.fr Thu Mar 20 14:12:38 1997 Return-Path: Received: from ida.org by cronus.csed.ida.org (SMI-8.6/SMI-SVR4) id OAA19420; Thu, 20 Mar 1997 14:12:37 -0500 Received: from sw-eng.falls-church.va.us (ns1.sw-eng.falls-church.va.us) by ida.org (4.1/SMI-4.1) id AA17688; Thu, 20 Mar 97 14:12:58 EST Received: from melimelo.enst-bretagne.fr by sw-eng.falls-church.va.us (8.7.1/) id RAA07868; Thu, 20 Mar 1997 17:16:00 GMT Received: from huygens.enst-bretagne.fr (huygens.enst-bretagne.fr [192.44.75.121]) by melimelo.enst-bretagne.fr (8.8.5/8.8.5) with SMTP id SAA25503 for ; Thu, 20 Mar 1997 18:18:19 +0100 Received: by huygens.enst-bretagne.fr (SMI-8.6/SMI-SVR4) id SAA12731; Thu, 20 Mar 1997 18:18:17 +0100 Date: Thu, 20 Mar 1997 18:18:17 +0100 Message-Id: <199703201718.SAA12731@huygens.enst-bretagne.fr> From: Alain Le Guennec To: ASIS-Comment@sw-eng.falls-church.va.us Subject: More on issue #28 (Lines functions of Asis.Text) Content-Length: 1140 Status: OR !topic Lines & Line_Image !from Alain Le Guennec !keywords Line Line_Image padding !discussion The comment of Line_Image (20.23) says: -- If the Line is the first line from the Lines result for an Element, it may -- represent only a portion of a line from the original compilation. If the -- Element's Span began at character position P, the first Line of it's Lines -- result will be padded at the beginning with P-1 white space characters -- (Ascii.' ' or Ascii.Ht). The first character of the Element's image will -- thus begin at character P of the string for the first Line. Due to the This comment only mentions the Element's Span, which may be different from the The_Span argument in the case of the second Lines function (20.19) or the implicit span defined by First_Line and Last_Line in the case of the third Lines function (20.20). So strictly speaking, the precision provided by this comment does not apply to Lines (20.19) and so the question whether the first line returned by Lines (20.19) should be padded with The_Span.First_Column - 1 white spaces is not answered. Regards, -- Alain Le Guennec, ENST de Bretagne From Alain.LeGuennec@enst-bretagne.fr Tue May 27 10:17:04 1997 Return-Path: Received: from ida.org by cronus.csed.ida.org (SMI-8.6/SMI-SVR4) id KAA09250; Tue, 27 May 1997 10:17:04 -0400 Received: from sw-eng.falls-church.va.us (ns1.sw-eng.falls-church.va.us) by ida.org (4.1/SMI-4.1) id AA26075; Tue, 27 May 97 10:17:44 EDT Received: from audrey.enst-bretagne.fr by sw-eng.falls-church.va.us (8.7.1/) id OAA17728; Tue, 27 May 1997 14:10:34 GMT Received: from huygens.enst-bretagne.fr (huygens.enst-bretagne.fr [192.44.75.121]) by audrey.enst-bretagne.fr (8.8.5/8.8.5) with SMTP id QAA41628 for ; Tue, 27 May 1997 16:13:04 +0200 Received: by huygens.enst-bretagne.fr (SMI-8.6/SMI-SVR4) id QAA02231; Tue, 27 May 1997 16:13:03 +0200 To: ASIS-Comment@sw-eng.falls-church.va.us Subject: Inconsistency in Asis.Text.First_Line_Number spec. From: Alain Le Guennec Date: 27 May 1997 16:13:02 +0200 Message-Id: Lines: 25 X-Mailer: Gnus v5.4.55/Emacs 19.34 Content-Length: 1091 Status: OR !topic Inconsistency in Asis.Text.First_Line_Number spec. !reference ASIS 95-20.8 !from Alain Le Guennec 97-05-27 !keywords First_Line_Number Constraint_Error !discussion --------------------------------------------------------------------------------------- -- Subclause 20.8 function First_Line_Number --------------------------------------------------------------------------------------- function First_Line_Number (Element : in Asis.Element) return Line_Number_Positive; --------------------------------------------------------------------------------------- -- Element - Specifies the element to query -- -- Returns the first line number on which the text of the element resides. -- -- Returns 0 if not Is_Text_Available(Element). ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Since the result type is now Line_Number_Positive, this is bound to raise a Constraint_Error, which is not allowed for any ASIS query. Maybe the change from Line_Number to Line_Number_Positive was not a good idea after all ? (I was the one who suggested it...) From Peter.Hermann@csv.ICA.Uni-Stuttgart.DE Fri Mar 7 10:35:32 1997 Return-Path: Received: from ida.org by cronus.csed.ida.org (SMI-8.6/SMI-SVR4) id KAA21641; Fri, 7 Mar 1997 10:35:31 -0500 Received: from sw-eng.falls-church.va.us (ns1.sw-eng.falls-church.va.us) by ida.org (4.1/SMI-4.1) id AA26016; Fri, 7 Mar 97 10:34:56 EST Received: from noc.belwue.de by sw-eng.falls-church.va.us (8.7.1/) id OAA20740; Fri, 7 Mar 1997 14:30:48 GMT Received: from iris1.csv.ICA.Uni-Stuttgart.DE (iris1.csv.ica.uni-stuttgart.de [129.69.118.2]) by noc.belwue.de (8.8.5/8.8.5) with ESMTP id PAA18647 for ; Fri, 7 Mar 1997 15:33:29 +0100 (MET) Received: from iris14.csv.ica.uni-stuttgart.de by iris1.csv.ICA.Uni-Stuttgart.DE via ESMTP (8.8.3/BelWue-1.2SGI+) (for ) id OAA06488; Fri, 7 Mar 1997 14:33:26 GMT Received: by iris14.csv.ica.uni-stuttgart.de (8.8.3/BelWue-1.0SG(subsidiary)) (for asis-technical@sw-eng.falls-church.va.us) id OAA15937; Fri, 7 Mar 1997 14:34:50 GMT From: Peter.Hermann@csv.ICA.Uni-Stuttgart.DE (Peter Hermann) Message-Id: <199703071434.OAA15937@iris14.csv.ica.uni-stuttgart.de> Subject: Re: A comment about Asis.Text.Lines (ASIS-2.0.L) To: asis-technical@sw-eng.falls-church.va.us Date: Fri, 7 Mar 1997 15:34:50 +0100 (MEZ) In-Reply-To: <199703071356.OAA27430@Xantia.DoCS.UU.SE> from "Alain Le Guennec" at Mar 7, 97 02:56:26 pm Content-Type: text Content-Length: 1731 Status: OR What about a null range given intentionally from a machine-generated "customer"? I always tend to prefer omission of special handling of "special cases". This makes many applications much much easier. > The specification for one of the Asis.Text.Lines functions reads : > ------------------------------------------------------------------- > -- Section 20.20 function Lines > ------------------------------------------------------------------- > function Lines (Element : in Asis.Element; > First_Line : in Line_Number; > Last_Line : in Line_Number) return Line_List; > > ------------------------------------------------------------------- > -- Element - Specifies the element to query > -- First_Line - Specifies the first line to return > -- Last_Line - Specifies the last line to return > > > Shouldn't First_Line be of type Line_Number_Positive > instead of simply Line_Number, since a line number equal to 0 > is supposed to be an invalid line number by definition ? > Section 20.2 says : > -- > -- Line_Number = 0 is reserved to act as an "invalid" Line_Number value. No > -- unit text line will ever have a Line_Number of zero. > > > > -- > Alain Le Guennec, 3rd year student at ENST de Bretagne (Telecom Bretagne). > ENST de Bretagne (France) : Uppsala University (SWEDEN) : > mailto:Alain.LeGuennec@enst-bretagne.fr mailto:alainlg@Kay.docs.uu.se > http://www-eleves.enst-bretagne.fr/~leguenne http://www.docs.uu.se/~alainlg > -- Peter Hermann Tel:+49-711-685-3611 Fax:3758 ph@csv.ica.uni-stuttgart.de Pfaffenwaldring 27, 70569 Stuttgart Uni Computeranwendungen Team Ada: "C'mon people let the world begin" (Paul McCartney) From sblake@alsys.com Tue Mar 11 11:21:27 1997 Return-Path: Received: from ida.org by cronus.csed.ida.org (SMI-8.6/SMI-SVR4) id LAA29720; Tue, 11 Mar 1997 11:21:27 -0500 Received: from sw-eng.falls-church.va.us (ns1.sw-eng.falls-church.va.us) by ida.org (4.1/SMI-4.1) id AA16499; Tue, 11 Mar 97 11:21:44 EST Received: from gw.alsys.com by sw-eng.falls-church.va.us (8.7.1/) id PAA21459; Tue, 11 Mar 1997 15:57:07 GMT Received: from rasht.alsys.com (mailhub.alsys.com) by gw.alsys.com (4.1/SMI-4.1.1) id AA07650; Tue, 11 Mar 97 08:00:08 PST Received: from puumba.telesoft by rasht.alsys.com (4.1/TS-1.2c) id AA14494; Tue, 11 Mar 97 07:59:14 PST Received: by puumba.telesoft (SMI-8.6/SMI-SVR4) id HAA12283; Tue, 11 Mar 1997 07:59:12 -0800 Date: Tue, 11 Mar 1997 07:59:12 -0800 From: sblake@alsys.com (Steve Blake @pulsar) Message-Id: <199703111559.HAA12283@puumba.telesoft> To: alainlg@Minsk.DoCS.UU.SE, asis-technical@sw-eng.falls-church.va.us Subject: Re: A comment about Asis.Text.Lines (ASIS-2.0.L) Content-Length: 1051 Status: OR >Shouldn't First_Line be of type Line_Number_Positive >instead of simply Line_Number, since a line number equal to 0 >is supposed to be an invalid line number by definition ? >Section 20.2 says : >-- >-- Line_Number = 0 is reserved to act as an "invalid" Line_Number value. No >-- unit text line will ever have a Line_Number of zero. A value of 0 for First_Line should raise Asis_Inappropriate_Line_Number: -- Raises Asis_Inappropriate_Line_Number if the Span defines a Nil_Span or a -- line whose number is outside the range of text lines that can be accessed -- through the element. I'd suggest clearly stating that by modifying the commentary: -- Raises Asis_Inappropriate_Line_Number if the Span defines a Nil_Span or a -- line whose number is invalid or outside the range of text lines that can -- be accessed through the element. The purpose of this query is to harvest lines before, after, or between elements. These lines might contain comments whose position or content has some semantic value. A PDL is an example. Steve Blake From alainlg@student.DoCS.UU.SE Fri Mar 7 09:19:16 1997 Return-Path: Received: from ida.org by cronus.csed.ida.org (SMI-8.6/SMI-SVR4) id JAA21588; Fri, 7 Mar 1997 09:19:16 -0500 Received: from sw-eng.falls-church.va.us (ns1.sw-eng.falls-church.va.us) by ida.org (4.1/SMI-4.1) id AA24418; Fri, 7 Mar 97 09:18:26 EST Received: from veda.DoCS.UU.SE by sw-eng.falls-church.va.us (8.7.1/) id NAA19465; Fri, 7 Mar 1997 13:53:49 GMT Received: from Xantia.DoCS.UU.SE (Xantia.DoCS.UU.SE [130.238.8.76]) by veda.DoCS.UU.SE (8.6.12/8.6.12) with ESMTP id OAA15114 for ; Fri, 7 Mar 1997 14:56:28 +0100 Received: (alainlg@localhost) by Xantia.DoCS.UU.SE (8.6.12/8.6.12) id OAA27430; Fri, 7 Mar 1997 14:56:26 +0100 Date: Fri, 7 Mar 1997 14:56:26 +0100 Message-Id: <199703071356.OAA27430@Xantia.DoCS.UU.SE> From: Alain Le Guennec To: asis-technical@sw-eng.falls-church.va.us Subject: A comment about Asis.Text.Lines (ASIS-2.0.L) Content-Length: 1267 Status: OR The specification for one of the Asis.Text.Lines functions reads : ------------------------------------------------------------------- -- Section 20.20 function Lines ------------------------------------------------------------------- function Lines (Element : in Asis.Element; First_Line : in Line_Number; Last_Line : in Line_Number) return Line_List; ------------------------------------------------------------------- -- Element - Specifies the element to query -- First_Line - Specifies the first line to return -- Last_Line - Specifies the last line to return Shouldn't First_Line be of type Line_Number_Positive instead of simply Line_Number, since a line number equal to 0 is supposed to be an invalid line number by definition ? Section 20.2 says : -- -- Line_Number = 0 is reserved to act as an "invalid" Line_Number value. No -- unit text line will ever have a Line_Number of zero. -- Alain Le Guennec, 3rd year student at ENST de Bretagne (Telecom Bretagne). ENST de Bretagne (France) : Uppsala University (SWEDEN) : mailto:Alain.LeGuennec@enst-bretagne.fr mailto:alainlg@Kay.docs.uu.se http://www-eleves.enst-bretagne.fr/~leguenne http://www.docs.uu.se/~alainlg