next up previous
Next: Initialization Up: Declarations Previous: Declarators

Type names

A type name is used to denote a type. If it is not possible to describe the desired type with specifiers alone, then a declarator is needed. However, that declarator is not allowed to declare an identifier. This situation, a declarator that describes a type but does not declare an identifier, is represented by the abstract_declarator contexts.

AST nodes[14]:

RULE: type_name                    ::= Specifiers                         END;
RULE: type_name                    ::= Specifiers abstract_declarator     END;

RULE: abstract_declarator          ::= pointer_abstract_declarator        END;
RULE: abstract_declarator          ::= array_abstract_declarator          END;
RULE: abstract_declarator          ::= function_abstract_declarator       END;

RULE: pointer_abstract_declarator  ::= '*' Specifiers                     END;
RULE: pointer_abstract_declarator  ::= '*' Specifiers abstract_declarator END;

RULE: array_abstract_declarator    ::= '[' constant_expression ']'        END;
RULE: array_abstract_declarator    ::=
                   abstract_declarator '[' constant_expression ']'        END;

RULE: function_abstract_declarator ::= '(' parameter_type_list ')'        END;
RULE: function_abstract_declarator ::=
                   abstract_declarator '(' parameter_type_list ')'        END;
This macro is defined in definitions 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, and 18.
This macro is invoked in definition 1.



2008-08-30