Uploaded image for project: 'Clover'
  1. Clover
  2. CLOV-1328

as a Clover developer I'd like to use the latest version of ANTLR

    • Our product teams collect and evaluate feedback from a number of different sources. To learn more about how we use customer feedback in the planning process, check out our new feature policy.

      Clover uses ANTLR 2.x currently which is few light-years from the latest version, which is ANTLR 4.x. Upgrade to the latest ANTLR library version.

      • check ANTLR 4.x license (it's different from 2.x) whether we can actually use it; if not - try to use 3.x, if possible
      • check if there's any Java grammar (the best for Java 8) available for Antlr 4
      • estimate whether it's better to use completely new grammar file and embed clover stuff there or to upgrade our existing grammar file from 2.x to 4.x
        • watch out for our custom extensions like unicode escape sequence handling, annotations etc

            [CLOV-1328] as a Clover developer I'd like to use the latest version of ANTLR

            ANTLR3 license is BSD

            Marek Parfianowicz added a comment - ANTLR3 license is BSD

            Marek Parfianowicz added a comment - https://github.com/antlr/examples-v3/blob/master/java/java/Java.g

            Marek Parfianowicz added a comment - http://www.antlr.org/wiki/display/ANTLR3/Migrating+from+ANTLR+2+to+ANTLR+3

            We can use Complete ANTLR 3.5 Java binaries w/o legacy ANTLR v2 jar (complete ANTLR 3.5 tool, Java runtime and ST 4.0.7 which should be able to run the tool and the generated code unless you are using output=template; For backward compatibility reasons, ANTLR 3.5 still generates code that uses ST v3 at parse-time.)

            Marek Parfianowicz added a comment - We can use Complete ANTLR 3.5 Java binaries w/o legacy ANTLR v2 jar (complete ANTLR 3.5 tool, Java runtime and ST 4.0.7 which should be able to run the tool and the generated code unless you are using output=template; For backward compatibility reasons, ANTLR 3.5 still generates code that uses ST v3 at parse-time.)

            We can't use ANTLR v4 because it requires JDK1.6+ and we still plan to support JDK1.5 for a while.

            d:\Installs\Java>java -jar JavaClassVersionChecker.jar c:\Temp\antlr4.1 short
            
            Version Checker Tool V1.0
            
            Verified Direcotry : c:\Temp\antlr4.1
            
            ..........................................................................................
            Major.Minor Version : 50.0             JAVA compatibility : Java 1.6 platform: 45.3-50.0
            Number of classes : 167
            
            .........................................................................................
            Total Time : 0 Seconds
            
            d:\Installs\Java>java -jar JavaClassVersionChecker.jar c:\Temp\antlr-3.5 short
            
            Version Checker Tool V1.0
            
            Verified Direcotry : c:\Temp\antlr-3.5
            
            ..........................................................................................
            Major.Minor Version : 49.0             JAVA compatibility : Java 1.5 platform: 45.3-49.0
            Number of classes : 705
            
            .........................................................................................
            Total Time : 0 Seconds
            
            d:\Installs\Java>java -jar JavaClassVersionChecker.jar c:\Temp\antlr-3.5-with-v2 short
            
            Version Checker Tool V1.0
            
            Verified Direcotry : c:\Temp\antlr-3.5-with-v2
            
            ..........................................................................................
            Major.Minor Version : 46.0             JAVA compatibility : Java 1.2 platform: 45.3-46.0
            Number of classes : 224
            
            Major.Minor Version : 49.0             JAVA compatibility : Java 1.5 platform: 45.3-49.0
            Number of classes : 705
            
            Major.Minor Version : 48.0             JAVA compatibility : Java 1.4 platform: 45.3-48.0
            Number of classes : 60
            
            .........................................................................................
            Total Time : 0 Seconds
            

            Marek Parfianowicz added a comment - We can't use ANTLR v4 because it requires JDK1.6+ and we still plan to support JDK1.5 for a while. d:\Installs\Java>java -jar JavaClassVersionChecker.jar c:\Temp\antlr4.1 short Version Checker Tool V1.0 Verified Direcotry : c:\Temp\antlr4.1 .......................................................................................... Major.Minor Version : 50.0 JAVA compatibility : Java 1.6 platform: 45.3-50.0 Number of classes : 167 ......................................................................................... Total Time : 0 Seconds d:\Installs\Java>java -jar JavaClassVersionChecker.jar c:\Temp\antlr-3.5 short Version Checker Tool V1.0 Verified Direcotry : c:\Temp\antlr-3.5 .......................................................................................... Major.Minor Version : 49.0 JAVA compatibility : Java 1.5 platform: 45.3-49.0 Number of classes : 705 ......................................................................................... Total Time : 0 Seconds d:\Installs\Java>java -jar JavaClassVersionChecker.jar c:\Temp\antlr-3.5-with-v2 short Version Checker Tool V1.0 Verified Direcotry : c:\Temp\antlr-3.5-with-v2 .......................................................................................... Major.Minor Version : 46.0 JAVA compatibility : Java 1.2 platform: 45.3-46.0 Number of classes : 224 Major.Minor Version : 49.0 JAVA compatibility : Java 1.5 platform: 45.3-49.0 Number of classes : 705 Major.Minor Version : 48.0 JAVA compatibility : Java 1.4 platform: 45.3-48.0 Number of classes : 60 ......................................................................................... Total Time : 0 Seconds

              mparfianowicz Marek Parfianowicz
              mparfianowicz Marek Parfianowicz
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: