def METHOD_NAME(lines):
	root = Block(0)
	stack = [root]
	lineno = 0
	for line in lines:
		lineno += 1
		line = line.strip()
		if line.startswith('$'):
			block = Block(lineno)
			block.checkfor(line)
			stack[-1].append(block)
			stack.append(block)
		elif line.startswith('}'):
			stack.pop()
		elif line and not line.startswith('#'):
			stack[-1].append(Block(lineno, line))
	return root