====== Compiler Construction I ====== * Analysis * Scanner (Text -> Token-Stream) * Parser (Token-Stream -> Syntax tree) * Type Checker (Syntax tree -> (Anotated) Syntax tree) * Synthesis ===== Scanner ===== Scanner vs. Siever??? (offt kombiniert) * Preprocessing * Decoppling (Spaces, comments) * Collecting (Pragmas, was nicht direkt teil der Sprache ist) * Replacing * Constants (Strings) * Names (Name Mangling) ==== Name Mangling ==== Namespaces konfliktfrei auflösen (u.a. auch Polymorphie) Bsp. C++: ''_ZN9wikipedia7article6formatEv'' ==== Regular Expression ==== * $\Sigma$ Alphabet * $x \cdot y$ * $x^{*}$ * $x \mid y$ * $x? = (\epsilon \mid e)$ * $e^{+} = (e \cdot e^{*})$ ==== Automaten ==== === Finit === * $Q$ Set of states === Deterministic finite === === Thompson's Algorithm === Hat Nachteile??? === Berry-Sethi/Glushkov Algorithm ===