Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!ima!johnl From: johnl@ima.UUCP Newsgroups: mod.compilers Subject: Table-driven top-down parsing Message-ID: <288@ima.UUCP> Date: Wed, 10-Dec-86 09:46:07 EST Article-I.D.: ima.288 Posted: Wed Dec 10 09:46:07 1986 Date-Received: Sun, 14-Dec-86 01:01:23 EST Reply-To: uucp (uucp user) Lines: 30 Approved:At the end of article <284@ima.UUCP> [by Ken Yap ] our moderator suggests: >Most recursive descent compilers are written by hand, ... I'd rather let >yacc do the work for me. Yacc can parse anything with enough help ... Top-down, of course, does not necessarily mean recursive descent. There exist very good generators for table-driven LL(1) [actually SLL(1)] parsers. Most (though not all) modern languages have usable LL(1) grammars, and an LL(1) parser has the following very nice properties: - Very small tables (typically half the size of SLR tables for the same language) - Very clean semantics -- easily-understood algorithm and data structures - Ability to embed semantic routines at arbitrary locations within the right-hand side of a production - Extremely simple algorithm (Fischer-Milton-Quiring) for high-quality, fully automatic syntactic error correction Michael L. Scott University of Rochester (716) 275-7745 scott@rochester.arpa {decvax, allegra, seismo, cmcl2}!rochester!scott scott%rochester@CSNET-RELAY -- Send compilers mail to ima!compilers or, in a pinch to Levine@YALE.EDU Plausible paths are { ihnp4 | decvax | cbosgd | harvard | yale | bbncca}!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