Personal tools

Literate programming/Bird conversion via sed

From HaskellWiki

< Literate programming
Revision as of 17:23, 9 October 2006 by BrettGiles (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
# bird2code.sed
^> !p
^> {
  i\
\\begin{code}

  :loop
  N
  /\n>[^\n]*$/{
    b loop
  }
  s/^> //
  s/\(\n\)> /\1/g
  s/\n$//
  a\
\\end{code}\

  p
}