Wiki

A universe of ideas

User Tools

Site Tools


uni:10:comp:start

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

uni/10/comp/start.txt · Last modified: 2020-11-18 18:11 by 127.0.0.1