Path: utzoo!censor!geac!torsqnt!news-server.csri.toronto.edu!cs.utexas.edu!samsung!think.com!mintaka!spdcc!ima!iecc!compilers-sender From: dave@labtam.labtam.oz.au (David Taylor) Newsgroups: comp.compilers Subject: Re: Recursive Descent Parsers and YACC Keywords: parse, yacc, design, question Message-ID: <5602@labtam.labtam.oz> Date: 20 Nov 90 01:01:30 GMT References: <11678@hubcap.clemson.edu Sender: compilers-sender@iecc.cambridge.ma.us Reply-To: dave@labtam.labtam.oz.au (David Taylor) Organization: Compilers Central Lines: 31 Approved: compilers@iecc.cambridge.ma.us grimlok@hubcap.clemson.edu (Mike Percy) writes: >What is faster, in my experience, is the speed in which you can get a parser >running. Trying to coax a grammer that YACC likes (conflict-free) is >downright a pain, but the recursive descent parser generators I've worked >on/with have much laxer restrictions on the grammar than LR(1). In theory, >one could have a non-deterministic, backtracking RD parser (seen one or two >done in Prolog), but most generators at least require the grammar to be >deterministic (is this the same as LR(1)? Recursive descent parser == LL(0) LR(1) is LESS restrictive. You can still use a grammar with yacc that has some conflicts as it has some simple rules for conflict resolution. Some of these recursive descent parser generators that you mention probably use similar rules for conflict resolution but don't bother to tell you about their use. Look up some of the compiler theory ... it helps when you're trying to design the grammar. -- David Taylor Labtam Information Systems Pty. Ltd. Work: (03) 587-1444 UUCP: !uunet!munnari!labtam.oz!dave FAX: (03) 580-5581 Internet: dave@labtam.oz.au Home: (03) 857-5660 (occasionally) -- Send compilers articles to compilers@iecc.cambridge.ma.us or {ima | spdcc | world}!iecc!compilers. Meta-mail to compilers-request.