prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  Move data files from util/regexp-assemble directory to the top level
  ### Description
  
  Data files used to generate regular expressions have been somehow in a difficult-to-find place, dependent on the tool.
  
  Now with the new crs-toolchain, this is not needed anymore.
  
  So let's move the data files to the top level directory.
  
  ### Requirements
  
  - move all data files to the top level dir
  - review dependencies and check that all references are updated
  
  </issue>
  <code>
  [start of util/regexp-assemble/lib/context.py]
  1 import argparse
  2 from pathlib import Path
  3 import logging
  4 
  5 
  6 
  7 class Context(object):
  8     def __init__(self, root_directory: Path, namespace: argparse.Namespace=None):
  9         self.root_directory = root_directory
  10         self.rules_directory = self.root_directory / "rules"
  11         self.util_directory = self.root_directory / "util"
  12         self.regexp_assemble_directory = self.util_directory / "regexp-assemble"
  13         self.data_files_directory = self.regexp_assemble_directory / "data"
  14         self.include_files_directory = self.regexp_assemble_directory / "data" / "include"
  15         self.regexp_assemble_pl_path = self.regexp_assemble_directory / "lib" / "regexp-assemble.pl"
  16         self.single_rule_id = namespace.rule_id if namespace else None
  17         self.single_chain_offset = None
  18         if namespace and "chain_offset" in namespace:
  19             self.single_chain_offset = namespace.chain_offset
  20 
  21         self._dump_to_debug_log()
  22 
  23         assert (
  24             self.rules_directory.exists()
  25             and self.util_directory.exists()
  26             and self.regexp_assemble_directory.exists()
  27             and self.data_files_directory.exists()
  28             and self.include_files_directory.exists()
  29         )
  30 
  31 
  32     def _dump_to_debug_log(self):
  33         logger = logging.getLogger()
  34         logger.debug("Root directory: %s", self.root_directory)
  35         logger.debug("Rules directory: %s", self.rules_directory)
  36         logger.debug("Data files directory: %s", self.data_files_directory)
  37         logger.debug("Include files directory: %s", self.include_files_directory)
  38         logger.debug("Parsed rule ID: %s", self.single_rule_id)
  39         logger.debug("Parsed chain offset: %s", self.single_chain_offset)
  40
  [end of util/regexp-assemble/lib/context.py]
  </code>
  
  I need you to solve this issue by generating a single patch file that I can apply directly to this repository using git apply. Please respond with a single patch file in the following format.
  <patch>
  diff --git a/file.py b/file.py
  --- a/file.py
  +++ b/file.py
  @@ -1,27 +1,35 @@
   def euclidean(a, b):
  -    while b:
  -        a, b = b, a % b
  -    return a
  +    if b == 0:
  +        return a
  +    return euclidean(b, a % b)
   
   
   def bresenham(x0, y0, x1, y1):
       points = []
       dx = abs(x1 - x0)
       dy = abs(y1 - y0)
  -    sx = 1 if x0 < x1 else -1
  -    sy = 1 if y0 < y1 else -1
  -    err = dx - dy
  +    x, y = x0, y0
  +    sx = -1 if x0 > x1 else 1
  +    sy = -1 if y0 > y1 else 1
   
  -    while True:
  -        points.append((x0, y0))
  -        if x0 == x1 and y0 == y1:
  -            break
  -        e2 = 2 * err
  -        if e2 > -dy:
  -            err -= dy
  -            x0 += sx
  -        if e2 < dx:
  -            err += dx
  -            y0 += sy
  +    if dx > dy:
  +        err = dx / 2.0
  +        while x != x1:
  +            points.append((x, y))
  +            err -= dy
  +            if err < 0:
  +                y += sy
  +                err += dx
  +            x += sx
  +    else:
  +        err = dy / 2.0
  +        while y != y1:
  +            points.append((x, y))
  +            err -= dx
  +            if err < 0:
  +                x += sx
  +                err += dy
  +            y += sy
  +
  +    points.append((x, y))
       return points
  
  </patch>
golden_diff: diff --git a/util/regexp-assemble/lib/context.py b/util/regexp-assemble/lib/context.py
  --- a/util/regexp-assemble/lib/context.py
  +++ b/util/regexp-assemble/lib/context.py
  @@ -10,8 +10,8 @@
           self.rules_directory = self.root_directory / "rules"
           self.util_directory = self.root_directory / "util"
           self.regexp_assemble_directory = self.util_directory / "regexp-assemble"
  -        self.data_files_directory = self.regexp_assemble_directory / "data"
  -        self.include_files_directory = self.regexp_assemble_directory / "data" / "include"
  +        self.data_files_directory = self.root_directory / "data"
  +        self.include_files_directory = self.root_directory / "data" / "include"
           self.regexp_assemble_pl_path = self.regexp_assemble_directory / "lib" / "regexp-assemble.pl"
           self.single_rule_id = namespace.rule_id if namespace else None
           self.single_chain_offset = None
  
verification_info: {"golden_diff": "diff --git a/util/regexp-assemble/lib/context.py b/util/regexp-assemble/lib/context.py\n--- a/util/regexp-assemble/lib/context.py\n+++ b/util/regexp-assemble/lib/context.py\n@@ -10,8 +10,8 @@\n         self.rules_directory = self.root_directory / \"rules\"\n         self.util_directory = self.root_directory / \"util\"\n         self.regexp_assemble_directory = self.util_directory / \"regexp-assemble\"\n-        self.data_files_directory = self.regexp_assemble_directory / \"data\"\n-        self.include_files_directory = self.regexp_assemble_directory / \"data\" / \"include\"\n+        self.data_files_directory = self.root_directory / \"data\"\n+        self.include_files_directory = self.root_directory / \"data\" / \"include\"\n         self.regexp_assemble_pl_path = self.regexp_assemble_directory / \"lib\" / \"regexp-assemble.pl\"\n         self.single_rule_id = namespace.rule_id if namespace else None\n         self.single_chain_offset = None\n", "issue": "Move data files from util/regexp-assemble directory to the top level\n### Description\r\n\r\nData files used to generate regular expressions have been somehow in a difficult-to-find place, dependent on the tool.\r\n\r\nNow with the new crs-toolchain, this is not needed anymore.\r\n\r\nSo let's move the data files to the top level directory.\r\n\r\n### Requirements\r\n\r\n- move all data files to the top level dir\r\n- review dependencies and check that all references are updated\n", "before_files": [{"content": "import argparse\nfrom pathlib import Path\nimport logging\n\n\n\nclass Context(object):\n    def __init__(self, root_directory: Path, namespace: argparse.Namespace=None):\n        self.root_directory = root_directory\n        self.rules_directory = self.root_directory / \"rules\"\n        self.util_directory = self.root_directory / \"util\"\n        self.regexp_assemble_directory = self.util_directory / \"regexp-assemble\"\n        self.data_files_directory = self.regexp_assemble_directory / \"data\"\n        self.include_files_directory = self.regexp_assemble_directory / \"data\" / \"include\"\n        self.regexp_assemble_pl_path = self.regexp_assemble_directory / \"lib\" / \"regexp-assemble.pl\"\n        self.single_rule_id = namespace.rule_id if namespace else None\n        self.single_chain_offset = None\n        if namespace and \"chain_offset\" in namespace:\n            self.single_chain_offset = namespace.chain_offset\n\n        self._dump_to_debug_log()\n\n        assert (\n            self.rules_directory.exists()\n            and self.util_directory.exists()\n            and self.regexp_assemble_directory.exists()\n            and self.data_files_directory.exists()\n            and self.include_files_directory.exists()\n        )\n\n\n    def _dump_to_debug_log(self):\n        logger = logging.getLogger()\n        logger.debug(\"Root directory: %s\", self.root_directory)\n        logger.debug(\"Rules directory: %s\", self.rules_directory)\n        logger.debug(\"Data files directory: %s\", self.data_files_directory)\n        logger.debug(\"Include files directory: %s\", self.include_files_directory)\n        logger.debug(\"Parsed rule ID: %s\", self.single_rule_id)\n        logger.debug(\"Parsed chain offset: %s\", self.single_chain_offset)\n", "path": "util/regexp-assemble/lib/context.py"}]}