Examples of PostfixExpression


Examples of com.bacoder.parser.java.api.PostfixExpression

    if (context.getChildCount() == 2
        && context.getChild(1) instanceof TerminalNode
        && POSTFIX_OPERATOR_MAP.containsKey(
            ((TerminalNode) context.getChild(1)).getSymbol().getType())) {
      PostfixExpression postfixExpression = createNode(context, PostfixExpression.class);

      postfixExpression.setOperator(
          POSTFIX_OPERATOR_MAP.get(((TerminalNode) context.getChild(1)).getSymbol().getType()));

      ExpressionContext expressionContext = getChild(context, ExpressionContext.class);
      if (expressionContext != null) {
        postfixExpression.setExpression(
            getAdapter(ExpressionAdapter.class).adapt(expressionContext));
      }

      return postfixExpression;
    }
View Full Code Here

Examples of com.dragome.compiler.ast.PostfixExpression

    PStarExpression.Operator operator= getOp(sum);
    if (operator == null)
      return false;

    PStarExpression p= new PostfixExpression();
    p.setOperand((Expression) fa1);
    p.setOperator(operator);

    decl.vbs.remove(vb1);
    decl.vbs.remove(vb2);
    VariableBinding vb= decl.vbs.get(0);
    vb.getParentBlock().replaceChild(p, vb);
View Full Code Here

Examples of com.icona.tree.nodes.Expression.PostfixExpression


    // $ANTLR start "postfix_expression"
    // C:\\Users\\line47\\workspace\\ObjCFYPA\\src\\com\\icona\\antlr\\main\\ObjectiveC.g:1210:1: postfix_expression returns [PostfixExpression expression] : exp1= primary_expression ;
    public final PostfixExpression postfix_expression() throws RecognitionException {
        PostfixExpression expression = null;


        PrimaryExpression exp1 =null;



          expression =new PostfixExpression(null,-1);

        try {
            // C:\\Users\\line47\\workspace\\ObjCFYPA\\src\\com\\icona\\antlr\\main\\ObjectiveC.g:1215:2: (exp1= primary_expression )
            // C:\\Users\\line47\\workspace\\ObjCFYPA\\src\\com\\icona\\antlr\\main\\ObjectiveC.g:1216:2: exp1= primary_expression
            {
            pushFollow(FOLLOW_primary_expression_in_postfix_expression3649);
            exp1=primary_expression();

            state._fsp--;
            if (state.failed) return expression;

            if ( state.backtracking==0 ) {expression.setPrimaryExpression(exp1);}

            }

        }
        catch (RecognitionException re) {
View Full Code Here

Examples of com.stuffwithstuff.bantam.expressions.PostfixExpression

  public PostfixOperatorParselet(int precedence) {
    mPrecedence = precedence;
  }
 
  public Expression parse(Parser parser, Expression left, Token token) {
    return new PostfixExpression(left, token.getType());
  }
View Full Code Here

Examples of org.eclipse.jdt.core.dom.PostfixExpression

  @Test
  public void testFieldInc() throws Exception {
    CompilationUnit cu = EclipseTACSimpleTestDriver.parseCode("FieldInc", FIELD_INC);
    MethodDeclaration m = EclipseTACSimpleTestDriver.getFirstMethod(cu);
    EclipseTAC tac = new EclipseTAC(m.resolveBinding());
    PostfixExpression inc = (PostfixExpression) EclipseTACSimpleTestDriver.getLastStatementReturn(m).getExpression();
    TACInstruction instr = tac.instruction(inc);
    Assert.assertTrue(instr != null);
    Assert.assertTrue(instr instanceof EclipseInstructionSequence);
    LoadFieldInstruction load = (LoadFieldInstruction) tac.instruction(inc.getOperand());
   
    EclipseInstructionSequence seq = (EclipseInstructionSequence) instr;
    Assert.assertEquals(
        "Wrong number of instructions in sequence: " + seq.getInstructions().length,
        4, seq.getInstructions().length);
View Full Code Here

Examples of org.eclipse.jdt.core.dom.PostfixExpression

                    returnStatement.setExpression(newAssignment);
                } else if (operator.equals("++") || operator.equals("--")) {
                    Expression expression;

                    if (isPostfix) {
                        PostfixExpression postfix = ast.newPostfixExpression();
                        postfix.setOperand((Expression) ASTNode.copySubtree(
                                ast, assignment.getLeftHandSide()));
                        postfix.setOperator(PostfixExpression.Operator
                                .toOperator(operator));
                        expression = postfix;

                        // Produce prefix operators next time.
                        if (operator.equals("--")) {
View Full Code Here

Examples of org.eclipse.jdt.internal.compiler.ast.PostfixExpression

  Expression leftHandSide = this.expressionStack[this.expressionPtr];
  if (leftHandSide instanceof Reference) {
    // ++foo()++ is unvalid
    if (post) {
      this.expressionStack[this.expressionPtr] =
        new PostfixExpression(
          leftHandSide,
          IntLiteral.One,
          op,
          this.endStatementPosition);
    } else {
View Full Code Here

Examples of org.eclipse.php.internal.core.compiler.ast.nodes.PostfixExpression

    super(goal);
  }

  public IGoal[] init() {
    ExpressionTypeGoal typedGoal = (ExpressionTypeGoal) goal;
    PostfixExpression postfixExpression = (PostfixExpression) typedGoal
        .getExpression();
    return new IGoal[] { new ExpressionTypeGoal(goal.getContext(),
        postfixExpression.getVariable()) };
  }
View Full Code Here

Examples of org.lilystudio.javascript.expression.PostfixExpression

    }

    case Token.INC:
    case Token.DEC:
      if (node.getIntProp(Node.INCRDECR_PROP, -1) > 1) {
        return new PostfixExpression(node, root, scope);
      }
    case Token.DELPROP:
    case Token.TYPEOF:
    case Token.TYPEOFNAME:
    case Token.VOID:
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.