You no longer have to write a compiler from scratch using C. Modern practice relies on powerful frameworks:

Organizing tokens into a Hierarchical Tree (Abstract Syntax Tree or AST) based on the language's grammar.

Used by Java and JavaScript, JIT compilers translate code during execution, allowing for "hot-spot" optimizations that static compilers can't predict. 4. Finding Resources and PDFs

A powerful parser generator that can take a formal grammar and automatically produce the code to parse it.

The gold standard for modular compiler design. LLVM provides a reusable "back-end," allowing developers to focus only on the front-end of their new language.

For those seeking "The Art of Compiler Design: Theory and Practice" in PDF form, several seminal texts define this field:

Compiler design is the ultimate exercise in problem-solving. It requires a mastery of formal logic, data structures, and hardware architecture. Whether you are building a domain-specific language for a niche project or just want to write more efficient C++, studying the theory and practice of compilers provides a mental model that will improve every line of code you write.

How optimized is the resulting machine code?

Compilers: Principles, Techniques, and Tools by Aho, Lam, Sethi, and Ullman. It is the definitive (though dense) bible of the industry.

By Andrew Appel, known for being highly practical and project-oriented.