Exemple #1
0
 virtual public void pre_expression(pre_expression ast, int parent)
 {
     //        int myprec = prec(ast.op.str + "e");
     //        if (myprec <= parent)
     //            parenexpr(ast);
     //        else {
     //            Write("{0}", ast.op.str);
     //            visit(ast.expr, myprec);
     //        }
 }
Exemple #2
0
    virtual public void pre_expression(pre_expression ast, int parent)
    {
        int myprec = prec(ast.op.str + "e");

        if (myprec <= parent)
        {
            parenexpr(ast);
        }
        else
        {
            Write("{0}", ast.op.str);
            visit(ast.expr, myprec);
        }
    }
Exemple #3
0
 public virtual expression pre_expression(pre_expression ast, int lvalue, int rvalue)
 {
     ast.expr = expression(ast.expr, 1, 1);
     return(wrap(ast, rvalue));
 }