Home | History | Annotate | Line # | Download | only in gcc
spellcheck.h revision 1.1
      1  1.1  mrg /* Find near-matches for strings and identifiers.
      2  1.1  mrg    Copyright (C) 2015-2016 Free Software Foundation, Inc.
      3  1.1  mrg 
      4  1.1  mrg This file is part of GCC.
      5  1.1  mrg 
      6  1.1  mrg GCC is free software; you can redistribute it and/or modify it under
      7  1.1  mrg the terms of the GNU General Public License as published by the Free
      8  1.1  mrg Software Foundation; either version 3, or (at your option) any later
      9  1.1  mrg version.
     10  1.1  mrg 
     11  1.1  mrg GCC is distributed in the hope that it will be useful, but WITHOUT ANY
     12  1.1  mrg WARRANTY; without even the implied warranty of MERCHANTABILITY or
     13  1.1  mrg FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
     14  1.1  mrg for more details.
     15  1.1  mrg 
     16  1.1  mrg You should have received a copy of the GNU General Public License
     17  1.1  mrg along with GCC; see the file COPYING3.  If not see
     18  1.1  mrg <http://www.gnu.org/licenses/>.  */
     19  1.1  mrg 
     20  1.1  mrg #ifndef GCC_SPELLCHECK_H
     21  1.1  mrg #define GCC_SPELLCHECK_H
     22  1.1  mrg 
     23  1.1  mrg typedef unsigned int edit_distance_t;
     24  1.1  mrg const edit_distance_t MAX_EDIT_DISTANCE = UINT_MAX;
     25  1.1  mrg 
     26  1.1  mrg /* spellcheck.c  */
     27  1.1  mrg extern edit_distance_t
     28  1.1  mrg levenshtein_distance (const char *s, int len_s,
     29  1.1  mrg 		      const char *t, int len_t);
     30  1.1  mrg 
     31  1.1  mrg extern edit_distance_t
     32  1.1  mrg levenshtein_distance (const char *s, const char *t);
     33  1.1  mrg 
     34  1.1  mrg extern const char *
     35  1.1  mrg find_closest_string (const char *target,
     36  1.1  mrg 		     const auto_vec<const char *> *candidates);
     37  1.1  mrg 
     38  1.1  mrg /* spellcheck-tree.c  */
     39  1.1  mrg 
     40  1.1  mrg extern edit_distance_t
     41  1.1  mrg levenshtein_distance (tree ident_s, tree ident_t);
     42  1.1  mrg 
     43  1.1  mrg extern tree
     44  1.1  mrg find_closest_identifier (tree target, const auto_vec<tree> *candidates);
     45  1.1  mrg 
     46  1.1  mrg #endif  /* GCC_SPELLCHECK_H  */
     47