Implements the rules: list_ids, list_vars_declaration and type.