*/
public ConsCell replaceSymbolPair(ConsCell input, String startSymbol, String endSymbol, String newStart, String newEnd) throws ParserException {
ConsCell current = input;
do {
if (current.getCarType() == ConsType.CONS_CELL)
current.replaceCar(replaceSymbolPair((ConsCell) current.getCar(), startSymbol, endSymbol, newStart, newEnd));
if (current.getCarType() == ConsType.IDENTIFIER && ((String) current.getCar()).equals(startSymbol)) {
ConsCell inner = new ConsCell(), head = inner;
int count = 1;
boolean reset = current == input;
while (!(current = current.remove()).isNull()) {