From Alain.LeGuennec@enst-bretagne.fr Fri Mar 14 08:26:04 1997 Return-Path: Received: from ida.org by cronus.csed.ida.org (SMI-8.6/SMI-SVR4) id IAA07054; Fri, 14 Mar 1997 08:26:03 -0500 Received: from by ida.org (4.1/SMI-4.1) id AB08584; Fri, 14 Mar 97 08:23:28 EST Received: from audrey.enst-bretagne.fr by sw-eng.falls-church.va.us (8.7.1/) id MAA04047; Fri, 14 Mar 1997 12:47:58 GMT Received: from cramer.enst-bretagne.fr (cramer.enst-bretagne.fr [192.44.75.91]) by audrey.enst-bretagne.fr (8.8.5/8.8.5) with SMTP id NAA03359 for ; Fri, 14 Mar 1997 13:49:42 +0100 Received: by cramer.enst-bretagne.fr (SMI-8.6/SMI-SVR4) id NAA07093; Fri, 14 Mar 1997 13:49:42 +0100 Date: Fri, 14 Mar 1997 13:49:42 +0100 Message-Id: <199703141249.NAA07093@cramer.enst-bretagne.fr> From: Alain Le Guennec To: ASIS-Comment@sw-eng.falls-church.va.us Subject: Asis and statements' labels : a proposal to make things clearer Content-Length: 2290 Status: OR !topic Asis and statements'labels !from Alain Le Guennec !keywords label !discussion In the current ASIS draft, there is no way to query the _whole_ label attached to a statement, only label names through the query Asis.Statements.Label_Names. Now consider the two following (a bit pathological) examples : procedure Sample1 is begin << -- << inside comment :-) label_name >> null; end Sample1; procedure Sample2 is begin loop_name -- : inside comment :-) : loop null; end loop loop_name; end Sample2; Now if one wants (for example in a style-checker application) to get the _whole_ image corresponding to a label, there is no other way than getting the image of the whole statement, then manually parse to extract the relevant part. The Element_Image returned for A_Defining_Identifier corresponding to a label will only give the label_name, not the full text between '<<' and '>>' (or not until the ':' for loops and blocks identifier.) After reading the relevant part of the RM, I definitely think that labels (for gotos, loops and blocks) are an independant 'syntaxic construct' which has no counter-part in Asis. I think there is simply a missing Asis.Element_Kind : A_Label which could then be further qualified as Label_Kinds : - Not_A_Label - A_Statement_Label - A_Loop_Identifier_Label - A_Block_Identifier_Label (the fact that a statement label and a loop identifier can not have the same name in a given sub-program clearly suggests that they are of the same kind: A_Label.) With this new category, there wouldn't be any more ambiguities about what to return as an Element_Image. And there would be one more structural query to return the label name of A_Label element. Asis.Statements.Label_Names would have to be renamed Asis.Statements.Labels which should return a list of A_Label elements instead of a list of A_Defining_Identifier elements. I would really appreciate any comment about this proposal. Regards, Alain. -- 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 sblake@alsys.com Mon Mar 17 09:25:22 1997 Return-Path: Received: from ida.org by cronus.csed.ida.org (SMI-8.6/SMI-SVR4) id JAA11180; Mon, 17 Mar 1997 09:25:21 -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 AA16115; Mon, 17 Mar 97 09:25:48 EST Received: from wormhole.mtc.iitri.com by sw-eng.falls-church.va.us (8.7.1/) id OAA11918; Mon, 17 Mar 1997 14:19:34 GMT Received: from gw.alsys.com by mtc.iitri.com (4.1/3.1.090690-IITRI-MTC) id AA17019; Mon, 17 Mar 97 01:43:56 EST Received: from rasht.alsys.com (mailhub.alsys.com) by gw.alsys.com (4.1/SMI-4.1.1) id AA12886; Sun, 16 Mar 97 08:16:40 PST Received: from puumba.telesoft by rasht.alsys.com (4.1/TS-1.2c) id AA15424; Sun, 16 Mar 97 08:15:44 PST Received: by puumba.telesoft (SMI-8.6/SMI-SVR4) id IAA09118; Sun, 16 Mar 1997 08:15:43 -0800 Date: Sun, 16 Mar 1997 08:15:43 -0800 From: sblake@alsys.com (Steve Blake @pulsar) Message-Id: <199703161615.IAA09118@puumba.telesoft> To: ASIS-Comment@sw-eng.falls-church.va.us, Alain.LeGuennec@enst-bretagne.fr Subject: Re: Asis and statements' labels : a proposal to make things clearer Content-Length: 3019 Status: OR Alain, it is great that you are giving such a thorough review! The A_Defining_Identifier returned from Label_Names can be used as an argument to the Asis.Text queries to get what you want here. Asis.Text.Element_Image gives the string of the label including embedded comments. Asis.Text.Lines gives a list of lines that can be queried by Asis.Text.Comment_Image. Please take a look and see if these would provide the functionality you are looking for. Regards, Steve Blake >From Alain.LeGuennec@enst-bretagne.fr Fri Mar 14 05:07:23 1997 >To: ASIS-Comment@sw-eng.falls-church.va.us >Subject: Asis and statements' labels : a proposal to make things clearer > >!topic Asis and statements'labels >!from Alain Le Guennec >!keywords label >!discussion > >In the current ASIS draft, there is no way to query >the _whole_ label attached to a statement, >only label names through the query Asis.Statements.Label_Names. > >Now consider the two following (a bit pathological) examples : > >procedure Sample1 is >begin > << -- << inside comment :-) > label_name >> null; >end Sample1; > >procedure Sample2 is >begin > loop_name -- : inside comment :-) > : > loop > null; > end loop loop_name; >end Sample2; > > >Now if one wants (for example in a style-checker application) >to get the _whole_ image corresponding to a label, >there is no other way than getting the image of the whole >statement, then manually parse to extract the relevant part. > >The Element_Image returned for A_Defining_Identifier >corresponding to a label will only give the label_name, >not the full text between '<<' and '>>' (or not until the ':' >for loops and blocks identifier.) > >After reading the relevant part of the RM, I definitely >think that labels (for gotos, loops and blocks) are >an independant 'syntaxic construct' which has no counter-part in Asis. > >I think there is simply a missing Asis.Element_Kind : A_Label >which could then be further qualified as Label_Kinds : > - Not_A_Label > - A_Statement_Label > - A_Loop_Identifier_Label > - A_Block_Identifier_Label > >(the fact that a statement label and a loop identifier can not have >the same name in a given sub-program clearly suggests that they are >of the same kind: A_Label.) > >With this new category, there wouldn't be any more ambiguities >about what to return as an Element_Image. And there would be one >more structural query to return the label name of A_Label element. >Asis.Statements.Label_Names would have to be renamed Asis.Statements.Labels >which should return a list of A_Label elements instead of a list >of A_Defining_Identifier elements. > > >I would really appreciate any comment about this proposal. > >Regards, > > Alain. -- 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