Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!seismo!rutgers!ucla-cs!zen!ucbvax!decvax!ima!johnl From: johnl@ima.UUCP Newsgroups: comp.compilers Subject: Yacc poll Message-ID: <634@ima.ISC.COM> Date: Fri, 31-Jul-87 11:56:58 EDT Article-I.D.: ima.634 Posted: Fri Jul 31 11:56:58 1987 Date-Received: Sat, 1-Aug-87 22:15:18 EDT Sender: johnl@ima.ISC.COM Reply-To: harvard!ames!ausmelb!ejp Lines: 49 Approved: compilers@ima.UUCP I am presently involved in a discussion about compiler implementation, specifically the pros and cons of Yacc, and I would like opinions from other experienced compiler-writers. There seem to be some standard objections to Yacc in particular, e.g. a. the form of Yacc's input b. the limitations of its syntax/semantic interface c. the incomprehensibility of the C output d. the size of the generated parser e. the speed of the generated parser f. debugging difficulties and some more general objections, e.g. g. generic objections to LR parsing h. generic preference for some other technique i. etc. I have some sympathy with objections (a), (b), and (d), although they appear minor compared with the advantages gained, and don't warrant overlooking the use of the tool. I reject the remainder. Some of these are simply uninformed. We need to choose between 3 existing syntax analysers for the language in question (Cobol): ad-hoc parsing, recursive-descent, and a Yacc grammar. As the author of both the recursive-descent and Yacc implementations, I strongly favour Yacc, or at least LR parsing. Would any readers care to comment, or indeed vote? E-mail replies please; if enough interest, I'll summarize to the moderator. -- Esmond Pitt, Austec International Ltd ...!seismo!munnari!ausmelb!ejp,ejp@ausmelb.oz.au [Cobol was designed so long ago that it seems uniquely well-suited to ad-hoc parsing. On the other hand, so was Fortran, and I was never sorry that I wrote the INfort parser in heavily kludged yacc. The two huge wins for me were that I knew that it would complain about any invalid input (unlike recursive descent where practically every line seems to be followed by "else syntax_error();") and that as people asked for their favorite featurettes, I could throw in the new syntax and know I wouldn't break existing stuff and not know about it. Other opinions solicited, particularly from actual experience. -John] -- Send compilers articles to ima!compilers or, in a pinch, to Levine@YALE.ARPA Plausible paths are { ihnp4 | decvax | cbosgd | harvard | yale | cca}!ima Please send responses to the originator of the message -- I cannot forward mail accidentally sent back to compilers. Meta-mail to ima!compilers-request