transff.nim 188 B

123456789
  1. # Shows how to transform a file
  2. import pegs
  3. transformFile("infile.txt", "outfile.txt",
  4. [(peg"""S <- {typedesc} \s* {\ident} \s* ','
  5. typedesc <- \ident '*'* """, r"$2: $1")])