Pep

Example Pep script

   read;
   # the lexing phase of the script
   ![:space:] { 
     whilenot [:space:]; put; clear;
     add "word*"; push; .reparse
   }
   # the parsing/compiling phase 
   parse>
    pop; pop; 
    "word*word*", "text*word*" {
      clear; get; add " "; ++; get; --; put; clear;
      add "text*"; push; .reparse
    }
 
Pep
is an open source (unix) sed-like tool for parsing and compiling (formal) languages
Pep
is (I think) fun to use because it teaches new techniques for parsing and compiling.
An (Uninteresting) Example
pep -e "read;print;print;clear;" -i "abcd"
Please see
the sourceforge site bumble.sf.net/books/pars/ for full source code and examples
Pep scripts
can be translated to other languages (using pep scripts).