public void addInnerNavigation(
     CSTNavigationOperatorCS operat,
     CSTOclExpressionCS innerExp)
 {
     this.innerNavigation.Add(innerExp);
     this.operators.Add(operat);
 }
Exemplo n.º 2
0
 public CSTLetExpCS(
     List <object> varDeclarations,
     CSTOclExpressionCS expression)
 {
     this.varDeclarations = varDeclarations;
     this.expression      = expression;
 }
Exemplo n.º 3
0
 public CSTUnaryExpressionCS(
     CSTOperatorCS operat,
     CSTOclExpressionCS expression)
 {
     this.operat     = operat;
     this.expression = expression;
 }
Exemplo n.º 4
0
 public CSTIterateExpCS(
     List <object> iterators,
     CSTVariableDeclarationCS result,
     CSTOclExpressionCS bodyExpression)
 {
     this.iterators      = iterators;
     this.result         = result;
     this.bodyExpression = bodyExpression;
 }
Exemplo n.º 5
0
 public CSTIteratorExpCS(
     CSTIteratorOperationCS iteratorOperation,
     List <object> variables,
     CSTOclExpressionCS bodyExpression)
 {
     this.iteratorOperation = iteratorOperation;
     this.variables         = variables;
     this.bodyExpression    = bodyExpression;
 }
 public CSTBinaryExpressionCS(
     CSTOclExpressionCS leftExpression,
     CSTOperatorCS operat,
     CSTOclExpressionCS rightExpression)
 {
     this.leftExpression  = leftExpression;
     this.operat          = operat;
     this.rightExpression = rightExpression;
 }
Exemplo n.º 7
0
 public CSTIfExpCS(
     OCLWorkbenchToken tokenIf,
     CSTOclExpressionCS conditionExp,
     CSTOclExpressionCS thenExp,
     CSTOclExpressionCS elseExp)
 {
     this.conditionExp = conditionExp;
     this.thenExp      = thenExp;
     this.elseExp      = elseExp;
     this.tokenIf      = tokenIf;
 }
        /* (non-Javadoc)
         * @see br.cos.ufrj.lens.odyssey.tools.psw.parser.cst.CSTNode#accept(br.cos.ufrj.lens.odyssey.tools.psw.parser.cst.CSTVisitor)
         */
        public override void accept(CSTVisitor visitor)
        {
            if (callExp != null)
            {
                callExp.accept(visitor);
                visitor.visitNavigationExpressionBegin(this, callExp);

                //var expAndOperators = innerNavigation.Zip(operators, (e, o) => new { Expression = e, Operator = o });
                //foreach (var e in expAndOperators)
                //{
                //    CSTOclExpressionCS innerExp = (CSTOclExpressionCS) e.Expression;
                //    CSTNavigationOperatorCS operat = (CSTNavigationOperatorCS) e.Operator;

                //    if ((innerExp != null) && (operat != null))
                //    {
                //        operat.accept(visitor);
                //        innerExp.accept(visitor);
                //        visitor.visitNavigationExpression(this, innerExp);
                //    }
                //}

                var iter         = innerNavigation.GetEnumerator();
                var iterOperator = operators.GetEnumerator();
                while (iter.MoveNext() && iterOperator.MoveNext())
                {
                    CSTOclExpressionCS      innerExp = (CSTOclExpressionCS)iter.Current;
                    CSTNavigationOperatorCS operat   = (CSTNavigationOperatorCS)iterOperator.Current;

                    if ((innerExp != null) && (operat != null))
                    {
                        operat.accept(visitor);
                        innerExp.accept(visitor);
                        visitor.visitNavigationExpression(this, innerExp);
                    }
                }

                visitor.visitNavigationExpressionEnd(this, innerNavigation, callExp);
            }
        }
 public CSTNavigationExpressionCS(CSTOclExpressionCS callExp)
 {
     this.callExp         = callExp;
     this.innerNavigation = new List <object>();
     this.operators       = new List <object>();
 }
Exemplo n.º 10
0
 public CSTArgumentCS(CSTOclExpressionCS expression)
 {
     this.expressionNodeCS = expression;
 }