Re: Recursive Descent Parsers and YACC

henry@zoo.toronto.edu (Henry Spencer)
Sat, 17 Nov 90 22:05:36 GMT

          From comp.compilers

Related articles
Recursive Descent Parsers and YACC melling@psuvax1.cs.psu.edu (1990-11-15)
Re: Recursive Descent Parsers and YACC pardo@cs.washington.edu (1990-11-16)
Re: Recursive Descent Parsers and YACC grimlok@hubcap.clemson.edu (1990-11-16)
Re: Recursive Descent Parsers and YACC Bruce.Hoult@actrix.co.nz (1990-11-18)
Re: Recursive Descent Parsers and YACC dave@labtam.labtam.oz.au (1990-11-20)
Re: Recursive Descent Parsers and YACC hankd@ecn.purdue.edu (1990-11-17)
Re: Recursive Descent Parsers and YACC henry@zoo.toronto.edu (1990-11-17)
Re: Recursive Descent Parsers and YACC mailrus!sharkey!hela!iti.org!dhw@uunet.UU.NETid AA (1990-11-20)
Recursive Descent Parsers and YACC grosch@gmdka.uucp (Josef Grosch) (1990-11-22)
Re: Recursive Descent Parsers and YACC grimlok@hubcap.clemson.edu (1990-11-23)
Recursive Descent Parsers and YACC jsp@milton.u.washington.edu (Jeff Prothero) (1990-11-23)
Re: Recursive Descent Parsers and YACC melling@psuvax1.cs.psu.edu (1990-11-26)
Re: Recursive Descent Parsers and YACC moss@cs.umass.edu (1990-11-26)
[1 later articles]
| List of all articles for this month |
Newsgroups: comp.compilers
From: henry@zoo.toronto.edu (Henry Spencer)
Keywords: yacc, parse, design
Organization: U of Toronto Zoology
References: <F7p?bk63@cs.psu.edu>
Date: Sat, 17 Nov 90 22:05:36 GMT

In article <F7p?bk63@cs.psu.edu> melling@psuvax1.cs.psu.edu (Michael D Mellinger) writes:
>Can someone give me an estimate on how much faster parsing can be made by
>writing a recursive-descent parser instead of using Yacc and Lex? Is there
>enough of a difference to consider using a RDP in a commercial C compiler?
>...
>[It is my distinct impression that yacc parsers work fairly quickly.
>Particularly on machines with slow procedure calls, they can be faster than
>recursive descent...


Of note here is the recent EUUG paper from Ken Thompson on the Plan 9 C
compiler. (This is a small, fast compiler generating quite good code.)
He uses a yacc parser, but says that the compiler spends a lot of time
parsing and he thinks a recursive-descent parser would be substantially
faster, now that the compiler and the language (which has some changes
from orthodox C) have settled down.


He also notes that using the manufacturer's fancy "call" instruction is
usually a bad idea, since a stripped-down one (fortunately both the VAX
and the NS32k series have such) is generally much faster. His assessment
of relative speeds probably assumes an efficient call sequence.
--
Henry Spencer at U of Toronto Zoology
henry@zoo.toronto.edu utzoo!henry
--


Post a followup to this message

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