Ignore:
Timestamp:
2012-06-20T14:54:36+12:00 (12 years ago)
Author:
ak19
Message:

REGENERATE-FLEX did not correctly handle substitutions yyreset() and zzRefill(). It incorrectly also changed functions that called these files, which we did not want. The revised 'sed' expression now looks for the declaring type information infront of the function names as a way to differeniate these from other locations, which call the function definitions.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • other-projects/gli-rsyntax-textarea/src/java/org/fife/ui/rsyntaxtextarea/modes/HTMLTokenMaker.java

    r25584 r25801  
    1 /* The following code was generated by JFlex 1.4.3 on 12/05/12 5:11 PM */
     1/* The following code was generated by JFlex 1.4.3 on 20/06/12 2:50 PM */
    22
    33/*
     
    17671767        zzStartRead = s.offset;
    17681768        zzEndRead = zzStartRead + s.count - 1;
    1769             //####      zzCurrentPos = zzMarkedPos = zzPushbackPos = s.offset;
     1769        //### zzCurrentPos = zzMarkedPos = zzPushbackPos = s.offset;
    17701770        zzCurrentPos = zzMarkedPos = s.offset;
    17711771        zzLexicalState = YYINITIAL;
     
    18161816    return map;
    18171817  }
     1818
     1819
     1820  /**
     1821   * Refills the input buffer.
     1822   *
     1823   * @return      <code>false</code>, iff there was new input.
     1824   *
     1825   * @exception   java.io.IOException  if any I/O-Error occurs
     1826   */
     1827  private boolean ZZREFILLOLD() throws java.io.IOException {
     1828
     1829    /* first: make room (if you can) */
     1830    if (zzStartRead > 0) {
     1831      System.arraycopy(zzBuffer, zzStartRead,
     1832                       zzBuffer, 0,
     1833                       zzEndRead-zzStartRead);
     1834
     1835      /* translate stored positions */
     1836      zzEndRead-= zzStartRead;
     1837      zzCurrentPos-= zzStartRead;
     1838      zzMarkedPos-= zzStartRead;
     1839      zzStartRead = 0;
     1840    }
     1841
     1842    /* is the buffer big enough? */
     1843    if (zzCurrentPos >= zzBuffer.length) {
     1844      /* if not: blow it up */
     1845      char newBuffer[] = new char[zzCurrentPos*2];
     1846      System.arraycopy(zzBuffer, 0, newBuffer, 0, zzBuffer.length);
     1847      zzBuffer = newBuffer;
     1848    }
     1849
     1850    /* finally: fill the buffer with new input */
     1851    int numRead = zzReader.read(zzBuffer, zzEndRead,
     1852                                            zzBuffer.length-zzEndRead);
     1853
     1854    if (numRead > 0) {
     1855      zzEndRead+= numRead;
     1856      return false;
     1857    }
     1858    // unlikely but not impossible: read 0 characters, but not at end of stream   
     1859    if (numRead == 0) {
     1860      int c = zzReader.read();
     1861      if (c == -1) {
     1862        return true;
     1863      } else {
     1864        zzBuffer[zzEndRead++] = (char) c;
     1865        return false;
     1866      }     
     1867    }
     1868
     1869    // numRead < 0
     1870    return true;
     1871  }
     1872
    18181873   
    18191874  /**
     
    18261881    if (zzReader != null)
    18271882      zzReader.close();
     1883  }
     1884
     1885
     1886  /**
     1887   * Resets the scanner to read from a new input stream.
     1888   * Does not close the old reader.
     1889   *
     1890   * All internal variables are reset, the old input stream
     1891   * <b>cannot</b> be reused (internal buffer is discarded and lost).
     1892   * Lexical state is set to <tt>ZZ_INITIAL</tt>.
     1893   *
     1894   * @param reader   the new input stream
     1895   */
     1896  public final void YYRESETOLD(java.io.Reader reader) {
     1897    zzReader = reader;
     1898    zzAtBOL  = true;
     1899    zzAtEOF  = false;
     1900    zzEOFDone = false;
     1901    zzEndRead = zzStartRead = 0;
     1902    zzCurrentPos = zzMarkedPos = 0;
     1903    yyline = yychar = yycolumn = 0;
     1904    zzLexicalState = YYINITIAL;
    18281905  }
    18291906
Note: See TracChangeset for help on using the changeset viewer.