From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: Ada grammar rules for names too permissive?
Date: Sat, 5 Jan 2019 02:45:26 -0600
Date: 2019-01-05T02:45:26-06:00 [thread overview]
Message-ID: <q0pqr6$u5t$1@franka.jacob-sparre.dk> (raw)
In-Reply-To: q0n77h$2e4$1@gioia.aioe.org
"Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> wrote in message
news:q0n77h$2e4$1@gioia.aioe.org...
> On 2019-01-03 23:39, olivermkellogg@gmail.com wrote:
>> On Tuesday, January 1, 2019 at 9:44:17 AM UTC+1, Dmitry A. Kazakov wrote:
>>> [...]
>>> Never push semantic rules into syntax.
>>
>> I'm not so sure about that:
>> A nice feature of ANTLR is that is supports semantic predicates which can
>> be embedded in the grammar.
>> For example, using sem preds on the basis of symbol tables would permit
>> discerning among indexed_component, type_conversion, function_call.
>
> In presence of overloading, really? Anyway, I see no use in such a
> distinction in general.
Right. That might work in other languages, but in Ada that is a very complex
algorithm. You'd think that the lack of object overloading would help, and
it does, but not enough, since you can have a function that returns an array
that is then indexed, as opposed to a function that returns an
access-to-function. They both could look like:
F (1) (2)
And you don't want the grammar to be too smart, simply because hand-written
error messages are almost always better than automatically generated ones,
once you get past the trivial (missing punctuation).
Randy.
next prev parent reply other threads:[~2019-01-05 8:45 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-29 18:20 Ada grammar rules for names too permissive? olivermkellogg
2018-12-31 21:45 ` Randy Brukardt
2019-01-01 8:44 ` Dmitry A. Kazakov
2019-01-01 19:49 ` Stephen Leake
2019-01-01 20:42 ` Dmitry A. Kazakov
2019-01-02 19:21 ` Stephen Leake
2019-01-02 20:47 ` Dmitry A. Kazakov
2019-01-03 21:45 ` Stephen Leake
2019-01-03 22:34 ` Jere
2019-01-05 18:46 ` Stephen Leake
2019-01-07 11:11 ` J-P. Rosen
2019-01-08 18:58 ` Stephen Leake
2019-01-04 8:53 ` Dmitry A. Kazakov
2019-01-03 22:39 ` olivermkellogg
2019-01-04 8:58 ` Dmitry A. Kazakov
2019-01-05 8:45 ` Randy Brukardt [this message]
2019-01-05 18:50 ` Stephen Leake
2019-01-01 19:46 ` olivermkellogg
2019-01-03 22:36 ` Randy Brukardt
2019-01-01 19:46 ` Stephen Leake
2019-01-01 21:03 ` olivermkellogg
2019-01-02 19:42 ` Stephen Leake
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox