comp.lang.ada
 help / color / mirror / Atom feed
* SPARK syntax and “use type” : lack of feature ?
@ 2010-05-24 18:41 Yannick Duchêne (Hibou57)
  2010-05-24 23:01 ` Phil Thornley
  0 siblings, 1 reply; 8+ messages in thread
From: Yannick Duchêne (Hibou57) @ 2010-05-24 18:41 UTC (permalink / 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 ?



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2010-05-26 10:28 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-05-24 18:41 SPARK syntax and “use type” : lack of feature ? Yannick Duchêne (Hibou57)
2010-05-24 23:01 ` 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)

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