From: Ted Dennison<dennison@telepath.com>
Subject: Re: Ada95 BNF
Date: Wed, 09 May 2001 13:47:49 GMT
Date: 2001-05-09T13:47:49+00:00 [thread overview]
Message-ID: <9UbK6.7578$vg1.620956@www.newsranger.com> (raw)
In-Reply-To: 3af8ded6$1@pull.gecm.com
In article <3af8ded6$1@pull.gecm.com>, Martin Dowie says...
>
>Fair enough, but I still thnk it is strange that it
>wasn't defined along the lines of:
>
>defining_program_unit_name ::=
> [ parent_unit_name "." ] defining_identifier
>
>parent_unit_name ::=
> identifier
>
>given that "identifier" already exists and can be
>navigated to through the existing definitions in
>about 2 clicks and by-passing all the 'invalid'
>options anyway...
>
>:-)
>
>
>Tucker Taft <stt@averstar.com> wrote in message
>news:3AF80887.F8942BE3@averstar.com...
>> Martin Dowie wrote:
>> >
>> > Ok... this seems a little strange to me - but if those are the rules!
>:-)
>> >
>> > Is it really that hard to come up with a BNF that does actually match
>> > what the language does allow?
>>
>> In many cases it is preferable to make the BNF somewhat
>> "looser" than the "official" grammar, and then do the
>> checking as part of semantic checking, because the errors
>> tend to be handled a bit more gracefully. In addition,
>> in Ada, there are constructs which look identical
>> syntactically but which are distinct semantically, such
>> as a type conversion and an array indexing. The grammar
>> in the LRM distinguishes these, whereas the grammar used
>> for an LR parser can't, since an LR parser requires that
>> the grammar be context-free (i.e. independent of the
>> "meaning" of particular identifiers).
>>
>> --
>> -Tucker Taft stt@avercom.net http://www.averstar.com/~stt/
>> Chief Technology Officer, AverCom Corporation (A Titan Company)
>> Burlington, MA USA (AverCom was formerly the Commercial Division of
>AverStar:
>> http://www.averstar.com/services/ebusiness_applications.html)
>
>
---
T.E.D. homepage - http://www.telepath.com/dennison/Ted/TED.html
home email - mailto:dennison@telepath.com
next prev parent reply other threads:[~2001-05-09 13:47 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-05-03 12:23 Ada95 BNF Martin Dowie
2001-05-03 16:24 ` Stephen Leake
2001-05-03 19:18 ` Martin Dowie
2001-05-04 9:27 ` Marius Amado Alves
2001-05-08 14:53 ` Tucker Taft
2001-05-09 6:18 ` Martin Dowie
2001-05-09 13:47 ` Ted Dennison [this message]
-- strict thread matches above, loose matches on Subject: below --
2001-05-04 5:48 Christoph Grein
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox