private void traverseTerminalStrings(Item i) {
		if (i.shifts != null) {
			for (Transition t : i.shifts) {				
				q.add(t);
				traverseTerminalStrings(t.target);
				q.pop();
			}
		} else {
			Symbol[] str = new Symbol[q.size()];
			for (int j = 0; j < q.size(); ++j) {
				str[j] = q.get(j).label;
			}
			
			// add it to minimalStrings
			for (Transition t : i.reduces) {
				for (Transition shift: t.shifts) {
					Symbol[] prev = minimalStrings.get(shift);
					if (prev == null || prev.length > str.length) {
						minimalStrings.put(shift, str);
					}
				}
			}
		}
	}