Buch-OWLOnline-Buchhandel

Writing a C Compiler

Build a Real Programming Language from Scratch

von Nora Sandler

Einband
Kartoniert
Sprache
Englisch
Erschienen
August 2024
Verlag
Random House LLC US

Buchbeschreibung

A fun, hands-on guide to writing your own compiler for a real-world programming language.

Compilers are at the heart of everything programmers do, yet even experienced developers find them intimidating. For those eager to truly grasp how compilers work, Writing a C Compiler dispels the mystery. This book guides you through a fun and engaging project where you’ll learn what it takes to compile a real-world programming language to actual assembly code.

Ganze Beschreibung lesenWeniger anzeigen

Writing a C Compiler will take you step by step through the process of building your own compiler for a significant subset of C—no prior experience with compiler construction or assembly code needed. Once you’ve built a working compiler for the simplest C program, you’ll add new features chapter by chapter.

The algorithms in the book are all in pseudocode, so you can implement your compiler in whatever language you like. Along the way, you’ll explore key concepts like:

  • Lexing and parsing: Learn how to write a lexer and recursive descent parser that transform C code into an abstract syntax tree.
  • Program analysis: Discover how to analyze a program to understand its behavior and detect errors.
  • Code generation: Learn how to translate C language constructs like arithmetic operations, function calls, and control-flow statements into x64 assembly code.
  • Optimization techniques: Improve performance with methods like constant folding, dead store elimination, and register allocation.

Compilers aren’t terrifying beasts—and with help from this hands-on, accessible guide, you might even turn them into your friends for life.

Inhaltsverzeichnis

  • Acknowledgments
  • Introduction
  • Part I: The Basics
  • Chapter 1: A Minimal Compiler
  • Chapter 2: Unary Operators
  • Chapter 3: Binary Operators
  • Chapter 4: Logical and Relational Operators
  • Chapter 5: Local Variables
Ganzes Inhaltsverzeichnis anzeigen (30 Einträge)Weniger anzeigen
  • Chapter 6: If Statements and Conditional Expressions
  • Chapter 7: Compound Statements
  • Chapter 8: Loops
  • Chapter 9: Functions
  • Chapter 10: File-scope Variables and Storage-class
  • Specifiers
  • Part II: Types Beyond Int
  • Chapter 11: Long Integers
  • Chapter 12: Unsigned Integers
  • Chapter 13: Floating-Point Numbers
  • Chapter 14: Pointers
  • Chapter 15: Arrays and Pointer Arithmetic
  • Chapter 16: Characters and Strings
  • Chapter 17: Supporting Dynamic Memory Allocation
  • Chapter 18: Structures
  • Part III: Optimizations
  • Chapter 19: Optimizing Tacky Programs
  • Chapter 20: Register Allocation
  • Next Steps
  • Appendix A: Debugging Assembly Code with GDB or LLDB
  • Appendix B: Assembly Generation and Code Emission Tables
  • References

Details

Erscheinungstermin
August 2024
Kategorie
Fremdsprachige Bücher
Einband
Kartoniert
Sprache
Englisch
Verlag
Random House LLC US
Format
23,0 × 18,0 cm
Dicke
4,0 cm
Gewicht
1.270 g
EAN / ISBN-13
9781718500426
Maßstabsgetreu: Deckel und Buchrücken neben einer Hand (18 cm).

Über Nora Sandler

Nora Sandler is a software engineer based in Seattle. She holds a BS in computer science from the University of Chicago, where she researched the implementation of parallel programming languages.

Mehr über Nora SandlerWeniger anzeigen

More recently, she’s worked on domain-specific languages at an endpoint security company. You can find her blog on pranks, compilers, and other computer science topics at https://norasandler.com.

Versand und Rückgabe

Standardversand: 1 bis 3 Werktage, 3,99 €, kostenlos ab 35 €

Versandbeginn: in der Regel am selben oder am nächsten Werktag

Liefergebiet: Deutschland

Rücksendung: 14 Tage Widerrufsrecht. Bei einem Widerruf tragen Sie die Kosten der Rücksendung. Bei einer Falschlieferung oder einem Fehler von uns erstatten wir Ihnen das Rückporto. Den Widerruf erklären Sie über den Knopf „Vertrag widerrufen“ im Fuß der Seite.

Hersteller und Produktsicherheiteucomply OÜ
eucomply OÜ
Pärnu mnt. 139b – 14
11317 Tallinn
Estland
hello@eucompliancepartner.com

Ähnliche Titel

Bewertungen

Zu diesem Titel gibt es noch keine Bewertung. Bewerten kann, wer ihn bei uns gekauft hat.

So prüfen wir Bewertungen
Eine Bewertung kann bei uns nur abgeben, wer den Titel über sein Kundenkonto bei uns gekauft hat. Jede Bewertung ist fest mit der zugehörigen Bestellung verknüpft; anders kommt sie technisch gar nicht zustande. Deshalb trägt jede angezeigte Bewertung den Hinweis „Verifizierter Kauf". Wir zeigen positive wie negative Bewertungen und löschen nur bei Rechtsverstößen. Für Bewertungen gibt es keine Gegenleistung.
69,00 €Voraussichtlich 27. Nov. bis 1. Dez.

Inhalte ab 18

Cover von Titeln für Erwachsene, etwa erotische Romane, Manga oder Comics, bleiben unscharf, bis Sie bestätigen. Die Bestätigung gilt für alle Seiten und Tabs, bis Sie den Browser schließen.

Zurück zum Katalog