Premium
The cost of a generated parser
Software: Practice And ExperiencePeer ReviewedWaite W. M. +11985Journals
The ‘fact’ that compilers employing generated parsers suffer significant performance degradation dis‐a‐vis recursive descent compilers is entrenched in the folklore of computing. We give detailed measurements that support this belief when the entire compiler is written in Pascal. We then define a general interface for a parsing module that hides significantly more information than usual, simplifying the process of generation and integration. This interface makes an assembly‐coded parse table interpreter feasible without changing the language used for the remainder of the compiler. When the parse table interpreter is written in assembly language, the costs of the generated parser are essentially the same as those for recursive descent. (A minor space/time trade‐off is possible, with the recursive descent implementation being slightly bigger and slightly faster.)

This content is not available in your region!

Continue researching from Zendy home

Having issues? Contact support