Lecture overview -- Keyboard shortcut: 'u'  Previous page: Coarse grained linguistic abstraction in Lisp -- Keyboard shortcut: 'p'  Next page: Language embedding [Section] -- 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 7 : 22
Functional Programming in Scheme
Linguistic abstraction
An example of coarse grained abstraction

Transformation of a document which is represented as a list structure

(course-home-page

  (name "Programming Paradigms")

  (number-of-lectures 15)

  (lecture-names
    "intr" "scheme" "higher-order-fn" 
    "eval-order" "lisp-languages")

  (current-lecture 3)

  (links
    "schemers.org" "http://www.schemers.org/"
    "LAML" "http://www.cs.auc.dk/~normark/laml/"
    "Haskell" "http://haskell.org/"
  )
)

A sample document in the course home page language. This is an example of a web document in the new course home page language. We will not implement the language here, just sketch the overall approach of the processing of the document.

y:/Kurt/Files/courses/prog3/prog3-03/sources/notes/includes/list-language/reading.scmReading the document as a list structure.

We open a port to the document and use the read primitive in Scheme to read the list expression on the file. The procedure or function process-document is supposed to implement the processing semantics of the new language.

y:/Kurt/Files/courses/prog3/prog3-03/sources/notes/includes/list-language/processing.scmA simple demo processing of the document.

We just extract some information about the document. No attempt is made here to implement the language, nor to process the document in any realistic way.