next up previous
Next: About this document ... Up: No Title Previous: A Hierarchy of Grammar

Top-Down / Bottom-Up

Top-Down

+
easy to write by hand.
+
flexible embedding in compiler possible.
-
harder to maintain.
-
error recovery can be tricky.
-
deep recursion can be inefficient.
Bottom-Up
+
larger class of languages and grammar.
-
needs tool to generate
-
less flexible to embed in compiler
-
depends on quality of tool
Mixtures are possible. Some commercial compilers use recursive descent, with operator precedence for expressions to get rid of deep recursion.



Christoph Zenger
4/6/2000