Prof. Brivaldo Junior

others

Micro C: learning about compilers, step by step

Pedro Henrique and I have written Micro C: Aprendendo Compiladores, a practical introduction to how compilers work. The book uses the small Micro C language to guide readers through the main stages of a compiler: lexical and syntax analysis, syntax-tree construction, semantic checks, intermediate-code generation, and translation to x86-64 Assembly.

Cover of Micro C: Aprendendo Compiladores

The explanations combine diagrams, implementation excerpts, and progressive exercises to connect compiler theory with working code. It is intended for students, instructors, and curious programmers who want to understand a compiler from end to end and experiment with building one of their own. The book is written in Brazilian Portuguese.

You can also explore the Micro C compiler source code on GitHub.

Download and license

Download the book (PDF)

The book is released under the Creative Commons Attribution–NonCommercial–ShareAlike 3.0 Brazil (CC BY-NC-SA 3.0 BR) license. You may download, share, and adapt it for personal or educational use, provided you credit the authors, do not use it commercially, and distribute adaptations under the same license. Both authors agree with the distribution and terms of use described here. For commercial use or a separate authorization, please email Brivaldo to coordinate with the authors.

Back cover of Micro C: Aprendendo Compiladores