Package org.allspice.structured.expr

Examples of org.allspice.structured.expr.Expr


* @param parser
* @param state
* @return The object
**/
private static final Expr reduce134(PositionRange range,Parser parser,ParserState state) {
      Expr factor = (Expr)state.reductions.tail.head.o ;
{
  return new org.allspice.structured.expr.PostIncExpr(factor,range) ;
}
}
View Full Code Here


* @param parser
* @param state
* @return The object
**/
private static final Expr reduce135(PositionRange range,Parser parser,ParserState state) {
      Expr factor = (Expr)state.reductions.tail.head.o ;
{
  return new org.allspice.structured.expr.PostDecExpr(factor,range) ;
}
}
View Full Code Here

* @param parser
* @param state
* @return The object
**/
private static final Expr reduce137(PositionRange range,Parser parser,ParserState state) {
      Expr factor = (Expr)state.reductions.tail.tail.head.o ;
      String ID = (String)state.reductions.head.o ;
{
  return new org.allspice.structured.expr.FieldVarExpr(factor,ID,range) ;
}
}
View Full Code Here

* @param parser
* @param state
* @return The object
**/
private static final Expr reduce138(PositionRange range,Parser parser,ParserState state) {
      Expr factor = (Expr)state.reductions.tail.tail.head.o ;
{
  return new org.allspice.structured.expr.FieldVarExpr(factor,"class",range) ;
}
}
View Full Code Here

* @param parser
* @param state
* @return The object
**/
private static final Expr reduce139(PositionRange range,Parser parser,ParserState state) {
      Expr factor = (Expr)state.reductions.tail.tail.tail.tail.tail.tail.head.o ;
      String type = (String)state.reductions.tail.tail.tail.head.o ;
      ImmutableCollection<Expr> elist_opt = (ImmutableCollection<Expr>)state.reductions.tail.head.o ;
{
  return new org.allspice.structured.expr.NewExpr(factor,type,elist_opt,null,range) ;
}
View Full Code Here

    }
  }
  private static final class PlusConverter extends ArithOp<PlusExpr> {
    @Override
    public void compile(TypeName forwardType, PlusExpr t, EvaluationContext context, InstList l) throws CompilerException {
      final Expr lhs = t.lhs;
      final Expr rhs = t.rhs;
      StubResolver type = getType(t,context) ;
      if (type.getTypeName().equals(TypeName.STRING)) {
        l.add(new New(TypeName.STRINGBUILDER)) ;
        l.add(new Dup(TypeCode.VOID,TypeCode.OBJECT)) ;
        l.add(new InvokeSpecial(new MethodRef(TypeName.STRINGBUILDER,TypeName.VOID,"<init>"))) ;
View Full Code Here

    }
  }
  private static final class BitNotConverter implements
      ExprCompiler<BitNotExpr> {
    public void compile(TypeName forwardType, BitNotExpr t, EvaluationContext context, InstList result) throws CompilerException {
      final Expr lhs = t.e;
      TypeCode type = getBitBinopType(context.getTypeCode(lhs),context.getTypeCode(lhs)) ;
      context.compile(null,lhs, result)
      result.add(new Not(type)) ;
      convertResult(context,t,forwardType,result) ;
    }
View Full Code Here

      return context.classPool.isAssignableFrom(type, getType(t, context)) ;
    }
  }
  private static final class PostDecConverter extends IncExpr<PostDecExpr> {
    public void compile(TypeName forwardType, PostDecExpr t, EvaluationContext context, InstList result) throws CompilerException {
      final Expr lhs = t.e;
      StubResolver type = getType(t,context) ;
      final Number inc = createNegOne(type.getTypeCode());
      createPostInc(context, forwardType, lhs, inc,result) ;
    }
View Full Code Here

      throw new NoLValAvailable() ;
    }
  }
  private static final class PostIncConverter extends IncExpr<PostIncExpr> {
    public void compile(TypeName forwardType, PostIncExpr t, EvaluationContext context, InstList result) throws CompilerException {
      final Expr lhs = t.e;
      StubResolver type = getType(t,context) ;
      final Number inc = createOne(type.getTypeCode());
      createPostInc(context, forwardType, lhs, inc,result) ;
    }
View Full Code Here

  }
  private static final class PreDecConverter extends LValuePlaceOp<PreDecExpr> {
    @Override
    public LValue compileLValue(PreDecExpr t, EvaluationContext context,
        InstList l) throws CompilerException {
      final Expr lhs = t.e;
      StubResolver type = getType(t,context) ;
      final Number inc = createNegOne(type.getTypeCode());
      return createInc(context, lhs, inc,l) ;
    }
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.