-repeating the start and end values with the { value, string } declaration.
-
-abstract_type enum {
- parent = integer;
- map = {
- { { start_value, end_value }, string },
- { { start_value, end_value }, string },
- { { start_value, end_value }, string },
- { value, string },
- { value, string },
- ...
- };
+repeating the start and end values with the value = string declaration. If the
+<integer_type> is omitted, the type chosen by the C compiler to hold the
+enumeration is used. The <integer_type> specifier can only be omitted for
+enumerations containing only simple "value -> string" mappings (compatible with
+C).
+
+enum <integer_type> name {
+ string = start_value1 ... end_value1,
+ "other string" = start_value2 ... end_value2,
+ yet_another_string, /* will be assigned to end_value2 + 1 */
+ "some other string" = value,
+ ...
+};
+
+If the values are omitted, the enumeration starts at 0 and increment of 1 for
+each entry:
+
+enum {
+ ZERO,
+ ONE,
+ TWO,
+ TEN = 10,
+ ELEVEN,