Build grammar from associative net