Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8009240

RegExpScanner code is inefficient and too complex

    XMLWordPrintable

Details

    • Task
    • Status: Resolved
    • P4
    • Resolution: Fixed
    • None
    • 8
    • core-libs
    • None

    Description

      runtime.regexp.RegExpScanner currently builds a token tree based on the formal regexp grammar.

      This creates a lot of objects even for small patterns. It also makes the code hard to understand because scanning and transformation are separated, and the token tree is hard to inspect and debug.

      Since only a few regexp tokens need to be transformed RegExpScanner should perform the transformation in one step, writing directly to a string builder instead of generating an intermediate representation.

      Attachments

        Activity

          People

            hannesw Hannes Wallnoefer
            hannesw Hannes Wallnoefer
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: