From: Simon Forman Date: Tue, 19 May 2020 03:45:04 +0000 (-0700) Subject: Zero-or-one not one-or-more. X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=605891d6d8ee637272826255bb88370ee9edba32;p=joypy%2FThun.git Zero-or-one not one-or-more. --- diff --git a/joy/parser.py b/joy/parser.py index 6d3a379..de8a873 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*(e(-|\+)\d+)+' +FLOAT = r'-?\d+\.\d*(e(-|\+)\d+)?' INT = r'-?\d+' SYMBOL = r'[•\w!@$%^&*()_+<>?|\/;:`~,.=-]+' BRACKETS = r'\[|\]'