+ PARSE_ERROR0("Unparsable size of array");
+ }
+ /* End of fixed size arrays handling */
+
+ } else if (gras_ddt_parse_tok_num == GRAS_DDT_PARSE_TOKEN_WORD) {
+ /* Handle annotation */
+ s_identifier_t array;
+ char *keyname = NULL;
+ char *keyval = NULL;
+ memset(&array,0,sizeof(array));
+ if (strcmp(gras_ddt_parse_text,"GRAS_ANNOTE"))
+ PARSE_ERROR1("Unparsable symbol: Expected 'GRAS_ANNOTE', got '%s'",gras_ddt_parse_text);
+
+ gras_ddt_parse_tok_num = gras_ddt_parse_lex_n_dump();
+ if (gras_ddt_parse_tok_num != GRAS_DDT_PARSE_TOKEN_LP)
+ PARSE_ERROR1("Unparsable annotation: Expected parenthesis, got '%s'",gras_ddt_parse_text);
+
+ while ( (gras_ddt_parse_tok_num = gras_ddt_parse_lex_n_dump()) == GRAS_DDT_PARSE_TOKEN_EMPTY );
+
+ if (gras_ddt_parse_tok_num != GRAS_DDT_PARSE_TOKEN_WORD)
+ PARSE_ERROR1("Unparsable annotation: Expected key name, got '%s'",gras_ddt_parse_text);
+ keyname = (char*)strdup(gras_ddt_parse_text);
+
+ while ( (gras_ddt_parse_tok_num = gras_ddt_parse_lex_n_dump()) == GRAS_DDT_PARSE_TOKEN_EMPTY );
+
+ if (gras_ddt_parse_tok_num != GRAS_DDT_PARSE_TOKEN_COLON)
+ PARSE_ERROR1("Unparsable annotation: expected ',' after the key name, got '%s'",gras_ddt_parse_text);
+
+ while ( (gras_ddt_parse_tok_num = gras_ddt_parse_lex_n_dump()) == GRAS_DDT_PARSE_TOKEN_EMPTY );
+
+ if (gras_ddt_parse_tok_num != GRAS_DDT_PARSE_TOKEN_WORD)
+ PARSE_ERROR1("Unparsable annotation: Expected key value, got '%s'",gras_ddt_parse_text);
+ keyval = (char*)strdup(gras_ddt_parse_text);
+
+ while ( (gras_ddt_parse_tok_num = gras_ddt_parse_lex_n_dump()) == GRAS_DDT_PARSE_TOKEN_EMPTY );
+
+ if (gras_ddt_parse_tok_num != GRAS_DDT_PARSE_TOKEN_RP)
+ PARSE_ERROR1("Unparsable annotation: Expected parenthesis, got '%s'",gras_ddt_parse_text);
+
+ /* Done with parsing the annotation. Now deal with it by replacing previously pushed type with the right one */
+
+ DEBUG2("Anotation: %s=%s",keyname,keyval);
+ if (!strcmp(keyname,"size")) {
+ free(keyname);
+ if (!identifier.tm.is_ref)
+ PARSE_ERROR0("Size annotation for a field not being a reference");
+ identifier.tm.is_ref--;
+
+ if (!strcmp(keyval,"1")) {
+ change_to_ref(identifiers);
+ free(keyval);
+ continue;
+ } else {
+ char *p;
+ int fixed = 1;
+ for (p = keyval; *p != '\0'; p++)
+ if (! isdigit(*p) )
+ fixed = 0;
+ if (fixed) {
+ change_to_fixed_array(identifiers,atoi(keyval));
+ change_to_ref(identifiers);
+ free(keyval);
+ continue;
+
+ } else {
+ change_to_ref_pop_array(identifiers);
+ xbt_dynar_push(fields_to_push,&keyval);
+ continue;
+ }
+ }
+ RAISE_IMPOSSIBLE;
+
+ } else {
+ PARSE_ERROR1("Unknown annotation type: '%s'",keyname);