O'Reilly logo

Compilers: Principles and Practice by Himanshu B. Dave, Parag H. Dave

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

3.3 Compiler Writing Tools

Till now we have seen a few versions of hand-coded Scanners. Their designs were more or less ad hoc in the sense that a bit of common-sense and some amount of cut and try were used to implement them. As mentioned previously in Chapter 2, the operations of a Scanner can be specified in terms of a regular grammar, and systematic transformations of this grammar can give us a Scanner. The compiler writing tools such as lex and yacc use this idea to reduce the effort and time involved in implementing a compiler to considerable extent.

Before 1975 writing a compiler was a very time-consuming process. Most of the time it involved “boot-strapping” a compiler – programming in assembly language, write a hand-coded compiler for ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required