Skip to Content
lex & yacc, 2nd Edition
book

lex & yacc, 2nd Edition

by John Levine, Doug Brown, Tony Mason
October 1992
Intermediate to advanced
384 pages
7h 8m
English
O'Reilly Media, Inc.
Content preview from lex & yacc, 2nd Edition

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 13

  • 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

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

The GNU Make Book

The GNU Make Book

John Graham-Cumming
Learn LLVM 12

Learn LLVM 12

Kai Nacke
flex & bison

flex & bison

John Levine

Publisher Resources

ISBN: 9781565920002Errata Page