org.kiama.example.minijava

MiniJavaTree

object MiniJavaTree

Module containing tree structures for representing MiniJava programs.

Source
MiniJavaTree.scala
Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. MiniJavaTree
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Type Members

  1. case class AndExp(left: Expression, right: Expression) extends BinaryExpression with Product with Serializable

    Boolean conjunction (AND) expression.

  2. case class Argument(tipe: Type, name: IdnDef) extends MiniJavaTree with Product with Serializable

    An argument with a given type and name.

  3. case class ArrayAssign(name: IdnUse, ind: Expression, exp: Expression) extends Statement with Product with Serializable

    An assignment of the value of the exp expression to the array element of the named array whose index is given by the ind expression.

  4. abstract class BinaryExpression extends Expression with PrettyBinaryExpression

    Common interface for binary expressions.

  5. case class Block(stmts: Seq[Statement]) extends Statement with Product with Serializable

    A block containing a possibly empty list of statements.

  6. case class BooleanType() extends Type with Product with Serializable

    The basic Boolean type.

  7. case class CallExp(base: Expression, name: IdnUse, args: Seq[Expression]) extends Expression with Product with Serializable

    Method call expression.

  8. case class Class(name: IdnDef, superclass: Option[IdnUse], body: ClassBody) extends MiniJavaTree with Product with Serializable

    A general class with a given name, optional super class, possibly empty list of instance variables, and a possibly empty list of methods.

  9. case class ClassBody(fields: Seq[Field], methods: Seq[Method]) extends MiniJavaTree with Product with Serializable

    The body of a class.

  10. case class ClassType(name: IdnUse) extends Type with Product with Serializable

    A type given by the named class.

  11. abstract class Expression extends MiniJavaTree with PrettyExpression

    Common superclass of expressions.

  12. case class FalseExp() extends Expression with Product with Serializable

    Boolean FALSE expression.

  13. case class Field(tipe: Type, name: IdnDef) extends MiniJavaTree with Product with Serializable

    A class field with a given type and name.

  14. type Identifier = String

    A representation of identifiers as strings.

  15. case class IdnDef(idn: Identifier) extends IdnTree with Product with Serializable

    A defining occurrence of an identifier.

  16. case class IdnExp(name: IdnUse) extends Expression with Product with Serializable

    Identifier expression.

  17. abstract class IdnTree extends MiniJavaTree

    An identifier reference.

  18. case class IdnUse(idn: Identifier) extends IdnTree with Product with Serializable

    An applied occurrence (use) of an identifier.

  19. case class If(exp: Expression, stmt1: Statement, stmt2: Statement) extends Statement with Product with Serializable

    A conditional statement that tests the given expression, choosing stmt1 if the expression is true, otherwise choosing stmt2.

  20. case class IndExp(base: Expression, ind: Expression) extends Expression with Product with Serializable

    Array index epression.

  21. case class IntArrayType() extends Type with Product with Serializable

    An integer array type.

  22. case class IntExp(value: Int) extends Expression with Product with Serializable

    Integer value expression.

  23. case class IntType() extends Type with Product with Serializable

    The basic integer type.

  24. case class LengthExp(base: Expression) extends Expression with Product with Serializable

    Array length expression.

  25. case class LessExp(left: Expression, right: Expression) extends BinaryExpression with Product with Serializable

    Less than expression.

  26. case class MainClass(name: IdnDef, stmt: Statement) extends MiniJavaTree with Product with Serializable

    A main class with a given name and body given by a single statement.

  27. case class Method(name: IdnDef, body: MethodBody) extends MiniJavaTree with Product with Serializable

    A method with a given return type, name, possibly empty list of arguments, possibly empty list of local variables, an optional list of statements that comprise the method body, and an expression whose value is to be returned by the method.

  28. case class MethodBody(tipe: Type, args: Seq[Argument], vars: Seq[Var], optStmts: Seq[Statement], result: Expression) extends MiniJavaTree with Product with Serializable

    The body of a method.

  29. sealed abstract class MiniJavaTree extends TreeNode

    The common supertype of all source tree nodes.

  30. case class MinusExp(left: Expression, right: Expression) extends BinaryExpression with Product with Serializable

    Subtraction expression.

  31. case class NewArrayExp(exp: Expression) extends Expression with Product with Serializable

    Array creation expression.

  32. case class NewExp(name: IdnUse) extends Expression with Product with Serializable

    Instance creation expression.

  33. case class NotExp(exp: Expression) extends UnaryExpression with Product with Serializable

    Boolean NOT expression.

  34. case class PlusExp(left: Expression, right: Expression) extends BinaryExpression with Product with Serializable

    Addition expression.

  35. case class Println(exp: Expression) extends Statement with Product with Serializable

    An output statement that prints the value of the given expression followed by a newline.

  36. case class Program(main: MainClass, classes: Seq[Class]) extends MiniJavaTree with Product with Serializable

    A main program consisting of a main class and a possibly empty list of other classes (defines the root scope).

  37. case class StarExp(left: Expression, right: Expression) extends BinaryExpression with Product with Serializable

    Multiplication expression.

  38. sealed abstract class Statement extends MiniJavaTree

    Common superclass of statements.

  39. case class ThisExp() extends Expression with Product with Serializable

    THIS expression.

  40. case class TrueExp() extends Expression with Product with Serializable

    Boolean TRUE expression.

  41. abstract class Type extends MiniJavaTree

    Common superclass for types.

  42. abstract class UnaryExpression extends Expression with PrettyUnaryExpression

    Common interface for unary expressions.

  43. case class Var(tipe: Type, name: IdnDef) extends MiniJavaTree with Product with Serializable

    A variable with a given type and name.

  44. case class VarAssign(name: IdnUse, exp: Expression) extends Statement with Product with Serializable

    An assignment of the value of the given expression to the variable with the given name.

  45. case class While(exp: Expression, stmt: Statement) extends Statement with Product with Serializable

    A while loop that tests the given expression and has as body the given statement.

Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  7. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  9. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  10. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  11. final def getClass(): java.lang.Class[_]

    Definition Classes
    AnyRef → Any
  12. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  13. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  14. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  15. final def notify(): Unit

    Definition Classes
    AnyRef
  16. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  17. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  18. def toString(): String

    Definition Classes
    AnyRef → Any
  19. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  20. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  21. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped