diff options
author | Bob Duff <duff@adacore.com> | 2017-01-06 11:56:16 +0000 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2017-01-06 12:56:16 +0100 |
commit | 533e3abc48268dd8eee0c63ddcf133e7a14b370d (patch) | |
tree | e8e7f4a54bb69880fbcb93c3100b1f285bc23820 /gcc/ada/scans.ads | |
parent | a62e6287d91309dd07957739d5a000fc0b0073c9 (diff) | |
download | gcc-533e3abc48268dd8eee0c63ddcf133e7a14b370d.zip gcc-533e3abc48268dd8eee0c63ddcf133e7a14b370d.tar.gz gcc-533e3abc48268dd8eee0c63ddcf133e7a14b370d.tar.bz2 |
snames.ads-tmpl (Renamed): New name for the pragma argument.
2017-01-06 Bob Duff <duff@adacore.com>
* snames.ads-tmpl (Renamed): New name for the pragma argument.
* par-ch2.adb: Allow the new pragma (with analysis deferred
to Sem_Prag).
* sinfo.ads, sinfo.adb (Map_Pragma_Name, Pragma_Name_Mapped):
Keep a mapping from new pragma names to old names.
* sem_prag.adb: Check legality of pragma Rename_Pragma, and
implement it by calling Map_Pragma_Name.
* checks.adb, contracts.adb, einfo.adb, errout.adb,
* exp_attr.adb, exp_ch3.adb, exp_ch6.adb, exp_ch7.adb, exp_ch9.adb,
* exp_prag.adb, exp_util.adb, freeze.adb, frontend.adb, ghost.adb,
* inline.adb, lib-writ.adb, scans.adb, scans.ads, sem_attr.adb,
* sem_aux.adb, sem_ch10.adb, sem_ch13.adb, sem_ch6.adb, sem_ch9.adb,
* sem_elab.adb, sem_res.adb, sem_util.adb, sem_util.ads,
* sem_warn.adb: Call Pragma_Name_Mapped instead of Pragma_Name
as appropriate.
From-SVN: r244144
Diffstat (limited to 'gcc/ada/scans.ads')
-rw-r--r-- | gcc/ada/scans.ads | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/gcc/ada/scans.ads b/gcc/ada/scans.ads index 682bb6c..afbdf96 100644 --- a/gcc/ada/scans.ads +++ b/gcc/ada/scans.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2014, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2016, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -45,10 +45,6 @@ package Scans is -- The class column in this table indicates the token classes which -- apply to the token, as defined by subsequent subtype declarations. - -- Note: Namet.Is_Keyword_Name depends on the fact that the first entry in - -- this type declaration is *not* for a reserved word. For details on why - -- there is this requirement, see Initialize_Ada_Keywords below. - type Token_Type is ( -- Token name Token type Class(es) @@ -228,6 +224,11 @@ package Scans is -- No_Token is used for initializing Token values to indicate that -- no value has been set yet. + function Keyword_Name (Token : Token_Type) return Name_Id; + -- Given a token that is a reserved word, return the corresponding Name_Id + -- in lower case. E.g. Keyword_Name (Tok_Begin) = Name_Find ("begin"). + -- It is an error to pass any other kind of token. + -- Note: in the RM, operator symbol is a special case of string literal. -- We distinguish at the lexical level in this compiler, since there are -- many syntactic situations in which only an operator symbol is allowed. |