def type_name
      name = @input.scan(/[a-zA-Z0-9_]+(\.[a-zA-Z0-9_]+)*|\*/)

      if !name
        return false
      elsif @relations[name]
        @out << @formatter.link(name, nil, name)
      elsif @primitives[name]
        if @relations[@primitives[name]]
          @out << @formatter.link(@primitives[name], nil, name)
        else
          @out << name
        end
      elsif @relations.ignore?(name) || name == "*"
        @out << name
      else
        @error = :name
        return false
      end

      # All type names besides * can be followed by .<arguments>
      if name != "*" && @input.scan(/\.</)
        @out << ".&lt;"
        return false unless type_arguments
        return false unless @input.scan(/>/)
        @out << "&gt;"
      end

      true
    end
def type_name
      name = @input.scan(/[a-zA-Z0-9_]+(\.[a-zA-Z0-9_]+)*|\*/)

      if !name
        return false
      elsif @relations[name]
        @out << @formatter.link(name, nil, name)
      elsif @primitives[name]
        if @relations[@primitives[name]]
          @out << @formatter.link(@primitives[name], nil, name)
        else
          @out << name
        end
      elsif @relations.ignore?(name) || name == "*"
        @out << name
      else
        @error = :name
        return false
      end

      # All type names besides * can be followed by .<arguments>
      if name != "*" && @input.scan(/\.</)
        @out << ".&lt;"
        return false unless type_arguments
        return false unless @input.scan(/>/)
        @out << "&gt;"
      end

      true
    end
<type-name> ::= <type-application> | "*"

     <type-application> ::= <ident-chain> [ "." "<" <type-arguments> ">" ]

     <type-arguments> ::= <alteration-type> [ "," <alteration-type> ]*

     <ident-chain> ::= <ident> [ "." <ident> ]*

     <ident> ::= [a-zA-Z0-9_]+