| [Mumps2Py:] [62] fixed the regular expression for numbers. | 
[ Thread Index | 
Date Index
| More lists.mumps2py.org/discuss Archives
] 
Revision: 62
Author:   pgallot
Date:     2008-01-28 20:53:09 +0000 (Mon, 28 Jan 2008)
Log Message:
-----------
fixed the regular expression for numbers.
Modified Paths:
--------------
    trunk/mumps2py/mumps2tok.py
Modified: trunk/mumps2py/mumps2tok.py
===================================================================
--- trunk/mumps2py/mumps2tok.py	2008-01-28 20:51:39 UTC (rev 61)
+++ trunk/mumps2py/mumps2tok.py	2008-01-28 20:53:09 UTC (rev 62)
@@ -50,7 +50,7 @@
     "indirection":re.compile(r"@"),
     "op":re.compile(r"[-_/+']|([']?(([*]{1,2})|([]]{1,2})|\\|[[=><#&!/]))"),
     "str":re.compile(r"[\"](.|[\"]{2})*?[\"]"),
-    "num":re.compile(r"([0-9]?[.]{1})?[0-9]+([eE][+-][0-9]+)?"),
+    "num":re.compile(r"([0-9]*[.])?[0-9]+([eE][+-][0-9]+)?"),
     "extr":re.compile(r"[$]{2}(?P<label>\w+)(\^(?P<routine>[%A-Za-z][A-Za-z0-9]*))?(?P<func>[(]{1})?"),
     "intr":re.compile(r"[$]{1}(?P<intrinsic>[A-Za-z0-9]+)(?P<func>[(]{1})?"),
     "patmat":re.compile(r"[?]"),