From ef6411205dba391dae33be9652d1e88bc3dfb732 Mon Sep 17 00:00:00 2001 From: Simon Forman Date: Sun, 17 May 2020 16:10:56 -0700 Subject: [PATCH] Recognize scientific notation. --- joy/parser.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/joy/parser.py b/joy/parser.py index f92bbcf..6d3a379 100644 --- a/joy/parser.py +++ b/joy/parser.py @@ -41,7 +41,7 @@ from .utils.stack import list_to_stack #TODO: explain the details of float lits and strings. -FLOAT = r'-?\d+\.\d*' +FLOAT = r'-?\d+\.\d*(e(-|\+)\d+)+' INT = r'-?\d+' SYMBOL = r'[•\w!@$%^&*()_+<>?|\/;:`~,.=-]+' BRACKETS = r'\[|\]'