docs: protected List<Grammar> getEffectivelyUsedGrammars(final Grammar grammar) {
      final Function1<AbstractRule, Grammar> _function = (AbstractRule it) -> {
        return GrammarUtil.getGrammar(it);
      };
      final Function1<Grammar, Boolean> _function_1 = (Grammar it) -> {
        return Boolean.valueOf((it != grammar));
      };
      return IterableExtensions.<Grammar>toList(IterableExtensions.<Grammar>toSet(IterableExtensions.<Grammar>filter(ListExtensions.<AbstractRule, Grammar>map(GrammarUtil.allRules(grammar), _function), _function_1)));
    }