summaryrefslogtreecommitdiff
path: root/build/tolower.sed
blob: ce0eb1651bd2cd00ba676dd79aaa6d350568d309 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#########################################################################
#                                                                       #
#                                 OCaml                                 #
#                                                                       #
#       Nicolas Pouillard, projet Gallium, INRIA Rocquencourt           #
#                                                                       #
#   Copyright 2007 Institut National de Recherche en Informatique et    #
#   en Automatique.  All rights reserved.  This file is distributed     #
#   under the terms of the Q Public License version 1.0.                #
#                                                                       #
#########################################################################

# tolower.sed expands one ...<:lower<FOO>>... to ...foo... per line
h
s/.*<:lower<\(.*\)>>.*/\1/
t cont
b end
:cont
y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/
s/$/|/
G
s/\(.*\)|\n\(.*\)<:lower<\(.*\)>>/\2\1/
:end