robert-w-gries / javar

Java compiler written in Java
0 stars 0 forks source link

Re-generating parser files with javacc 5 or newer results in compiler errors #8

Closed robert-w-gries closed 6 years ago

robert-w-gries commented 6 years ago

It seems like an issue with our .jj file

Information:2/21/2018 3:13 PM - Compilation completed with 6 errors and 1 warning in 4s 176ms
C:\Users\rgrie\javar\src\frontend\parse\JavarParser.java
Warning:(1089, 93) java: Integer(java.lang.String) in java.lang.Integer has been deprecated
Error:(1836, 34) java: constructor SimpleCharStream in class frontend.parse.SimpleCharStream cannot be applied to given types;
  required: java.io.Reader,int,int
  found: java.io.InputStream,java.lang.String,int,int
  reason: actual and formal argument lists differ in length
Error:(1851, 31) java: cannot find symbol
  symbol:   method ReInit(java.io.InputStream,java.lang.String,int,int)
  location: variable jj_input_stream of type frontend.parse.SimpleCharStream
Error:(1883, 27) java: cannot find symbol
  symbol:   method ReInit(java.io.Reader,int,int)
  location: variable jj_input_stream of type frontend.parse.SimpleCharStream
Error:(2077, 17) java: no suitable constructor found for ParseException(frontend.parse.Token,int[][],java.lang.String[])
    constructor frontend.parse.ParseException.ParseException(frontend.parse.Token,int[][]) is not applicable
      (actual and formal argument lists differ in length)
    constructor frontend.parse.ParseException.ParseException() is not applicable
      (actual and formal argument lists differ in length)
C:\Users\rgrie\javar\src\frontend\parse\JavarParserTokenManager.java
Error:(945, 13) java: cannot find symbol
  symbol:   method newToken(int)
  location: class frontend.parse.Token
Error:(1101, 91) java: incompatible types: possible lossy conversion from int to char
robert-w-gries commented 6 years ago

@jchitel Deleting all .java files in src/frontend/parse/ worked. javacc will not regenerate the utility files unless they're deleted first.