Summary
In this chapter, you learned how to use lexical and syntax information to provide the coloring of text in an IDE. Most of the coloring is based on relatively simple lexical analysis, and much of the work required involves modifying the compiler frontend to provide a memory-based interface, instead of relying on reading and writing files on disk. In this chapter, you picked up several skills. You learned how to color reserved words and other lexical categories in a programmer’s editor, communicate information between the compiler code and the programmer’s editor, and highlight syntax errors during editing.
Up to this point, this book has been about analyzing and using the information extracted from source code. The rest of this book is all about generating code and the runtime environments in which programs execute. The topic we will explore in the next chapter is bytecode interpreters.