Package org.allspice.structured.expr

Examples of org.allspice.structured.expr.Expr


        throw new StaticReferenceToMember(context.classDef.getTypeName(),name) ;
      }
      l.add(new Load(c)) ;
    }
    else if (decl instanceof FieldVarExpr){
      Expr object = ((FieldVarExpr)decl).object ;
      context.compile(null,object, l) ;
    }
    else {
      throw new OnlyIdenfitierReferenceAllowed() ;
    }
View Full Code Here


      }
      return null ;
    }
    else if (e instanceof FieldVarExpr) {
      FieldVarExpr fve = (FieldVarExpr)e ;
      Expr obj = fve.object ;
      String name = fve.name ;
      TypeName type = getClassName(context,obj);
      if (type == null) {
        return null ;
      }
View Full Code Here

      return new Add(tc.getTypeCode()) ;
    }
    @Override
    public void compileLValueNoReturn(AddInPlaceExpr t,
        EvaluationContext context, InstList l) throws CompilerException {
      Expr inc = t.rhs;
      final Expr var = t.lhs;
      final StubResolver type = context.getType(var);
      if (type.getTypeName().equals(TypeName.STRING)) {
        LValue v = context.compileLValue(var, l);
        l.add(new Dup(TypeCode.VOID,v.getRefType())) ;
        l.add(new Load(v)) ;
View Full Code Here

        super.compileLValueNoReturn(t, context, l) ;
      }
    }
    @Override
    public LValue compileLValue(AddInPlaceExpr t,EvaluationContext context, InstList l) throws CompilerException {
      Expr inc = t.rhs;
      final Expr var = t.lhs;
      final StubResolver type = context.getType(var);
      if (type.getTypeName().equals(TypeName.STRING)) {
        LValue v = context.compileLValue(var, l);
        l.add(new Dup(TypeCode.VOID,v.getRefType())) ;
        l.add(new Dup(TypeCode.VOID,v.getRefType())) ;
View Full Code Here

    }
  }
  private static final class ExprStatementConverter extends
      StateementOp<ExprStatement> {
    public void compile(TypeName forwardType, ExprStatement t, EvaluationContext context, InstList result) throws CompilerException {
      Expr e = t.e ;
      createExprStatement(context, e,result);
    }
View Full Code Here

    }
  }
  private static final class InstanceOfConverter implements
      ExprCompiler<InstanceofExpr> {
    public void compile(TypeName forwardType, InstanceofExpr t, EvaluationContext context, InstList result) throws CompilerException {
      final Expr e = t.lhs;
      final String type = t.rhs;
      createInstanceOf(context, e, type,result);
      convertResult(context,t,forwardType,result) ;
    }
View Full Code Here

      return context.classPool.isAssignableFrom(type, getType(t, context)) ;
    }
  }
  private static final class CallConverter implements ExprCompiler<CallExpr> {
    public void compile(TypeName forwardType, CallExpr t, EvaluationContext context, InstList result) throws CompilerException {
      Expr decl = t.object ;
      final Collection<Expr> args = t.args;
      createCall(context, decl, args,result);
      convertResult(context,t,forwardType,result) ;
    }
View Full Code Here

* @param parser
* @param state
* @return The object
**/
private static final ImmutableCollection<Statement> reduce53(PositionRange range,Parser parser,ParserState state) {
      Expr expr = (Expr)state.reductions.tail.head.o ;
{
  return new FIFO<Statement>(new org.allspice.structured.statement.ThrowStatement(expr,range)) ;
}
}
View Full Code Here

* @param parser
* @param state
* @return The object
**/
private static final ImmutableCollection<Statement> reduce57(PositionRange range,Parser parser,ParserState state) {
      Expr expr = (Expr)state.reductions.tail.head.o ;
{
  return new FIFO<Statement>(new org.allspice.structured.statement.CaseStatement(expr,range)) ;
}
}
View Full Code Here

* @param parser
* @param state
* @return The object
**/
private static final ImmutableCollection<Statement> reduce58(PositionRange range,Parser parser,ParserState state) {
      Expr expr = (Expr)state.reductions.tail.tail.head.o ;
      ImmutableCollection<Statement> compoundstatement = (ImmutableCollection<Statement>)state.reductions.head.o ;
{
  return new FIFO<Statement>(new org.allspice.structured.statement.SwitchStatement(expr,compoundstatement,range)) ;
}
}
View Full Code Here

TOP

Related Classes of org.allspice.structured.expr.Expr

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.