16. Enumerations

An Enumeration (or enum for short) is a type whose only valid values are a set of named constants. These constants themselves may be of any type, including the enumeration itself.

16.1. Syntax

EnumerationItem  ::=  Identifier [ "=>" Value ]
EnumerationItems ::=  ( EnumerationItem \n )*
Enumeration      ::=  "enum" Identifier EnumerationItems "end"