+ {
+ match_u32_assert(3);
+ fprintf(stream, "(special 3)");
+ match_byte_assert(0);
+ match_byte_assert(0);
+ match_byte_assert(1);
+ match_byte_assert(0);
+ match_u32_assert(2);
+ dump_nested_string(); /* Our corpus doesn't contain any examples with strings though. */
+ }
+ }
+ else
+ match_byte_assert (0x58);
+}
+
+static const char *
+format_to_string (int type)
+{
+ static char tmp[16];
+ switch (type)
+ {
+ case 1: return "A";
+ case 2: return "AHEX";
+ case 3: return "COMMA";
+ case 4: return "DOLLAR";
+ case 5: case 40: return "F";
+ case 6: return "IB";
+ case 7: return "PIBHEX";
+ case 8: return "P";
+ case 9: return "PIB";
+ case 10: return "PK";
+ case 11: return "RB";
+ case 12: return "RBHEX";
+ case 15: return "Z";
+ case 16: return "N";
+ case 17: return "E";
+ case 20: return "DATE";
+ case 21: return "TIME";
+ case 22: return "DATETIME";
+ case 23: return "ADATE";
+ case 24: return "JDATE";
+ case 25: return "DTIME";
+ case 26: return "WKDAY";
+ case 27: return "MONTH";
+ case 28: return "MOYR";
+ case 29: return "QYR";
+ case 30: return "WKYR";
+ case 31: return "PCT";
+ case 32: return "DOT";
+ case 33: return "CCA";
+ case 34: return "CCB";
+ case 35: return "CCC";
+ case 36: return "CCD";
+ case 37: return "CCE";
+ case 38: return "EDATE";
+ case 39: return "SDATE";
+ default:
+ abort();
+ sprintf(tmp, "<%d>", type);
+ return tmp;
+ }
+}
+
+static void
+dump_value(FILE *stream, int level)
+{
+ match_byte(0);
+ match_byte(0);
+ match_byte(0);
+ match_byte(0);
+
+ for (int i = 0; i <= level; i++)
+ fprintf (stream, " ");
+
+ if (match_byte (3))
+ {
+ char *text = get_string();
+ dump_value_31(stream);
+ char *identifier = get_string();
+ char *text_eng = get_string();
+ fprintf (stream, "<string c=\"%s\"", text_eng);
+ if (identifier[0])
+ fprintf (stream, " identifier=\"%s\"", identifier);
+ if (strcmp(text_eng, text))
+ fprintf (stream, " local=\"%s\"", text);
+ fprintf (stream, "/>\n");
+ if (!match_byte (0))
+ match_byte_assert(1);