Search code examples
cprivateansi-ccompiler-construction

Missing header file, <tools/debug.h> for ANSI C?


I hope you're doing well. I was going through the book, "Compiler Design In C", by Allen I. Holub, when I came across these header files implemented in a sample program:

#include <tools/debug.h>
#include <tools.h> /* Needed only for prototype

My compiler says that no such file or directory exists ( Dev-C++ ). I have set the compiler settings to ANSI-C, seeing as to how the author uses ANSI-C to write code, but to no avail.

The program also includes a PRIVATE keyword, which after changing from C99 to ANSI-C, is still reported by the compiler to be an unknown keyword.

Can anyone help me out with this? Apologies if this has been asked before, but I could not find a reference to this anywhere. I have also included pictures of the code down here.

First page

Second page, remaining part

If I should abstain, or I'm unable to access these files, what other options do I have? I really want to complete this project.

Thank you in advance for your time and patience in reading all this through.


Solution

  • The headers are supplementary materials. They are available for download from the author's web page: https://holub.com/compiler/ .

    The book itself must have referred to this somewhere in the introductory chapters.