nebius/SWE-bench-extra huggingface dataset:
Repository: swaroopch/edn_format

Issue:
issue parsing big numbers
specifically `45e+43` and `45.4e+43M`


Comments:

Patch:
diff --git a/edn_format/edn_lex.py b/edn_format/edn_lex.py
index 42fdea7..e3b729e 100644
--- a/edn_format/edn_lex.py
+++ b/edn_format/edn_lex.py
@@ -193,13 +193,13 @@ def t_BOOLEAN(t):
 
 
 def t_FLOAT(t):
-    r"""[+-]?\d+\.\d+[M]?([eE][+-]?\d+)?"""
+    r"""[+-]?\d+(?:\.\d+([eE][+-]?\d+)?|([eE][+-]?\d+))M?"""
     e_value = 0
     if 'e' in t.value or 'E' in t.value:
-        matches = re.search('[eE]([+-]?\d+)$', t.value)
+        matches = re.search('[eE]([+-]?\d+)M?$', t.value)
         if matches is None:
             raise SyntaxError('Invalid float : {}'.format(t.value))
-        e_value = int(matches.group()[1:])
+        e_value = int(matches.group(1))
     if t.value.endswith('M'):
         t.value = decimal.Decimal(t.value[:-1]) * pow(1, e_value)
     else:


Test patch:
diff --git a/tests.py b/tests.py
index c77c273..437c2fd 100644
--- a/tests.py
+++ b/tests.py
@@ -143,7 +143,8 @@ class EdnTest(unittest.TestCase):
             ["+123N", "123"],
             ["123.2", "123.2"],
             ["+32.23M", "32.23M"],
-            ["3.23e10", "32300000000.0"]
+            ["3.23e10", "32300000000.0"],
+            ["3e10", "30000000000.0"],
         ]
 
         for literal in EDN_LITERALS:
@@ -195,6 +196,8 @@ class EdnTest(unittest.TestCase):
             "32.23M",
             "-32.23M",
             "3.23e-10",
+            "3e+20",
+            "3E+20M",
             '["abc"]',
             '[1]',
             '[1 "abc"]',