Lucene - Core
  1. Lucene - Core
  2. LUCENE-1851

'ant javacc' in root project should also properly create contrib/surround Java files

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.9
    • Fix Version/s: 2.9
    • Component/s: modules/other
    • Labels:
      None
    • Lucene Fields:
      New, Patch Available

      Description

      For consistency after LUCENE-1829 which did the same for contrib/queryparser

      1. javacc20090825.patch
        0.4 kB
        Paul Elschot
      2. LUCENE-1851.patch
        4 kB
        Luis Alves

        Issue Links

          Activity

          Hide
          Paul Elschot added a comment -

          Everything working as expected now. Thanks.

          Show
          Paul Elschot added a comment - Everything working as expected now. Thanks.
          Hide
          Michael Busch added a comment -

          Fixed it. Sorry about that.

          Committed revision 808224.

          Show
          Michael Busch added a comment - Fixed it. Sorry about that. Committed revision 808224.
          Hide
          Luis Alves added a comment -
          javacc:
             [javacc] Java Compiler Compiler Version 4.2 (Parser Generator)
             [javacc] (type "javacc" with no arguments for help)
             [javacc] Reading from file /home/lafa/kisor2/workspace_eclipse33/lucene_trunk2/contrib/surround/src/java/org/apache/lucene/queryParser/surround/parser/QueryParser.jj . . .
             [javacc] org.javacc.parser.ParseException: Encountered " "<<" "<< "" at line 187, column 3.
             [javacc] Was expecting one of:
             [javacc]     <STRING_LITERAL> ...
             [javacc]     "<" ...
             [javacc]     
             [javacc] Detected 1 errors and 0 warnings.
          

          I just re-synced and see the same problem, I think Michael forgot to commit the QueryParser.jj changes I made.

          Show
          Luis Alves added a comment - javacc: [javacc] Java Compiler Compiler Version 4.2 (Parser Generator) [javacc] (type "javacc" with no arguments for help) [javacc] Reading from file /home/lafa/kisor2/workspace_eclipse33/lucene_trunk2/contrib/surround/src/java/org/apache/lucene/queryParser/surround/parser/QueryParser.jj . . . [javacc] org.javacc.parser.ParseException: Encountered " " << " " << "" at line 187, column 3. [javacc] Was expecting one of: [javacc] <STRING_LITERAL> ... [javacc] "<" ... [javacc] [javacc] Detected 1 errors and 0 warnings. I just re-synced and see the same problem, I think Michael forgot to commit the QueryParser.jj changes I made.
          Hide
          Paul Elschot added a comment -

          Reopening only to make sure my last comment is not missed before the impending 2.9 release.

          Show
          Paul Elschot added a comment - Reopening only to make sure my last comment is not missed before the impending 2.9 release.
          Hide
          Paul Elschot added a comment -

          After svn update I still have the output below, so I think the commit missed some files affected by the patch:

          svn diff `find contrib/surround -name '*.jj'`

          Index: contrib/surround/src/java/org/apache/lucene/queryParser/surround/parser/QueryParser.jj
          ===================================================================
          — contrib/surround/src/java/org/apache/lucene/queryParser/surround/parser/QueryParser.jj (revision 807956)
          +++ contrib/surround/src/java/org/apache/lucene/queryParser/surround/parser/QueryParser.jj (working copy)
          @@ -184,7 +184,7 @@
          }

          <DEFAULT> SKIP :

          { - <<_WHITESPACE>> + < <_WHITESPACE>> }

          /* Operator tokens (in increasing order of precedence): */

          Show
          Paul Elschot added a comment - After svn update I still have the output below, so I think the commit missed some files affected by the patch: svn diff `find contrib/surround -name '*.jj'` Index: contrib/surround/src/java/org/apache/lucene/queryParser/surround/parser/QueryParser.jj =================================================================== — contrib/surround/src/java/org/apache/lucene/queryParser/surround/parser/QueryParser.jj (revision 807956) +++ contrib/surround/src/java/org/apache/lucene/queryParser/surround/parser/QueryParser.jj (working copy) @@ -184,7 +184,7 @@ } <DEFAULT> SKIP : { - <<_WHITESPACE>> + < <_WHITESPACE>> } /* Operator tokens (in increasing order of precedence): */
          Hide
          Michael Busch added a comment -

          Committed revision 807835.

          Thanks for the patch, Luis, and for testing, Paul!

          Show
          Michael Busch added a comment - Committed revision 807835. Thanks for the patch, Luis, and for testing, Paul!
          Hide
          Michael Busch added a comment -

          Patch works fine for me too. Will commit soon.

          Show
          Michael Busch added a comment - Patch works fine for me too. Will commit soon.
          Hide
          Paul Elschot added a comment - - edited

          I've meanwhile switched to ubuntu, and I had to install javacc, which was easy.
          Then I still had to apply the attached patch for javacc to common-build.xml, and put the following line in ~/build.properties:
          javacc.home=/usr/share/java

          After that, these worked fine with Luis' patch applied from contrib/surround:
          ant clean
          ant javacc
          ant test

          Since the patch does not change the tests of the surround parser the change to the .jj file still passed all the tests.

          From the top directory:
          ant clean
          ant javacc
          ant test-contrib

          also worked fine.

          So, in all, this was a very nice excuse to reinstall javacc

          Show
          Paul Elschot added a comment - - edited I've meanwhile switched to ubuntu, and I had to install javacc, which was easy. Then I still had to apply the attached patch for javacc to common-build.xml, and put the following line in ~/build.properties: javacc.home=/usr/share/java After that, these worked fine with Luis' patch applied from contrib/surround: ant clean ant javacc ant test Since the patch does not change the tests of the surround parser the change to the .jj file still passed all the tests. From the top directory: ant clean ant javacc ant test-contrib also worked fine. So, in all, this was a very nice excuse to reinstall javacc
          Hide
          Luis Alves added a comment -

          Hi Paul,

          I found some time to write a patch for this
          If you have time can you try my patch.

          Show
          Luis Alves added a comment - Hi Paul, I found some time to write a patch for this If you have time can you try my patch.
          Hide
          Luis Alves added a comment -

          changes:

          • fixed jjdoc - removed StandardTokenizer.jj added /surround/parser/QueryParser.jj and StandardSyntaxParser.jj
          • fixed surround/build.xml to build javacc
          • fixed surround/.../QueryParser.jj small change to allow javacc to process the file
          • updated clean-javacc and javacc targets
          Show
          Luis Alves added a comment - changes: fixed jjdoc - removed StandardTokenizer.jj added /surround/parser/QueryParser.jj and StandardSyntaxParser.jj fixed surround/build.xml to build javacc fixed surround/.../QueryParser.jj small change to allow javacc to process the file updated clean-javacc and javacc targets
          Hide
          Luis Alves added a comment -

          Paul do you have time to create a patch file?
          I'll review it and test it, if you don't have time let me know.

          Show
          Luis Alves added a comment - Paul do you have time to create a patch file? I'll review it and test it, if you don't have time let me know.

            People

            • Assignee:
              Michael Busch
              Reporter:
              Paul Elschot
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development