import shlex


def parseTransform(transform):
	"""
	Parses a single JTL transform into tokens.

	:param transform: str
	:return: [[str]]
	"""
	#Create a lexer with some slight tweaks
	lexer = shlex.shlex(transform, posix=False)
	lexer.wordchars += '.+-*=<>!'

	#Split into operations
	operations = []
	operation = []
	for token in lexer:
		#Split tokens on $
		if token == '$':
			operations.append(operation)
			operation = []
		else:
			operation.append(token)

	#Append any final operation
	operations.append(operation)

	return operations