Writing Compilers and Interpreters
Quickly master all the skills you need to build your own compilers and interpreters in C++
Whether you are a professional programmer who needs to write a compiler at work or a personal programmer who wants to write an interpreter for a language of your own invention, this book quickly gets you up and running with all the knowledge and skills you need to do it right. It cuts right to the chase with a series of skill-building exercises ranging in complexity from the basics of reading a program to advanced object-oriented techniques for building a compiler in C++.
Here's how it works:
Every chapter contains anywhere from one to three working utility programs that provide a firsthand demonstration of concepts discussed, and each chapter builds upon the preceding ones. You begin by learning how to read a program and produce a listing, deconstruct a program into tokens (scanning), and how to analyze it based on its syntax (parsing). From there, Ron Mak shows you step by step how to build an actual working interpreter and an interactive debugger. Once you've mastered those skills, you're ready to apply them to building a compiler that runs on virtually any desktop computer.
Visit the Wiley Computer Books Web page at: http://www.wiley.com/compbooks/
What people are saying - Write a review
We haven't found any reviews in the usual places.
Reading and Listing the Source Program
12 other sections not shown
Other editions - View all
1996 by Ronald append array assignment statements BEGlN binary operators boolean break bytes calls char pString character Check class diagram class TParser common.h const TType constant Copyright current token debugger declarations delete enumeration type Execute Executor expression extern const TTokenCode extract Figure FlLE GetToken GetTokenAppend header file implementation file input instructional purposes integer intermediate code line number list.PutLine Loop to parse member function MODULE NULL number token object diagrams output Parse ParseExpression parser parser.cpp ParseStatement Pascal plntegerType pRealType pResultType Pretty-print Print procedures and functions prog2-l pType public member function record field reserved word Ronald Mak routine runtime stack scanner source file source lines source program sprintf(list.text stack frame subclass subrange subroutine symbol table node symtab.h syntax errors tcDummy tcldentifier Tlcode tlStatementStart token code Tokenln(token TSymtab TSymtabNode TSymtabNode pRoutineld TType Type identifier type object unchanged prog3-2 utility program variable version of implementation warranties