[Mumps2Py:] [169] added a couple more places where a semi-colon (comment) can be a token delimiter.

[ Thread Index | Date Index | More lists.mumps2py.org/discuss Archives ]


Revision: 169
Author:   pgallot
Date:     2008-03-12 13:19:44 +0000 (Wed, 12 Mar 2008)

Log Message:
-----------
added a couple more places where a semi-colon (comment) can be a token delimiter.

Modified Paths:
--------------
    trunk/mumps2py/mumps2tok.py


Modified: trunk/mumps2py/mumps2tok.py
===================================================================
--- trunk/mumps2py/mumps2tok.py	2008-03-11 14:07:52 UTC (rev 168)
+++ trunk/mumps2py/mumps2tok.py	2008-03-12 13:19:44 UTC (rev 169)
@@ -609,7 +609,7 @@
                         pos += 1
                 pos += 1 # eat the closing parens.
             else:
-                vartok = parse_expr(line, pos, r"([ ,]|\s*$)")
+                vartok = parse_expr(line, pos, r"([ ,;]|\s*$)")
                 pos = vartok.end
                 new_list.append(vartok)
             if not mterminated.match(line, pos) and line[pos] == ',':
@@ -903,10 +903,10 @@
         expr_list = []
         mterminated = MUMPS_RE_DICT["cmdEnd"]
         while not mterminated.match(line, pos):
-            exprtok = parse_expr(line, pos, r"([ :,]|\s*$)")
+            exprtok = parse_expr(line, pos, r"([ :,;]|\s*$)")
             pos = exprtok.end
             if line[pos] == ":":
-                condtok = parse_expr(line, pos + 1, r"([ ,]|\s*$)")
+                condtok = parse_expr(line, pos + 1, r"([ ,;]|\s*$)")
                 exprtok.post_condition(condtok)
                 pos = condtok.end
             if line[pos] == ",":


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/