On this page:
Programming Languages
7.8.0.8

Programming Languages

Matthias Felleisen, Robert Bruce Findler, Matthew Flatt, and Jay McCarthy

© 1 August 2019 Matthias Felleisen, Robert Bruce Findler, Matthew Flatt, and Jay McCarthy

This material is copyrighted and provided under the Creative Commons CC BY-NC-ND license [interpretation].

Table of Contents

    Prelude

      1 Overview

      2 Prerequisites

    1 Programming Languages

      1.1 One Project, Many Programming Languages

      1.2 One Programming Language, Many Languages

        1.2.1 Embedded Programs as Strings

        1.2.2 Embedded Programs as Grammatical Productions

      1.3 Why Embedded Languages Matter

      1.4 One Racket Programmer, Many Languages

      1.5 Programming A Language, Programming Many Languages

    2 A Simple Model

    3 Onward to Racket

      3.1 What Does this Look Like in Real Racket?

      3.2 Defining Functions at Compile Time and Run Time

      3.3 Plain Syntax Macros

      3.4 Beyond the Model

        3.4.1 Scope

        3.4.2 The Core is Flexible

    4 Syntax Pattern

      4.1 The Basics of Syntax Pattern Matching

      4.2 More Pattern Matching, More Templating

      4.3 Yet More Pattern Matching, Yet More Templating

    5 Language Extensions

      5.1 When and Why

      5.2 Two Simple Language Extensions

      5.3 Evolving a Language Extension

      5.4 Another Evolution

      5.5 Language Extensions Must Behave Properly

      5.6 Language Extensions Must Generate Properly Sized Code

      5.7 Macros in Libraries

      5.8 Lessons Learned

    6 Syntax Classes

      6.1 One Last Thought, Revisited

      6.2 Classy Syntax

      6.3 Defining Syntax Classes

      6.4 Synthesis in Syntax Classes

      6.5 Recursive Syntax Classes

        6.5.1 Context

    7 Macro Conspiracies

      7.1 Macros Generate Macros

      7.2 Macros that Conspire

      7.3 More Conspiracy

      7.4 A Third Evolution: State Propagation

    8 Scope and Hygiene

      8.1 Hygiene

      8.2 Breaking Hygiene: From Data to Syntax

      8.3 Syntax Parameters: Working With Hygiene

    9 Embedded Languages

      9.1 An Example Class

      9.2 This and That

      9.3 Introducing Names

      9.4 Scoped New Names

      9.5 Literal Identifiers

      9.6 The definition of classy

      9.7 What we did not cover

    10 Module Languages

      10.1 Defining Modules

      10.2 From Modules to Languages

      10.3 The Core module Form

      10.4 A First Implementation of pfsh

      10.5 Compile Time and Run Time

      10.6 More Language Variations

      10.7 The Application Form

      10.8 More Implicit Forms

        10.8.1 #%datum

        10.8.2 #%top

        10.8.3 #%top-interaction

      10.9 Defining Functions

        10.9.1 Detecting Bindings

        10.9.2 Macro-Defining Macros

      10.10 Installing a Language

    Postlude

      1 Topics Covered

      2 Extending Embedded Languages