public static Cons cppTranslateOperatorCall(Cons operatornames, Cons arguments, int arity) {
    { Cons otree = null;

      switch (arity) {
        case 1: 
          otree = Cons.list$(Cons.cons(Stella.SYM_STELLA_CPP_UNARY_OP, Cons.cons(operatornames.value, Cons.cons(Cons.cons(Stella_Object.cppTranslateATree(arguments.value), Stella.NIL), Stella.NIL))));
        break;
        case 2: 
          if (arguments.length() > 2) {
            otree = Cons.list$(Cons.cons(Stella.SYM_STELLA_CPP_BINARY_OP, Cons.cons(Stella_Object.cppTranslateATree(arguments.value), Cons.cons(Cons.cons(operatornames.value, Cons.cons(Cons.cppTranslateOperatorCall(((Cons)(Stella_Object.copyConsTree(operatornames))), arguments.rest, 2), Stella.NIL)), Stella.NIL))));
          }
          else {
            otree = Cons.list$(Cons.cons(Stella.SYM_STELLA_CPP_BINARY_OP, Cons.cons(Stella_Object.cppTranslateATree(arguments.value), Cons.cons(Cons.cons(operatornames.value, Cons.cons(Stella_Object.cppTranslateATree(arguments.rest.value), Stella.NIL)), Stella.NIL))));
          }
        break;
        case 3: 
          otree = Cons.list$(Cons.cons(Stella.SYM_STELLA_CPP_TERNARY_OP, Cons.cons(Stella_Object.cppTranslateATree(arguments.value), Cons.cons(Cons.cons(operatornames.value, Cons.cons(Stella_Object.cppTranslateATree(arguments.rest.value), Cons.cons(operatornames.rest.value, Cons.cons(Stella_Object.cppTranslateATree(arguments.rest.rest.value), Stella.NIL)))), Stella.NIL))));
        break;
        default:
          { OutputStringStream stream000 = OutputStringStream.newOutputStringStream();

            stream000.nativeStream.print("`" + arity + "' is not a valid case option");
            throw ((StellaException)(StellaException.newStellaException(stream000.theStringReader()).fillInStackTrace()));
          }
      }
      return (otree);
    }
  }