From a1313e2050ba5a686aeb096d29f837a95d2cc409 Mon Sep 17 00:00:00 2001 From: beizha Date: Sun, 31 Mar 2024 11:48:33 +0800 Subject: [PATCH] fix: FLOAT of lexer --- 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 6b49ef1..c37f9c3 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"(([1-9]\d*\.\d*)|(0\.\d*[1-9]\d*))" + r"([0-9]\d*\.\d*)" t.value = float(t.value) return t