Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!linus!philabs!cmcl2!seismo!brl-smoke!smoke!gabriel@ANL-MCS.ARPA From: gabriel@ANL-MCS.ARPA (John Gabriel) Newsgroups: net.sources Subject: Re: Syntax descrs of PASCAL/C/FORTRAN in YACC Message-ID: <1008@brl-smoke.ARPA> Date: Mon, 17-Feb-86 15:02:23 EST Article-I.D.: brl-smok.1008 Posted: Mon Feb 17 15:02:23 1986 Date-Received: Wed, 19-Feb-86 20:27:36 EST Sender: news@brl-smoke.ARPA Lines: 29 There is an LALR(1) grammar for "C" in an appendix to "C" A Reference Manual; S.B. Harbison & G.L. Steele, pub Prentice Hall, 1985 page 333. As far as PASCAL is concerned, the syntax diagrams in Jensen and Wirth are isomorphic to prescriptions for recursive descent rcognition. I do not know if they are complete. There is also an ANSI standard for PASCAL describing both syntax and semantics, ANSI-IEEE 770X3.97-1983 PASCAL. The syntax diagrams in ANSI should be complete. For FORTRAN 77 there is also an ANSI standard having syntax diagrams ANSI X3.9-1978 FORTRAN. I think the algorithm to convert syntax diagrams to parsers is described either by Jensen and Wirth or in Peter Grogono's book on PASCAL. I do not have either at hand - they are at home together with my copy of IEEE 770. There is also a book called "Standard PASCAL", whose author I forget which may also publish a grammar. I just found a copy of Grogono in my bookshelf. The conversion from syntax diagrams to recursive descent is described on p108 et seq. It's not the one I recollect so you might look in Jensen & Wirth. Syntax diagrams are in Grogono p327 et seq. The book is "Programming in PASCAL", revised edition, pub Addison Wesley 1980, ISBN 0-201-02775-5. Sincerely John Gabriel