Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
C HAPTER 33 ยท Combinator Parsing will map one to one to the constructions of a context-free grammar, to make them easy to understand. This chapter introduces only one language feature that was not explained before: this aliasing, in Section 33.6. The chapter does, however, heavily use several other features that were explained in previous chapters. Among others, parameterized types, abstract types, functions as objects, operator overloading, by-name parameters, and implicit conversions all play impor- tant roles. The chapter shows how these language elements can be combined in the design of a very high-level library. The concepts explained in this chapter tend to be a bit more advanced than previous chapters. If you have a good grounding in compiler construc- tion, you'll profit from it reading this chapter, because it will help you put things better in perspective. However, the only prerequisite for understand- ing this chapter is that you know about regular and context-free grammars. If you don't, the material in this chapter can also safely be skipped. 33.1 Example: Arithmetic expressions