@Override
	public AnalysisResult analyze(final SourceCode input) {
		reporter.logStart(StringAnalyzer.class, input);
		StringBuilder sb = new StringBuilder();
		final Terminator terminator = getTerminator(input);
		if (terminator == Terminator.NONE) {
			return SimpleAnalysisResult.failed(StringAnalyzer.class,
					"does not start as a string");
		}
		final boolean singleLine = singleLine(terminator);
		boolean escaped = false;
		for (int i = length(terminator); i < input.length(); i++) {
			if (escaped) {
				sb.append(convertEscapedChar(input.charAt(i)));
				escaped = false;
			} else {
				if (isTerminated(input, i, terminator)) {
					return SimpleAnalysisResult.success(StringAnalyzer.class,
							input.rest(i + length(terminator)),
							new TerminalSymbolExecutor<String>(sb.toString()));
				}
				if (singleLine && isNL(input.charAt(i))) {
					return SimpleAnalysisResult.failed(StringAnalyzer.class,
							"single line string not terminated before eol");
				}
				if (input.charAt(i) == BS) {
					escaped = true;
				} else {
					sb.append(input.charAt(i));
				}
			}
		}

		return SimpleAnalysisResult.failed(StringAnalyzer.class,
				"string not terminated");
	}