|
@@ -7,6 +7,8 @@ package migl.lisp;
|
|
|
*
|
|
|
*/
|
|
|
public class LispFactory {
|
|
|
+
|
|
|
+ private static Lisp interpreter;
|
|
|
|
|
|
private LispFactory() {
|
|
|
// do nothing
|
|
@@ -18,6 +20,9 @@ public class LispFactory {
|
|
|
* @return a new lisp interpreter.
|
|
|
*/
|
|
|
public static Lisp makeIntepreter() {
|
|
|
- return new LispImpl();
|
|
|
+ if(interpreter == null) {
|
|
|
+ interpreter = new LispImpl();
|
|
|
+ }
|
|
|
+ return interpreter;
|
|
|
}
|
|
|
}
|