Exemple #1
0
        /// <summary>
        /// eval := dynamic | deferred
        /// </summary>
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
//ORIGINAL LINE: protected AstEval eval() throws org.camunda.bpm.engine.impl.juel.Scanner.ScanException, ParseException
        protected internal virtual AstEval eval()
        {
            AstEval e = eval(false, false);

            if (e == null)
            {
                e = eval(false, true);
                if (e == null)
                {
                    fail(START_EVAL_DEFERRED + "|" + START_EVAL_DYNAMIC);
                }
            }
            return(e);
        }
Exemple #2
0
        /// <summary>
        /// tree := text? ((dynamic text?)+ | (deferred text?)+)?
        /// </summary>
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
//ORIGINAL LINE: public Tree tree() throws org.camunda.bpm.engine.impl.juel.Scanner.ScanException, ParseException
        public virtual Tree tree()
        {
            consumeToken();
            AstNode t = text();

            if (token.Symbol == EOF)
            {
                if (t == null)
                {
                    t = new AstText("");
                }
                return(new Tree(t, functions, identifiers, false));
            }
            AstEval e = eval();

            if (token.Symbol == EOF && t == null)
            {
                return(new Tree(e, functions, identifiers, e.Deferred));
            }
            List <AstNode> list = new List <AstNode>();

            if (t != null)
            {
                list.Add(t);
            }
            list.Add(e);
            t = text();
            if (t != null)
            {
                list.Add(t);
            }
            while (token.Symbol != EOF)
            {
                if (e.Deferred)
                {
                    list.Add(eval(true, true));
                }
                else
                {
                    list.Add(eval(true, false));
                }
                t = text();
                if (t != null)
                {
                    list.Add(t);
                }
            }
            return(new Tree(createAstComposite(list), functions, identifiers, e.Deferred));
        }
Exemple #3
0
        /// <summary>
        /// dynmamic := &lt;START_EVAL_DYNAMIC&gt; expr &lt;END_EVAL&gt;
        /// deferred := &lt;START_EVAL_DEFERRED&gt; expr &lt;END_EVAL&gt;
        /// </summary>
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
//ORIGINAL LINE: protected AstEval eval(boolean required, boolean deferred) throws org.camunda.bpm.engine.impl.juel.Scanner.ScanException, ParseException
        protected internal virtual AstEval eval(bool required, bool deferred)
        {
            AstEval v          = null;
            Symbol  start_eval = deferred ? START_EVAL_DEFERRED : START_EVAL_DYNAMIC;

            if (token.Symbol == start_eval)
            {
                consumeToken();
                v = new AstEval(expr(true), deferred);
                consumeToken(END_EVAL);
            }
            else if (required)
            {
                fail(start_eval);
            }
            return(v);
        }