LALR Parser - Implementation Issues

Implementation Issues

Because the LALR parser performs a right derivation instead of the more intuitive left derivation, understanding how it works is quite difficult. This makes the process of finding a correct and efficient LALR grammar very demanding and time consuming. For the same reason error reporting can be quite hard because LALR parser errors cannot always be interpreted into messages meaningful for the end user. For this reason the recursive descent parser is sometimes preferred over the LALR parser. This parser requires more hand-written code because of less language recognition power. However, it does not have the special difficulties of the LALR parser because it performs left-derivation. Notable examples of this phenomenon are the C and C++ parsers of GCC. They started as LALR parsers but were later changed to recursive descent parsers.

Read more about this topic:  LALR Parser

Famous quotes containing the word issues:

    Your toddler will be “good” if he feels like doing what you happen to want him to do and does not happen to feel like doing anything you would dislike. With a little cleverness you can organize life as a whole, and issues in particular, so that you both want the same thing most of the time.
    Penelope Leach (20th century)