(j3.2006) (SC22WG5.5689) [ukfortran] AW: RE: F08/C201

Van Snyder Van.Snyder
Mon Mar 28 18:43:00 EDT 2016


It was proposed to delete the four syntax terms mentioned in C201 from
<action-stmt>, and then delete C201, in 06-188r1.  The only place this
has effect in 16-007, as far as I can tell, is in 1.3.134.2, where those
four statements would need to be mentioned explicitly.  Subgroup A chose
to take no action, without explanation.

On Thu, 2016-03-17 at 14:54 +0900, Cohen Malcolm wrote:
> The way that the end statements are counted in <action-stmt> and C201 
> excludes them from appearing as executable constructs is at best confusing, 
> whether it is technically wrong or not.
> 
> FWIW, on close examination I do think it probably is technically wrong, as 
> the end statement (does not need "subroutine" - that is an optional keyword 
> in this context) in the interface body in the BLOCK construct is indeed 
> reached via executable-construct.
> 
> Not that a compiler is likely to take that interpretation.
> 
> This could be patched by modifying C201, but since this looks like a very 
> confusing way of describing the grammer anyway, I would be more in favour of 
> getting the end statements out of action-stmt and inserting them as 
> necessary elsewhere, unless that turns out to be more difficult than it 
> looks.  We would certainly want to be very careful how we change this 
> otherwise the chance of incidental BNF breakage would be quite high.
> 
> Cheers,
> 
> -----Original Message----- 
> From: Robert Corbett
> Sent: Wednesday, March 16, 2016 9:04 PM
> To: fortran standards email list for J3
> Cc: Forcheck ; Bader, Reinhold ; 'WG5'
> Subject: [ukfortran] (SC22WG5.5686) (j3.2006) AW: RE: F08/C201
> 
> On 03/16/16 00:46, Bader, Reinhold wrote:
> > Hi Erik,
> >
> > my impression is that C201 only closes a hole that would otherwise permit 
> > improper nesting of statements with respect to executable constructs, 
> > e.g.,
> >
> > block
> >     ...
> >     end subroutine
> > end block
> >
> > Cheers
> > Reinhold
> >
> 
> You and Erik raise a fair point.  Constraint C201 has the same effect on the
> syntax as would be achieved by deleting the alternatives 
> /end-function-stmt/,
> /end-mp-subprogram-stmt/, /end-program-stmt/, and /end-subroutine-stmt/ from
> rule R214 (rule R215 of 16-007), which is the syntax definition of an
> /action-stmt/.  I suspect that the intended purpose of including those
> alternatives is to indicate that those forms of END statements are 
> executable
> constructs.  That does not work, because none of the cases where one of 
> those
> forms of END statements is produced by the grammar are derived (indirectly) 
> from
> the syntax term /executable-construct/ because of the constraint.
> 
> Robert Corbett
> 
> _______________________________________________
> ukfortran mailing list
> http://lists.accu.org/mailman/listinfo/ukfortran
> 





More information about the J3 mailing list