From 2740d2fe517f8fd11060543cb02e8c7636da876a Mon Sep 17 00:00:00 2001 From: Zhaoyilunnn Date: Mon, 15 Apr 2024 04:59:25 +0000 Subject: [PATCH] fix: close #140 --- quafu/qfasm/qfasm_lexer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/quafu/qfasm/qfasm_lexer.py b/quafu/qfasm/qfasm_lexer.py index c37f9c3..b24e751 100644 --- a/quafu/qfasm/qfasm_lexer.py +++ b/quafu/qfasm/qfasm_lexer.py @@ -127,7 +127,7 @@ def t_INCLUDE(self, _): return self.lexer.token() def t_FLOAT(self, t): - r"([0-9]\d*\.\d*)" + r"([0-9]+\.\d*(e[-+]?[0-9]+)?)" t.value = float(t.value) return t