Preface
Lex and yacc are tools designed for writers of compilers and interpreters, although they are also useful for many applications that will interest the noncompiler writer. Any application that looks for patterns in its input, or has an input or command language is a good candidate for lex and yacc. Furthermore, they allow for rapid application prototyping, easy modification, and simple maintenance of programs. To stimulate your imagination, here are a few things people have used lex and yacc to develop:
The desktop calculator bc
The tools eqn and pic, typesetting preprocessors for mathematical equations and complex pictures.
PCC, the Portable C Compiler used with many UNIX systems, and GCC, the GNU C Compiler
A menu compiler
A SQL data base language syntax checker
The lex program itself
What’s New in the Second Edition
We have made extensive revisions in this new second edition. Major changes include:
Completely rewritten introductory Chapters 1–3
New Chapter 5 with a full SQL grammar
New, much more extensive reference chapters
Full coverage of all major MS-DOS and UNIX versions of lex and yacc, including AT&T lex and yacc, Berkeley yacc, flex, GNU bison, MKS lex and yacc, and Abraxas PCYACC
Coverage of the new POSIX 1003.2 standard versions of lex and yacc
Scope of This Book
Chapter 1, Lex and Yacc , gives an overview of how and why lex and yacc are used to create compilers and interpreters, and demonstrates some small lex and yacc applications. It also introduces basic terms we use ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access