comp.lang.ada
 help / color / mirror / Atom feed
From: James Alan Farrell <jfarrell@nospam.com>
Subject: Re: Question on use of ! instead of |
Date: Thu, 23 Jun 2005 09:00:57 -0400
Date: 2005-06-23T09:00:57-04:00	[thread overview]
Message-ID: <42bab2e1$1_3@newsfeed.slurp.net> (raw)
In-Reply-To: <d9cp3h$vcl$1@news.ya.com>

[-- Attachment #1: Type: text/plain, Size: 1516 bytes --]

Manuel G. R. wrote:
> James Alan Farrell wrote:
> 
>> According to ASIS, "A!B" is an identifier.  If I put spaces around the 
>> ! then A and B are identifiers and things work the way I expect, and 
>> if I replace the ! with a | again things work the way I expect.
>>
>> Could this be a bug in the compiler or in ASIS?
> 
> 
> In ASIS for GNAT, I think.
> 

I was thinking about this last night.  Seems the parser needs to 
determine where the identifier begins and ends (the lexer actually), so 
that needs to be saying the three characters are the identifier.  The 
bug has to be here (well before ASIS gets involved).

But if that were the case, it should fail with an error that A!B is 
undefined.  So it appears that there is a second place place where the 
delimiter is looked for - when the declaration of A is looked up.

Now there's a subtlety with this test case:  A and B are parameters to a 
variant record.  But nothing in the record depends on B.  So if B is not 
set, executable code would be produced that still produces the expected 
output, and the ACATS test could still pass.

>>
>> I couldn't find ! in the ARM.  It's supposed to be a direct 
>> replacement for |, correct?  (ie, they should work the same 
>> semantically and syntactically?)
>>
> 
> Yes, they should. This is one of the obsolescent features in Ada 95: "A 
> vertical line character (|) can be replaced by an exclamation mark (!) 
> where used as a delimiter."
> 
> http://www.adaic.com/standards/95lrm/html/RM-J-2.html
> 
> 


[-- Attachment #2: jfarrell.vcf --]
[-- Type: text/x-vcard, Size: 88 bytes --]

begin:vcard
fn:James Alan Farrell
n:Farrell;James
org:GrammaTech
version:2.1
end:vcard


  reply	other threads:[~2005-06-23 13:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-06-22 13:35 Question on use of ! instead of | James Alan Farrell
2005-06-22 22:35 ` Manuel G. R.
2005-06-23 13:00   ` James Alan Farrell [this message]
2005-06-23  1:27 ` Steve
replies disabled

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