From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 88620 invoked by alias); 12 Dec 2015 17:02:54 -0000 Mailing-List: contact fortran-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: fortran-owner@gcc.gnu.org Received: (qmail 88603 invoked by uid 89); 12 Dec 2015 17:02:54 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.8 required=5.0 tests=AWL,BAYES_20,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-Spam-User: qpsmtpd, 2 recipients X-HELO: mail-wm0-f48.google.com Received: from mail-wm0-f48.google.com (HELO mail-wm0-f48.google.com) (74.125.82.48) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Sat, 12 Dec 2015 17:02:53 +0000 Received: by mail-wm0-f48.google.com with SMTP id p66so11312047wmp.1; Sat, 12 Dec 2015 09:02:52 -0800 (PST) X-Received: by 10.28.215.209 with SMTP id o200mr12902858wmg.31.1449939770098; Sat, 12 Dec 2015 09:02:50 -0800 (PST) Received: from [10.46.26.155] (089144228155.atnat0037.highway.a1.net. [89.144.228.155]) by smtp.gmail.com with ESMTPSA id b84sm8353217wmh.15.2015.12.12.09.02.48 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 12 Dec 2015 09:02:49 -0800 (PST) User-Agent: K-9 Mail for Android In-Reply-To: <1449623225.8490.98.camel@surprise> References: <1448974501-30981-1-git-send-email-rep.dot.nop@gmail.com> <1448974501-30981-4-git-send-email-rep.dot.nop@gmail.com> <566340AC.3050408@sfr.fr> <1449623225.8490.98.camel@surprise> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Subject: Re: [PATCH] v2 Re: [PATCH] RFC: Use Levenshtein spelling suggestions in Fortran FE From: Bernhard Reutner-Fischer Date: Sat, 12 Dec 2015 17:02:00 -0000 To: David Malcolm ,Mikael Morin CC: fortran@gcc.gnu.org,gcc-patches@gcc.gnu.org Message-ID: <27F3B40E-D717-4671-BC5A-129B57E43252@gmail.com> X-IsSubscribed: yes X-SW-Source: 2015-12/txt/msg00079.txt.bz2 On December 9, 2015 2:07:05 AM GMT+01:00, David Malcolm wrote: >I can't comment on Mikael's observations, but here's an updated version >of Bernhard's patch which moves the duplicated code into a new >"find_closest_string" function in gcc/spellcheck.c. >With that, the lookup_*_fuzzy functions are all of the form: > >{ > auto_vec candidates; > > /* call something to populate candidates e.g.: */ > lookup_function_fuzzy_find_candidates (fun, &candidates); > > return find_closest_string (fn, &candidates); >} > >where, as before, the auto_vec is implicitly cleaned up via a >C++ destructor as the function exits. Hopefully with this change it >reduces the amount of proposed C++ in the fortran subdirectory to an >palatable amount. > >That's all I did; I didn't address the other issues seen in this thread >(e.g. Mikael's notes above). > >Not yet well-tested; it compiles and passes the new test cases; I'm >posting it here in case someone more familiar with the Fortran FE wants >to take this forward (Bernhard?) I have rewritten the autovec to plain c, will send an updated patch including current comments and maybe the parameter handling as suggested by Joost when done. Thanks, > >Hope this is constructive >Dave