| 1 |
------------------------------------------------------------------------------ |
| 2 |
-- -- |
| 3 |
-- GNAT COMPILER COMPONENTS -- |
| 4 |
-- -- |
| 5 |
-- N A M E T - S P -- |
| 6 |
-- -- |
| 7 |
-- S p e c -- |
| 8 |
-- -- |
| 9 |
-- Copyright (C) 1992-2025, Free Software Foundation, Inc. -- |
| 10 |
-- -- |
| 11 |
-- GNAT is free software; you can redistribute it and/or modify it under -- |
| 12 |
-- terms of the GNU General Public License as published by the Free Soft- -- |
| 13 |
-- ware Foundation; either version 3, or (at your option) any later ver- -- |
| 14 |
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- |
| 15 |
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- |
| 16 |
-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -- |
| 17 |
-- for more details. You should have received a copy of the GNU General -- |
| 18 |
-- Public License distributed with GNAT; see file COPYING3. If not, go to -- |
| 19 |
-- http://www.gnu.org/licenses for a complete copy of the license. -- |
| 20 |
-- -- |
| 21 |
-- GNAT was originally developed by the GNAT team at New York University. -- |
| 22 |
-- Extensive contributions were provided by Ada Core Technologies Inc. -- |
| 23 |
-- -- |
| 24 |
------------------------------------------------------------------------------ |
| 25 |
|
| 26 |
-- This child package contains a spell checker for Name_Id values. It is |
| 27 |
-- separated off as a child package, because of the extra dependencies, |
| 28 |
-- in particular on GNAT.UTF_32_Spelling_Checker. There are a number of |
| 29 |
-- packages that use Namet that do not need the spell checking feature, |
| 30 |
-- and this separation helps in dealing with older versions of GNAT. |
| 31 |
|
| 32 |
package Namet.Sp is |
| 33 |
|
| 34 |
function Aspect_Spell_Check (Name : Name_Id) return Boolean; |
| 35 |
-- Returns True, if Name is a misspelling of some aspect name |
| 36 |
|
| 37 |
function Aspect_Spell_Check (Name : Name_Id) return Name_Id; |
| 38 |
-- Returns a possible correction, if Name is a misspelling of some aspect |
| 39 |
-- name. If not, return No_Name. |
| 40 |
|
| 41 |
function Attribute_Spell_Check (N : Name_Id) return Boolean; |
| 42 |
-- Returns True, if Name is a misspelling of some attribute name |
| 43 |
|
| 44 |
function Attribute_Spell_Check (N : Name_Id) return Name_Id; |
| 45 |
-- Returns a possible correction, if Name is a misspelling of some |
| 46 |
-- attribute name. If not, return No_Name. |
| 47 |
|
| 48 |
function Is_Bad_Spelling_Of (Found, Expect : Name_Id) return Boolean; |
| 49 |
-- Compares two identifier names from the names table, and returns True if |
| 50 |
-- Found is a plausible misspelling of Expect. This function properly deals |
| 51 |
-- with wide and wide wide character encodings in the input names. Note |
| 52 |
-- that an exact match in the names results in False being returned. |
| 53 |
|
| 54 |
end Namet.Sp; |