Lecture overview -- Keyboard shortcut: 'u'  Previous page: Language embedding [Section] -- Keyboard shortcut: 'p'  Next page: Examples of language embedding in HTML -- Keyboard shortcut: 'n'  Lecture notes - all slides and notes together  slide -- Keyboard shortcut: 't'  Textbook -- Keyboard shortcut: 'v'  Help page about these notes  Alphabetic index  Course home  Lecture 6 - Page 9 : 22
Functional Programming in Scheme
Linguistic abstraction
Embedded languages

A new language N is an embedded language in an existing language E if an expression in N can be used as a subexpression of a construct in E.

As a matter of practical organization the interpreter of the new language N is made available as a function in the existing language E.

  • There are many examples of embedding web languages and programming languages

    • Embedding of CSS in HTML, SVG and other XML languages

    • Embedding of Javascript in HTML for client dynamics

    • Embedding of a programming language in HTML at the server-side

      • ASP: HTML embedding of Visual Basic fragments

      • JSP: HTML embedding of Java fragments

      • PHP: HTML embedding of C-like fragments

      • BRL: HTML embedding of Scheme fragments

More or less elegant embedding of one language into the other is found in numerous web contexts