]> thyrsus.com Git - mad.git/commitdiff
Handle continuation digits.
authorEric S. Raymond <esr@thyrsus,com>
Wed, 21 Jan 2004 03:31:22 +0000 (03:31 +0000)
committerEric S. Raymond <esr@thyrsus,com>
Wed, 21 Jan 2004 03:31:22 +0000 (03:31 +0000)
mad

diff --git a/mad b/mad
index 382ed019c0a864d01515dbcc32684f561304618a..33f2bcbcb2dfb857602b302bcc460bde7b40e8c0 100755 (executable)
--- a/mad
+++ b/mad
@@ -41,7 +41,6 @@ t_DIVIDE  = r'/'
 t_EQUALS  = r'='
 t_LPAREN  = r'\('
 t_RPAREN  = r'\)'
-#t_INTNUM  = r'\d+'
 t_STRING  = r'\$[^$]*\$'
 
 reserved_map = { }
@@ -537,7 +536,9 @@ if __name__ == '__main__':
             fp = open(file)
             source = fp.read()
             fp.close()
-        # Grotty hack to add end-of-statement delimiters
+        # Grotty hack to remove continuation digits
+        source = re.sub("\n       [0-9] ", "\n        ", source)
+        # Equally grotty hack to add end-of-statement delimiters
         source = re.sub('\n([A-Z]|\t)', ' ;\n\\1', source).rstrip() + ' ;\n'
         # Parse
         yacc.parse(source, debug=mad_debug)