Related articles |
---|
Re: Compiler Construction in Ada crigler@osceola.cs.ucf.edu (1993-01-08) |
Top-Down Parser Construction Conjectures bart@cs.uoregon.edu (1993-01-18) |
Re: Top-Down Parser Construction Conjectures W.Purvis@daresbury.ac.uk (1993-01-18) |
Re: Top-Down Parser Construction Conjectures sja@vinkku.hut.fi (1993-01-18) |
Re: Top-Down Parser Construction Conjectures parrt@ecn.purdue.edu (1993-01-19) |
Re: Top-Down Parser Construction Conjectures pardo@cs.washington.edu (1993-01-20) |
Newsgroups: | comp.compilers |
From: | sja@vinkku.hut.fi (Sakari Jalovaara) |
Organization: | Helsinki University of Technology, Finland |
Date: | Mon, 18 Jan 1993 10:50:05 GMT |
Keywords: | parse, performance |
References: | 93-01-048 93-01-122 |
>> hand-coded recursive descent, and very impressive performance stats have
>> been reported in this group. So this technique is of more than simple
>> academic interest.
Oh, recursive descent is easily faster than yacc. I wrote a C parser in
yacc and later replaced it with a mostly recursive descent hand- coded
parser ("mostly": expressions are not RD; labels require a kludge.) The
hand-coded parser is easily several times faster than the yacc version.
Transforming a yacc parser into RD is easy-ish since yacc directly gives a
list of lookahead tokens for any given parse state (e.g. you can easily
see which tokens can start a declarator.)
++sja
--
Return to the
comp.compilers page.
Search the
comp.compilers archives again.