Syntax Coloring in an IDE
Creating a useful programming language requires more than just a compiler or interpreter that makes it possible to run programs—it requires an ecosystem of tools for developers. This ecosystem often includes debuggers, online help, or an integrated development environment, commonly called an IDE. An IDE can be broadly defined as any programming environment in which source code editing, compilation, linking steps (if any), and execution can all be performed within the same user interface. A good modern IDE typically includes many additional features, such as a graphical user interface builder and integrated debugger.
This chapter addresses some of the challenges of supporting your programming language in an IDE to provide syntax coloring and visual feedback about syntax errors. One reason that you want to learn how to do this is that many programmers will not take your language seriously unless it has an IDE with such features. We will start by...