Ad
  • Custom User Avatar

    (Java) Clicking "Attempt" results in errors:

    src/test/java/RS5_Tests.java:1010: error: cannot find symbol
                TOKENIZER    = Pattern.compile(String.join("|", Arrays.asList(WHITE_COMMENTS, ID_PATT_BRA, ".")), Pattern.DOTALL),
                                                                                                                         ^
      symbol:   variable DOTALL
      location: class Pattern
    src/test/java/RS5_Tests.java:1011: error: incompatible types: String cannot be converted to Env
                VALID_TOKEN  = Pattern.compile(ID_PATT_BRA),
                                               ^
    src/test/java/RS5_Tests.java:1012: error: cannot find symbol
                IS_CMT_WHITE = Pattern.compile(WHITE_COMMENTS, Pattern.DOTALL);
                                                                      ^
      symbol:   variable DOTALL
      location: class Pattern
    src/test/java/RS5_Tests.java:1034: error: cannot find symbol
                Matcher m = TOKENIZER.matcher(source);
                                     ^
      symbol:   method matcher(String)
      location: variable TOKENIZER of type Pattern
    src/test/java/RS5_Tests.java:1037: error: cannot find symbol
                    if (IS_CMT_WHITE.matcher(tok).matches())  continue;
                                    ^
      symbol:   method matcher(String)
      location: variable IS_CMT_WHITE of type Pattern
    src/test/java/RS5_Tests.java:1038: error: cannot find symbol
                    if (VALID_TOKEN.matcher(tok).matches()) tokens.add(tok);
                                   ^
      symbol:   method matcher(String)
      location: variable VALID_TOKEN of type Pattern
    Note: src/main/java/RSUProgram.java uses unchecked or unsafe operations.
    Note: Recompile with -Xlint:unchecked for details.
    Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output
    6 errors
    
  • Custom User Avatar

    (Java) When I click "Attempt" I get a bunch of errors:

    src/test/java/SolutionTest.java:212: error: cannot find symbol
        final static private Pattern P_TOKENS  = Pattern.compile("p(\\d+)(.*?)q"),
                                                        ^
      symbol:   method compile(String)
      location: class Pattern
    src/test/java/SolutionTest.java:213: error: cannot find symbol
                                     TOKENIZER = Pattern.compile("(R+|F+|L+|[P)(]|p.+?q)(\\d*)");
                                                        ^
      symbol:   method compile(String)
      location: class Pattern
    src/test/java/SolutionTest.java:260: error: cannot find symbol
            Matcher m = P_TOKENS.matcher(code);
                                ^
      symbol:   method matcher(String)
      location: variable P_TOKENS of type Pattern
    src/test/java/SolutionTest.java:279: error: cannot find symbol
            Matcher m = TOKENIZER.matcher(code);
                                 ^
      symbol:   method matcher(String)
      location: variable TOKENIZER of type Pattern
    4 errors
    

    I do not use Pattern and Matcher in my solution.