wanted: error-correcting C parser

keller@trurl.informatik.uni-dortmund.de (Robert E. Keller)
Mon, 13 Feb 1995 21:17:56 GMT

          From comp.compilers

Related articles
wanted: error-correcting C parser keller@trurl.informatik.uni-dortmund.de (1995-02-13)
Re: wanted: error-correcting C parser umrigar@cs.binghamton.edu (Zerksis D. Umrigar) (1995-02-15)
Re: wanted: error-correcting C parser grosch@cocolab.sub.com (1995-02-18)
Re: wanted: error-correcting C parser parrt@parr-research.com (Terence John Parr) (1995-02-20)
| List of all articles for this month |

Newsgroups: comp.compilers
From: keller@trurl.informatik.uni-dortmund.de (Robert E. Keller)
Keywords: C, errors, parse, question
Organization: UniDo
Date: Mon, 13 Feb 1995 21:17:56 GMT

Hello


I'm looking for a parser which understands C (preferably ANSI-C)
(or some "reasonable" subset) and which, if it encounters a syntax
error, delivers a set of all those tokens/symbols which are correct
in place of the wrong symbol (not caring for what comes after the wrong
symbol, of course);


example:
given


extern short c;
int fnc(int a, int b){return a+;}
..


the described parser comes forward with s.th. like


error: line 2, symbol #14 (";");
correct symbols: a b c ( ' ! <.. some more unary operators etc. ..>
correct tokens: NUMBER




any reference to parser generators capable of generating such a parser
is welcome, too;


rumour has it that such generators could be found under
ftp.eb.ele.tue.nl:/pub/src/cocktail.*,
but this archive has been removed;


any comments?




2 more pointers:


LALR from MicroQuill Software Publishing, Inc.


PCYACC from Abraxas (somewhere in the U.S.)


does somebody know their e-mail/ftp addresses?


thanks
Bob
[Abraxas the last time I looked was selling a PC version of yacc and lex with
no particular enhancements, plus sample grammars for many languages. Haven't
looked at LALR. WHen the question of C error detection last came up, the
consensus seemed to be that coming up with the set of possible next tokens is
fairly easy in a top-down parser, nearly impossible in something like yacc.
That set isn't all that useful in error correction, e.g. it's no help if the
programmer left out a semicolon or a curly brace. -John]




--


Post a followup to this message

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