@Override
    public void parse(BasicPrattExpressionParser parser,
                      PsiBuilder builder,
                      PsiBuilder.Marker beforeLhs,
                      IElementType binOpType,
                      int currentPrecedence,
                      int mode) {
      builder.advanceLexer(); // skipping 'instanceof'

      BasicJavaParser javaParser = parser.myParser;
      if (!javaParser.getPatternParser().isPattern(builder)) {
        PsiBuilder.Marker type =
          javaParser.getReferenceParser().parseType(builder, BasicReferenceParser.EAT_LAST_DOT | BasicReferenceParser.WILDCARD);
        if (type == null) {
          error(builder, JavaPsiBundle.message("expected.type"));
        }
      }
      else {
        javaParser.getPatternParser().parsePrimaryPattern(builder, false);
      }
      beforeLhs.done(myJavaElementTypeContainer.INSTANCE_OF_EXPRESSION);
    }
@Override
    public void parse(BasicPrattExpressionParser parser,
                      PsiBuilder builder,
                      PsiBuilder.Marker beforeLhs,
                      IElementType binOpType,
                      int currentPrecedence,
                      int mode)