Schrodinger’s Yacc

There was a small controversy last year about parser combinators, a convenient way of rapidly developing parsers in a functional style. Yacc is presumably chosen as the archetypal non-combinator parser generator, requiring separate external parser compiler, known for being a pain to use.

Like Schrodinger’s cat, Yacc seems to be indeterminately alive or dead (though the last article conclusively opened the box for me).

Continuation Patterns

Interesting paper on the topic of various program patterns implemented in coroutine.  As mentioned in a previous post, continuations are a powerful control flow primitive — they can be used for:

Call with Current Continuation Patterns, Ferguson & Deugo

  • Escaping recursive procedures and loops
  • Reentry into recursion
  • Coroutines
  • Backtracking
  • Simulating multitasking

The paper covers these patterns, and gives sample implementations.

Continue reading “Continuation Patterns”