|
@@ -58,7 +58,7 @@ public class LispImpl implements Lisp {
|
|
|
result.add(str.substring(1));
|
|
|
}
|
|
|
} else if(str.charAt(str.length() - 1) == ')'){
|
|
|
- result.add(str.substring(0, str.length() - 2));
|
|
|
+ result.add(str.substring(0, str.length() - 1));
|
|
|
result.add("" + str.charAt(str.length() - 1));
|
|
|
} else {
|
|
|
result.add(str);
|
|
@@ -100,6 +100,7 @@ public class LispImpl implements Lisp {
|
|
|
String val = pile.remove(0);
|
|
|
while(pile.size() > 0 && !val.equals(")")) {
|
|
|
if(val.equals("(")) {
|
|
|
+ //list = list.append(this.parse("(" + val));
|
|
|
list = list.append(this.parseList(pile));
|
|
|
} else {
|
|
|
list = list.append(this.parseElement(val));
|