protected function readLiteral($input, $delim = '"', $escaper = NULL)
	{
		$literal = '';
		$escaped = false;
		$terminated = false;
		
		for($size = strlen($input), $i = 1; $i < $size; $i++)
		{
			if($input[$i] == $escaper)
			{
				if($escaped)
				{
					$literal .= $escaper;
					$escaped = false;
					
					continue;
				}
				
				$escaped = true;
				
				continue;
			}
			
			if($input[$i] == $delim)
			{
				if($escaped)
				{
					$escaped = false;
					$literal .= $delim;
					
					continue;
				}
				
				$terminated = true;
				
				break;
			}
			
			$escaped = false;
			$literal .= $input[$i];
		}
		
		if(!$terminated)
		{
			throw new \RuntimeException(sprintf('Unterminated literal: %s%s', $delim, $literal));
		}
		
		return $literal;
	}