Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## avrora.core.isdl.gen
Class InterpreterGenerator.CodeGenerator

    java.lang.Object
      avrora.core.isdl.gen.InterpreterGenerator.CodeGenerator

All Implemented Interfaces:
  CodeVisitor

Enclosing class:
  InterpreterGenerator

public class InterpreterGenerator.CodeGenerator
extends java.lang.Object
implements CodeVisitor

The `CodeGenerator` class is used to generate code for individual expressions. It generates textual code for each expression and dumps it to the printer.

Nested Class Summary

Nested classes inherited from class avrora.core.isdl.ast.CodeVisitor
`CodeVisitor.DepthFirst`

Constructor Summary
`InterpreterGenerator.CodeGenerator()`

Method Summary
`protected void` | `binop(java.lang.String op, Expr left, Expr right, int p)`
`protected void` | `inner(Expr e, int outerPrecedence)`
`void` | `visit(Arith.AddExpr e)`
`void` | `visit(Arith.AndExpr e)`
`void` | `visit(Arith.CompExpr e)`
`void` | `visit(Arith.DivExpr e)`
`void` | `visit(Arith.MulExpr e)`
`void` | `visit(Arith.NegExpr e)`
`void` | `visit(Arith.OrExpr e)`
`void` | `visit(Arith.ShiftLeftExpr e)`
`void` | `visit(Arith.ShiftRightExpr e)`
`void` | `visit(Arith.SubExpr e)`
`void` | `visit(Arith.XorExpr e)`
`void` | `visit(BitExpr e)`
`void` | `visit(BitRangeExpr e)`
`void` | `visit(CallExpr e)`
`void` | `visit(Literal.BoolExpr e)`
`void` | `visit(Literal.IntExpr e)`
`void` | `visit(Logical.AndExpr e)`
`void` | `visit(Logical.EquExpr e)`
`void` | `visit(Logical.GreaterEquExpr e)`
`void` | `visit(Logical.GreaterExpr e)`
`void` | `visit(Logical.LessEquExpr e)`
`void` | `visit(Logical.LessExpr e)`
`void` | `visit(Logical.NequExpr e)`
`void` | `visit(Logical.NotExpr e)`
`void` | `visit(Logical.OrExpr e)`
`void` | `visit(Logical.XorExpr e)`
`void` | `visit(MapExpr e)`
`void` | `visit(VarExpr e)`
`protected void` | `visitExprList(java.util.List l)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### InterpreterGenerator.CodeGenerator

    public InterpreterGenerator.CodeGenerator()

Method Detail

### inner

    protected void inner(Expr e,
                         int outerPrecedence)

### binop

    protected void binop(java.lang.String op,
                         Expr left,
                         Expr right,
                         int p)

### visit

    public void visit(Arith.AddExpr e)

  Specified by:
    `visit` in interface `CodeVisitor`

### visit

    public void visit(Arith.AndExpr e)

  Specified by:
    `visit` in interface `CodeVisitor`

### visit

    public void visit(Arith.CompExpr e)

  Specified by:
    `visit` in interface `CodeVisitor`

### visit

    public void visit(Arith.DivExpr e)

  Specified by:
    `visit` in interface `CodeVisitor`

### visit

    public void visit(Arith.MulExpr e)

  Specified by:
    `visit` in interface `CodeVisitor`

### visit

    public void visit(Arith.NegExpr e)

  Specified by:
    `visit` in interface `CodeVisitor`

### visit

    public void visit(Arith.OrExpr e)

  Specified by:
    `visit` in interface `CodeVisitor`

### visit

    public void visit(Arith.ShiftLeftExpr e)

  Specified by:
    `visit` in interface `CodeVisitor`

### visit

    public void visit(Arith.ShiftRightExpr e)

  Specified by:
    `visit` in interface `CodeVisitor`

### visit

    public void visit(Arith.SubExpr e)

  Specified by:
    `visit` in interface `CodeVisitor`

### visit

    public void visit(Arith.XorExpr e)

  Specified by:
    `visit` in interface `CodeVisitor`

### visit

    public void visit(BitExpr e)

  Specified by:
    `visit` in interface `CodeVisitor`

### visit

    public void visit(BitRangeExpr e)

  Specified by:
    `visit` in interface `CodeVisitor`

### visit

    public void visit(CallExpr e)

  Specified by:
    `visit` in interface `CodeVisitor`

### visitExprList

    protected void visitExprList(java.util.List l)

### visit

    public void visit(Literal.BoolExpr e)

  Specified by:
    `visit` in interface `CodeVisitor`

### visit

    public void visit(Literal.IntExpr e)

  Specified by:
    `visit` in interface `CodeVisitor`

### visit

    public void visit(Logical.AndExpr e)

  Specified by:
    `visit` in interface `CodeVisitor`

### visit

    public void visit(Logical.EquExpr e)

  Specified by:
    `visit` in interface `CodeVisitor`

### visit

    public void visit(Logical.GreaterEquExpr e)

  Specified by:
    `visit` in interface `CodeVisitor`

### visit

    public void visit(Logical.GreaterExpr e)

  Specified by:
    `visit` in interface `CodeVisitor`

### visit

    public void visit(Logical.LessEquExpr e)

  Specified by:
    `visit` in interface `CodeVisitor`

### visit

    public void visit(Logical.LessExpr e)

  Specified by:
    `visit` in interface `CodeVisitor`

### visit

    public void visit(Logical.NequExpr e)

  Specified by:
    `visit` in interface `CodeVisitor`

### visit

    public void visit(Logical.NotExpr e)

  Specified by:
    `visit` in interface `CodeVisitor`

### visit

    public void visit(Logical.OrExpr e)

  Specified by:
    `visit` in interface `CodeVisitor`

### visit

    public void visit(Logical.XorExpr e)

  Specified by:
    `visit` in interface `CodeVisitor`

### visit

    public void visit(MapExpr e)

  Specified by:
    `visit` in interface `CodeVisitor`

### visit

    public void visit(VarExpr e)

  Specified by:
    `visit` in interface `CodeVisitor`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD