<<*>>=
procedure go()
  local line
  while line := read() do {
    apply(prepass, line)
    write(line)
    if match("@fatal ", line) then exit(1)
    apply(postpass, line)
  }
end

procedure apply(pass, line)
    line ? (="@" & pass(tab(upto(' ')|0),  if =" " then tab(0) else &null))
end
@
[[indextext]] is a hack to introduce suitable ``[[@index nl]],'' but it
messes up the line counts!
<<*>>=
procedure writedefn(defn, locl)
  static indextext
  initial indextext := ""
  if /defn then
    *indextext > 0 & <<flush index>>
  else {
    if *indextext + *defn > 65 then <<flush index>>
    write(if \locl then "@index localdefn " else "@index defn ", defn)
    indextext ||:= " " || defn
  }
  return
end
<<flush index>>=
{ # write("@index nl")		# don't!
  indextext := ""
}
<<*>>=
procedure rcsinfo_too () 
  return "$Id: defns.nw,v 1.15 2006/06/12 21:03:54 nr Exp nr $" ||
         "$Name: v2_11b $"
end
@