Re: "Near Miss" error handling?

Laurent Guerby <guerby@acm.org>
31 Mar 2001 02:37:30 -0500

          From comp.compilers

Related articles
"Near Miss" error handling? gwyn@thislove.dyndns.org (2001-03-27)
Re: "Near Miss" error handling? jbeniston@siroyan.com (Jon Beniston) (2001-03-28)
Re: "Near Miss" error handling? eeide@cs.utah.edu (Eric Eide) (2001-03-31)
Re: "Near Miss" error handling? eballen1@qwest.net (Bruce Ediger) (2001-03-31)
Re: "Near Miss" error handling? guerby@acm.org (Laurent Guerby) (2001-03-31)
Re: "Near Miss" error handling? samiam@cisco.com (Scott Moore) (2001-03-31)
Re: "Near Miss" error handling? Martin.Ward@durham.ac.uk (2001-03-31)
Re: "Near Miss" error handling? ian.trudel@tr.cgocable.ca (Ian Trudel) (2001-03-31)
Re: "Near Miss" error handling? joachim_d@gmx.de (Joachim Durchholz) (2001-04-04)
Re: "Near Miss" error handling? joachim_d@gmx.de (Joachim Durchholz) (2001-04-04)
Re: "Near Miss" error handling? uabbwat@uab.ericsson.se (Barry Watson) (2001-04-04)
[5 later articles]
| List of all articles for this month |
From: Laurent Guerby <guerby@acm.org>
Newsgroups: comp.compilers
Date: 31 Mar 2001 02:37:30 -0500
Organization: Club-Internet (France)
References: 01-03-135
Keywords: parse, errors, editor
Posted-Date: 31 Mar 2001 02:37:30 EST

GNAT (the GNU Ada 95 compiler) does a very good job at detecting
misspellings:


$ cat t.adb
procedure T is
      My_Var : Integer;
begin
      My_Vra := 2;
edn T;
$ gcc -c -gnatvf t.adb
GNAT 3.14a (20010130) Copyright 1992-2001 Free Software Foundation, Inc.


Compiling: t.adb (source file time stamp: 2001-03-28 17:36:33)


          4. My_Vra := 2;
                      |
                >>> "My_Vra" is undefined
                >>> possible misspelling of "My_Var"


          5. edn T;
                |
                >>> incorrect spelling of keyword "end"


  6 lines: 3 errors
$


The heuristic used is hand-coded and uses context as you can see.
--
Laurent Guerby <guerby@acm.org>


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.