Re-organized the built in function classes
This commit is contained in:
parent
9a85cb62df
commit
0560c02093
|
@ -3,7 +3,7 @@ package function;
|
||||||
import java.text.MessageFormat;
|
import java.text.MessageFormat;
|
||||||
|
|
||||||
import error.LispException;
|
import error.LispException;
|
||||||
import function.builtin.LENGTH;
|
import function.builtin.cons.LENGTH;
|
||||||
import sexpression.*;
|
import sexpression.*;
|
||||||
|
|
||||||
public class ArgumentValidator {
|
public class ArgumentValidator {
|
||||||
|
|
|
@ -2,7 +2,8 @@ package function;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
import function.builtin.*;
|
import function.builtin.EVAL;
|
||||||
|
import function.builtin.special.SETF;
|
||||||
import sexpression.*;
|
import sexpression.*;
|
||||||
import table.SymbolTable;
|
import table.SymbolTable;
|
||||||
|
|
||||||
|
|
|
@ -3,6 +3,10 @@ package function.builtin;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
|
||||||
import function.LispFunction;
|
import function.LispFunction;
|
||||||
|
import function.builtin.cons.*;
|
||||||
|
import function.builtin.math.*;
|
||||||
|
import function.builtin.predicate.*;
|
||||||
|
import function.builtin.special.*;
|
||||||
import sexpression.*;
|
import sexpression.*;
|
||||||
|
|
||||||
public class EVAL extends LispFunction {
|
public class EVAL extends LispFunction {
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
package function.builtin;
|
package function.builtin;
|
||||||
|
|
||||||
import function.LispFunction;
|
import function.LispFunction;
|
||||||
|
import function.builtin.cons.LENGTH;
|
||||||
import sexpression.*;
|
import sexpression.*;
|
||||||
|
|
||||||
public class EXIT extends LispFunction {
|
public class EXIT extends LispFunction {
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
package function.builtin;
|
package function.builtin;
|
||||||
|
|
||||||
import function.*;
|
import function.*;
|
||||||
|
import function.builtin.cons.LIST;
|
||||||
import sexpression.*;
|
import sexpression.*;
|
||||||
|
|
||||||
public class FUNCALL extends LispFunction {
|
public class FUNCALL extends LispFunction {
|
||||||
|
|
|
@ -4,6 +4,7 @@ import java.io.FileInputStream;
|
||||||
import java.io.FileNotFoundException;
|
import java.io.FileNotFoundException;
|
||||||
|
|
||||||
import function.LispFunction;
|
import function.LispFunction;
|
||||||
|
import function.builtin.cons.LENGTH;
|
||||||
import parser.LispParser;
|
import parser.LispParser;
|
||||||
import sexpression.*;
|
import sexpression.*;
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
package function.builtin;
|
package function.builtin;
|
||||||
|
|
||||||
import function.LispFunction;
|
import function.LispFunction;
|
||||||
|
import function.builtin.cons.LENGTH;
|
||||||
import sexpression.*;
|
import sexpression.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
package function.builtin;
|
package function.builtin;
|
||||||
|
|
||||||
import function.*;
|
import function.*;
|
||||||
|
import function.builtin.cons.LENGTH;
|
||||||
import sexpression.*;
|
import sexpression.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package function.builtin;
|
package function.builtin.cons;
|
||||||
|
|
||||||
import function.*;
|
import function.*;
|
||||||
import sexpression.*;
|
import sexpression.*;
|
|
@ -1,4 +1,4 @@
|
||||||
package function.builtin;
|
package function.builtin.cons;
|
||||||
|
|
||||||
import function.*;
|
import function.*;
|
||||||
import sexpression.*;
|
import sexpression.*;
|
|
@ -1,4 +1,4 @@
|
||||||
package function.builtin;
|
package function.builtin.cons;
|
||||||
|
|
||||||
import function.*;
|
import function.*;
|
||||||
import sexpression.*;
|
import sexpression.*;
|
|
@ -1,4 +1,4 @@
|
||||||
package function.builtin;
|
package function.builtin.cons;
|
||||||
|
|
||||||
import java.math.BigInteger;
|
import java.math.BigInteger;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package function.builtin;
|
package function.builtin.cons;
|
||||||
|
|
||||||
import function.*;
|
import function.*;
|
||||||
import sexpression.*;
|
import sexpression.*;
|
|
@ -1,4 +1,4 @@
|
||||||
package function.builtin;
|
package function.builtin.math;
|
||||||
|
|
||||||
import java.math.BigInteger;
|
import java.math.BigInteger;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package function.builtin;
|
package function.builtin.math;
|
||||||
|
|
||||||
import java.math.BigInteger;
|
import java.math.BigInteger;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package function.builtin;
|
package function.builtin.math;
|
||||||
|
|
||||||
import function.*;
|
import function.*;
|
||||||
import sexpression.*;
|
import sexpression.*;
|
|
@ -1,4 +1,4 @@
|
||||||
package function.builtin;
|
package function.builtin.math;
|
||||||
|
|
||||||
import function.*;
|
import function.*;
|
||||||
import sexpression.*;
|
import sexpression.*;
|
|
@ -1,4 +1,4 @@
|
||||||
package function.builtin;
|
package function.builtin.predicate;
|
||||||
|
|
||||||
import function.*;
|
import function.*;
|
||||||
import sexpression.*;
|
import sexpression.*;
|
|
@ -1,4 +1,4 @@
|
||||||
package function.builtin;
|
package function.builtin.predicate;
|
||||||
|
|
||||||
import function.*;
|
import function.*;
|
||||||
import sexpression.*;
|
import sexpression.*;
|
|
@ -1,6 +1,7 @@
|
||||||
package function.builtin;
|
package function.builtin.predicate;
|
||||||
|
|
||||||
import function.*;
|
import function.*;
|
||||||
|
import function.builtin.cons.LIST;
|
||||||
import sexpression.*;
|
import sexpression.*;
|
||||||
|
|
||||||
public class EQUAL extends LispFunction {
|
public class EQUAL extends LispFunction {
|
|
@ -1,4 +1,4 @@
|
||||||
package function.builtin;
|
package function.builtin.predicate;
|
||||||
|
|
||||||
import function.*;
|
import function.*;
|
||||||
import sexpression.*;
|
import sexpression.*;
|
|
@ -1,4 +1,4 @@
|
||||||
package function.builtin;
|
package function.builtin.predicate;
|
||||||
|
|
||||||
import function.*;
|
import function.*;
|
||||||
import sexpression.*;
|
import sexpression.*;
|
|
@ -1,4 +1,4 @@
|
||||||
package function.builtin;
|
package function.builtin.predicate;
|
||||||
|
|
||||||
import function.*;
|
import function.*;
|
||||||
import sexpression.*;
|
import sexpression.*;
|
|
@ -1,4 +1,4 @@
|
||||||
package function.builtin;
|
package function.builtin.predicate;
|
||||||
|
|
||||||
import function.*;
|
import function.*;
|
||||||
import sexpression.*;
|
import sexpression.*;
|
|
@ -1,4 +1,4 @@
|
||||||
package function.builtin;
|
package function.builtin.predicate;
|
||||||
|
|
||||||
import function.*;
|
import function.*;
|
||||||
import sexpression.*;
|
import sexpression.*;
|
|
@ -1,6 +1,7 @@
|
||||||
package function.builtin;
|
package function.builtin.special;
|
||||||
|
|
||||||
import function.*;
|
import function.*;
|
||||||
|
import function.builtin.EVAL;
|
||||||
import sexpression.*;
|
import sexpression.*;
|
||||||
|
|
||||||
public class COND extends LispFunction {
|
public class COND extends LispFunction {
|
|
@ -1,8 +1,9 @@
|
||||||
package function.builtin;
|
package function.builtin.special;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
|
||||||
import function.*;
|
import function.*;
|
||||||
|
import function.builtin.EVAL;
|
||||||
import sexpression.*;
|
import sexpression.*;
|
||||||
|
|
||||||
public class DEFUN extends LispFunction {
|
public class DEFUN extends LispFunction {
|
|
@ -1,6 +1,8 @@
|
||||||
package function.builtin;
|
package function.builtin.special;
|
||||||
|
|
||||||
import function.*;
|
import function.*;
|
||||||
|
import function.builtin.*;
|
||||||
|
import function.builtin.cons.LENGTH;
|
||||||
import sexpression.*;
|
import sexpression.*;
|
||||||
|
|
||||||
/**
|
/**
|
|
@ -1,6 +1,7 @@
|
||||||
package function.builtin;
|
package function.builtin.special;
|
||||||
|
|
||||||
import function.*;
|
import function.*;
|
||||||
|
import function.builtin.EVAL;
|
||||||
import sexpression.*;
|
import sexpression.*;
|
||||||
import table.SymbolTable;
|
import table.SymbolTable;
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
package function.builtin;
|
package function.builtin.special;
|
||||||
|
|
||||||
import function.LispFunction;
|
import function.LispFunction;
|
||||||
|
import function.builtin.cons.LENGTH;
|
||||||
import sexpression.*;
|
import sexpression.*;
|
||||||
|
|
||||||
/**
|
/**
|
|
@ -1,6 +1,8 @@
|
||||||
package function.builtin;
|
package function.builtin.special;
|
||||||
|
|
||||||
import function.*;
|
import function.*;
|
||||||
|
import function.builtin.*;
|
||||||
|
import function.builtin.cons.LENGTH;
|
||||||
import sexpression.*;
|
import sexpression.*;
|
||||||
import table.SymbolTable;
|
import table.SymbolTable;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package function.builtin;
|
package function.builtin.cons;
|
||||||
|
|
||||||
import static testutil.TestUtilities.*;
|
import static testutil.TestUtilities.*;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package function.builtin;
|
package function.builtin.cons;
|
||||||
|
|
||||||
import static testutil.TestUtilities.*;
|
import static testutil.TestUtilities.*;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package function.builtin;
|
package function.builtin.cons;
|
||||||
|
|
||||||
import static testutil.TestUtilities.*;
|
import static testutil.TestUtilities.*;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package function.builtin;
|
package function.builtin.cons;
|
||||||
|
|
||||||
import static testutil.TestUtilities.*;
|
import static testutil.TestUtilities.*;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package function.builtin;
|
package function.builtin.math;
|
||||||
|
|
||||||
import static testutil.TestUtilities.*;
|
import static testutil.TestUtilities.*;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package function.builtin;
|
package function.builtin.math;
|
||||||
|
|
||||||
import static testutil.TestUtilities.*;
|
import static testutil.TestUtilities.*;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package function.builtin;
|
package function.builtin.math;
|
||||||
|
|
||||||
import static testutil.TestUtilities.*;
|
import static testutil.TestUtilities.*;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package function.builtin;
|
package function.builtin.math;
|
||||||
|
|
||||||
import static testutil.TestUtilities.*;
|
import static testutil.TestUtilities.*;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package function.builtin;
|
package function.builtin.predicate;
|
||||||
|
|
||||||
import static testutil.TestUtilities.*;
|
import static testutil.TestUtilities.*;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package function.builtin;
|
package function.builtin.predicate;
|
||||||
|
|
||||||
import static testutil.TestUtilities.*;
|
import static testutil.TestUtilities.*;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package function.builtin;
|
package function.builtin.predicate;
|
||||||
|
|
||||||
import static testutil.TestUtilities.*;
|
import static testutil.TestUtilities.*;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package function.builtin;
|
package function.builtin.predicate;
|
||||||
|
|
||||||
import static testutil.TestUtilities.*;
|
import static testutil.TestUtilities.*;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package function.builtin;
|
package function.builtin.predicate;
|
||||||
|
|
||||||
import static testutil.TestUtilities.*;
|
import static testutil.TestUtilities.*;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package function.builtin;
|
package function.builtin.predicate;
|
||||||
|
|
||||||
import static testutil.TestUtilities.*;
|
import static testutil.TestUtilities.*;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package function.builtin;
|
package function.builtin.predicate;
|
||||||
|
|
||||||
import static testutil.TestUtilities.*;
|
import static testutil.TestUtilities.*;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package function.builtin;
|
package function.builtin.predicate;
|
||||||
|
|
||||||
import static testutil.TestUtilities.*;
|
import static testutil.TestUtilities.*;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package function.builtin;
|
package function.builtin.special;
|
||||||
|
|
||||||
import static testutil.TestUtilities.*;
|
import static testutil.TestUtilities.*;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package function.builtin;
|
package function.builtin.special;
|
||||||
|
|
||||||
import static testutil.TestUtilities.*;
|
import static testutil.TestUtilities.*;
|
||||||
|
|
Loading…
Reference in New Issue