mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-23 20:03:03 +01:00
82 lines
644 B
Sed
82 lines
644 B
Sed
|
: loop
|
||
|
|
||
|
/^\/\// s,.*,,
|
||
|
|
||
|
/^$/{
|
||
|
x
|
||
|
p
|
||
|
n
|
||
|
b loop
|
||
|
}
|
||
|
/^"/{
|
||
|
: double
|
||
|
/^$/{
|
||
|
x
|
||
|
p
|
||
|
n
|
||
|
/^"/b break
|
||
|
b double
|
||
|
}
|
||
|
|
||
|
H
|
||
|
x
|
||
|
s,\n\(.[^\"]*\).*,\1,
|
||
|
x
|
||
|
s,.[^\"]*,,
|
||
|
|
||
|
/^"/b break
|
||
|
/^\\/{
|
||
|
H
|
||
|
x
|
||
|
s,\n\(.\).*,\1,
|
||
|
x
|
||
|
s/.//
|
||
|
}
|
||
|
b double
|
||
|
}
|
||
|
|
||
|
/^'/{
|
||
|
: single
|
||
|
/^$/{
|
||
|
x
|
||
|
p
|
||
|
n
|
||
|
/^'/b break
|
||
|
b single
|
||
|
}
|
||
|
H
|
||
|
x
|
||
|
s,\n\(.[^\']*\).*,\1,
|
||
|
x
|
||
|
s,.[^\']*,,
|
||
|
|
||
|
/^'/b break
|
||
|
/^\\/{
|
||
|
H
|
||
|
x
|
||
|
s,\n\(.\).*,\1,
|
||
|
x
|
||
|
s/.//
|
||
|
}
|
||
|
b single
|
||
|
}
|
||
|
|
||
|
/^\/\*/{
|
||
|
s/.//
|
||
|
: ccom
|
||
|
s,^.[^*]*,,
|
||
|
/^$/ n
|
||
|
/^\*\//{
|
||
|
s/..//
|
||
|
b loop
|
||
|
}
|
||
|
b ccom
|
||
|
}
|
||
|
|
||
|
: break
|
||
|
H
|
||
|
x
|
||
|
s,\n\(.[^"'/]*\).*,\1,
|
||
|
x
|
||
|
s/.[^"'/]*//
|
||
|
b loop
|