+typedef struct parsed_array_t parsed_array_t;
+struct parsed_array_t {
+ construct_type_t construct_type;
+ type_qualifier_t type_qualifiers;
+ bool is_static;
+ bool is_variable;
+ expression_t *size;
+};
+
+typedef struct construct_base_type_t construct_base_type_t;
+struct construct_base_type_t {
+ construct_type_t construct_type;
+ type_t *type;
+};
+
+static construct_type_t *parse_pointer_declarator(void)
+{
+ eat('*');
+
+ parsed_pointer_t *pointer = obstack_alloc(&temp_obst, sizeof(pointer[0]));
+ memset(pointer, 0, sizeof(pointer[0]));
+ pointer->type_qualifiers = parse_type_qualifiers();
+
+ return (construct_type_t*) pointer;
+}
+
+static construct_type_t *parse_array_declarator(void)
+{
+ eat('[');
+
+ parsed_array_t *array = obstack_alloc(&temp_obst, sizeof(array[0]));
+ memset(array, 0, sizeof(array[0]));
+
+ if(token.type == T_static) {
+ array->is_static = true;
+ next_token();
+ }
+
+ type_qualifier_t type_qualifiers = parse_type_qualifiers();
+ if(type_qualifiers != 0) {
+ if(token.type == T_static) {
+ array->is_static = true;
+ next_token();
+ }
+ }
+ array->type_qualifiers = type_qualifiers;
+
+ if(token.type == '*' && look_ahead(1)->type == ']') {
+ array->is_variable = true;
+ next_token();
+ } else if(token.type != ']') {
+ array->size = parse_assignment_expression();
+ }
+
+ expect(']');
+
+ return (construct_type_t*) array;
+}
+
+static construct_type_t *parse_method_declarator(declaration_t *declaration)
+{
+ eat('(');
+
+ method_type_t *method_type
+ = allocate_type_zero(sizeof(method_type[0]));
+ method_type->type.type = TYPE_METHOD;
+
+ declaration_t *parameters = parse_parameters(method_type);
+ if(declaration != NULL) {
+ declaration->context.declarations = parameters;
+ }
+
+ construct_method_type_t *construct_method_type =
+ obstack_alloc(&temp_obst, sizeof(construct_method_type[0]));
+ memset(construct_method_type, 0, sizeof(construct_method_type[0]));
+ construct_method_type->construct_type.type = CONSTRUCT_METHOD;
+ construct_method_type->method_type = method_type;
+
+ expect(')');
+
+ return (construct_type_t*) construct_method_type;
+}