    [NAME]
    ALL.dao.grammar.typename

    [TITLE]
    Type Name

    [DESCRIPTION]

    Drafting in progress.

     0.1   Special Types

       1  NoneType       ::= [ 'dao' '::' ] 'none'
       2  AnyType        ::= [ 'dao' '::' ] 'any'
       3  UndefinedType  ::= '?'
       4  VariantHolder  ::= TypeHolder '<' VariantType '>'
       5  SpecialType    ::= NoneType | AnyType | UndefinedType | TypeHolder | VariantHolder

     0.2   Primitive Types

       1  PrimitiveType ::= 'int' | 'float' | 'double' | 'complex' | 'long' | 'string'

     0.3   Enum Symbol Types

       1  SymbolItem ::= Identifier [ '=' Integer ]
       2
       3  SymbolType ::= 'enum' '<' [ SymbolItem { ',' SymbolItem } ] '>'
       4  FlagType   ::= 'enum' '<' [ SymbolItem { ';' SymbolItem } ] '>'
       5
       6  EnumSymbolType ::= 'enum' | SymbolType | FlagType

     0.4   Array Type

       1  ArrayNumType ::= 'int' | 'float' | 'double' | 'complex'
       2  ArrayType ::= 'array' [ '<' ( ArrayNumType | AnyType | UndefinedType | TypeHolder ) '>' ]

     0.5   List Type

       1  ListType ::= 'list' [ '<' Type '>' ]

     0.6   Map Type

       1  MapType ::= 'map' [ '<' Type, Type '>' ]

     0.7   Tuple Type

       1  TupleItemType ::= [ Identifier ':' ] Type
       2  TupleType ::= 'tuple' [ '<' TupleItemType { ',' TupleItemType } '>' ]

     0.8   Routine Type

       1  ParamTypeItem1 ::= 'Identifier' [ ':' Type ]
       2  ParamTypeItem2 ::= 'Identifier' [ '=' Type ]
       3  ParamTypeList1 ::= ParamTypeItem1 { ',' ParamTypeItem1 } { ',' ParamTypeItem2 } [ ',' '...' ]
       4  ParamTypeList2 ::= ParamTypeItem2 { ',' ParamTypeItem2 } [ ',' '...' ]
       5  ParamTypeList  ::= ParamTypeList1 | ParamTypeList2 | '...'
       6
       7  ParamTypeItem3 ::= 'Identifier' ':' Type
       8  ParamTypeList3 ::= ParamTypeItem3 { ',' ParamTypeItem3 }
       9  CodeBlockReturn ::= '[' ParamTypeList3 ']'
      10
      11  RoutineType ::= 'routine' [ '<' [ ParamTypeList ] [ '=>' Type ] '>' [ CodeBlockReturn ] ]

     0.9   User Type

       1  # For unspecialized C data types:
       2  TemplParamList1 ::= TypeHolder { ',' TypeHolder } { ',' TypeHolder '=' Type }
       3  TemplParamList2 ::= TypeHolder '=' Type { ',' TypeHolder '=' Type }
       4
       5
       6  # For specialized C data types:
       7  TemplArgList   ::= ( Type | ConstExpression) { ',' Type | ConstExpression }
       8
       9  TemplType ::= Identifier '<' ( TemplParamList1 | TemplParamList2 | TemplType ) '>'
      10
      11  UserType ::= Identifier
      12             | UserType '::' Identifier
      13             | UserType '::' TemplType

     0.10   Variant Type

       1  VariantType ::= Type ( '|' Type )+

     0.11   Type

       1  Type ::= SpecialType
       2         | [ 'dao' '::' ] PrimitiveType
       3         | [ 'dao' '::' ] EnumSymbolType
       4         | [ 'dao' '::' ] ArrayType
       5         | [ 'dao' '::' ] ListType
       6         | [ 'dao' '::' ] MapType
       7         | [ 'dao' '::' ] TupleType
       8         | [ 'dao' '::' ] RoutineType
       9         | { Identifier '::' } UserType