Examples of UnaryExpression


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

    // C:\\Users\\line47\\workspace\\ObjCFYPA\\src\\com\\icona\\antlr\\main\\ObjectiveC.g:1182:1: cast_expression returns [Expression expression] : exp= unary_expression ;
    public final Expression cast_expression() throws RecognitionException {
        Expression expression = null;


        UnaryExpression exp =null;


        try {
            // C:\\Users\\line47\\workspace\\ObjCFYPA\\src\\com\\icona\\antlr\\main\\ObjectiveC.g:1184:2: (exp= unary_expression )
            // C:\\Users\\line47\\workspace\\ObjCFYPA\\src\\com\\icona\\antlr\\main\\ObjectiveC.g:1185:2: exp= unary_expression
View Full Code Here

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


    // $ANTLR start "unary_expression"
    // C:\\Users\\line47\\workspace\\ObjCFYPA\\src\\com\\icona\\antlr\\main\\ObjectiveC.g:1187:1: unary_expression returns [UnaryExpression expression] : (exp= postfix_expression | '++' exp= unary_expression | '--' exp= unary_expression |op= unary_operator exp= cast_expression );
    public final UnaryExpression unary_expression() throws RecognitionException {
        UnaryExpression expression = null;


        Expression exp =null;

        UnarySymbol op =null;



          UnarySymbol operator=null;

        try {
            // C:\\Users\\line47\\workspace\\ObjCFYPA\\src\\com\\icona\\antlr\\main\\ObjectiveC.g:1192:2: (exp= postfix_expression | '++' exp= unary_expression | '--' exp= unary_expression |op= unary_operator exp= cast_expression )
            int alt82=4;
            switch ( input.LA(1) ) {
            case CHARACTER_LITERAL:
            case DECIMAL_LITERAL:
            case FLOATING_POINT_LITERAL:
            case HEX_LITERAL:
            case IDENTIFIER:
            case OCTAL_LITERAL:
            case STRING_LITERAL:
            case 27:
                {
                alt82=1;
                }
                break;
            case 32:
                {
                alt82=2;
                }
                break;
            case 36:
                {
                alt82=3;
                }
                break;
            case 20:
            case 25:
            case 29:
            case 35:
            case 98:
                {
                alt82=4;
                }
                break;
            default:
                if (state.backtracking>0) {state.failed=true; return expression;}
                NoViableAltException nvae =
                    new NoViableAltException("", 82, 0, input);

                throw nvae;

            }

            switch (alt82) {
                case 1 :
                    // C:\\Users\\line47\\workspace\\ObjCFYPA\\src\\com\\icona\\antlr\\main\\ObjectiveC.g:1193:4: exp= postfix_expression
                    {
                    pushFollow(FOLLOW_postfix_expression_in_unary_expression3534);
                    exp=postfix_expression();

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

                    if ( state.backtracking==0 ) {expression =new UnaryExpression(null,-1,null,(Expression)exp);}

                    }
                    break;
                case 2 :
                    // C:\\Users\\line47\\workspace\\ObjCFYPA\\src\\com\\icona\\antlr\\main\\ObjectiveC.g:1194:4: '++' exp= unary_expression
                    {
                    match(input,32,FOLLOW_32_in_unary_expression3541); if (state.failed) return expression;

                    pushFollow(FOLLOW_unary_expression_in_unary_expression3545);
                    exp=unary_expression();

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

                    if ( state.backtracking==0 ) {expression =new UnaryExpression(null,-1,UnarySymbol.PRE_INC,(Expression)exp);}

                    }
                    break;
                case 3 :
                    // C:\\Users\\line47\\workspace\\ObjCFYPA\\src\\com\\icona\\antlr\\main\\ObjectiveC.g:1195:4: '--' exp= unary_expression
                    {
                    match(input,36,FOLLOW_36_in_unary_expression3553); if (state.failed) return expression;

                    pushFollow(FOLLOW_unary_expression_in_unary_expression3557);
                    exp=unary_expression();

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

                    if ( state.backtracking==0 ) {expression =new UnaryExpression(null,-1,UnarySymbol.PRE_DEC,(Expression)exp);}

                    }
                    break;
                case 4 :
                    // C:\\Users\\line47\\workspace\\ObjCFYPA\\src\\com\\icona\\antlr\\main\\ObjectiveC.g:1196:4: op= unary_operator exp= cast_expression
                    {
                    pushFollow(FOLLOW_unary_operator_in_unary_expression3567);
                    op=unary_operator();

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

                    if ( state.backtracking==0 ) {operator=op;}

                    pushFollow(FOLLOW_cast_expression_in_unary_expression3572);
                    exp=cast_expression();

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

                    if ( state.backtracking==0 ) {expression =new UnaryExpression(null,-1,operator,(Expression)exp);}

                    }
                    break;

            }
View Full Code Here

Examples of com.puppetlabs.geppetto.pp.UnaryExpression

        if(result == null)
          result = defaultCase(theEObject);
        return result;
      }
      case PPPackage.UNARY_EXPRESSION: {
        UnaryExpression unaryExpression = (UnaryExpression) theEObject;
        T result = caseUnaryExpression(unaryExpression);
        if(result == null)
          result = caseExpression(unaryExpression);
        if(result == null)
          result = defaultCase(theEObject);
View Full Code Here

Examples of eu.admire.dispel.expressions.UnaryExpression

          for (MultiplicativeExpressionChild child : exp.getChildren())
            newObj = getLeaf(child);
        }
   
        if (obj instanceof UnaryExpression) {
          UnaryExpression exp = (UnaryExpression) obj;
          newObj = getLeaf(exp.getChild());
        }
   
        if (obj instanceof SuffixUnaryModificationExpression) {
          SuffixUnaryModificationExpression exp = (SuffixUnaryModificationExpression) obj;
          newObj = getLeaf(exp.getChild());
        }
   
        if (obj instanceof StringReference)
          return obj;
   
View Full Code Here

Examples of eu.admire.dispel.expressions.UnaryExpression

        .createAdditiveExpression();
    ex10.getChildren().add(ex11);
    MultiplicativeExpression ex12 = ExpressionsFactory.eINSTANCE
        .createMultiplicativeExpression();
    ex11.getChildren().add(ex12);
    UnaryExpression ex13 = ExpressionsFactory.eINSTANCE
        .createUnaryExpression();
    ex12.getChildren().add(ex13);
    SuffixUnaryModificationExpression ex14 = ExpressionsFactory
        .eINSTANCE.createSuffixUnaryModificationExpression();
    ex13.setChild(ex14);
   
    //Return head and tail
   
    return new Pair<AssignmentExpression,
        SuffixUnaryModificationExpression>(ex1, ex14);
View Full Code Here

Examples of eu.admire.dispel.expressions.UnaryExpression

    MultiplicativeExpression ex12 = ExpressionsFactory.eINSTANCE
        .createMultiplicativeExpression();

    ex11.getChildren().add(ex12);

    UnaryExpression ex13 = ExpressionsFactory.eINSTANCE
        .createUnaryExpression();

    ex12.getChildren().add(ex13);

    SuffixUnaryModificationExpression ex14 = ExpressionsFactory.eINSTANCE
        .createSuffixUnaryModificationExpression();

    ex13.setChild(ex14);

    NewProcessingElementCall call = InstantiationsFactory.eINSTANCE
        .createNewProcessingElementCall();

    ex14.setChild(call);
View Full Code Here

Examples of lombok.ast.UnaryExpression

        set(node, new NullLiteral());
        return;
      }
     
      if (literal != null) {
        if (negative) set(node, new UnaryExpression().astOperand(setPos(node, literal)).astOperator(UnaryOperator.UNARY_MINUS));
        else set(node, literal);
      } else {
        throw new IllegalArgumentException("Unknown JCLiteral type tag:" + node.typetag);
      }
    }
View Full Code Here

Examples of lombok.ast.UnaryExpression

      cast.rawTypeReference(toTree(node.getType(), FlagKey.TYPE_REFERENCE));
      set(node, cast);
    }
   
    @Override public void visitUnary(JCUnary node) {
      UnaryExpression expr = new UnaryExpression();
      expr.rawOperand(toTree(node.getExpression()));
      expr.astOperator(JcTreeBuilder.UNARY_OPERATORS.inverse().get(getTag(node)));
      set(node, expr);
    }
View Full Code Here

Examples of net.sourceforge.htmlunit.corejs.javascript.ast.UnaryExpression

        block.addChildBefore(newInstrumentationNode(lineNr), elseIfStatement);
    }

    private AstNode newInstrumentationNode(final int lineNr) {
        final ExpressionStatement instrumentationNode = new ExpressionStatement();
        final UnaryExpression inc = new UnaryExpression();

        inc.setIsPostfix(true);
        inc.setOperator(Token.INC);

        final ElementGet outer = new ElementGet();
        final ElementGet inner = new ElementGet();

        outer.setTarget(inner);

        final Name covDataVar = new Name();
        covDataVar.setIdentifier(ScriptInstrumenter.COVERAGE_VARIABLE_NAME);

        inner.setTarget(covDataVar);

        final StringLiteral fileName = new StringLiteral();
        fileName.setValue(data.getSourceUriAsString());
        fileName.setQuoteCharacter('\'');

        inner.setElement(fileName);

        final NumberLiteral index = new NumberLiteral();
        index.setNumber(lineNr);
        index.setValue(Integer.toString(lineNr));

        outer.setElement(index);

        inc.setOperand(outer);

        instrumentationNode.setExpression(inc);
        instrumentationNode.setHasResult();

        return instrumentationNode;
View Full Code Here

Examples of org.apache.camel.language.simple.ast.UnaryExpression

        }

        // okay we are not inside a function or quote, so we want to support operators
        // and the special null value as well
        if (token.getType().isUnary()) {
            return new UnaryExpression(token);
        } else if (token.getType().isBinary()) {
            return new BinaryExpression(token);
        } else if (token.getType().isLogical()) {
            return new LogicalExpression(token);
        } else if (token.getType().isNullValue()) {
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.