Advertisement
zachmc8

Untitled

Dec 20th, 2019
256
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Scala 1.55 KB | None | 0 0
  1. object SchemeInterpreter
  2. val emptyEnvironment: Environment
  3. val primitiveProcedures: HashMap[String, Procedure]
  4.  
  5. def add(operands: ListBuffer[Expression]): Expression
  6. def sub(operands: ListBuffer[Expression]): Expression
  7. def mult(operands: ListBuffer[Expression]): Expression
  8. def div(operands: ListBuffer[Expression]): Expression
  9. def abs(operands: ListBuffer[Expression]): Expression
  10. def eq(operands: ListBuffer[Expression]): Expression
  11. def less(operands: ListBuffer[Expression]): Expression
  12. def great(operands: ListBuffer[Expression]): Expression
  13. def cos(operands: ListBuffer[Expression]): Expression
  14. def sin(operands: ListBuffer[Expression]): Expression
  15. def tan(operands: ListBuffer[Expression]): Expression
  16. def log(operands: ListBuffer[Expression]): Expression
  17. def expt(operands: ListBuffer[Expression]): Expression
  18.  
  19. def define(exp: Node, env, Environment): Unit
  20. def cond(exp: Node, env: Environment): Unit
  21. def ifStatement(exp: Node, env: Environment): Unit
  22.  
  23. def isNumber(x: String): Boolean
  24. def isBoolean(x: String): Boolean
  25. def isString(x: String): Boolean
  26. def toBoolean(x: String): Boolean
  27. def getType(x: String): Expression
  28. def lexer(input: String): Node
  29. def makeTree(ls: ListBuffer[String], pointer: Int, adult: Node): Node
  30. def printTree(current: Node): Unit
  31.  
  32. def selfEvaluating(x: Expression): Boolean
  33. def valueList(exp: Node, ls: ListBuffer[Expression], env: Environment): ListBuffer[Expression]
  34. def apply(proc: ListBuffer[Expression => Expression, args: ListBuffer[Expression]): Expression
  35. def eval(exp: Node, env: Environment): Expression
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement