@staticmethod<EOL><INDENT>def register(value, name):<DEDENT>
if value in TokenKind._value_map:<EOL><INDENT>raise ValueError('<STR_LIT>' % value)<EOL><DEDENT>kind = TokenKind(value, name)<EOL>TokenKind._value_map[value] = kind<EOL>setattr(TokenKind, name, kind)<EOL>
Register a new TokenKind enumeration.

        This should only be called at module load time by code within this
        package.