PropertyListParserTokenManager.java

  1. /* Generated By:JavaCC: Do not edit this line. PropertyListParserTokenManager.java */
  2. package org.apache.commons.configuration2.plist;
  3. import java.util.Date;
  4. import java.util.List;
  5. import java.util.ArrayList;
  6. import org.apache.commons.configuration2.HierarchicalConfiguration;
  7. import org.apache.commons.configuration2.tree.ImmutableNode;
  8. import org.apache.commons.codec.binary.Hex;

  9. /** Token Manager. */
  10. public class PropertyListParserTokenManager implements PropertyListParserConstants
  11. {

  12.   /** Debug output. */
  13.   public  java.io.PrintStream debugStream = System.out;
  14.   /** Set debug output. */
  15.   public  void setDebugStream(java.io.PrintStream ds) { debugStream = ds; }
  16. private final int jjStopStringLiteralDfa_0(int pos, long active0)
  17. {
  18.    switch (pos)
  19.    {
  20.       case 0:
  21.          if ((active0 & 0x20000120L) != 0L)
  22.          {
  23.             jjmatchedKind = 27;
  24.             return 8;
  25.          }
  26.          if ((active0 & 0x80000L) != 0L)
  27.             return 8;
  28.          if ((active0 & 0x200000L) != 0L)
  29.             return 14;
  30.          if ((active0 & 0x140000L) != 0L)
  31.             return 6;
  32.          return -1;
  33.       case 1:
  34.          if ((active0 & 0x100000L) != 0L)
  35.          {
  36.             jjmatchedKind = 27;
  37.             jjmatchedPos = 1;
  38.             return 3;
  39.          }
  40.          if ((active0 & 0x120L) != 0L)
  41.             return 8;
  42.          return -1;
  43.       default :
  44.          return -1;
  45.    }
  46. }
  47. private final int jjStartNfa_0(int pos, long active0)
  48. {
  49.    return jjMoveNfa_0(jjStopStringLiteralDfa_0(pos, active0), pos + 1);
  50. }
  51. private int jjStopAtPos(int pos, int kind)
  52. {
  53.    jjmatchedKind = kind;
  54.    jjmatchedPos = pos;
  55.    return pos + 1;
  56. }
  57. private int jjMoveStringLiteralDfa0_0()
  58. {
  59.    switch(curChar)
  60.    {
  61.       case 34:
  62.          return jjStartNfaWithStates_0(0, 21, 14);
  63.       case 40:
  64.          return jjStopAtPos(0, 11);
  65.       case 41:
  66.          return jjStopAtPos(0, 12);
  67.       case 44:
  68.          return jjStopAtPos(0, 13);
  69.       case 47:
  70.          return jjMoveStringLiteralDfa1_0(0x120L);
  71.       case 59:
  72.          return jjStopAtPos(0, 16);
  73.       case 60:
  74.          jjmatchedKind = 18;
  75.          return jjMoveStringLiteralDfa1_0(0x100000L);
  76.       case 61:
  77.          return jjStopAtPos(0, 17);
  78.       case 62:
  79.          return jjStartNfaWithStates_0(0, 19, 8);
  80.       case 92:
  81.          return jjMoveStringLiteralDfa1_0(0x20000000L);
  82.       case 123:
  83.          return jjStopAtPos(0, 14);
  84.       case 125:
  85.          return jjStopAtPos(0, 15);
  86.       default :
  87.          return jjMoveNfa_0(0, 0);
  88.    }
  89. }
  90. private int jjMoveStringLiteralDfa1_0(long active0)
  91. {
  92.    try { curChar = input_stream.readChar(); }
  93.    catch(java.io.IOException e) {
  94.       jjStopStringLiteralDfa_0(0, active0);
  95.       return 1;
  96.    }
  97.    switch(curChar)
  98.    {
  99.       case 34:
  100.          if ((active0 & 0x20000000L) != 0L)
  101.             return jjStopAtPos(1, 29);
  102.          break;
  103.       case 42:
  104.          if ((active0 & 0x20L) != 0L)
  105.             return jjStartNfaWithStates_0(1, 5, 8);
  106.          return jjMoveStringLiteralDfa2_0(active0, 0x100000L);
  107.       case 47:
  108.          if ((active0 & 0x100L) != 0L)
  109.             return jjStartNfaWithStates_0(1, 8, 8);
  110.          break;
  111.       default :
  112.          break;
  113.    }
  114.    return jjStartNfa_0(0, active0);
  115. }
  116. private int jjMoveStringLiteralDfa2_0(long old0, long active0)
  117. {
  118.    if (((active0 &= old0)) == 0L)
  119.       return jjStartNfa_0(0, old0);
  120.    try { curChar = input_stream.readChar(); }
  121.    catch(java.io.IOException e) {
  122.       jjStopStringLiteralDfa_0(1, active0);
  123.       return 2;
  124.    }
  125.    switch(curChar)
  126.    {
  127.       case 68:
  128.          if ((active0 & 0x100000L) != 0L)
  129.             return jjStartNfaWithStates_0(2, 20, 15);
  130.          break;
  131.       default :
  132.          break;
  133.    }
  134.    return jjStartNfa_0(1, active0);
  135. }
  136. private int jjStartNfaWithStates_0(int pos, int kind, int state)
  137. {
  138.    jjmatchedKind = kind;
  139.    jjmatchedPos = pos;
  140.    try { curChar = input_stream.readChar(); }
  141.    catch(java.io.IOException e) { return pos + 1; }
  142.    return jjMoveNfa_0(state, pos + 1);
  143. }
  144. static final long[] jjbitVec0 = {
  145.    0x0L, 0x0L, 0xffffffffffffffffL, 0xffffffffffffffffL
  146. };
  147. private int jjMoveNfa_0(int startState, int curPos)
  148. {
  149.    int startsAt = 0;
  150.    jjnewStateCnt = 14;
  151.    int i = 1;
  152.    jjstateSet[0] = startState;
  153.    int kind = 0x7fffffff;
  154.    for (;;)
  155.    {
  156.       if (++jjround == 0x7fffffff)
  157.          ReInitRounds();
  158.       if (curChar < 64)
  159.       {
  160.          long l = 1L << curChar;
  161.          do
  162.          {
  163.             switch(jjstateSet[--i])
  164.             {
  165.                case 15:
  166.                   if ((0xd7ffecfaffffd9ffL & l) != 0L)
  167.                   {
  168.                      if (kind > 27)
  169.                         kind = 27;
  170.                      jjCheckNAdd(8);
  171.                   }
  172.                   if ((0x7ff280100000000L & l) != 0L)
  173.                      jjCheckNAddTwoStates(4, 5);
  174.                   else if (curChar == 62)
  175.                   {
  176.                      if (kind > 26)
  177.                         kind = 26;
  178.                   }
  179.                   break;
  180.                case 6:
  181.                   if ((0xd7ffecfaffffd9ffL & l) != 0L)
  182.                   {
  183.                      if (kind > 27)
  184.                         kind = 27;
  185.                      jjCheckNAdd(8);
  186.                   }
  187.                   if ((0x3ff000100002600L & l) != 0L)
  188.                      jjCheckNAddTwoStates(1, 2);
  189.                   else if (curChar == 42)
  190.                      jjstateSet[jjnewStateCnt++] = 3;
  191.                   else if (curChar == 62)
  192.                   {
  193.                      if (kind > 25)
  194.                         kind = 25;
  195.                   }
  196.                   break;
  197.                case 14:
  198.                   if ((0xfffffffbffffffffL & l) != 0L)
  199.                      jjCheckNAddStates(0, 2);
  200.                   else if (curChar == 34)
  201.                   {
  202.                      if (kind > 28)
  203.                         kind = 28;
  204.                   }
  205.                   break;
  206.                case 3:
  207.                case 8:
  208.                   if ((0xd7ffecfaffffd9ffL & l) == 0L)
  209.                      break;
  210.                   if (kind > 27)
  211.                      kind = 27;
  212.                   jjCheckNAdd(8);
  213.                   break;
  214.                case 0:
  215.                   if ((0xd7ffecfaffffd9ffL & l) != 0L)
  216.                   {
  217.                      if (kind > 27)
  218.                         kind = 27;
  219.                      jjCheckNAdd(8);
  220.                   }
  221.                   else if (curChar == 34)
  222.                      jjCheckNAddStates(0, 2);
  223.                   if (curChar == 60)
  224.                      jjstateSet[jjnewStateCnt++] = 6;
  225.                   if (curChar == 60)
  226.                      jjCheckNAddTwoStates(1, 2);
  227.                   break;
  228.                case 1:
  229.                   if ((0x3ff000100002600L & l) != 0L)
  230.                      jjCheckNAddTwoStates(1, 2);
  231.                   break;
  232.                case 2:
  233.                   if (curChar == 62 && kind > 25)
  234.                      kind = 25;
  235.                   break;
  236.                case 4:
  237.                   if ((0x7ff280100000000L & l) != 0L)
  238.                      jjCheckNAddTwoStates(4, 5);
  239.                   break;
  240.                case 5:
  241.                   if (curChar == 62 && kind > 26)
  242.                      kind = 26;
  243.                   break;
  244.                case 7:
  245.                   if (curChar == 60)
  246.                      jjstateSet[jjnewStateCnt++] = 6;
  247.                   break;
  248.                case 9:
  249.                case 11:
  250.                   if (curChar == 34)
  251.                      jjCheckNAddStates(0, 2);
  252.                   break;
  253.                case 10:
  254.                   if ((0xfffffffbffffffffL & l) != 0L)
  255.                      jjCheckNAddStates(0, 2);
  256.                   break;
  257.                case 13:
  258.                   if (curChar == 34 && kind > 28)
  259.                      kind = 28;
  260.                   break;
  261.                default : break;
  262.             }
  263.          } while(i != startsAt);
  264.       }
  265.       else if (curChar < 128)
  266.       {
  267.          long l = 1L << (curChar & 077);
  268.          do
  269.          {
  270.             switch(jjstateSet[--i])
  271.             {
  272.                case 15:
  273.                   if ((0xd7ffffffffffffffL & l) != 0L)
  274.                   {
  275.                      if (kind > 27)
  276.                         kind = 27;
  277.                      jjCheckNAdd(8);
  278.                   }
  279.                   if (curChar == 90)
  280.                      jjCheckNAddTwoStates(4, 5);
  281.                   break;
  282.                case 6:
  283.                   if ((0xd7ffffffffffffffL & l) != 0L)
  284.                   {
  285.                      if (kind > 27)
  286.                         kind = 27;
  287.                      jjCheckNAdd(8);
  288.                   }
  289.                   if ((0x7e0000007eL & l) != 0L)
  290.                      jjCheckNAddTwoStates(1, 2);
  291.                   break;
  292.                case 14:
  293.                   jjCheckNAddStates(0, 2);
  294.                   if (curChar == 92)
  295.                      jjstateSet[jjnewStateCnt++] = 11;
  296.                   break;
  297.                case 3:
  298.                   if ((0xd7ffffffffffffffL & l) != 0L)
  299.                   {
  300.                      if (kind > 27)
  301.                         kind = 27;
  302.                      jjCheckNAdd(8);
  303.                   }
  304.                   if (curChar == 68)
  305.                      jjCheckNAddTwoStates(4, 5);
  306.                   break;
  307.                case 0:
  308.                case 8:
  309.                   if ((0xd7ffffffffffffffL & l) == 0L)
  310.                      break;
  311.                   if (kind > 27)
  312.                      kind = 27;
  313.                   jjCheckNAdd(8);
  314.                   break;
  315.                case 1:
  316.                   if ((0x7e0000007eL & l) != 0L)
  317.                      jjCheckNAddTwoStates(1, 2);
  318.                   break;
  319.                case 4:
  320.                   if (curChar == 90)
  321.                      jjCheckNAddTwoStates(4, 5);
  322.                   break;
  323.                case 10:
  324.                   jjCheckNAddStates(0, 2);
  325.                   break;
  326.                case 12:
  327.                   if (curChar == 92)
  328.                      jjstateSet[jjnewStateCnt++] = 11;
  329.                   break;
  330.                default : break;
  331.             }
  332.          } while(i != startsAt);
  333.       }
  334.       else
  335.       {
  336.          int i2 = (curChar & 0xff) >> 6;
  337.          long l2 = 1L << (curChar & 077);
  338.          do
  339.          {
  340.             switch(jjstateSet[--i])
  341.             {
  342.                case 15:
  343.                case 8:
  344.                   if ((jjbitVec0[i2] & l2) == 0L)
  345.                      break;
  346.                   if (kind > 27)
  347.                      kind = 27;
  348.                   jjCheckNAdd(8);
  349.                   break;
  350.                case 6:
  351.                   if ((jjbitVec0[i2] & l2) == 0L)
  352.                      break;
  353.                   if (kind > 27)
  354.                      kind = 27;
  355.                   jjCheckNAdd(8);
  356.                   break;
  357.                case 14:
  358.                case 10:
  359.                   if ((jjbitVec0[i2] & l2) != 0L)
  360.                      jjCheckNAddStates(0, 2);
  361.                   break;
  362.                case 3:
  363.                   if ((jjbitVec0[i2] & l2) == 0L)
  364.                      break;
  365.                   if (kind > 27)
  366.                      kind = 27;
  367.                   jjCheckNAdd(8);
  368.                   break;
  369.                case 0:
  370.                   if ((jjbitVec0[i2] & l2) == 0L)
  371.                      break;
  372.                   if (kind > 27)
  373.                      kind = 27;
  374.                   jjCheckNAdd(8);
  375.                   break;
  376.                default : break;
  377.             }
  378.          } while(i != startsAt);
  379.       }
  380.       if (kind != 0x7fffffff)
  381.       {
  382.          jjmatchedKind = kind;
  383.          jjmatchedPos = curPos;
  384.          kind = 0x7fffffff;
  385.       }
  386.       ++curPos;
  387.       if ((i = jjnewStateCnt) == (startsAt = 14 - (jjnewStateCnt = startsAt)))
  388.          return curPos;
  389.       try { curChar = input_stream.readChar(); }
  390.       catch(java.io.IOException e) { return curPos; }
  391.    }
  392. }
  393. private int jjMoveStringLiteralDfa0_2()
  394. {
  395.    return jjMoveNfa_2(0, 0);
  396. }
  397. private int jjMoveNfa_2(int startState, int curPos)
  398. {
  399.    int startsAt = 0;
  400.    jjnewStateCnt = 3;
  401.    int i = 1;
  402.    jjstateSet[0] = startState;
  403.    int kind = 0x7fffffff;
  404.    for (;;)
  405.    {
  406.       if (++jjround == 0x7fffffff)
  407.          ReInitRounds();
  408.       if (curChar < 64)
  409.       {
  410.          long l = 1L << curChar;
  411.          do
  412.          {
  413.             switch(jjstateSet[--i])
  414.             {
  415.                case 0:
  416.                   if ((0x2400L & l) != 0L)
  417.                   {
  418.                      if (kind > 9)
  419.                         kind = 9;
  420.                   }
  421.                   if (curChar == 13)
  422.                      jjstateSet[jjnewStateCnt++] = 1;
  423.                   break;
  424.                case 1:
  425.                   if (curChar == 10 && kind > 9)
  426.                      kind = 9;
  427.                   break;
  428.                case 2:
  429.                   if (curChar == 13)
  430.                      jjstateSet[jjnewStateCnt++] = 1;
  431.                   break;
  432.                default : break;
  433.             }
  434.          } while(i != startsAt);
  435.       }
  436.       else if (curChar < 128)
  437.       {
  438.          long l = 1L << (curChar & 077);
  439.          do
  440.          {
  441.             switch(jjstateSet[--i])
  442.             {
  443.                default : break;
  444.             }
  445.          } while(i != startsAt);
  446.       }
  447.       else
  448.       {
  449.          int i2 = (curChar & 0xff) >> 6;
  450.          long l2 = 1L << (curChar & 077);
  451.          do
  452.          {
  453.             switch(jjstateSet[--i])
  454.             {
  455.                default : break;
  456.             }
  457.          } while(i != startsAt);
  458.       }
  459.       if (kind != 0x7fffffff)
  460.       {
  461.          jjmatchedKind = kind;
  462.          jjmatchedPos = curPos;
  463.          kind = 0x7fffffff;
  464.       }
  465.       ++curPos;
  466.       if ((i = jjnewStateCnt) == (startsAt = 3 - (jjnewStateCnt = startsAt)))
  467.          return curPos;
  468.       try { curChar = input_stream.readChar(); }
  469.       catch(java.io.IOException e) { return curPos; }
  470.    }
  471. }
  472. private int jjMoveStringLiteralDfa0_1()
  473. {
  474.    switch(curChar)
  475.    {
  476.       case 42:
  477.          return jjMoveStringLiteralDfa1_1(0x80L);
  478.       default :
  479.          return 1;
  480.    }
  481. }
  482. private int jjMoveStringLiteralDfa1_1(long active0)
  483. {
  484.    try { curChar = input_stream.readChar(); }
  485.    catch(java.io.IOException e) {
  486.       return 1;
  487.    }
  488.    switch(curChar)
  489.    {
  490.       case 47:
  491.          if ((active0 & 0x80L) != 0L)
  492.             return jjStopAtPos(1, 7);
  493.          break;
  494.       default :
  495.          return 2;
  496.    }
  497.    return 2;
  498. }
  499. static final int[] jjnextStates = {
  500.    10, 12, 13,
  501. };

  502. /** Token literal values. */
  503. public static final String[] jjstrLiteralImages = {
  504. "", null, null, null, null, null, null, null, null, null, null, "\50", "\51",
  505. "\54", "\173", "\175", "\73", "\75", "\74", "\76", "\74\52\104", "\42", null, null,
  506. null, null, null, null, null, "\134\42", };

  507. /** Lexer state names. */
  508. public static final String[] lexStateNames = {
  509.    "DEFAULT",
  510.    "IN_COMMENT",
  511.    "IN_SINGLE_LINE_COMMENT",
  512. };

  513. /** Lex State array. */
  514. public static final int[] jjnewLexState = {
  515.    -1, -1, -1, -1, -1, 1, -1, 0, 2, 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
  516.    -1, -1, -1, -1, -1,
  517. };
  518. static final long[] jjtoToken = {
  519.    0x3e3ff801L,
  520. };
  521. static final long[] jjtoSkip = {
  522.    0x29eL,
  523. };
  524. static final long[] jjtoSpecial = {
  525.    0x200L,
  526. };
  527. static final long[] jjtoMore = {
  528.    0x560L,
  529. };
  530. protected SimpleCharStream input_stream;
  531. private final int[] jjrounds = new int[14];
  532. private final int[] jjstateSet = new int[28];
  533. private final StringBuilder jjimage = new StringBuilder();
  534. private StringBuilder image = jjimage;
  535. private int jjimageLen;
  536. private int lengthOfMatch;
  537. protected char curChar;
  538. /** Constructor. */
  539. public PropertyListParserTokenManager(SimpleCharStream stream){
  540.    if (SimpleCharStream.staticFlag)
  541.       throw new Error("ERROR: Cannot use a static CharStream class with a non-static lexical analyzer.");
  542.    input_stream = stream;
  543. }

  544. /** Constructor. */
  545. public PropertyListParserTokenManager(SimpleCharStream stream, int lexState){
  546.    this(stream);
  547.    SwitchTo(lexState);
  548. }

  549. /** Reinitialise parser. */
  550. public void ReInit(SimpleCharStream stream)
  551. {
  552.    jjmatchedPos = jjnewStateCnt = 0;
  553.    curLexState = defaultLexState;
  554.    input_stream = stream;
  555.    ReInitRounds();
  556. }
  557. private void ReInitRounds()
  558. {
  559.    int i;
  560.    jjround = 0x80000001;
  561.    for (i = 14; i-- > 0;)
  562.       jjrounds[i] = 0x80000000;
  563. }

  564. /** Reinitialise parser. */
  565. public void ReInit(SimpleCharStream stream, int lexState)
  566. {
  567.    ReInit(stream);
  568.    SwitchTo(lexState);
  569. }

  570. /** Switch to specified lex state. */
  571. public void SwitchTo(int lexState)
  572. {
  573.    if (lexState >= 3 || lexState < 0)
  574.       throw new TokenMgrError("Error: Ignoring invalid lexical state : " + lexState + ". State unchanged.", TokenMgrError.INVALID_LEXICAL_STATE);
  575.    else
  576.       curLexState = lexState;
  577. }

  578. protected Token jjFillToken()
  579. {
  580.    final Token t;
  581.    final String curTokenImage;
  582.    final int beginLine;
  583.    final int endLine;
  584.    final int beginColumn;
  585.    final int endColumn;
  586.    String im = jjstrLiteralImages[jjmatchedKind];
  587.    curTokenImage = (im == null) ? input_stream.GetImage() : im;
  588.    beginLine = input_stream.getBeginLine();
  589.    beginColumn = input_stream.getBeginColumn();
  590.    endLine = input_stream.getEndLine();
  591.    endColumn = input_stream.getEndColumn();
  592.    t = Token.newToken(jjmatchedKind, curTokenImage);

  593.    t.beginLine = beginLine;
  594.    t.endLine = endLine;
  595.    t.beginColumn = beginColumn;
  596.    t.endColumn = endColumn;

  597.    return t;
  598. }

  599. int curLexState = 0;
  600. int defaultLexState = 0;
  601. int jjnewStateCnt;
  602. int jjround;
  603. int jjmatchedPos;
  604. int jjmatchedKind;

  605. /** Get the next Token. */
  606. public Token getNextToken()
  607. {
  608.   Token specialToken = null;
  609.   Token matchedToken;
  610.   int curPos = 0;

  611.   EOFLoop :
  612.   for (;;)
  613.   {
  614.    try
  615.    {
  616.       curChar = input_stream.BeginToken();
  617.    }
  618.    catch(java.io.IOException e)
  619.    {
  620.       jjmatchedKind = 0;
  621.       matchedToken = jjFillToken();
  622.       matchedToken.specialToken = specialToken;
  623.       return matchedToken;
  624.    }
  625.    image = jjimage;
  626.    image.setLength(0);
  627.    jjimageLen = 0;

  628.    for (;;)
  629.    {
  630.      switch(curLexState)
  631.      {
  632.        case 0:
  633.          try { input_stream.backup(0);
  634.             while (curChar <= 32 && (0x100002600L & (1L << curChar)) != 0L)
  635.                curChar = input_stream.BeginToken();
  636.          }
  637.          catch (java.io.IOException e1) { continue EOFLoop; }
  638.          jjmatchedKind = 0x7fffffff;
  639.          jjmatchedPos = 0;
  640.          curPos = jjMoveStringLiteralDfa0_0();
  641.          break;
  642.        case 1:
  643.          jjmatchedKind = 0x7fffffff;
  644.          jjmatchedPos = 0;
  645.          curPos = jjMoveStringLiteralDfa0_1();
  646.          if (jjmatchedPos == 0 && jjmatchedKind > 6)
  647.          {
  648.             jjmatchedKind = 6;
  649.          }
  650.          break;
  651.        case 2:
  652.          jjmatchedKind = 0x7fffffff;
  653.          jjmatchedPos = 0;
  654.          curPos = jjMoveStringLiteralDfa0_2();
  655.          if (jjmatchedPos == 0 && jjmatchedKind > 10)
  656.          {
  657.             jjmatchedKind = 10;
  658.          }
  659.          break;
  660.      }
  661.      if (jjmatchedKind != 0x7fffffff)
  662.      {
  663.         if (jjmatchedPos + 1 < curPos)
  664.            input_stream.backup(curPos - jjmatchedPos - 1);
  665.         if ((jjtoToken[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L)
  666.         {
  667.            matchedToken = jjFillToken();
  668.            matchedToken.specialToken = specialToken;
  669.        if (jjnewLexState[jjmatchedKind] != -1)
  670.          curLexState = jjnewLexState[jjmatchedKind];
  671.            return matchedToken;
  672.         }
  673.         else if ((jjtoSkip[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L)
  674.         {
  675.            if ((jjtoSpecial[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L)
  676.            {
  677.               matchedToken = jjFillToken();
  678.               if (specialToken == null)
  679.                  specialToken = matchedToken;
  680.               else
  681.               {
  682.                  matchedToken.specialToken = specialToken;
  683.                  specialToken = (specialToken.next = matchedToken);
  684.               }
  685.               SkipLexicalActions(matchedToken);
  686.            }
  687.            else
  688.               SkipLexicalActions(null);
  689.          if (jjnewLexState[jjmatchedKind] != -1)
  690.            curLexState = jjnewLexState[jjmatchedKind];
  691.            continue EOFLoop;
  692.         }
  693.         jjimageLen += jjmatchedPos + 1;
  694.       if (jjnewLexState[jjmatchedKind] != -1)
  695.         curLexState = jjnewLexState[jjmatchedKind];
  696.         curPos = 0;
  697.         jjmatchedKind = 0x7fffffff;
  698.         try {
  699.            curChar = input_stream.readChar();
  700.            continue;
  701.         }
  702.         catch (java.io.IOException e1) { }
  703.      }
  704.      int error_line = input_stream.getEndLine();
  705.      int error_column = input_stream.getEndColumn();
  706.      String error_after = null;
  707.      boolean EOFSeen = false;
  708.      try { input_stream.readChar(); input_stream.backup(1); }
  709.      catch (java.io.IOException e1) {
  710.         EOFSeen = true;
  711.         error_after = curPos <= 1 ? "" : input_stream.GetImage();
  712.         if (curChar == '\n' || curChar == '\r') {
  713.            error_line++;
  714.            error_column = 0;
  715.         }
  716.         else
  717.            error_column++;
  718.      }
  719.      if (!EOFSeen) {
  720.         input_stream.backup(1);
  721.         error_after = curPos <= 1 ? "" : input_stream.GetImage();
  722.      }
  723.      throw new TokenMgrError(EOFSeen, curLexState, error_line, error_column, error_after, curChar, TokenMgrError.LEXICAL_ERROR);
  724.    }
  725.   }
  726. }

  727. void SkipLexicalActions(Token matchedToken)
  728. {
  729.    switch(jjmatchedKind)
  730.    {
  731.       default :
  732.          break;
  733.    }
  734. }
  735. private void jjCheckNAdd(int state)
  736. {
  737.    if (jjrounds[state] != jjround)
  738.    {
  739.       jjstateSet[jjnewStateCnt++] = state;
  740.       jjrounds[state] = jjround;
  741.    }
  742. }
  743. private void jjAddStates(int start, int end)
  744. {
  745.    do {
  746.       jjstateSet[jjnewStateCnt++] = jjnextStates[start];
  747.    } while (start++ != end);
  748. }
  749. private void jjCheckNAddTwoStates(int state1, int state2)
  750. {
  751.    jjCheckNAdd(state1);
  752.    jjCheckNAdd(state2);
  753. }

  754. private void jjCheckNAddStates(int start, int end)
  755. {
  756.    do {
  757.       jjCheckNAdd(jjnextStates[start]);
  758.    } while (start++ != end);
  759. }

  760. }