def asn (tokeniser, value=None):
	if value is None:
		if not tokeniser.tokens:
			raise ValueError('an asn is required')

	value = tokeniser()
	try:
		if value.count('.'):
			high,low = value.split('.',1)
			as_number = (int(high) << 16) + int(low)
		else:
			as_number = int(value)
		return ASN(as_number)
	except __HOLE__:
		raise ValueError('"%s" is an invalid ASN' % value)
dataset/ETHPy150Open Exa-Networks/exabgp/lib/exabgp/configuration/parser.py/asn