FreeTechBooks.com Homepage
FreeTechBooks.com
Free Online Computer Science and Programming Books, Textbooks, and Lecture Notes


A Compact Guide to Lex & Yacc
Reply with quote
A Compact Guide to Lex & Yacc

Author(s) : Thomas Niemann

Book excerpts:

This document explains how to construct a compiler using lex and yacc, the tools used to generate lexical analyzers and parsers. It is assumed that you can program in C, and understand data structures such as linked-lists and trees.

The overview describes the basic building blocks of a compiler and explains the interaction between lex and yacc. The next two sections describe lex and yacc in more detail. With this background, you will construct a sophisticated calculator. You will also implement conventional arithmetic operations and control statements, such as if-else and while. And with minor changes, you will convert the calculator into a compiler for a stack-based machine. The remaining sections discuss issues that commonly arise in compiler writing.

Arrow View/Download A Compact Guide to Lex & Yacc

View user's profileSend private message
  
   
 Reply to topic