Rename "compiler" functionality to Evaluator

Allows for stdin input for evaluation when no input file is provided.
This commit is contained in:
James Eversole
2025-01-01 08:17:05 -06:00
parent 458d3c3b10
commit 7d38d99dcd
8 changed files with 43 additions and 32 deletions

View File

@ -45,7 +45,7 @@ data LToken
deriving (Show, Eq, Ord)
-- Output formats
data CompiledForm = TreeCalculus | FSL | AST | Ternary | Ascii
data EvaluatedForm = TreeCalculus | FSL | AST | Ternary | Ascii
deriving (Show, Data, Typeable)
-- Environment containing previously evaluated TC terms
@ -122,7 +122,7 @@ toList (Fork x rest) = case toList rest of
toList _ = Left "Invalid Tree Calculus list"
-- Outputs
formatResult :: CompiledForm -> T -> String
formatResult :: EvaluatedForm -> T -> String
formatResult TreeCalculus = toSimpleT . show
formatResult FSL = show
formatResult AST = show . toAST