unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Ludovic Brenta <ludovic@ludovic-brenta.org>
To: 36788@debbugs.gnu.org
Cc: ada-mode-users@nongnu.org
Subject: bug#36788: 26.1; ada-mode 6.0.0 should support function expressions returning aggregates directly
Date: Wed, 24 Jul 2019 18:13:56 +0200	[thread overview]
Message-ID: <ee6643380310923989a505ff15d61b64@ludovic-brenta.org> (raw)

Package: emacs, ada-mode
X-Debbugs-CC: ada-mode-users@nongnu.org
Severity: minor

Hello,

ada_mode_wisi_lr1_parse.exe does not follow AI12-0157[1], which allows
a function expression to return an aggregate directly as opposed to
an aggregate enclosed in an extra pair of parentheses:

package P is
    type T is null record;
    function F return T is (null record);
end P;

ada-mode 6.0 and later (checked with 6.1.1) show red exclamation marks
in the margin at function F.  C-c C-f says:

p.adb:3:51: syntax error: expecting BEGIN, ENTRY, FOR, FUNCTION, 
GENERIC, NOT, OVERRIDING, PACKAGE, PRAGMA, PROCEDURE, PROTECTED, 
SUBTYPE, TASK, TYPE, USE, IDENTIFIER, found 'LEFT_PAREN'

Changing the line to

    function F return T is ((null record));

removes the parsing error.

I know that GNAT Pro has had support for AI12-0157 for at least
a couple of years and I'm pretty sure the latest GNAT GPL Edition
has it too.

[1] 
http://www.ada-auth.org/cgi-bin/cvsweb.cgi/ai12s/ai12-0157-1.txt?rev=1.6

-- 
Ludovic Brenta.





             reply	other threads:[~2019-07-24 16:13 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-24 16:13 Ludovic Brenta [this message]
2019-08-18 17:00 ` bug#36788: Fixed in ada-mode 6.2.1 Stephen Leake
2019-12-14 18:02 ` bug#36788: closed by " Stephen Leake

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ee6643380310923989a505ff15d61b64@ludovic-brenta.org \
    --to=ludovic@ludovic-brenta.org \
    --cc=36788@debbugs.gnu.org \
    --cc=ada-mode-users@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).