mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-05 08:35:26 +00:00
28 lines
394 B
Perl
28 lines
394 B
Perl
#!/usr/bin/perl
|
|
|
|
print "var sqlTables = {\n";
|
|
|
|
$in_item = 0;
|
|
|
|
while (<>) {
|
|
chop;
|
|
if (/--(.*)/) {
|
|
print " /* $1 */\n";
|
|
}
|
|
s/--.*$//;
|
|
|
|
if (/^\s*CREATE TABLE (\S+)/) {
|
|
print " $1:\n";
|
|
$in_item = 1;
|
|
} elsif(/^\);/) {
|
|
print " \"\",\n\n";
|
|
$in_item = 0;
|
|
} else {
|
|
if ($in_item) {
|
|
next if /^\s*$/;
|
|
print " \"$_\" +\n";
|
|
}
|
|
}
|
|
}
|
|
print "};\n"
|