CSS Prepare

optional · CSS study notes

Syntax-Directed Translation

  • Synthesized attributes: values computed from a node's children, passed upward to the parent in the parse tree
  • Inherited attributes: values passed downward from a parent (or sideways from siblings) to a node — the direction of value flow is the key exam distinction
  • Construction of syntax trees: abstract representations of the program's grammatical structure, omitting unnecessary grammar detail
  • Top-down translation: semantic actions embedded and evaluated during a top-down parse

MCQ Trap

  • Synthesized attributes flow upward; inherited attributes flow downward/sideways.