Uploaded image for project: 'Derby'
  1. Derby
  2. DERBY-6989

Upgrade javacc version

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 10.14.1.0, 10.15.1.3
    • None
    • Build tools
    • None
    • Normal

    Description

      Our javacc version is still 4.0 on the 10.15 trunk as well as on the 10.14 and older branches. The following command demonstrates this:

      > java -cp trunk/tools/java/javacc.jar javacc
      Java Compiler Compiler Version 4.0 (Parser Generator)
      
      Usage:
          javacc option-settings inputfile
      
      "option-settings" is a sequence of settings separated by spaces.
      Each option setting must be of one of the following forms:
      
          -optionname=value (e.g., -STATIC=false)
          -optionname:value (e.g., -STATIC:false)
          -optionname       (equivalent to -optionname=true.  e.g., -STATIC)
          -NOoptionname     (equivalent to -optionname=false. e.g., -NOSTATIC)
      
      Option settings are not case-sensitive, so one can say "-nOsTaTiC" instead
      of "-NOSTATIC".  Option values must be appropriate for the corresponding
      option, and must be either an integer, a boolean, or a string value.
      
      The integer valued options are:
      
          LOOKAHEAD              (default 1)
          CHOICE_AMBIGUITY_CHECK (default 2)
          OTHER_AMBIGUITY_CHECK  (default 1)
      
      The boolean valued options are:
      
          STATIC                 (default true)
          DEBUG_PARSER           (default false)
          DEBUG_LOOKAHEAD        (default false)
          DEBUG_TOKEN_MANAGER    (default false)
          OPTIMIZE_TOKEN_MANAGER (default true)
          ERROR_REPORTING        (default true)
          JAVA_UNICODE_ESCAPE    (default false)
          UNICODE_INPUT          (default false)
          IGNORE_CASE            (default false)
          COMMON_TOKEN_ACTION    (default false)
          USER_TOKEN_MANAGER     (default false)
          USER_CHAR_STREAM       (default false)
          BUILD_PARSER           (default true)
          BUILD_TOKEN_MANAGER    (default true)
          TOKEN_MANAGER_USES_PARSER (default false)
          SANITY_CHECK           (default true)
          FORCE_LA_CHECK         (default false)
          CACHE_TOKENS           (default false)
          KEEP_LINE_COLUMN       (default true)
      
      The string valued options are:
      
          OUTPUT_DIRECTORY       (default Current Directory)
          JDK_VERSION       (default 1.4)
      
      EXAMPLE:
          javacc -STATIC=false -LOOKAHEAD:2 -debug_parser mygrammar.jj
      

      This version of javacc is so old that its default JDK version is 1.4.

      DERBY-5215 describes some of the issues involved in upgrading javacc. I seem to recall that later versions of javacc produced worse error messages when users tried to compile illegal SQL statements. That might still be a showstopper.

      However, relying on a stale, unsupported tool seems like a bad long-term strategy.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              rhillegas Richard N. Hillegas
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: