 			let upperBound = cykTable.count - row
 			
 			cykTable[row] = (0..<upperBound).map { column -> [SyntaxTree<Production, Range<String.Index>>] in
-				(1...row).flatMap { offset -> [SyntaxTree<Production, Range<String.Index>>] in
+				let cell = (1...row).flatMap { offset -> [SyntaxTree<Production, Range<String.Index>>] in
 					let ref1Row = row - offset
 					let ref2Col = column + row - offset + 1
 					let ref2Row = offset - 1

		}
	}

	public func syntaxTree(for string: String) throws -> SyntaxTree<NonTerminal, Range<String.Index>> {
		let tokens = try self.tokenizer.tokenize(string)
		if tokens.isEmpty {
			if normalizedGrammar.productions.contains(where: { production -> Bool in
				production.pattern == normalizedGrammar.start
					&& production.generatesEmpty(in: normalizedGrammar)
			}) {
				return SyntaxTree.node(key: normalizedGrammar.start, children: [SyntaxTree.leaf("".startIndex ..< "".endIndex)])
			} else {
				throw SyntaxError(range: string.startIndex ..< string.endIndex, in: string, reason: .emptyNotAllowed)
			}

	}
}

/// A parser that can parse ambiguous grammars and retrieve every possible syntax tree
public protocol AmbiguousGrammarParser: Parser {
	func allSyntaxTrees(for string: String) throws -> [SyntaxTree<NonTerminal, Range<String.Index>>]
}

/// A parser based on the CYK algorithm.
///
/// The parser can parse non-deterministic and deterministic grammars.
/// It requires O(n^3) runtime.
public struct CYKParser: AmbiguousGrammarParser {
	
	/// The grammar which the parser recognizes
	public let grammar: Grammar
