def remove_exclude_templates(self, exclude_templates):
    """Remove specified exclude templates from the grammar."""
    all_templates = []
    exclude_templates = [(t[0], str(t[1])) for t in exclude_templates]
    for template, rules in self.all_templates:
      if (template, str(rules)) not in exclude_templates:
        all_templates.append((template, rules))
    self.all_templates = all_templates
Remove specified exclude templates from the grammar.
language/gscan/data/grammar.py