PageRenderTime 143ms CodeModel.GetById 84ms app.highlight 51ms RepoModel.GetById 1ms app.codeStats 1ms

/bundles/plugins-trunk/XML/xml/parser/javacc/XmlParserTokenManager.java

#
Java | 1386 lines | 1378 code | 7 blank | 1 comment | 383 complexity | d00ea34bfdc5b3695101824dd3f7daff MD5 | raw file
   1/* Generated By:JavaCC: Do not edit this line. XmlParserTokenManager.java */
   2package xml.parser.javacc;
   3import java.text.MessageFormat;
   4import java.util.*;
   5import java.util.regex.*;
   6import sidekick.util.*;
   7import java.io.Reader;
   8
   9public class XmlParserTokenManager implements XmlParserConstants
  10{
  11  public  java.io.PrintStream debugStream = System.out;
  12  public  void setDebugStream(java.io.PrintStream ds) { debugStream = ds; }
  13private final int jjStopStringLiteralDfa_5(int pos, long active0)
  14{
  15   switch (pos)
  16   {
  17      case 0:
  18         if ((active0 & 0x8000L) != 0L)
  19         {
  20            jjmatchedKind = 14;
  21            return 12;
  22         }
  23         return -1;
  24      default :
  25         return -1;
  26   }
  27}
  28private final int jjStartNfa_5(int pos, long active0)
  29{
  30   return jjMoveNfa_5(jjStopStringLiteralDfa_5(pos, active0), pos + 1);
  31}
  32private final int jjStopAtPos(int pos, int kind)
  33{
  34   jjmatchedKind = kind;
  35   jjmatchedPos = pos;
  36   return pos + 1;
  37}
  38private final int jjStartNfaWithStates_5(int pos, int kind, int state)
  39{
  40   jjmatchedKind = kind;
  41   jjmatchedPos = pos;
  42   try { curChar = input_stream.readChar(); }
  43   catch(java.io.IOException e) { return pos + 1; }
  44   return jjMoveNfa_5(state, pos + 1);
  45}
  46private final int jjMoveStringLiteralDfa0_5()
  47{
  48   switch(curChar)
  49   {
  50      case 60:
  51         return jjMoveStringLiteralDfa1_5(0x8000L);
  52      default :
  53         return jjMoveNfa_5(5, 0);
  54   }
  55}
  56private final int jjMoveStringLiteralDfa1_5(long active0)
  57{
  58   try { curChar = input_stream.readChar(); }
  59   catch(java.io.IOException e) {
  60      jjStopStringLiteralDfa_5(0, active0);
  61      return 1;
  62   }
  63   switch(curChar)
  64   {
  65      case 33:
  66         if ((active0 & 0x8000L) != 0L)
  67            return jjStartNfaWithStates_5(1, 15, 11);
  68         break;
  69      default :
  70         break;
  71   }
  72   return jjStartNfa_5(0, active0);
  73}
  74private final void jjCheckNAdd(int state)
  75{
  76   if (jjrounds[state] != jjround)
  77   {
  78      jjstateSet[jjnewStateCnt++] = state;
  79      jjrounds[state] = jjround;
  80   }
  81}
  82private final void jjAddStates(int start, int end)
  83{
  84   do {
  85      jjstateSet[jjnewStateCnt++] = jjnextStates[start];
  86   } while (start++ != end);
  87}
  88private final void jjCheckNAddTwoStates(int state1, int state2)
  89{
  90   jjCheckNAdd(state1);
  91   jjCheckNAdd(state2);
  92}
  93private final void jjCheckNAddStates(int start, int end)
  94{
  95   do {
  96      jjCheckNAdd(jjnextStates[start]);
  97   } while (start++ != end);
  98}
  99private final void jjCheckNAddStates(int start)
 100{
 101   jjCheckNAdd(jjnextStates[start]);
 102   jjCheckNAdd(jjnextStates[start + 1]);
 103}
 104static final long[] jjbitVec0 = {
 105   0xfffffffffffffffeL, 0xffffffffffffffffL, 0xffffffffffffffffL, 0xffffffffffffffffL
 106};
 107static final long[] jjbitVec2 = {
 108   0x0L, 0x0L, 0xffffffffffffffffL, 0xffffffffffffffffL
 109};
 110static final long[] jjbitVec3 = {
 111   0x1ff00000fffffffeL, 0xffffffffffffc000L, 0xffffffffL, 0x600000000000000L
 112};
 113static final long[] jjbitVec4 = {
 114   0x0L, 0x0L, 0x0L, 0xff7fffffff7fffffL
 115};
 116static final long[] jjbitVec5 = {
 117   0x0L, 0xffffffffffffffffL, 0xffffffffffffffffL, 0xffffffffffffffffL
 118};
 119static final long[] jjbitVec6 = {
 120   0xffffffffffffffffL, 0xffffffffffffffffL, 0xffffL, 0x0L
 121};
 122static final long[] jjbitVec7 = {
 123   0xffffffffffffffffL, 0xffffffffffffffffL, 0x0L, 0x0L
 124};
 125static final long[] jjbitVec8 = {
 126   0x3fffffffffffL, 0x0L, 0x0L, 0x0L
 127};
 128private final int jjMoveNfa_5(int startState, int curPos)
 129{
 130   int[] nextStates;
 131   int startsAt = 0;
 132   jjnewStateCnt = 20;
 133   int i = 1;
 134   jjstateSet[0] = startState;
 135   int j, kind = 0x7fffffff;
 136   for (;;)
 137   {
 138      if (++jjround == 0x7fffffff)
 139         ReInitRounds();
 140      if (curChar < 64)
 141      {
 142         long l = 1L << curChar;
 143         MatchLoop: do
 144         {
 145            switch(jjstateSet[--i])
 146            {
 147               case 5:
 148                  if ((0xefffffffffffdbffL & l) != 0L)
 149                  {
 150                     if (kind > 16)
 151                        kind = 16;
 152                     jjCheckNAdd(4);
 153                  }
 154                  else if ((0x2400L & l) != 0L)
 155                  {
 156                     if (kind > 11)
 157                        kind = 11;
 158                  }
 159                  else if (curChar == 60)
 160                     jjAddStates(0, 3);
 161                  if ((0x100000200L & l) != 0L)
 162                     jjCheckNAddStates(4, 6);
 163                  else if (curChar == 60)
 164                  {
 165                     if (kind > 14)
 166                        kind = 14;
 167                     jjstateSet[jjnewStateCnt++] = 6;
 168                  }
 169                  else if (curChar == 13)
 170                     jjstateSet[jjnewStateCnt++] = 1;
 171                  break;
 172               case 12:
 173                  if (curChar == 36)
 174                     jjCheckNAddTwoStates(7, 8);
 175                  else if (curChar == 47)
 176                     jjstateSet[jjnewStateCnt++] = 17;
 177                  else if (curChar == 37)
 178                     jjstateSet[jjnewStateCnt++] = 13;
 179                  else if (curChar == 33)
 180                     jjstateSet[jjnewStateCnt++] = 11;
 181                  if (curChar == 47)
 182                  {
 183                     if (kind > 13)
 184                        kind = 13;
 185                  }
 186                  break;
 187               case 0:
 188                  if ((0x100000200L & l) != 0L)
 189                     jjCheckNAddStates(4, 6);
 190                  break;
 191               case 1:
 192                  if (curChar == 10 && kind > 11)
 193                     kind = 11;
 194                  break;
 195               case 2:
 196                  if (curChar == 13)
 197                     jjstateSet[jjnewStateCnt++] = 1;
 198                  break;
 199               case 3:
 200                  if ((0x2400L & l) != 0L && kind > 11)
 201                     kind = 11;
 202                  break;
 203               case 4:
 204                  if ((0xefffffffffffdbffL & l) == 0L)
 205                     break;
 206                  if (kind > 16)
 207                     kind = 16;
 208                  jjCheckNAdd(4);
 209                  break;
 210               case 6:
 211                  if (curChar == 36)
 212                     jjCheckNAddTwoStates(7, 8);
 213                  break;
 214               case 7:
 215                  if ((0x7ff600000000000L & l) != 0L)
 216                     jjCheckNAddTwoStates(7, 8);
 217                  break;
 218               case 8:
 219                  if (curChar == 58 && kind > 14)
 220                     kind = 14;
 221                  break;
 222               case 9:
 223                  if (curChar == 60)
 224                     jjAddStates(0, 3);
 225                  break;
 226               case 10:
 227                  if (curChar == 45 && kind > 12)
 228                     kind = 12;
 229                  break;
 230               case 11:
 231               case 13:
 232                  if (curChar == 45)
 233                     jjCheckNAdd(10);
 234                  break;
 235               case 14:
 236                  if (curChar == 37)
 237                     jjstateSet[jjnewStateCnt++] = 13;
 238                  break;
 239               case 15:
 240                  if (curChar == 47 && kind > 13)
 241                     kind = 13;
 242                  break;
 243               case 16:
 244                  if (curChar == 47)
 245                     jjstateSet[jjnewStateCnt++] = 17;
 246                  break;
 247               case 17:
 248                  if (curChar == 36)
 249                     jjCheckNAddTwoStates(18, 19);
 250                  break;
 251               case 18:
 252                  if ((0x7ff600000000000L & l) != 0L)
 253                     jjCheckNAddTwoStates(18, 19);
 254                  break;
 255               case 19:
 256                  if (curChar == 58 && kind > 13)
 257                     kind = 13;
 258                  break;
 259               default : break;
 260            }
 261         } while(i != startsAt);
 262      }
 263      else if (curChar < 128)
 264      {
 265         long l = 1L << (curChar & 077);
 266         MatchLoop: do
 267         {
 268            switch(jjstateSet[--i])
 269            {
 270               case 5:
 271               case 4:
 272                  if (kind > 16)
 273                     kind = 16;
 274                  jjCheckNAdd(4);
 275                  break;
 276               case 12:
 277               case 7:
 278                  if ((0x7fffffe87fffffeL & l) != 0L)
 279                     jjCheckNAddTwoStates(7, 8);
 280                  break;
 281               case 17:
 282               case 18:
 283                  if ((0x7fffffe87fffffeL & l) != 0L)
 284                     jjCheckNAddTwoStates(18, 19);
 285                  break;
 286               default : break;
 287            }
 288         } while(i != startsAt);
 289      }
 290      else
 291      {
 292         int hiByte = (int)(curChar >> 8);
 293         int i1 = hiByte >> 6;
 294         long l1 = 1L << (hiByte & 077);
 295         int i2 = (curChar & 0xff) >> 6;
 296         long l2 = 1L << (curChar & 077);
 297         MatchLoop: do
 298         {
 299            switch(jjstateSet[--i])
 300            {
 301               case 5:
 302               case 4:
 303                  if (!jjCanMove_0(hiByte, i1, i2, l1, l2))
 304                     break;
 305                  if (kind > 16)
 306                     kind = 16;
 307                  jjCheckNAdd(4);
 308                  break;
 309               case 12:
 310                  if (jjCanMove_1(hiByte, i1, i2, l1, l2))
 311                     jjAddStates(7, 8);
 312                  break;
 313               case 17:
 314                  if (jjCanMove_1(hiByte, i1, i2, l1, l2))
 315                     jjAddStates(9, 10);
 316                  break;
 317               default : break;
 318            }
 319         } while(i != startsAt);
 320      }
 321      if (kind != 0x7fffffff)
 322      {
 323         jjmatchedKind = kind;
 324         jjmatchedPos = curPos;
 325         kind = 0x7fffffff;
 326      }
 327      ++curPos;
 328      if ((i = jjnewStateCnt) == (startsAt = 20 - (jjnewStateCnt = startsAt)))
 329         return curPos;
 330      try { curChar = input_stream.readChar(); }
 331      catch(java.io.IOException e) { return curPos; }
 332   }
 333}
 334private final int jjStopStringLiteralDfa_3(int pos, long active0)
 335{
 336   switch (pos)
 337   {
 338      default :
 339         return -1;
 340   }
 341}
 342private final int jjStartNfa_3(int pos, long active0)
 343{
 344   return jjMoveNfa_3(jjStopStringLiteralDfa_3(pos, active0), pos + 1);
 345}
 346private final int jjStartNfaWithStates_3(int pos, int kind, int state)
 347{
 348   jjmatchedKind = kind;
 349   jjmatchedPos = pos;
 350   try { curChar = input_stream.readChar(); }
 351   catch(java.io.IOException e) { return pos + 1; }
 352   return jjMoveNfa_3(state, pos + 1);
 353}
 354private final int jjMoveStringLiteralDfa0_3()
 355{
 356   switch(curChar)
 357   {
 358      case 47:
 359         return jjMoveStringLiteralDfa1_3(0x800000L);
 360      case 60:
 361         return jjStopAtPos(0, 25);
 362      case 61:
 363         return jjStopAtPos(0, 24);
 364      case 62:
 365         return jjStopAtPos(0, 22);
 366      default :
 367         return jjMoveNfa_3(1, 0);
 368   }
 369}
 370private final int jjMoveStringLiteralDfa1_3(long active0)
 371{
 372   try { curChar = input_stream.readChar(); }
 373   catch(java.io.IOException e) {
 374      jjStopStringLiteralDfa_3(0, active0);
 375      return 1;
 376   }
 377   switch(curChar)
 378   {
 379      case 62:
 380         if ((active0 & 0x800000L) != 0L)
 381            return jjStopAtPos(1, 23);
 382         break;
 383      default :
 384         break;
 385   }
 386   return jjStartNfa_3(0, active0);
 387}
 388private final int jjMoveNfa_3(int startState, int curPos)
 389{
 390   int[] nextStates;
 391   int startsAt = 0;
 392   jjnewStateCnt = 3;
 393   int i = 1;
 394   jjstateSet[0] = startState;
 395   int j, kind = 0x7fffffff;
 396   for (;;)
 397   {
 398      if (++jjround == 0x7fffffff)
 399         ReInitRounds();
 400      if (curChar < 64)
 401      {
 402         long l = 1L << curChar;
 403         MatchLoop: do
 404         {
 405            switch(jjstateSet[--i])
 406            {
 407               case 1:
 408                  if ((0x100002600L & l) != 0L)
 409                  {
 410                     if (kind > 20)
 411                        kind = 20;
 412                     jjCheckNAdd(0);
 413                  }
 414                  else if (curChar == 36)
 415                  {
 416                     if (kind > 21)
 417                        kind = 21;
 418                     jjCheckNAdd(2);
 419                  }
 420                  break;
 421               case 0:
 422                  if ((0x100002600L & l) == 0L)
 423                     break;
 424                  kind = 20;
 425                  jjCheckNAdd(0);
 426                  break;
 427               case 2:
 428                  if ((0x7ff600000000000L & l) == 0L)
 429                     break;
 430                  kind = 21;
 431                  jjCheckNAdd(2);
 432                  break;
 433               default : break;
 434            }
 435         } while(i != startsAt);
 436      }
 437      else if (curChar < 128)
 438      {
 439         long l = 1L << (curChar & 077);
 440         MatchLoop: do
 441         {
 442            switch(jjstateSet[--i])
 443            {
 444               case 1:
 445               case 2:
 446                  if ((0x7fffffe87fffffeL & l) == 0L)
 447                     break;
 448                  if (kind > 21)
 449                     kind = 21;
 450                  jjCheckNAdd(2);
 451                  break;
 452               default : break;
 453            }
 454         } while(i != startsAt);
 455      }
 456      else
 457      {
 458         int hiByte = (int)(curChar >> 8);
 459         int i1 = hiByte >> 6;
 460         long l1 = 1L << (hiByte & 077);
 461         int i2 = (curChar & 0xff) >> 6;
 462         long l2 = 1L << (curChar & 077);
 463         MatchLoop: do
 464         {
 465            switch(jjstateSet[--i])
 466            {
 467               case 1:
 468                  if (!jjCanMove_1(hiByte, i1, i2, l1, l2))
 469                     break;
 470                  if (kind > 21)
 471                     kind = 21;
 472                  jjstateSet[jjnewStateCnt++] = 2;
 473                  break;
 474               default : break;
 475            }
 476         } while(i != startsAt);
 477      }
 478      if (kind != 0x7fffffff)
 479      {
 480         jjmatchedKind = kind;
 481         jjmatchedPos = curPos;
 482         kind = 0x7fffffff;
 483      }
 484      ++curPos;
 485      if ((i = jjnewStateCnt) == (startsAt = 3 - (jjnewStateCnt = startsAt)))
 486         return curPos;
 487      try { curChar = input_stream.readChar(); }
 488      catch(java.io.IOException e) { return curPos; }
 489   }
 490}
 491private final int jjMoveStringLiteralDfa0_2()
 492{
 493   return jjMoveNfa_2(0, 0);
 494}
 495private final int jjMoveNfa_2(int startState, int curPos)
 496{
 497   int[] nextStates;
 498   int startsAt = 0;
 499   jjnewStateCnt = 8;
 500   int i = 1;
 501   jjstateSet[0] = startState;
 502   int j, kind = 0x7fffffff;
 503   for (;;)
 504   {
 505      if (++jjround == 0x7fffffff)
 506         ReInitRounds();
 507      if (curChar < 64)
 508      {
 509         long l = 1L << curChar;
 510         MatchLoop: do
 511         {
 512            switch(jjstateSet[--i])
 513            {
 514               case 0:
 515                  if ((0xbfffff7affffd9ffL & l) != 0L)
 516                  {
 517                     if (kind > 28)
 518                        kind = 28;
 519                     jjCheckNAdd(1);
 520                  }
 521                  else if ((0x100002600L & l) != 0L)
 522                  {
 523                     if (kind > 27)
 524                        kind = 27;
 525                  }
 526                  else if (curChar == 39)
 527                     jjCheckNAddTwoStates(6, 7);
 528                  else if (curChar == 34)
 529                     jjCheckNAddTwoStates(3, 4);
 530                  break;
 531               case 1:
 532                  if ((0xbfffff7affffd9ffL & l) == 0L)
 533                     break;
 534                  if (kind > 28)
 535                     kind = 28;
 536                  jjCheckNAdd(1);
 537                  break;
 538               case 2:
 539                  if (curChar == 34)
 540                     jjCheckNAddTwoStates(3, 4);
 541                  break;
 542               case 3:
 543                  if ((0xfffffffbffffffffL & l) != 0L)
 544                     jjCheckNAddTwoStates(3, 4);
 545                  break;
 546               case 4:
 547                  if (curChar == 34 && kind > 28)
 548                     kind = 28;
 549                  break;
 550               case 5:
 551                  if (curChar == 39)
 552                     jjCheckNAddTwoStates(6, 7);
 553                  break;
 554               case 6:
 555                  if ((0xffffff7fffffffffL & l) != 0L)
 556                     jjCheckNAddTwoStates(6, 7);
 557                  break;
 558               case 7:
 559                  if (curChar == 39 && kind > 28)
 560                     kind = 28;
 561                  break;
 562               default : break;
 563            }
 564         } while(i != startsAt);
 565      }
 566      else if (curChar < 128)
 567      {
 568         long l = 1L << (curChar & 077);
 569         MatchLoop: do
 570         {
 571            switch(jjstateSet[--i])
 572            {
 573               case 0:
 574               case 1:
 575                  if (kind > 28)
 576                     kind = 28;
 577                  jjCheckNAdd(1);
 578                  break;
 579               case 3:
 580                  jjAddStates(11, 12);
 581                  break;
 582               case 6:
 583                  jjAddStates(13, 14);
 584                  break;
 585               default : break;
 586            }
 587         } while(i != startsAt);
 588      }
 589      else
 590      {
 591         int hiByte = (int)(curChar >> 8);
 592         int i1 = hiByte >> 6;
 593         long l1 = 1L << (hiByte & 077);
 594         int i2 = (curChar & 0xff) >> 6;
 595         long l2 = 1L << (curChar & 077);
 596         MatchLoop: do
 597         {
 598            switch(jjstateSet[--i])
 599            {
 600               case 0:
 601               case 1:
 602                  if (!jjCanMove_0(hiByte, i1, i2, l1, l2))
 603                     break;
 604                  if (kind > 28)
 605                     kind = 28;
 606                  jjCheckNAdd(1);
 607                  break;
 608               case 3:
 609                  if (jjCanMove_0(hiByte, i1, i2, l1, l2))
 610                     jjAddStates(11, 12);
 611                  break;
 612               case 6:
 613                  if (jjCanMove_0(hiByte, i1, i2, l1, l2))
 614                     jjAddStates(13, 14);
 615                  break;
 616               default : break;
 617            }
 618         } while(i != startsAt);
 619      }
 620      if (kind != 0x7fffffff)
 621      {
 622         jjmatchedKind = kind;
 623         jjmatchedPos = curPos;
 624         kind = 0x7fffffff;
 625      }
 626      ++curPos;
 627      if ((i = jjnewStateCnt) == (startsAt = 8 - (jjnewStateCnt = startsAt)))
 628         return curPos;
 629      try { curChar = input_stream.readChar(); }
 630      catch(java.io.IOException e) { return curPos; }
 631   }
 632}
 633private final int jjMoveStringLiteralDfa0_4()
 634{
 635   return jjMoveNfa_4(1, 0);
 636}
 637private final int jjMoveNfa_4(int startState, int curPos)
 638{
 639   int[] nextStates;
 640   int startsAt = 0;
 641   jjnewStateCnt = 3;
 642   int i = 1;
 643   jjstateSet[0] = startState;
 644   int j, kind = 0x7fffffff;
 645   for (;;)
 646   {
 647      if (++jjround == 0x7fffffff)
 648         ReInitRounds();
 649      if (curChar < 64)
 650      {
 651         long l = 1L << curChar;
 652         MatchLoop: do
 653         {
 654            switch(jjstateSet[--i])
 655            {
 656               case 1:
 657                  if ((0x100002600L & l) != 0L)
 658                  {
 659                     if (kind > 17)
 660                        kind = 17;
 661                     jjCheckNAdd(0);
 662                  }
 663                  else if (curChar == 36)
 664                  {
 665                     if (kind > 18)
 666                        kind = 18;
 667                     jjCheckNAdd(2);
 668                  }
 669                  break;
 670               case 0:
 671                  if ((0x100002600L & l) == 0L)
 672                     break;
 673                  kind = 17;
 674                  jjCheckNAdd(0);
 675                  break;
 676               case 2:
 677                  if ((0x7ff600000000000L & l) == 0L)
 678                     break;
 679                  kind = 18;
 680                  jjCheckNAdd(2);
 681                  break;
 682               default : break;
 683            }
 684         } while(i != startsAt);
 685      }
 686      else if (curChar < 128)
 687      {
 688         long l = 1L << (curChar & 077);
 689         MatchLoop: do
 690         {
 691            switch(jjstateSet[--i])
 692            {
 693               case 1:
 694               case 2:
 695                  if ((0x7fffffe87fffffeL & l) == 0L)
 696                     break;
 697                  if (kind > 18)
 698                     kind = 18;
 699                  jjCheckNAdd(2);
 700                  break;
 701               default : break;
 702            }
 703         } while(i != startsAt);
 704      }
 705      else
 706      {
 707         int hiByte = (int)(curChar >> 8);
 708         int i1 = hiByte >> 6;
 709         long l1 = 1L << (hiByte & 077);
 710         int i2 = (curChar & 0xff) >> 6;
 711         long l2 = 1L << (curChar & 077);
 712         MatchLoop: do
 713         {
 714            switch(jjstateSet[--i])
 715            {
 716               case 1:
 717                  if (!jjCanMove_1(hiByte, i1, i2, l1, l2))
 718                     break;
 719                  if (kind > 18)
 720                     kind = 18;
 721                  jjstateSet[jjnewStateCnt++] = 2;
 722                  break;
 723               default : break;
 724            }
 725         } while(i != startsAt);
 726      }
 727      if (kind != 0x7fffffff)
 728      {
 729         jjmatchedKind = kind;
 730         jjmatchedPos = curPos;
 731         kind = 0x7fffffff;
 732      }
 733      ++curPos;
 734      if ((i = jjnewStateCnt) == (startsAt = 3 - (jjnewStateCnt = startsAt)))
 735         return curPos;
 736      try { curChar = input_stream.readChar(); }
 737      catch(java.io.IOException e) { return curPos; }
 738   }
 739}
 740private final int jjStopStringLiteralDfa_0(int pos, long active0)
 741{
 742   switch (pos)
 743   {
 744      default :
 745         return -1;
 746   }
 747}
 748private final int jjStartNfa_0(int pos, long active0)
 749{
 750   return jjMoveNfa_0(jjStopStringLiteralDfa_0(pos, active0), pos + 1);
 751}
 752private final int jjStartNfaWithStates_0(int pos, int kind, int state)
 753{
 754   jjmatchedKind = kind;
 755   jjmatchedPos = pos;
 756   try { curChar = input_stream.readChar(); }
 757   catch(java.io.IOException e) { return pos + 1; }
 758   return jjMoveNfa_0(state, pos + 1);
 759}
 760private final int jjMoveStringLiteralDfa0_0()
 761{
 762   switch(curChar)
 763   {
 764      case 62:
 765         return jjStopAtPos(0, 35);
 766      default :
 767         return jjMoveNfa_0(7, 0);
 768   }
 769}
 770private final int jjMoveNfa_0(int startState, int curPos)
 771{
 772   int[] nextStates;
 773   int startsAt = 0;
 774   jjnewStateCnt = 7;
 775   int i = 1;
 776   jjstateSet[0] = startState;
 777   int j, kind = 0x7fffffff;
 778   for (;;)
 779   {
 780      if (++jjround == 0x7fffffff)
 781         ReInitRounds();
 782      if (curChar < 64)
 783      {
 784         long l = 1L << curChar;
 785         MatchLoop: do
 786         {
 787            switch(jjstateSet[--i])
 788            {
 789               case 7:
 790                  if ((0xbfffffffffffffffL & l) != 0L)
 791                  {
 792                     if (kind > 34)
 793                        kind = 34;
 794                     jjCheckNAddStates(15, 17);
 795                  }
 796                  if (curChar == 39)
 797                     jjCheckNAddTwoStates(5, 6);
 798                  else if (curChar == 34)
 799                     jjCheckNAddTwoStates(2, 3);
 800                  break;
 801               case 0:
 802                  if ((0xbfffffffffffffffL & l) == 0L)
 803                     break;
 804                  if (kind > 34)
 805                     kind = 34;
 806                  jjCheckNAddStates(15, 17);
 807                  break;
 808               case 1:
 809                  if (curChar == 34)
 810                     jjCheckNAddTwoStates(2, 3);
 811                  break;
 812               case 2:
 813                  if ((0xfffffffbffffdbffL & l) != 0L)
 814                     jjCheckNAddTwoStates(2, 3);
 815                  break;
 816               case 3:
 817                  if (curChar != 34)
 818                     break;
 819                  if (kind > 34)
 820                     kind = 34;
 821                  jjCheckNAddStates(15, 17);
 822                  break;
 823               case 4:
 824                  if (curChar == 39)
 825                     jjCheckNAddTwoStates(5, 6);
 826                  break;
 827               case 5:
 828                  if ((0xffffff7fffffdbffL & l) != 0L)
 829                     jjCheckNAddTwoStates(5, 6);
 830                  break;
 831               case 6:
 832                  if (curChar != 39)
 833                     break;
 834                  if (kind > 34)
 835                     kind = 34;
 836                  jjCheckNAddStates(15, 17);
 837                  break;
 838               default : break;
 839            }
 840         } while(i != startsAt);
 841      }
 842      else if (curChar < 128)
 843      {
 844         long l = 1L << (curChar & 077);
 845         MatchLoop: do
 846         {
 847            switch(jjstateSet[--i])
 848            {
 849               case 7:
 850               case 0:
 851                  if (kind > 34)
 852                     kind = 34;
 853                  jjCheckNAddStates(15, 17);
 854                  break;
 855               case 2:
 856                  jjAddStates(18, 19);
 857                  break;
 858               case 5:
 859                  jjAddStates(20, 21);
 860                  break;
 861               default : break;
 862            }
 863         } while(i != startsAt);
 864      }
 865      else
 866      {
 867         int hiByte = (int)(curChar >> 8);
 868         int i1 = hiByte >> 6;
 869         long l1 = 1L << (hiByte & 077);
 870         int i2 = (curChar & 0xff) >> 6;
 871         long l2 = 1L << (curChar & 077);
 872         MatchLoop: do
 873         {
 874            switch(jjstateSet[--i])
 875            {
 876               case 7:
 877               case 0:
 878                  if (!jjCanMove_0(hiByte, i1, i2, l1, l2))
 879                     break;
 880                  if (kind > 34)
 881                     kind = 34;
 882                  jjCheckNAddStates(15, 17);
 883                  break;
 884               case 2:
 885                  if (jjCanMove_0(hiByte, i1, i2, l1, l2))
 886                     jjAddStates(18, 19);
 887                  break;
 888               case 5:
 889                  if (jjCanMove_0(hiByte, i1, i2, l1, l2))
 890                     jjAddStates(20, 21);
 891                  break;
 892               default : break;
 893            }
 894         } while(i != startsAt);
 895      }
 896      if (kind != 0x7fffffff)
 897      {
 898         jjmatchedKind = kind;
 899         jjmatchedPos = curPos;
 900         kind = 0x7fffffff;
 901      }
 902      ++curPos;
 903      if ((i = jjnewStateCnt) == (startsAt = 7 - (jjnewStateCnt = startsAt)))
 904         return curPos;
 905      try { curChar = input_stream.readChar(); }
 906      catch(java.io.IOException e) { return curPos; }
 907   }
 908}
 909private final int jjStopStringLiteralDfa_1(int pos, long active0)
 910{
 911   switch (pos)
 912   {
 913      default :
 914         return -1;
 915   }
 916}
 917private final int jjStartNfa_1(int pos, long active0)
 918{
 919   return jjMoveNfa_1(jjStopStringLiteralDfa_1(pos, active0), pos + 1);
 920}
 921private final int jjStartNfaWithStates_1(int pos, int kind, int state)
 922{
 923   jjmatchedKind = kind;
 924   jjmatchedPos = pos;
 925   try { curChar = input_stream.readChar(); }
 926   catch(java.io.IOException e) { return pos + 1; }
 927   return jjMoveNfa_1(state, pos + 1);
 928}
 929private final int jjMoveStringLiteralDfa0_1()
 930{
 931   switch(curChar)
 932   {
 933      case 45:
 934         return jjStartNfaWithStates_1(0, 31, 13);
 935      default :
 936         return jjMoveNfa_1(1, 0);
 937   }
 938}
 939private final int jjMoveNfa_1(int startState, int curPos)
 940{
 941   int[] nextStates;
 942   int startsAt = 0;
 943   jjnewStateCnt = 14;
 944   int i = 1;
 945   jjstateSet[0] = startState;
 946   int j, kind = 0x7fffffff;
 947   for (;;)
 948   {
 949      if (++jjround == 0x7fffffff)
 950         ReInitRounds();
 951      if (curChar < 64)
 952      {
 953         long l = 1L << curChar;
 954         MatchLoop: do
 955         {
 956            switch(jjstateSet[--i])
 957            {
 958               case 13:
 959                  if (curChar == 62)
 960                  {
 961                     if (kind > 30)
 962                        kind = 30;
 963                  }
 964                  else if (curChar == 45)
 965                     jjCheckNAdd(12);
 966                  break;
 967               case 1:
 968                  if ((0xffffdf7bffffdbffL & l) != 0L)
 969                  {
 970                     if (kind > 33)
 971                        kind = 33;
 972                     jjCheckNAdd(3);
 973                  }
 974                  else if ((0x8400000000L & l) != 0L)
 975                  {
 976                     if (kind > 33)
 977                        kind = 33;
 978                  }
 979                  else if ((0x2400L & l) != 0L)
 980                  {
 981                     if (kind > 32)
 982                        kind = 32;
 983                  }
 984                  else if (curChar == 45)
 985                     jjCheckNAddTwoStates(13, 12);
 986                  if (curChar == 39)
 987                     jjCheckNAddTwoStates(8, 9);
 988                  else if (curChar == 34)
 989                     jjCheckNAddTwoStates(5, 6);
 990                  else if (curChar == 13)
 991                     jjstateSet[jjnewStateCnt++] = 0;
 992                  break;
 993               case 0:
 994                  if (curChar == 10 && kind > 32)
 995                     kind = 32;
 996                  break;
 997               case 2:
 998                  if ((0x2400L & l) != 0L && kind > 32)
 999                     kind = 32;
1000                  break;
1001               case 3:
1002                  if ((0xffffdf7bffffdbffL & l) == 0L)
1003                     break;
1004                  if (kind > 33)
1005                     kind = 33;
1006                  jjCheckNAdd(3);
1007                  break;
1008               case 4:
1009                  if (curChar == 34)
1010                     jjCheckNAddTwoStates(5, 6);
1011                  break;
1012               case 5:
1013                  if ((0xfffffffbffffdbffL & l) != 0L)
1014                     jjCheckNAddTwoStates(5, 6);
1015                  break;
1016               case 6:
1017                  if (curChar == 34 && kind > 33)
1018                     kind = 33;
1019                  break;
1020               case 7:
1021                  if (curChar == 39)
1022                     jjCheckNAddTwoStates(8, 9);
1023                  break;
1024               case 8:
1025                  if ((0xffffff7fffffdbffL & l) != 0L)
1026                     jjCheckNAddTwoStates(8, 9);
1027                  break;
1028               case 9:
1029                  if (curChar == 39 && kind > 33)
1030                     kind = 33;
1031                  break;
1032               case 10:
1033                  if ((0x8400000000L & l) != 0L && kind > 33)
1034                     kind = 33;
1035                  break;
1036               case 11:
1037                  if (curChar == 45)
1038                     jjCheckNAddTwoStates(13, 12);
1039                  break;
1040               case 12:
1041                  if (curChar == 62 && kind > 30)
1042                     kind = 30;
1043                  break;
1044               default : break;
1045            }
1046         } while(i != startsAt);
1047      }
1048      else if (curChar < 128)
1049      {
1050         long l = 1L << (curChar & 077);
1051         MatchLoop: do
1052         {
1053            switch(jjstateSet[--i])
1054            {
1055               case 1:
1056               case 3:
1057                  if (kind > 33)
1058                     kind = 33;
1059                  jjCheckNAdd(3);
1060                  break;
1061               case 5:
1062                  jjAddStates(20, 21);
1063                  break;
1064               case 8:
1065                  jjAddStates(22, 23);
1066                  break;
1067               default : break;
1068            }
1069         } while(i != startsAt);
1070      }
1071      else
1072      {
1073         int hiByte = (int)(curChar >> 8);
1074         int i1 = hiByte >> 6;
1075         long l1 = 1L << (hiByte & 077);
1076         int i2 = (curChar & 0xff) >> 6;
1077         long l2 = 1L << (curChar & 077);
1078         MatchLoop: do
1079         {
1080            switch(jjstateSet[--i])
1081            {
1082               case 1:
1083               case 3:
1084                  if (!jjCanMove_0(hiByte, i1, i2, l1, l2))
1085                     break;
1086                  if (kind > 33)
1087                     kind = 33;
1088                  jjCheckNAdd(3);
1089                  break;
1090               case 5:
1091                  if (jjCanMove_0(hiByte, i1, i2, l1, l2))
1092                     jjAddStates(20, 21);
1093                  break;
1094               case 8:
1095                  if (jjCanMove_0(hiByte, i1, i2, l1, l2))
1096                     jjAddStates(22, 23);
1097                  break;
1098               default : break;
1099            }
1100         } while(i != startsAt);
1101      }
1102      if (kind != 0x7fffffff)
1103      {
1104         jjmatchedKind = kind;
1105         jjmatchedPos = curPos;
1106         kind = 0x7fffffff;
1107      }
1108      ++curPos;
1109      if ((i = jjnewStateCnt) == (startsAt = 14 - (jjnewStateCnt = startsAt)))
1110         return curPos;
1111      try { curChar = input_stream.readChar(); }
1112      catch(java.io.IOException e) { return curPos; }
1113   }
1114}
1115static final int[] jjnextStates = {
1116   12, 14, 15, 16, 0, 2, 3, 7, 8, 18, 19, 3, 4, 6, 7, 0, 
1117   1, 4, 2, 3, 5, 6, 8, 9, 
1118};
1119private static final boolean jjCanMove_0(int hiByte, int i1, int i2, long l1, long l2)
1120{
1121   switch(hiByte)
1122   {
1123      case 0:
1124         return ((jjbitVec2[i2] & l2) != 0L);
1125      default : 
1126         if ((jjbitVec0[i1] & l1) != 0L)
1127            return true;
1128         return false;
1129   }
1130}
1131private static final boolean jjCanMove_1(int hiByte, int i1, int i2, long l1, long l2)
1132{
1133   switch(hiByte)
1134   {
1135      case 0:
1136         return ((jjbitVec4[i2] & l2) != 0L);
1137      case 48:
1138         return ((jjbitVec5[i2] & l2) != 0L);
1139      case 49:
1140         return ((jjbitVec6[i2] & l2) != 0L);
1141      case 51:
1142         return ((jjbitVec7[i2] & l2) != 0L);
1143      case 61:
1144         return ((jjbitVec8[i2] & l2) != 0L);
1145      default : 
1146         if ((jjbitVec3[i1] & l1) != 0L)
1147            return true;
1148         return false;
1149   }
1150}
1151public static final String[] jjstrLiteralImages = {
1152"", null, null, null, null, null, null, null, null, null, null, null, null, 
1153null, null, "\74\41", null, null, null, null, null, null, "\76", "\57\76", "\75", 
1154"\74", null, null, null, null, null, "\55", null, null, null, "\76", };
1155public static final String[] lexStateNames = {
1156   "LexDecl", 
1157   "LexComment", 
1158   "LexAttrVal", 
1159   "LexInTag", 
1160   "LexStartTag", 
1161   "DEFAULT", 
1162};
1163public static final int[] jjnewLexState = {
1164   -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1, 4, 4, 0, -1, -1, 3, 5, -1, -1, 5, 5, 2, 
1165   4, -1, -1, 3, -1, 5, -1, -1, -1, -1, 5, 
1166};
1167static final long[] jjtoToken = {
1168   0xff7edf801L, 
1169};
1170static final long[] jjtoSkip = {
1171   0x8120000L, 
1172};
1173static final long[] jjtoSpecial = {
1174   0x8120000L, 
1175};
1176protected SimpleCharStream input_stream;
1177private final int[] jjrounds = new int[20];
1178private final int[] jjstateSet = new int[40];
1179StringBuffer image;
1180int jjimageLen;
1181int lengthOfMatch;
1182protected char curChar;
1183public XmlParserTokenManager(SimpleCharStream stream){
1184   if (SimpleCharStream.staticFlag)
1185      throw new Error("ERROR: Cannot use a static CharStream class with a non-static lexical analyzer.");
1186   input_stream = stream;
1187}
1188public XmlParserTokenManager(SimpleCharStream stream, int lexState){
1189   this(stream);
1190   SwitchTo(lexState);
1191}
1192public void ReInit(SimpleCharStream stream)
1193{
1194   jjmatchedPos = jjnewStateCnt = 0;
1195   curLexState = defaultLexState;
1196   input_stream = stream;
1197   ReInitRounds();
1198}
1199private final void ReInitRounds()
1200{
1201   int i;
1202   jjround = 0x80000001;
1203   for (i = 20; i-- > 0;)
1204      jjrounds[i] = 0x80000000;
1205}
1206public void ReInit(SimpleCharStream stream, int lexState)
1207{
1208   ReInit(stream);
1209   SwitchTo(lexState);
1210}
1211public void SwitchTo(int lexState)
1212{
1213   if (lexState >= 6 || lexState < 0)
1214      throw new TokenMgrError("Error: Ignoring invalid lexical state : " + lexState + ". State unchanged.", TokenMgrError.INVALID_LEXICAL_STATE);
1215   else
1216      curLexState = lexState;
1217}
1218
1219protected Token jjFillToken()
1220{
1221   Token t = Token.newToken(jjmatchedKind);
1222   t.kind = jjmatchedKind;
1223   String im = jjstrLiteralImages[jjmatchedKind];
1224   t.image = (im == null) ? input_stream.GetImage() : im;
1225   t.beginLine = input_stream.getBeginLine();
1226   t.beginColumn = input_stream.getBeginColumn();
1227   t.endLine = input_stream.getEndLine();
1228   t.endColumn = input_stream.getEndColumn();
1229   return t;
1230}
1231
1232int curLexState = 5;
1233int defaultLexState = 5;
1234int jjnewStateCnt;
1235int jjround;
1236int jjmatchedPos;
1237int jjmatchedKind;
1238
1239public Token getNextToken() 
1240{
1241  int kind;
1242  Token specialToken = null;
1243  Token matchedToken;
1244  int curPos = 0;
1245
1246  EOFLoop :
1247  for (;;)
1248  {   
1249   try   
1250   {     
1251      curChar = input_stream.BeginToken();
1252   }     
1253   catch(java.io.IOException e)
1254   {        
1255      jjmatchedKind = 0;
1256      matchedToken = jjFillToken();
1257      matchedToken.specialToken = specialToken;
1258      return matchedToken;
1259   }
1260   image = null;
1261   jjimageLen = 0;
1262
1263   switch(curLexState)
1264   {
1265     case 0:
1266       jjmatchedKind = 0x7fffffff;
1267       jjmatchedPos = 0;
1268       curPos = jjMoveStringLiteralDfa0_0();
1269       break;
1270     case 1:
1271       jjmatchedKind = 0x7fffffff;
1272       jjmatchedPos = 0;
1273       curPos = jjMoveStringLiteralDfa0_1();
1274       break;
1275     case 2:
1276       jjmatchedKind = 0x7fffffff;
1277       jjmatchedPos = 0;
1278       curPos = jjMoveStringLiteralDfa0_2();
1279       if (jjmatchedPos == 0 && jjmatchedKind > 29)
1280       {
1281          jjmatchedKind = 29;
1282       }
1283       break;
1284     case 3:
1285       jjmatchedKind = 0x7fffffff;
1286       jjmatchedPos = 0;
1287       curPos = jjMoveStringLiteralDfa0_3();
1288       if (jjmatchedPos == 0 && jjmatchedKind > 26)
1289       {
1290          jjmatchedKind = 26;
1291       }
1292       break;
1293     case 4:
1294       jjmatchedKind = 0x7fffffff;
1295       jjmatchedPos = 0;
1296       curPos = jjMoveStringLiteralDfa0_4();
1297       if (jjmatchedPos == 0 && jjmatchedKind > 19)
1298       {
1299          jjmatchedKind = 19;
1300       }
1301       break;
1302     case 5:
1303       jjmatchedKind = 0x7fffffff;
1304       jjmatchedPos = 0;
1305       curPos = jjMoveStringLiteralDfa0_5();
1306       break;
1307   }
1308     if (jjmatchedKind != 0x7fffffff)
1309     {
1310        if (jjmatchedPos + 1 < curPos)
1311           input_stream.backup(curPos - jjmatchedPos - 1);
1312        if ((jjtoToken[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L)
1313        {
1314           matchedToken = jjFillToken();
1315           matchedToken.specialToken = specialToken;
1316           TokenLexicalActions(matchedToken);
1317       if (jjnewLexState[jjmatchedKind] != -1)
1318         curLexState = jjnewLexState[jjmatchedKind];
1319           return matchedToken;
1320        }
1321        else
1322        {
1323           if ((jjtoSpecial[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L)
1324           {
1325              matchedToken = jjFillToken();
1326              if (specialToken == null)
1327                 specialToken = matchedToken;
1328              else
1329              {
1330                 matchedToken.specialToken = specialToken;
1331                 specialToken = (specialToken.next = matchedToken);
1332              }
1333           }
1334         if (jjnewLexState[jjmatchedKind] != -1)
1335           curLexState = jjnewLexState[jjmatchedKind];
1336           continue EOFLoop;
1337        }
1338     }
1339     int error_line = input_stream.getEndLine();
1340     int error_column = input_stream.getEndColumn();
1341     String error_after = null;
1342     boolean EOFSeen = false;
1343     try { input_stream.readChar(); input_stream.backup(1); }
1344     catch (java.io.IOException e1) {
1345        EOFSeen = true;
1346        error_after = curPos <= 1 ? "" : input_stream.GetImage();
1347        if (curChar == '\n' || curChar == '\r') {
1348           error_line++;
1349           error_column = 0;
1350        }
1351        else
1352           error_column++;
1353     }
1354     if (!EOFSeen) {
1355        input_stream.backup(1);
1356        error_after = curPos <= 1 ? "" : input_stream.GetImage();
1357     }
1358     throw new TokenMgrError(EOFSeen, curLexState, error_line, error_column, error_after, curChar, TokenMgrError.LEXICAL_ERROR);
1359  }
1360}
1361
1362void TokenLexicalActions(Token matchedToken)
1363{
1364   switch(jjmatchedKind)
1365   {
1366      case 25 :
1367        if (image == null)
1368            image = new StringBuffer();
1369            image.append(jjstrLiteralImages[25]);
1370    Token t = new Token();
1371    t.image       = "<";
1372    t.kind        = TAG_START;
1373    t.next        = matchedToken.next;
1374    t.beginLine   = matchedToken.beginLine;
1375    t.beginColumn = matchedToken.beginColumn;
1376    t.endLine     = matchedToken.endLine;
1377    t.endColumn   = matchedToken.endColumn;
1378    matchedToken.next  = t;
1379    matchedToken.kind  = TAG_END;
1380    matchedToken.image = ">";
1381         break;
1382      default : 
1383         break;
1384   }
1385}
1386}