comp.lang.ada
 help / color / mirror / Atom feed
From: Stephen Leake <stephen_leake@stephe-leake.org>
Subject: Re: Ada grammar rules for names too permissive?
Date: Sat, 5 Jan 2019 10:50:56 -0800 (PST)
Date: 2019-01-05T10:50:56-08:00	[thread overview]
Message-ID: <10f539a0-0ec7-4437-8609-ab742be97011@googlegroups.com> (raw)
In-Reply-To: <78b94e7e-521b-46c4-8975-1f4c6afbb4b5@googlegroups.com>

On Thursday, January 3, 2019 at 2:39:12 PM UTC-8, oliverm...@gmail.com wrote:
> 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.

That could be useful for colorization; Emacs Ada-mode takes a simplistic approach to coloring identifiers.

libadalang takes a different approach; it does some semantic analysis after parsing, including name resolution.

> The interesting question IMO is:
> What are the necessary transformations for going from Annex P BNF plus informal description of semantic rules to the actual implementation grammar.

That totally depends on the purpose of the implementation. A compiler has very different requirements from an IDE engine.

-- Stephe

  parent reply	other threads:[~2019-01-05 18:50 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
2019-01-05 18:50       ` Stephen Leake [this message]
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