src/ets.php
function build_all($datatree, $entry)
	{
		// No entry: stop
		if (!isset($this->masktree[$entry])) {
			$this->error(8, 57, $entry);
		}
		// Data tree
		$this->datatree = $datatree;
		if (is_array($this->datatree)) {
			$this->datatree['_parent'] = NULL;
		} elseif (is_object($this->datatree)) {
			$this->datatree->_parent = NULL;
		} elseif (isset($this->datatree)) {
			$this->error(9, 58);
			$this->datatree = NULL;
		}
		// Build
		$built = $this->build_mask($this->datatree, $this->masktree[$entry]);
		// Reduce and return
		if (!isset($this->masktree['0reduce'])) {
			$this->masktree['0reduce'] = _ETS_REDUCE_OFF;
		}
		switch ($this->masktree['0reduce']) {
			case _ETS_REDUCE_OFF:
				break;
			case _ETS_REDUCE_SPACES:
				$built = preg_replace('/(\r\n|\r|\n)+/sm', "\n", preg_replace('/[ \t]*?(\r\n|\r|\n)+[\t ]*/sm', "\n", $built));
				break;
			case _ETS_REDUCE_ALL:
				$built = preg_replace('/[ \t]*?(\r\n|\r|\n)+[\t ]*/sm', '', $built);
				break;
		}
		$built = str_replace("\1n\1", "\n", $built);
		$built = str_replace("\1r\1", "\r", $built);
		$built = str_replace("\1t\1", "\t", $built);
		$built = str_replace("\1s\1", " ",  $built);
		return $built;
	}
function build_all($datatree, $entry)
	{
		// No entry: stop
		if (!isset($this->masktree[$entry])) {
			$this->error(8, 57, $entry);
		}
		// Data tree
		$this->datatree = $datatree;
		if (is_array($this->datatree)) {
			$this->datatree['_parent'] = NULL;
		} elseif (is_object($this->datatree)) {
			$this->datatree->_parent = NULL;
		} elseif (isset($this->datatree)) {
			$this->error(9, 58);
			$this->datatree = NULL;
		}
		// Build
		$built = $this->build_mask($this->datatree, $this->masktree[$entry]);
		// Reduce and return
		if (!isset($this->masktree['0reduce'])) {
			$this->masktree['0reduce'] = _ETS_REDUCE_OFF;
		}
		switch ($this->masktree['0reduce']) {
			case _ETS_REDUCE_OFF:
				break;
			case _ETS_REDUCE_SPACES:
				$built = preg_replace('/(\r\n|\r|\n)+/sm', "\n", preg_replace('/[ \t]*?(\r\n|\r|\n)+[\t ]*/sm', "\n", $built));
				break;
			case _ETS_REDUCE_ALL:
				$built = preg_replace('/[ \t]*?(\r\n|\r|\n)+[\t ]*/sm', '', $built);
				break;
		}
		$built = str_replace("\1n\1", "\n", $built);
		$built = str_replace("\1r\1", "\r", $built);
		$built = str_replace("\1t\1", "\t", $built);
		$built = str_replace("\1s\1", " ",  $built);
		return $built;
	}
Build the result