Added weights on rules, discrete distribution on

the generator and the project can now be built with codelite and
gcc/mingw.