summaryrefslogtreecommitdiff
path: root/ortho/agcc/agcc.sed
blob: 9252e4a451dbdfe5bf66a2d359fabd929a5afd56 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# SED script used to extract lines enclosed in /* BEGIN ... END  */ of a
# gnatbind C generated files.
# Copyright (C) 2002, 2003, 2004, 2005 Tristan Gingold

# If the current line starts with /* BEGIN, read next line and go to keep.
\@/* BEGIN@ {
 n
 b keep
}
# The current line is discarded, and a the cycle is restarted.
d

# keep the lines.
: keep
# If the current line starts with END, then it is removed and a new cycle is
# started.
\@  END@ d
# Print the current line
p
# Read the next line
n
# Go to keep.
b keep