final public ParsedPattern PrimaryExpr(boolean topLevel, Scope scope, Annotations a, Token[] except) throws ParseException {
  ParsedPattern p;
    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
    case 26:
      p = ElementExpr(scope, a);
      break;
    case 27:
      p = AttributeExpr(scope, a);
      break;
    case 10:
      p = GrammarExpr(scope, a);
      break;
    case 33:
      p = ExternalRefExpr(scope, a);
      break;
    case 31:
      p = ListExpr(scope, a);
      break;
    case 32:
      p = MixedExpr(scope, a);
      break;
    case 28:
      p = ParenExpr(topLevel, scope, a);
      break;
    case IDENTIFIER:
    case ESCAPED_IDENTIFIER:
      p = IdentifierExpr(scope, a);
      break;
    case 34:
      p = ParentExpr(scope, a);
      break;
    case 35:
    case 36:
    case PREFIXED_NAME:
      p = DataExpr(topLevel, scope, a, except);
      break;
    case LITERAL:
      p = ValueExpr(topLevel, a);
      break;
    case 18:
      p = TextExpr(a);
      break;
    case 17:
      p = EmptyExpr(a);
      break;
    case 19:
      p = NotAllowedExpr(a);
      break;
    default:
      jj_la1[19] = jj_gen;
      jj_consume_token(-1);
      throw new ParseException();
    }
    {if (true) return p;}
    throw new Error("Missing return statement in function");
  }