Packages

object Token

Contains all the different types of tokens.

Source
Token.scala
Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Token
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. case class ArgSeparator [R]() extends Token[R] with Product with Serializable

    An argument separator.

    An argument separator.

    This distinguishes between multiple arguments in a Function.

    R

    The type that the evaluator should return after evaluating the tokens

  2. case class CloseParen [R]() extends Parenthesis[R] with Product with Serializable

    A close parenthesis.

    A close parenthesis.

    R

    The type that the evaluator should return after evaluating the tokens

  3. abstract class Function [R] extends Postfix[R] with Precedence[R]

    Represents a function.

    Represents a function.

    A function can have zero or more arguments. Immediately following the function, there should be a pair of brackets, within which there should be the arguments to the function. The arguments to the function should be separated by the ArgSeparator token.

    For example, in sin(4), sin is a function that accepts one argument. Similarly, in max(3, 4), max is a function that accepts two arguments, and ',' is an argument separator.

    R

    The type that the evaluator should return after evaluating the tokens

  4. case class OpenParen [R]() extends Parenthesis[R] with Product with Serializable

    An open parenthesis.

    An open parenthesis.

    R

    The type that the evaluator should return after evaluating the tokens

  5. abstract class Operator [R] extends Postfix[R] with Precedence[R]

    Represents an operator.

    Represents an operator.

    An operator is something that takes in the values on either side of it as arguments. For example, in the expression 3 + 4, + is an operator that takes in the arguments 3 and 4.

    Operators also have precedence. Operators with higher precedence are evaluated first. For example, the expression 3 + 4 * 2, is interpreted as 3 + (4 * 2) because the * operator has higher precedence than the + operator.

    R

    The type that the evaluator should return after evaluating the tokens

  6. sealed abstract class Parenthesis [R] extends Precedence[R]

    Either an open or close parenthesis.

    Either an open or close parenthesis.

    Parentheses are used to separate sections of an expression and indicate it acts as one value. For example, in 4 * (2 + 3), the parentheses indicate that the 2 + 3 should be evaluated first.

    Parentheses are also used after functions.

    R

    The type that the evaluator should return after evaluating the tokens

  7. abstract class Value [R] extends Postfix[R]

    Represents a value.

    Represents a value.

    A value is anything that stands on its own, and can be evaluated without any arguments.

    For example, in the expression 2 + x, both 2 and x are values - the former a constant and the latter a variable.

    The value of the function doesn't need to be fixed. For example, there may be a value rand which returns a random number between 0 and 1 every time it's evaluated.

    R

    The type that the evaluator should return after evaluating the tokens

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  7. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  8. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  9. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
  10. def hashCode(): Int
    Definition Classes
    AnyRef → Any
  11. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  12. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  13. final def notify(): Unit
    Definition Classes
    AnyRef
  14. final def notifyAll(): Unit
    Definition Classes
    AnyRef
  15. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  16. def toString(): String
    Definition Classes
    AnyRef → Any
  17. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  18. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  19. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped