#!/usr/bin/perl -w

use strict;

open(FP, $ARGV[0]) or die "Can't open file: $!";
$_ = join('', <FP>);
close FP;

# Remove comments and whitespace
s#/\*(.*?)\*/##g;
s/\s+/ /g;
s/} /}\n/g;
s/\s+$//;
s/ { / {/g;
s/; }/}/g;
s/([;:,]) /$1/g;
print;

