[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Syntax failure with pragma
From: |
Simon Wright |
Subject: |
Re: Syntax failure with pragma |
Date: |
Wed, 25 Aug 2021 10:09:37 +0100 |
On 17 Aug 2021, at 23:30, Stephen Leake <stephen_leake@stephe-leake.org> wrote:
>
> Simon Wright <simon.j.wright@mac.com> writes:
>
>> On 30 Jul 2021, at 20:02, Stephen Leake <stephen_leake@stephe-leake.org>
>> wrote:
>>>
>>> Simon Wright <simon.j.wright@mac.com <mailto:simon.j.wright@mac.com>>
>>> writes:
>>>
>>>> Ada-mode doesn't accept this code
>>>>
>>>> with Ada.Real_Time.Timing_Events;
>>>> package Pragma_In_PO is
>>>>
>>>> protected type Flasher_Handler is
>>>> pragma Interrupt_Priority;
>>>> procedure Turn_Off_The_LED
>>>> (Event : in out Ada.Real_Time.Timing_Events.Timing_Event);
>>>> end Flasher_Handler;
>>>>
>>>> end Pragma_In_PO;
>>>>
>>>> C-c C-f says
>>>>
>>>> wisi syntax errors
>>>> pragma_in_po.ads:2:8: match name error
>>>
>>> Works in my bleeding-edge devel version, which uses a very much changed
>>> Ada grammar file (I started over from LRM Annex P, so I could ensure I
>>> got all the Ada 202x stuff). Which is many months away from release, at the
>>> rate I'm going.
>>
>> Works in 7.1.7, thanks.
>
> Hmm. That's probably because the default for ada-end-name-optional
> changed to t, so it doesn't ever report "match name error". Try setting
> ada-end-name-optional to nil.
I tried it both ways, and the pragma was accepted in either case.
Further: if I leave the end block name out altogether, C-c C-f reports the
pragma in either case. If the end block name is present but doesn't match, C-c
C-f reports the end block name in either case. If I comment out the pragma and
leave the end block name blank, C-c C-f reports the 'procedure'.
Still, if I 'do the right thing', it's all good!