final public ParsedPattern UnaryExpr(boolean topLevel, Scope scope, boolean[] hadOccur, Token[] except) throws ParseException {
  ParsedPattern p;
  Token t;
  ParsedElementAnnotation e;
    p = AnnotatedPrimaryExpr(topLevel, scope, except);
    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
    case 23:
    case 24:
    case 25:
     if (hadOccur != null) hadOccur[0] = true;
     p = afterComments(p);
      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
      case 23:
        t = jj_consume_token(23);
              checkExcept(except); p = sb.makeOneOrMore(p, makeLocation(t), null);
        break;
      case 24:
        t = jj_consume_token(24);
                checkExcept(except); p = sb.makeOptional(p, makeLocation(t), null);
        break;
      case 25:
        t = jj_consume_token(25);
                checkExcept(except); p = sb.makeZeroOrMore(p, makeLocation(t), null);
        break;
      default:
        jj_la1[25] = jj_gen;
        jj_consume_token(-1);
        throw new ParseException();
      }
      label_9:
      while (true) {
        switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
        case FANNOTATE:
          ;
          break;
        default:
          jj_la1[26] = jj_gen;
          break label_9;
        }
        t = jj_consume_token(FANNOTATE);
        e = AnnotationElement(false);
        if (topLevel)
          error("top_level_follow_annotation", t);
        else
          p = sb.annotateAfter(p, e);
      }
      break;
    default:
      jj_la1[27] = jj_gen;
      ;
    }
    {if (true) return p;}
    throw new Error("Missing return statement in function");
  }