lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dna...@apache.org
Subject cvs commit: jakarta-lucene/src/demo/org/apache/lucene/demo/html HTMLParser.java HTMLParserTokenManager.java HTMLParser.jj HTMLParserConstants.java
Date Mon, 06 Sep 2004 21:33:37 GMT
dnaber      2004/09/06 14:33:37

  Modified:    src/demo/org/apache/lucene/demo/html HTMLParser.java
                        HTMLParserTokenManager.java HTMLParser.jj
                        HTMLParserConstants.java
  Log:
  parse hexadecimal character references
  PR: 30617
  Submitted by: Dave Sparks
  
  Revision  Changes    Path
  1.9       +4 -4      jakarta-lucene/src/demo/org/apache/lucene/demo/html/HTMLParser.java
  
  Index: HTMLParser.java
  ===================================================================
  RCS file: /home/cvs/jakarta-lucene/src/demo/org/apache/lucene/demo/html/HTMLParser.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- HTMLParser.java	2 Sep 2004 13:07:12 -0000	1.8
  +++ HTMLParser.java	6 Sep 2004 21:33:37 -0000	1.9
  @@ -480,7 +480,7 @@
         jj_la1_0();
      }
      private static void jj_la1_0() {
  -      jj_la1_0 = new int[] {0x167e,0x167e,0x8000,0x1c0000,0x10000,0x40000,0x80000,0x100000,0x1d8000,0x1d8000,0x4000000,0x10000000,0x30,0x2000,};
  +      jj_la1_0 = new int[] {0x2c7e,0x2c7e,0x10000,0x380000,0x20000,0x80000,0x100000,0x200000,0x3b0000,0x3b0000,0x8000000,0x20000000,0x30,0x4000,};
      }
     final private JJCalls[] jj_2_rtns = new JJCalls[2];
     private boolean jj_rescan = false;
  @@ -651,8 +651,8 @@
   
     public ParseException generateParseException() {
       jj_expentries.removeAllElements();
  -    boolean[] la1tokens = new boolean[30];
  -    for (int i = 0; i < 30; i++) {
  +    boolean[] la1tokens = new boolean[31];
  +    for (int i = 0; i < 31; i++) {
         la1tokens[i] = false;
       }
       if (jj_kind >= 0) {
  @@ -668,7 +668,7 @@
           }
         }
       }
  -    for (int i = 0; i < 30; i++) {
  +    for (int i = 0; i < 31; i++) {
         if (la1tokens[i]) {
           jj_expentry = new int[1];
           jj_expentry[0] = i;
  
  
  
  1.3       +184 -162  jakarta-lucene/src/demo/org/apache/lucene/demo/html/HTMLParserTokenManager.java
  
  Index: HTMLParserTokenManager.java
  ===================================================================
  RCS file: /home/cvs/jakarta-lucene/src/demo/org/apache/lucene/demo/html/HTMLParserTokenManager.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- HTMLParserTokenManager.java	23 Nov 2003 18:37:32 -0000	1.2
  +++ HTMLParserTokenManager.java	6 Sep 2004 21:33:37 -0000	1.3
  @@ -13,11 +13,9 @@
      {
         case 0:
            if ((active0 & 0x32L) != 0L)
  -            return 17;
  +            return 20;
            return -1;
         case 1:
  -         if ((active0 & 0x30L) != 0L)
  -            return 22;
            if ((active0 & 0x2L) != 0L)
            {
               if (jjmatchedPos != 1)
  @@ -25,15 +23,17 @@
                  jjmatchedKind = 2;
                  jjmatchedPos = 1;
               }
  -            return 19;
  +            return 22;
            }
  +         if ((active0 & 0x30L) != 0L)
  +            return 25;
            return -1;
         case 2:
            if ((active0 & 0x2L) != 0L)
            {
               jjmatchedKind = 2;
               jjmatchedPos = 2;
  -            return 20;
  +            return 23;
            }
            return -1;
         case 3:
  @@ -41,7 +41,7 @@
            {
               jjmatchedKind = 2;
               jjmatchedPos = 3;
  -            return 20;
  +            return 23;
            }
            return -1;
         case 4:
  @@ -49,7 +49,7 @@
            {
               jjmatchedKind = 2;
               jjmatchedPos = 4;
  -            return 20;
  +            return 23;
            }
            return -1;
         case 5:
  @@ -57,7 +57,7 @@
            {
               jjmatchedKind = 2;
               jjmatchedPos = 5;
  -            return 20;
  +            return 23;
            }
            return -1;
         default :
  @@ -206,7 +206,7 @@
      {
         case 116:
            if ((active0 & 0x2L) != 0L)
  -            return jjStartNfaWithStates_0(6, 1, 20);
  +            return jjStartNfaWithStates_0(6, 1, 23);
            break;
         default :
            break;
  @@ -250,7 +250,7 @@
   {
      int[] nextStates;
      int startsAt = 0;
  -   jjnewStateCnt = 25;
  +   jjnewStateCnt = 28;
      int i = 1;
      jjstateSet[0] = startState;
      int j, kind = 0x7fffffff;
  @@ -265,34 +265,34 @@
            {
               switch(jjstateSet[--i])
               {
  +               case 20:
  +                  if (curChar == 33)
  +                     jjstateSet[jjnewStateCnt++] = 25;
  +                  else if (curChar == 47)
  +                     jjCheckNAdd(21);
  +                  break;
                  case 11:
                     if ((0x3ff000000000000L & l) != 0L)
                        jjCheckNAddTwoStates(7, 2);
                     else if ((0x100002600L & l) != 0L)
                     {
  -                     if (kind > 10)
  -                        kind = 10;
  +                     if (kind > 11)
  +                        kind = 11;
                        jjCheckNAdd(10);
                     }
                     else if (curChar == 60)
                        jjCheckNAddStates(0, 2);
                     else if (curChar == 38)
  -                     jjAddStates(3, 4);
  +                     jjAddStates(3, 5);
                     else if (curChar == 36)
                        jjstateSet[jjnewStateCnt++] = 1;
                     if ((0x3ff000000000000L & l) != 0L)
                     {
                        if (kind > 6)
                           kind = 6;
  -                     jjCheckNAddStates(5, 9);
  +                     jjCheckNAddStates(6, 10);
                     }
                     break;
  -               case 17:
  -                  if (curChar == 33)
  -                     jjstateSet[jjnewStateCnt++] = 22;
  -                  else if (curChar == 47)
  -                     jjCheckNAdd(18);
  -                  break;
                  case 0:
                     if (curChar == 36)
                        jjstateSet[jjnewStateCnt++] = 1;
  @@ -311,21 +311,21 @@
                        break;
                     if (kind > 6)
                        kind = 6;
  -                  jjCheckNAddStates(10, 12);
  +                  jjCheckNAddStates(11, 13);
                     break;
                  case 4:
                     if ((0x3ff000000000000L & l) == 0L)
                        break;
                     if (kind > 6)
                        kind = 6;
  -                  jjCheckNAddStates(5, 9);
  +                  jjCheckNAddStates(6, 10);
                     break;
                  case 5:
                     if ((0x880000000000L & l) == 0L)
                        break;
                     if (kind > 6)
                        kind = 6;
  -                  jjCheckNAddStates(13, 16);
  +                  jjCheckNAddStates(14, 17);
                     break;
                  case 6:
                     if ((0x3ff000000000000L & l) != 0L)
  @@ -336,7 +336,7 @@
                        break;
                     if (kind > 6)
                        kind = 6;
  -                  jjCheckNAddStates(10, 12);
  +                  jjCheckNAddStates(11, 13);
                     break;
                  case 8:
                     if ((0x208000000000L & l) != 0L)
  @@ -345,12 +345,12 @@
                  case 10:
                     if ((0x100002600L & l) == 0L)
                        break;
  -                  kind = 10;
  +                  kind = 11;
                     jjCheckNAdd(10);
                     break;
                  case 13:
  -                  if (curChar == 59 && kind > 9)
  -                     kind = 9;
  +                  if (curChar == 59 && kind > 10)
  +                     kind = 10;
                     break;
                  case 14:
                     if (curChar == 35)
  @@ -359,45 +359,56 @@
                  case 15:
                     if ((0x3ff000000000000L & l) == 0L)
                        break;
  -                  if (kind > 9)
  -                     kind = 9;
  +                  if (kind > 10)
  +                     kind = 10;
                     jjCheckNAddTwoStates(15, 13);
                     break;
                  case 16:
  +                  if (curChar == 35)
  +                     jjstateSet[jjnewStateCnt++] = 17;
  +                  break;
  +               case 18:
  +                  if ((0x3ff000000000000L & l) == 0L)
  +                     break;
  +                  if (kind > 10)
  +                     kind = 10;
  +                  jjCheckNAddTwoStates(18, 13);
  +                  break;
  +               case 19:
                     if (curChar == 60)
                        jjCheckNAddStates(0, 2);
                     break;
  -               case 19:
  +               case 22:
                     if ((0x9fffff7affffd9ffL & l) == 0L)
                        break;
                     if (kind > 2)
                        kind = 2;
  -                  jjCheckNAdd(20);
  +                  jjCheckNAdd(23);
                     break;
  -               case 20:
  +               case 23:
                     if ((0x9ffffffeffffd9ffL & l) == 0L)
                        break;
                     if (kind > 2)
                        kind = 2;
  -                  jjCheckNAdd(20);
  +                  jjCheckNAdd(23);
                     break;
  -               case 21:
  +               case 24:
                     if (curChar == 33)
  -                     jjstateSet[jjnewStateCnt++] = 22;
  +                     jjstateSet[jjnewStateCnt++] = 25;
                     break;
  -               case 23:
  +               case 26:
                     if ((0x9fffff7affffd9ffL & l) == 0L)
                        break;
                     if (kind > 3)
                        kind = 3;
  -                  jjCheckNAdd(24);
  +                  jjCheckNAdd(27);
                     break;
  -               case 24:
  +               case 27:
                     if ((0x9ffffffeffffd9ffL & l) == 0L)
                        break;
                     if (kind > 3)
                        kind = 3;
  -                  jjCheckNAdd(24);
  +                  jjCheckNAdd(27);
                     break;
                  default : break;
               }
  @@ -410,54 +421,65 @@
            {
               switch(jjstateSet[--i])
               {
  +               case 20:
  +               case 21:
  +                  if ((0x7fffffe07fffffeL & l) == 0L)
  +                     break;
  +                  if (kind > 2)
  +                     kind = 2;
  +                  jjstateSet[jjnewStateCnt++] = 22;
  +                  break;
                  case 11:
                  case 4:
                     if ((0x7fffffe07fffffeL & l) == 0L)
                        break;
                     if (kind > 6)
                        kind = 6;
  -                  jjCheckNAddStates(5, 9);
  -                  break;
  -               case 17:
  -               case 18:
  -                  if ((0x7fffffe07fffffeL & l) == 0L)
  -                     break;
  -                  if (kind > 2)
  -                     kind = 2;
  -                  jjstateSet[jjnewStateCnt++] = 19;
  +                  jjCheckNAddStates(6, 10);
                     break;
                  case 9:
                     if ((0x7fffffe07fffffeL & l) == 0L)
                        break;
                     if (kind > 6)
                        kind = 6;
  -                  jjCheckNAddStates(10, 12);
  +                  jjCheckNAddStates(11, 13);
                     break;
                  case 12:
                     if ((0x7fffffe07fffffeL & l) == 0L)
                        break;
  -                  if (kind > 9)
  -                     kind = 9;
  -                  jjAddStates(17, 18);
  +                  if (kind > 10)
  +                     kind = 10;
  +                  jjCheckNAddTwoStates(12, 13);
                     break;
  -               case 19:
  -               case 20:
  +               case 17:
  +                  if ((0x100000001000000L & l) != 0L)
  +                     jjCheckNAdd(18);
  +                  break;
  +               case 18:
  +                  if ((0x7e0000007eL & l) == 0L)
  +                     break;
  +                  if (kind > 10)
  +                     kind = 10;
  +                  jjCheckNAddTwoStates(18, 13);
  +                  break;
  +               case 22:
  +               case 23:
                     if (kind > 2)
                        kind = 2;
  -                  jjCheckNAdd(20);
  +                  jjCheckNAdd(23);
                     break;
  -               case 22:
  +               case 25:
                     if ((0x7fffffe07fffffeL & l) == 0L)
                        break;
                     if (kind > 3)
                        kind = 3;
  -                  jjstateSet[jjnewStateCnt++] = 23;
  +                  jjstateSet[jjnewStateCnt++] = 26;
                     break;
  -               case 23:
  -               case 24:
  +               case 26:
  +               case 27:
                     if (kind > 3)
                        kind = 3;
  -                  jjCheckNAdd(24);
  +                  jjCheckNAdd(27);
                     break;
                  default : break;
               }
  @@ -471,21 +493,21 @@
            {
               switch(jjstateSet[--i])
               {
  -               case 19:
  -               case 20:
  +               case 22:
  +               case 23:
                     if ((jjbitVec0[i2] & l2) == 0L)
                        break;
                     if (kind > 2)
                        kind = 2;
  -                  jjCheckNAdd(20);
  +                  jjCheckNAdd(23);
                     break;
  -               case 23:
  -               case 24:
  +               case 26:
  +               case 27:
                     if ((jjbitVec0[i2] & l2) == 0L)
                        break;
                     if (kind > 3)
                        kind = 3;
  -                  jjCheckNAdd(24);
  +                  jjCheckNAdd(27);
                     break;
                  default : break;
               }
  @@ -498,7 +520,7 @@
            kind = 0x7fffffff;
         }
         ++curPos;
  -      if ((i = jjnewStateCnt) == (startsAt = 25 - (jjnewStateCnt = startsAt)))
  +      if ((i = jjnewStateCnt) == (startsAt = 28 - (jjnewStateCnt = startsAt)))
            return curPos;
         try { curChar = input_stream.readChar(); }
         catch(java.io.IOException e) { return curPos; }
  @@ -530,20 +552,20 @@
                  case 1:
                     if ((0xfffffffbffffffffL & l) != 0L)
                     {
  -                     if (kind > 24)
  -                        kind = 24;
  +                     if (kind > 25)
  +                        kind = 25;
                        jjCheckNAdd(0);
                     }
                     else if (curChar == 34)
                     {
  -                     if (kind > 25)
  -                        kind = 25;
  +                     if (kind > 26)
  +                        kind = 26;
                     }
                     break;
                  case 0:
                     if ((0xfffffffbffffffffL & l) == 0L)
                        break;
  -                  kind = 24;
  +                  kind = 25;
                     jjCheckNAdd(0);
                     break;
                  default : break;
  @@ -559,7 +581,7 @@
               {
                  case 1:
                  case 0:
  -                  kind = 24;
  +                  kind = 25;
                     jjCheckNAdd(0);
                     break;
                  default : break;
  @@ -578,8 +600,8 @@
                  case 0:
                     if ((jjbitVec0[i2] & l2) == 0L)
                        break;
  -                  if (kind > 24)
  -                     kind = 24;
  +                  if (kind > 25)
  +                     kind = 25;
                     jjCheckNAdd(0);
                     break;
                  default : break;
  @@ -624,7 +646,7 @@
      switch(curChar)
      {
         case 62:
  -         return jjStopAtPos(0, 29);
  +         return jjStopAtPos(0, 30);
         default :
            return jjMoveNfa_7(0, 0);
      }
  @@ -651,7 +673,7 @@
                  case 0:
                     if ((0xbfffffffffffffffL & l) == 0L)
                        break;
  -                  kind = 28;
  +                  kind = 29;
                     jjstateSet[jjnewStateCnt++] = 0;
                     break;
                  default : break;
  @@ -666,7 +688,7 @@
               switch(jjstateSet[--i])
               {
                  case 0:
  -                  kind = 28;
  +                  kind = 29;
                     jjstateSet[jjnewStateCnt++] = 0;
                     break;
                  default : break;
  @@ -684,8 +706,8 @@
                  case 0:
                     if ((jjbitVec0[i2] & l2) == 0L)
                        break;
  -                  if (kind > 28)
  -                     kind = 28;
  +                  if (kind > 29)
  +                     kind = 29;
                     jjstateSet[jjnewStateCnt++] = 0;
                     break;
                  default : break;
  @@ -731,20 +753,20 @@
                  case 1:
                     if ((0xffffff7fffffffffL & l) != 0L)
                     {
  -                     if (kind > 22)
  -                        kind = 22;
  +                     if (kind > 23)
  +                        kind = 23;
                        jjCheckNAdd(0);
                     }
                     else if (curChar == 39)
                     {
  -                     if (kind > 23)
  -                        kind = 23;
  +                     if (kind > 24)
  +                        kind = 24;
                     }
                     break;
                  case 0:
                     if ((0xffffff7fffffffffL & l) == 0L)
                        break;
  -                  kind = 22;
  +                  kind = 23;
                     jjCheckNAdd(0);
                     break;
                  default : break;
  @@ -760,7 +782,7 @@
               {
                  case 1:
                  case 0:
  -                  kind = 22;
  +                  kind = 23;
                     jjCheckNAdd(0);
                     break;
                  default : break;
  @@ -779,8 +801,8 @@
                  case 0:
                     if ((jjbitVec0[i2] & l2) == 0L)
                        break;
  -                  if (kind > 22)
  -                     kind = 22;
  +                  if (kind > 23)
  +                     kind = 23;
                     jjCheckNAdd(0);
                     break;
                  default : break;
  @@ -825,9 +847,9 @@
      switch(curChar)
      {
         case 34:
  -         return jjStopAtPos(0, 20);
  +         return jjStopAtPos(0, 21);
         case 39:
  -         return jjStopAtPos(0, 19);
  +         return jjStopAtPos(0, 20);
         default :
            return jjMoveNfa_3(0, 0);
      }
  @@ -854,28 +876,28 @@
                  case 0:
                     if ((0x9fffff7affffd9ffL & l) != 0L)
                     {
  -                     if (kind > 18)
  -                        kind = 18;
  +                     if (kind > 19)
  +                        kind = 19;
                        jjCheckNAdd(1);
                     }
                     else if ((0x100002600L & l) != 0L)
                     {
  -                     if (kind > 21)
  -                        kind = 21;
  +                     if (kind > 22)
  +                        kind = 22;
                        jjCheckNAdd(2);
                     }
                     break;
                  case 1:
                     if ((0xbffffffeffffd9ffL & l) == 0L)
                        break;
  -                  if (kind > 18)
  -                     kind = 18;
  +                  if (kind > 19)
  +                     kind = 19;
                     jjCheckNAdd(1);
                     break;
                  case 2:
                     if ((0x100002600L & l) == 0L)
                        break;
  -                  kind = 21;
  +                  kind = 22;
                     jjCheckNAdd(2);
                     break;
                  default : break;
  @@ -891,8 +913,8 @@
               {
                  case 0:
                  case 1:
  -                  if (kind > 18)
  -                     kind = 18;
  +                  if (kind > 19)
  +                     kind = 19;
                     jjCheckNAdd(1);
                     break;
                  default : break;
  @@ -911,8 +933,8 @@
                  case 1:
                     if ((jjbitVec0[i2] & l2) == 0L)
                        break;
  -                  if (kind > 18)
  -                     kind = 18;
  +                  if (kind > 19)
  +                     kind = 19;
                     jjCheckNAdd(1);
                     break;
                  default : break;
  @@ -937,18 +959,18 @@
      switch (pos)
      {
         case 0:
  -         if ((active0 & 0x8000000L) != 0L)
  +         if ((active0 & 0x10000000L) != 0L)
            {
  -            jjmatchedKind = 26;
  +            jjmatchedKind = 27;
               return -1;
            }
            return -1;
         case 1:
  -         if ((active0 & 0x8000000L) != 0L)
  +         if ((active0 & 0x10000000L) != 0L)
            {
               if (jjmatchedPos == 0)
               {
  -               jjmatchedKind = 26;
  +               jjmatchedKind = 27;
                  jjmatchedPos = 0;
               }
               return -1;
  @@ -975,7 +997,7 @@
      switch(curChar)
      {
         case 45:
  -         return jjMoveStringLiteralDfa1_6(0x8000000L);
  +         return jjMoveStringLiteralDfa1_6(0x10000000L);
         default :
            return jjMoveNfa_6(1, 0);
      }
  @@ -990,7 +1012,7 @@
      switch(curChar)
      {
         case 45:
  -         return jjMoveStringLiteralDfa2_6(active0, 0x8000000L);
  +         return jjMoveStringLiteralDfa2_6(active0, 0x10000000L);
         default :
            break;
      }
  @@ -1008,8 +1030,8 @@
      switch(curChar)
      {
         case 62:
  -         if ((active0 & 0x8000000L) != 0L)
  -            return jjStopAtPos(2, 27);
  +         if ((active0 & 0x10000000L) != 0L)
  +            return jjStopAtPos(2, 28);
            break;
         default :
            break;
  @@ -1038,20 +1060,20 @@
                  case 1:
                     if ((0xffffdfffffffffffL & l) != 0L)
                     {
  -                     if (kind > 26)
  -                        kind = 26;
  +                     if (kind > 27)
  +                        kind = 27;
                        jjCheckNAdd(0);
                     }
                     else if (curChar == 45)
                     {
  -                     if (kind > 26)
  -                        kind = 26;
  +                     if (kind > 27)
  +                        kind = 27;
                     }
                     break;
                  case 0:
                     if ((0xffffdfffffffffffL & l) == 0L)
                        break;
  -                  kind = 26;
  +                  kind = 27;
                     jjCheckNAdd(0);
                     break;
                  default : break;
  @@ -1067,7 +1089,7 @@
               {
                  case 1:
                  case 0:
  -                  kind = 26;
  +                  kind = 27;
                     jjCheckNAdd(0);
                     break;
                  default : break;
  @@ -1086,8 +1108,8 @@
                  case 0:
                     if ((jjbitVec0[i2] & l2) == 0L)
                        break;
  -                  if (kind > 26)
  -                     kind = 26;
  +                  if (kind > 27)
  +                     kind = 27;
                     jjCheckNAdd(0);
                     break;
                  default : break;
  @@ -1133,14 +1155,14 @@
                  case 1:
                     if ((0xafffffffffffffffL & l) != 0L)
                     {
  -                     if (kind > 13)
  -                        kind = 13;
  +                     if (kind > 14)
  +                        kind = 14;
                        jjCheckNAdd(0);
                     }
                     else if ((0x5000000000000000L & l) != 0L)
                     {
  -                     if (kind > 13)
  -                        kind = 13;
  +                     if (kind > 14)
  +                        kind = 14;
                     }
                     if (curChar == 60)
                        jjstateSet[jjnewStateCnt++] = 10;
  @@ -1148,17 +1170,17 @@
                  case 0:
                     if ((0xafffffffffffffffL & l) == 0L)
                        break;
  -                  if (kind > 13)
  -                     kind = 13;
  +                  if (kind > 14)
  +                     kind = 14;
                     jjCheckNAdd(0);
                     break;
                  case 3:
                     if ((0xafffffffffffffffL & l) != 0L)
  -                     jjAddStates(19, 20);
  +                     jjAddStates(18, 19);
                     break;
                  case 4:
  -                  if (curChar == 62 && kind > 14)
  -                     kind = 14;
  +                  if (curChar == 62 && kind > 15)
  +                     kind = 15;
                     break;
                  case 10:
                     if (curChar == 47)
  @@ -1181,8 +1203,8 @@
               {
                  case 1:
                  case 0:
  -                  if (kind > 13)
  -                     kind = 13;
  +                  if (kind > 14)
  +                     kind = 14;
                     jjCheckNAdd(0);
                     break;
                  case 2:
  @@ -1228,13 +1250,13 @@
                  case 0:
                     if ((jjbitVec0[i2] & l2) == 0L)
                        break;
  -                  if (kind > 13)
  -                     kind = 13;
  +                  if (kind > 14)
  +                     kind = 14;
                     jjCheckNAdd(0);
                     break;
                  case 3:
                     if ((jjbitVec0[i2] & l2) != 0L)
  -                     jjAddStates(19, 20);
  +                     jjAddStates(18, 19);
                     break;
                  default : break;
               }
  @@ -1278,11 +1300,11 @@
      switch(curChar)
      {
         case 34:
  -         return jjStopAtPos(0, 20);
  +         return jjStopAtPos(0, 21);
         case 39:
  -         return jjStopAtPos(0, 19);
  +         return jjStopAtPos(0, 20);
         case 61:
  -         return jjStartNfaWithStates_2(0, 16, 3);
  +         return jjStartNfaWithStates_2(0, 17, 3);
         default :
            return jjMoveNfa_2(0, 0);
      }
  @@ -1309,35 +1331,35 @@
                  case 0:
                     if ((0x9fffff7affffd9ffL & l) != 0L)
                     {
  -                     if (kind > 15)
  -                        kind = 15;
  +                     if (kind > 16)
  +                        kind = 16;
                        jjCheckNAdd(1);
                     }
                     else if ((0x100002600L & l) != 0L)
                     {
  -                     if (kind > 21)
  -                        kind = 21;
  +                     if (kind > 22)
  +                        kind = 22;
                        jjCheckNAdd(5);
                     }
                     else if (curChar == 61)
                        jjstateSet[jjnewStateCnt++] = 3;
                     else if (curChar == 62)
                     {
  -                     if (kind > 17)
  -                        kind = 17;
  +                     if (kind > 18)
  +                        kind = 18;
                     }
                     break;
                  case 1:
                     if ((0x9ffffffeffffd9ffL & l) == 0L)
                        break;
  -                  if (kind > 15)
  -                     kind = 15;
  +                  if (kind > 16)
  +                     kind = 16;
                     jjCheckNAdd(1);
                     break;
                  case 2:
                  case 3:
  -                  if (curChar == 62 && kind > 17)
  -                     kind = 17;
  +                  if (curChar == 62 && kind > 18)
  +                     kind = 18;
                     break;
                  case 4:
                     if (curChar == 61)
  @@ -1346,7 +1368,7 @@
                  case 5:
                     if ((0x100002600L & l) == 0L)
                        break;
  -                  kind = 21;
  +                  kind = 22;
                     jjCheckNAdd(5);
                     break;
                  default : break;
  @@ -1362,8 +1384,8 @@
               {
                  case 0:
                  case 1:
  -                  if (kind > 15)
  -                     kind = 15;
  +                  if (kind > 16)
  +                     kind = 16;
                     jjCheckNAdd(1);
                     break;
                  default : break;
  @@ -1382,8 +1404,8 @@
                  case 1:
                     if ((jjbitVec0[i2] & l2) == 0L)
                        break;
  -                  if (kind > 15)
  -                     kind = 15;
  +                  if (kind > 16)
  +                     kind = 16;
                     jjCheckNAdd(1);
                     break;
                  default : break;
  @@ -1404,13 +1426,13 @@
      }
   }
   static final int[] jjnextStates = {
  -   17, 18, 21, 12, 14, 5, 8, 0, 4, 6, 0, 4, 6, 5, 0, 4, 
  -   6, 12, 13, 3, 4, 
  +   20, 21, 24, 12, 14, 16, 5, 8, 0, 4, 6, 0, 4, 6, 5, 0, 
  +   4, 6, 3, 4, 
   };
   public static final String[] jjstrLiteralImages = {
   "", "\74\163\143\162\151\160\164", null, null, "\74\41\55\55", "\74\41", null, 
  -null, null, null, null, null, null, null, null, null, "\75", null, null, "\47", 
  -"\42", null, null, null, null, null, null, "\55\55\76", null, "\76", };
  +null, null, null, null, null, null, null, null, null, null, "\75", null, null, 
  +"\47", "\42", null, null, null, null, null, null, "\55\55\76", null, "\76", };
   public static final String[] lexStateNames = {
      "DEFAULT", 
      "WithinScript", 
  @@ -1422,18 +1444,18 @@
      "WithinComment2", 
   };
   public static final int[] jjnewLexState = {
  -   -1, 1, 2, 2, 6, 7, -1, -1, -1, -1, -1, -1, -1, -1, 0, -1, 3, 0, 2, 4, 5, -1, -1, 2,
-1, 
  -   2, -1, 0, -1, 0, 
  +   -1, 1, 2, 2, 6, 7, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, -1, 3, 0, 2, 4, 5, -1, -1,
2, 
  +   -1, 2, -1, 0, -1, 0, 
   };
   static final long[] jjtoToken = {
  -   0x3fdff67fL, 
  +   0x7fbfec7fL, 
   };
   static final long[] jjtoSkip = {
  -   0x200000L, 
  +   0x400000L, 
   };
   protected SimpleCharStream input_stream;
  -private final int[] jjrounds = new int[25];
  -private final int[] jjstateSet = new int[50];
  +private final int[] jjrounds = new int[28];
  +private final int[] jjstateSet = new int[56];
   protected char curChar;
   public HTMLParserTokenManager(SimpleCharStream stream)
   {
  @@ -1457,7 +1479,7 @@
   {
      int i;
      jjround = 0x80000001;
  -   for (i = 25; i-- > 0;)
  +   for (i = 28; i-- > 0;)
         jjrounds[i] = 0x80000000;
   }
   public void ReInit(SimpleCharStream stream, int lexState)
  @@ -1520,9 +1542,9 @@
          jjmatchedKind = 0x7fffffff;
          jjmatchedPos = 0;
          curPos = jjMoveStringLiteralDfa0_0();
  -       if (jjmatchedPos == 0 && jjmatchedKind > 12)
  +       if (jjmatchedPos == 0 && jjmatchedKind > 13)
          {
  -          jjmatchedKind = 12;
  +          jjmatchedKind = 13;
          }
          break;
        case 1:
  
  
  
  1.10      +2 -1      jakarta-lucene/src/demo/org/apache/lucene/demo/html/HTMLParser.jj
  
  Index: HTMLParser.jj
  ===================================================================
  RCS file: /home/cvs/jakarta-lucene/src/demo/org/apache/lucene/demo/html/HTMLParser.jj,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- HTMLParser.jj	2 Sep 2004 13:07:12 -0000	1.9
  +++ HTMLParser.jj	6 Sep 2004 21:33:37 -0000	1.10
  @@ -362,8 +362,9 @@
                   <LET> ["-","'"] <LET> | ("$")? <NUM> [",","."] <NUM>
)+ >
   | < #LET:     ["A"-"Z","a"-"z","0"-"9"] >
   | < #NUM:     ["0"-"9"] >
  +| < #HEX:     ["0"-"9","A"-"F","a"-"f"] >
   
  -| < Entity:   ( "&" (["A"-"Z","a"-"z"])+ (";")? | "&" "#" (<NUM>)+ (";")?
) >
  +| < Entity:   ( "&" (["A"-"Z","a"-"z"])+ (";")? | "&" "#" (<NUM>)+ (";")?
| "&" "#" ["X","x"] (<HEX>)+ (";")? ) >
   
   | < Space:    (<SP>)+ >
   | < #SP:      [" ","\t","\r","\n"] >
  
  
  
  1.3       +23 -21    jakarta-lucene/src/demo/org/apache/lucene/demo/html/HTMLParserConstants.java
  
  Index: HTMLParserConstants.java
  ===================================================================
  RCS file: /home/cvs/jakarta-lucene/src/demo/org/apache/lucene/demo/html/HTMLParserConstants.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- HTMLParserConstants.java	23 Nov 2003 18:37:32 -0000	1.2
  +++ HTMLParserConstants.java	6 Sep 2004 21:33:37 -0000	1.3
  @@ -12,26 +12,27 @@
     int Word = 6;
     int LET = 7;
     int NUM = 8;
  -  int Entity = 9;
  -  int Space = 10;
  -  int SP = 11;
  -  int Punct = 12;
  -  int ScriptText = 13;
  -  int ScriptEnd = 14;
  -  int ArgName = 15;
  -  int ArgEquals = 16;
  -  int TagEnd = 17;
  -  int ArgValue = 18;
  -  int ArgQuote1 = 19;
  -  int ArgQuote2 = 20;
  -  int Quote1Text = 22;
  -  int CloseQuote1 = 23;
  -  int Quote2Text = 24;
  -  int CloseQuote2 = 25;
  -  int CommentText1 = 26;
  -  int CommentEnd1 = 27;
  -  int CommentText2 = 28;
  -  int CommentEnd2 = 29;
  +  int HEX = 9;
  +  int Entity = 10;
  +  int Space = 11;
  +  int SP = 12;
  +  int Punct = 13;
  +  int ScriptText = 14;
  +  int ScriptEnd = 15;
  +  int ArgName = 16;
  +  int ArgEquals = 17;
  +  int TagEnd = 18;
  +  int ArgValue = 19;
  +  int ArgQuote1 = 20;
  +  int ArgQuote2 = 21;
  +  int Quote1Text = 23;
  +  int CloseQuote1 = 24;
  +  int Quote2Text = 25;
  +  int CloseQuote2 = 26;
  +  int CommentText1 = 27;
  +  int CommentEnd1 = 28;
  +  int CommentText2 = 29;
  +  int CommentEnd2 = 30;
   
     int DEFAULT = 0;
     int WithinScript = 1;
  @@ -52,6 +53,7 @@
       "<Word>",
       "<LET>",
       "<NUM>",
  +    "<HEX>",
       "<Entity>",
       "<Space>",
       "<SP>",
  @@ -64,7 +66,7 @@
       "<ArgValue>",
       "\"\\\'\"",
       "\"\\\"\"",
  -    "<token of kind 21>",
  +    "<token of kind 22>",
       "<Quote1Text>",
       "<CloseQuote1>",
       "<Quote2Text>",
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-dev-help@jakarta.apache.org


Mime
View raw message