diff --git a/src/function/ArgumentValidator.java b/src/function/ArgumentValidator.java index 545af26..4df0a41 100644 --- a/src/function/ArgumentValidator.java +++ b/src/function/ArgumentValidator.java @@ -3,7 +3,7 @@ package function; import java.text.MessageFormat; import error.LispException; -import function.builtin.LENGTH; +import function.builtin.cons.LENGTH; import sexpression.*; public class ArgumentValidator { diff --git a/src/function/UserDefinedFunction.java b/src/function/UserDefinedFunction.java index a9fc27b..eaa46c5 100644 --- a/src/function/UserDefinedFunction.java +++ b/src/function/UserDefinedFunction.java @@ -2,7 +2,8 @@ package function; import java.util.ArrayList; -import function.builtin.*; +import function.builtin.EVAL; +import function.builtin.special.SETF; import sexpression.*; import table.SymbolTable; diff --git a/src/function/builtin/EVAL.java b/src/function/builtin/EVAL.java index 19feb34..b377722 100644 --- a/src/function/builtin/EVAL.java +++ b/src/function/builtin/EVAL.java @@ -3,6 +3,10 @@ package function.builtin; import java.util.HashMap; import function.LispFunction; +import function.builtin.cons.*; +import function.builtin.math.*; +import function.builtin.predicate.*; +import function.builtin.special.*; import sexpression.*; public class EVAL extends LispFunction { diff --git a/src/function/builtin/EXIT.java b/src/function/builtin/EXIT.java index 67d4a00..6413ac3 100644 --- a/src/function/builtin/EXIT.java +++ b/src/function/builtin/EXIT.java @@ -1,6 +1,7 @@ package function.builtin; import function.LispFunction; +import function.builtin.cons.LENGTH; import sexpression.*; public class EXIT extends LispFunction { diff --git a/src/function/builtin/FUNCALL.java b/src/function/builtin/FUNCALL.java index 84811cd..c3a6d56 100644 --- a/src/function/builtin/FUNCALL.java +++ b/src/function/builtin/FUNCALL.java @@ -1,6 +1,7 @@ package function.builtin; import function.*; +import function.builtin.cons.LIST; import sexpression.*; public class FUNCALL extends LispFunction { diff --git a/src/function/builtin/LOAD.java b/src/function/builtin/LOAD.java index c03ee1a..22e6963 100644 --- a/src/function/builtin/LOAD.java +++ b/src/function/builtin/LOAD.java @@ -4,6 +4,7 @@ import java.io.FileInputStream; import java.io.FileNotFoundException; import function.LispFunction; +import function.builtin.cons.LENGTH; import parser.LispParser; import sexpression.*; diff --git a/src/function/builtin/PRINT.java b/src/function/builtin/PRINT.java index 9401e91..dc36ede 100644 --- a/src/function/builtin/PRINT.java +++ b/src/function/builtin/PRINT.java @@ -1,6 +1,7 @@ package function.builtin; import function.LispFunction; +import function.builtin.cons.LENGTH; import sexpression.*; /** diff --git a/src/function/builtin/SYMBOL_FUNCTION.java b/src/function/builtin/SYMBOL_FUNCTION.java index 8d7dfb1..e4eac3a 100644 --- a/src/function/builtin/SYMBOL_FUNCTION.java +++ b/src/function/builtin/SYMBOL_FUNCTION.java @@ -1,6 +1,7 @@ package function.builtin; import function.*; +import function.builtin.cons.LENGTH; import sexpression.*; /** diff --git a/src/function/builtin/CAR.java b/src/function/builtin/cons/CAR.java similarity index 94% rename from src/function/builtin/CAR.java rename to src/function/builtin/cons/CAR.java index 1b4a0df..b6d6728 100644 --- a/src/function/builtin/CAR.java +++ b/src/function/builtin/cons/CAR.java @@ -1,4 +1,4 @@ -package function.builtin; +package function.builtin.cons; import function.*; import sexpression.*; diff --git a/src/function/builtin/CDR.java b/src/function/builtin/cons/CDR.java similarity index 94% rename from src/function/builtin/CDR.java rename to src/function/builtin/cons/CDR.java index 3fcd578..44a23da 100644 --- a/src/function/builtin/CDR.java +++ b/src/function/builtin/cons/CDR.java @@ -1,4 +1,4 @@ -package function.builtin; +package function.builtin.cons; import function.*; import sexpression.*; diff --git a/src/function/builtin/CONS.java b/src/function/builtin/cons/CONS.java similarity index 95% rename from src/function/builtin/CONS.java rename to src/function/builtin/cons/CONS.java index 1703ec8..88dc6fd 100644 --- a/src/function/builtin/CONS.java +++ b/src/function/builtin/cons/CONS.java @@ -1,4 +1,4 @@ -package function.builtin; +package function.builtin.cons; import function.*; import sexpression.*; diff --git a/src/function/builtin/LENGTH.java b/src/function/builtin/cons/LENGTH.java similarity index 98% rename from src/function/builtin/LENGTH.java rename to src/function/builtin/cons/LENGTH.java index b4b2d64..00bbbae 100644 --- a/src/function/builtin/LENGTH.java +++ b/src/function/builtin/cons/LENGTH.java @@ -1,4 +1,4 @@ -package function.builtin; +package function.builtin.cons; import java.math.BigInteger; diff --git a/src/function/builtin/LIST.java b/src/function/builtin/cons/LIST.java similarity index 96% rename from src/function/builtin/LIST.java rename to src/function/builtin/cons/LIST.java index 95bc872..2e86547 100644 --- a/src/function/builtin/LIST.java +++ b/src/function/builtin/cons/LIST.java @@ -1,4 +1,4 @@ -package function.builtin; +package function.builtin.cons; import function.*; import sexpression.*; diff --git a/src/function/builtin/DIVIDE.java b/src/function/builtin/math/DIVIDE.java similarity index 98% rename from src/function/builtin/DIVIDE.java rename to src/function/builtin/math/DIVIDE.java index f9efa8c..1d7e2af 100644 --- a/src/function/builtin/DIVIDE.java +++ b/src/function/builtin/math/DIVIDE.java @@ -1,4 +1,4 @@ -package function.builtin; +package function.builtin.math; import java.math.BigInteger; diff --git a/src/function/builtin/MINUS.java b/src/function/builtin/math/MINUS.java similarity index 97% rename from src/function/builtin/MINUS.java rename to src/function/builtin/math/MINUS.java index 9bace55..b809fa1 100644 --- a/src/function/builtin/MINUS.java +++ b/src/function/builtin/math/MINUS.java @@ -1,4 +1,4 @@ -package function.builtin; +package function.builtin.math; import java.math.BigInteger; diff --git a/src/function/builtin/MULTIPLY.java b/src/function/builtin/math/MULTIPLY.java similarity index 97% rename from src/function/builtin/MULTIPLY.java rename to src/function/builtin/math/MULTIPLY.java index eceb095..3b3f6aa 100644 --- a/src/function/builtin/MULTIPLY.java +++ b/src/function/builtin/math/MULTIPLY.java @@ -1,4 +1,4 @@ -package function.builtin; +package function.builtin.math; import function.*; import sexpression.*; diff --git a/src/function/builtin/PLUS.java b/src/function/builtin/math/PLUS.java similarity index 97% rename from src/function/builtin/PLUS.java rename to src/function/builtin/math/PLUS.java index db24685..d561732 100644 --- a/src/function/builtin/PLUS.java +++ b/src/function/builtin/math/PLUS.java @@ -1,4 +1,4 @@ -package function.builtin; +package function.builtin.math; import function.*; import sexpression.*; diff --git a/src/function/builtin/ATOM.java b/src/function/builtin/predicate/ATOM.java similarity index 93% rename from src/function/builtin/ATOM.java rename to src/function/builtin/predicate/ATOM.java index 4be2e9f..4f3ccb2 100644 --- a/src/function/builtin/ATOM.java +++ b/src/function/builtin/predicate/ATOM.java @@ -1,4 +1,4 @@ -package function.builtin; +package function.builtin.predicate; import function.*; import sexpression.*; diff --git a/src/function/builtin/EQ.java b/src/function/builtin/predicate/EQ.java similarity index 97% rename from src/function/builtin/EQ.java rename to src/function/builtin/predicate/EQ.java index 6857537..d37fe44 100644 --- a/src/function/builtin/EQ.java +++ b/src/function/builtin/predicate/EQ.java @@ -1,4 +1,4 @@ -package function.builtin; +package function.builtin.predicate; import function.*; import sexpression.*; diff --git a/src/function/builtin/EQUAL.java b/src/function/builtin/predicate/EQUAL.java similarity index 97% rename from src/function/builtin/EQUAL.java rename to src/function/builtin/predicate/EQUAL.java index 5d2d779..e13a241 100644 --- a/src/function/builtin/EQUAL.java +++ b/src/function/builtin/predicate/EQUAL.java @@ -1,6 +1,7 @@ -package function.builtin; +package function.builtin.predicate; import function.*; +import function.builtin.cons.LIST; import sexpression.*; public class EQUAL extends LispFunction { diff --git a/src/function/builtin/EQUALSP.java b/src/function/builtin/predicate/EQUALSP.java similarity index 97% rename from src/function/builtin/EQUALSP.java rename to src/function/builtin/predicate/EQUALSP.java index 5882e87..e9e2240 100644 --- a/src/function/builtin/EQUALSP.java +++ b/src/function/builtin/predicate/EQUALSP.java @@ -1,4 +1,4 @@ -package function.builtin; +package function.builtin.predicate; import function.*; import sexpression.*; diff --git a/src/function/builtin/GREATERP.java b/src/function/builtin/predicate/GREATERP.java similarity index 97% rename from src/function/builtin/GREATERP.java rename to src/function/builtin/predicate/GREATERP.java index 850626d..276eea1 100644 --- a/src/function/builtin/GREATERP.java +++ b/src/function/builtin/predicate/GREATERP.java @@ -1,4 +1,4 @@ -package function.builtin; +package function.builtin.predicate; import function.*; import sexpression.*; diff --git a/src/function/builtin/LESSP.java b/src/function/builtin/predicate/LESSP.java similarity index 97% rename from src/function/builtin/LESSP.java rename to src/function/builtin/predicate/LESSP.java index 5024649..f5db325 100644 --- a/src/function/builtin/LESSP.java +++ b/src/function/builtin/predicate/LESSP.java @@ -1,4 +1,4 @@ -package function.builtin; +package function.builtin.predicate; import function.*; import sexpression.*; diff --git a/src/function/builtin/LISTP.java b/src/function/builtin/predicate/LISTP.java similarity index 92% rename from src/function/builtin/LISTP.java rename to src/function/builtin/predicate/LISTP.java index f685785..85da74d 100644 --- a/src/function/builtin/LISTP.java +++ b/src/function/builtin/predicate/LISTP.java @@ -1,4 +1,4 @@ -package function.builtin; +package function.builtin.predicate; import function.*; import sexpression.*; diff --git a/src/function/builtin/NULL.java b/src/function/builtin/predicate/NULL.java similarity index 92% rename from src/function/builtin/NULL.java rename to src/function/builtin/predicate/NULL.java index 650858f..fae903f 100644 --- a/src/function/builtin/NULL.java +++ b/src/function/builtin/predicate/NULL.java @@ -1,4 +1,4 @@ -package function.builtin; +package function.builtin.predicate; import function.*; import sexpression.*; diff --git a/src/function/builtin/COND.java b/src/function/builtin/special/COND.java similarity index 96% rename from src/function/builtin/COND.java rename to src/function/builtin/special/COND.java index 05b1fe4..54cdcba 100644 --- a/src/function/builtin/COND.java +++ b/src/function/builtin/special/COND.java @@ -1,6 +1,7 @@ -package function.builtin; +package function.builtin.special; import function.*; +import function.builtin.EVAL; import sexpression.*; public class COND extends LispFunction { diff --git a/src/function/builtin/DEFUN.java b/src/function/builtin/special/DEFUN.java similarity index 96% rename from src/function/builtin/DEFUN.java rename to src/function/builtin/special/DEFUN.java index 6498b84..638c888 100644 --- a/src/function/builtin/DEFUN.java +++ b/src/function/builtin/special/DEFUN.java @@ -1,8 +1,9 @@ -package function.builtin; +package function.builtin.special; import java.util.HashMap; import function.*; +import function.builtin.EVAL; import sexpression.*; public class DEFUN extends LispFunction { diff --git a/src/function/builtin/LAMBDA.java b/src/function/builtin/special/LAMBDA.java similarity index 96% rename from src/function/builtin/LAMBDA.java rename to src/function/builtin/special/LAMBDA.java index ac52dee..30aa5c6 100644 --- a/src/function/builtin/LAMBDA.java +++ b/src/function/builtin/special/LAMBDA.java @@ -1,6 +1,8 @@ -package function.builtin; +package function.builtin.special; import function.*; +import function.builtin.*; +import function.builtin.cons.LENGTH; import sexpression.*; /** diff --git a/src/function/builtin/LET.java b/src/function/builtin/special/LET.java similarity index 98% rename from src/function/builtin/LET.java rename to src/function/builtin/special/LET.java index 2d16de3..86cdf2c 100644 --- a/src/function/builtin/LET.java +++ b/src/function/builtin/special/LET.java @@ -1,6 +1,7 @@ -package function.builtin; +package function.builtin.special; import function.*; +import function.builtin.EVAL; import sexpression.*; import table.SymbolTable; diff --git a/src/function/builtin/QUOTE.java b/src/function/builtin/special/QUOTE.java similarity index 93% rename from src/function/builtin/QUOTE.java rename to src/function/builtin/special/QUOTE.java index fa0aee9..c1533d4 100644 --- a/src/function/builtin/QUOTE.java +++ b/src/function/builtin/special/QUOTE.java @@ -1,6 +1,7 @@ -package function.builtin; +package function.builtin.special; import function.LispFunction; +import function.builtin.cons.LENGTH; import sexpression.*; /** diff --git a/src/function/builtin/SETF.java b/src/function/builtin/special/SETF.java similarity index 96% rename from src/function/builtin/SETF.java rename to src/function/builtin/special/SETF.java index 0f25359..27e8021 100644 --- a/src/function/builtin/SETF.java +++ b/src/function/builtin/special/SETF.java @@ -1,6 +1,8 @@ -package function.builtin; +package function.builtin.special; import function.*; +import function.builtin.*; +import function.builtin.cons.LENGTH; import sexpression.*; import table.SymbolTable; diff --git a/test/function/builtin/CARTester.java b/test/function/builtin/cons/CARTester.java similarity index 97% rename from test/function/builtin/CARTester.java rename to test/function/builtin/cons/CARTester.java index e619370..9a67c33 100644 --- a/test/function/builtin/CARTester.java +++ b/test/function/builtin/cons/CARTester.java @@ -1,4 +1,4 @@ -package function.builtin; +package function.builtin.cons; import static testutil.TestUtilities.*; diff --git a/test/function/builtin/CDRTester.java b/test/function/builtin/cons/CDRTester.java similarity index 97% rename from test/function/builtin/CDRTester.java rename to test/function/builtin/cons/CDRTester.java index 36b135c..394a01c 100644 --- a/test/function/builtin/CDRTester.java +++ b/test/function/builtin/cons/CDRTester.java @@ -1,4 +1,4 @@ -package function.builtin; +package function.builtin.cons; import static testutil.TestUtilities.*; diff --git a/test/function/builtin/CONSTester.java b/test/function/builtin/cons/CONSTester.java similarity index 97% rename from test/function/builtin/CONSTester.java rename to test/function/builtin/cons/CONSTester.java index 3ad96b5..09526f9 100644 --- a/test/function/builtin/CONSTester.java +++ b/test/function/builtin/cons/CONSTester.java @@ -1,4 +1,4 @@ -package function.builtin; +package function.builtin.cons; import static testutil.TestUtilities.*; diff --git a/test/function/builtin/LISTTester.java b/test/function/builtin/cons/LISTTester.java similarity index 97% rename from test/function/builtin/LISTTester.java rename to test/function/builtin/cons/LISTTester.java index e2ab223..0c6b891 100644 --- a/test/function/builtin/LISTTester.java +++ b/test/function/builtin/cons/LISTTester.java @@ -1,4 +1,4 @@ -package function.builtin; +package function.builtin.cons; import static testutil.TestUtilities.*; diff --git a/test/function/builtin/DIVIDETester.java b/test/function/builtin/math/DIVIDETester.java similarity index 97% rename from test/function/builtin/DIVIDETester.java rename to test/function/builtin/math/DIVIDETester.java index 634d573..682c24e 100644 --- a/test/function/builtin/DIVIDETester.java +++ b/test/function/builtin/math/DIVIDETester.java @@ -1,4 +1,4 @@ -package function.builtin; +package function.builtin.math; import static testutil.TestUtilities.*; diff --git a/test/function/builtin/MINUSTester.java b/test/function/builtin/math/MINUSTester.java similarity index 97% rename from test/function/builtin/MINUSTester.java rename to test/function/builtin/math/MINUSTester.java index 1bc7711..87e7b89 100644 --- a/test/function/builtin/MINUSTester.java +++ b/test/function/builtin/math/MINUSTester.java @@ -1,4 +1,4 @@ -package function.builtin; +package function.builtin.math; import static testutil.TestUtilities.*; diff --git a/test/function/builtin/MULTIPLYTester.java b/test/function/builtin/math/MULTIPLYTester.java similarity index 97% rename from test/function/builtin/MULTIPLYTester.java rename to test/function/builtin/math/MULTIPLYTester.java index f17e24c..e8a2ee0 100644 --- a/test/function/builtin/MULTIPLYTester.java +++ b/test/function/builtin/math/MULTIPLYTester.java @@ -1,4 +1,4 @@ -package function.builtin; +package function.builtin.math; import static testutil.TestUtilities.*; diff --git a/test/function/builtin/PLUSTester.java b/test/function/builtin/math/PLUSTester.java similarity index 97% rename from test/function/builtin/PLUSTester.java rename to test/function/builtin/math/PLUSTester.java index 96b6c38..a23b793 100644 --- a/test/function/builtin/PLUSTester.java +++ b/test/function/builtin/math/PLUSTester.java @@ -1,4 +1,4 @@ -package function.builtin; +package function.builtin.math; import static testutil.TestUtilities.*; diff --git a/test/function/builtin/ATOMTester.java b/test/function/builtin/predicate/ATOMTester.java similarity index 95% rename from test/function/builtin/ATOMTester.java rename to test/function/builtin/predicate/ATOMTester.java index dac4db0..08666bf 100644 --- a/test/function/builtin/ATOMTester.java +++ b/test/function/builtin/predicate/ATOMTester.java @@ -1,4 +1,4 @@ -package function.builtin; +package function.builtin.predicate; import static testutil.TestUtilities.*; diff --git a/test/function/builtin/EQTester.java b/test/function/builtin/predicate/EQTester.java similarity index 97% rename from test/function/builtin/EQTester.java rename to test/function/builtin/predicate/EQTester.java index 6af3b00..c5e8660 100644 --- a/test/function/builtin/EQTester.java +++ b/test/function/builtin/predicate/EQTester.java @@ -1,4 +1,4 @@ -package function.builtin; +package function.builtin.predicate; import static testutil.TestUtilities.*; diff --git a/test/function/builtin/EQUALSPTester.java b/test/function/builtin/predicate/EQUALSPTester.java similarity index 97% rename from test/function/builtin/EQUALSPTester.java rename to test/function/builtin/predicate/EQUALSPTester.java index cd19a3a..1372411 100644 --- a/test/function/builtin/EQUALSPTester.java +++ b/test/function/builtin/predicate/EQUALSPTester.java @@ -1,4 +1,4 @@ -package function.builtin; +package function.builtin.predicate; import static testutil.TestUtilities.*; diff --git a/test/function/builtin/EQUALTester.java b/test/function/builtin/predicate/EQUALTester.java similarity index 98% rename from test/function/builtin/EQUALTester.java rename to test/function/builtin/predicate/EQUALTester.java index a49b40f..a0681b8 100644 --- a/test/function/builtin/EQUALTester.java +++ b/test/function/builtin/predicate/EQUALTester.java @@ -1,4 +1,4 @@ -package function.builtin; +package function.builtin.predicate; import static testutil.TestUtilities.*; diff --git a/test/function/builtin/GREATERPTester.java b/test/function/builtin/predicate/GREATERPTester.java similarity index 97% rename from test/function/builtin/GREATERPTester.java rename to test/function/builtin/predicate/GREATERPTester.java index 9e2d8d3..607743d 100644 --- a/test/function/builtin/GREATERPTester.java +++ b/test/function/builtin/predicate/GREATERPTester.java @@ -1,4 +1,4 @@ -package function.builtin; +package function.builtin.predicate; import static testutil.TestUtilities.*; diff --git a/test/function/builtin/LESSPTester.java b/test/function/builtin/predicate/LESSPTester.java similarity index 97% rename from test/function/builtin/LESSPTester.java rename to test/function/builtin/predicate/LESSPTester.java index 21f4201..d4152fc 100644 --- a/test/function/builtin/LESSPTester.java +++ b/test/function/builtin/predicate/LESSPTester.java @@ -1,4 +1,4 @@ -package function.builtin; +package function.builtin.predicate; import static testutil.TestUtilities.*; diff --git a/test/function/builtin/LISTPTester.java b/test/function/builtin/predicate/LISTPTester.java similarity index 95% rename from test/function/builtin/LISTPTester.java rename to test/function/builtin/predicate/LISTPTester.java index de9f12b..e75e337 100644 --- a/test/function/builtin/LISTPTester.java +++ b/test/function/builtin/predicate/LISTPTester.java @@ -1,4 +1,4 @@ -package function.builtin; +package function.builtin.predicate; import static testutil.TestUtilities.*; diff --git a/test/function/builtin/NULLTester.java b/test/function/builtin/predicate/NULLTester.java similarity index 95% rename from test/function/builtin/NULLTester.java rename to test/function/builtin/predicate/NULLTester.java index 5a0198a..2ee7913 100644 --- a/test/function/builtin/NULLTester.java +++ b/test/function/builtin/predicate/NULLTester.java @@ -1,4 +1,4 @@ -package function.builtin; +package function.builtin.predicate; import static testutil.TestUtilities.*; diff --git a/test/function/builtin/CONDTester.java b/test/function/builtin/special/CONDTester.java similarity index 98% rename from test/function/builtin/CONDTester.java rename to test/function/builtin/special/CONDTester.java index a6a1697..5c764c0 100644 --- a/test/function/builtin/CONDTester.java +++ b/test/function/builtin/special/CONDTester.java @@ -1,4 +1,4 @@ -package function.builtin; +package function.builtin.special; import static testutil.TestUtilities.*; diff --git a/test/function/builtin/DEFUNTester.java b/test/function/builtin/special/DEFUNTester.java similarity index 95% rename from test/function/builtin/DEFUNTester.java rename to test/function/builtin/special/DEFUNTester.java index 1318a45..bac39a2 100644 --- a/test/function/builtin/DEFUNTester.java +++ b/test/function/builtin/special/DEFUNTester.java @@ -1,4 +1,4 @@ -package function.builtin; +package function.builtin.special; import static testutil.TestUtilities.*;