Skip to main content

Section C.13 S2: Extending C0 to Pointers and Scopes


  • So far, C0 cannot declare local variables and has no pointers.

  • First introduce pointers and recap L- and R-evaluation formally.

  • Second, add scopes by extending the block syntax and changing the state to a stack of variable assignments.

  • Introduce and discuss new block and leave rules that administer the stack of variable assignments.

Sections Covered.

Section 6.4, Section 6.5