comp.lang.ada
 help / color / mirror / Atom feed
From: "Yannick Duchêne (Hibou57)" <yannick_duchene@yahoo.fr>
Subject: SPARK syntax and “use type” : lack of feature ?
Date: Mon, 24 May 2010 20:41:11 +0200
Date: 2010-05-24T20:41:11+02:00	[thread overview]
Message-ID: <op.vc73ixt2ule2fv@garhos> (raw)

Hi,

I meet a strange behavior with the SPARK syntax checker (via the examiner).

If I have something of the form

    procedure My_Procedure
    is
       Who_Know_What : Who_Know_What_Type;
       use type My_Type;
    begin
       ... bla-bla-bla ...
    end My_Procedure;

it's OK.

While if I have something like

    procedure My_Procedure
    is
       use type My_Type;
    begin
       ... bla-bla-bla ...
    end My_Procedure;

Then the spark syntax checker complains “Syntax Error reserved "IS" cannot  
be followed by "USE" here.”

So, if the “use type” comes after any kind of declaration (type or  
entity), that's OK, but if this comes at the first place, or worst, alone,  
so that it cannot be anywhere than at the first place, then it is rejected.

Strange. So much strange to me that I wonder if weither or not this is  
something which had not been seen as a possible issue.

What people here think about it ?

Is SPARK missing something or is there a rational ?



             reply	other threads:[~2010-05-24 18:41 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-24 18:41 Yannick Duchêne (Hibou57) [this message]
2010-05-24 23:01 ` SPARK syntax and “use type” : lack of feature ? Phil Thornley
2010-05-25  7:29   ` Rod Chapman
2010-05-25 20:16     ` Yannick Duchêne (Hibou57)
2010-05-25 20:05   ` Yannick Duchêne (Hibou57)
2010-05-25 23:18     ` Phil Thornley
2010-05-26  7:38       ` Rod Chapman
2010-05-26 10:28         ` Yannick Duchêne (Hibou57)
replies disabled

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