improves grammar by also taking links of types into account
combines classsig and methodsig grammar