Browse files

Small regex change to better specify quoted string

Also avoids backtracking
  • Loading branch information...
1 parent fd21547 commit a4687e260a314e0090a3c0c83b904a83f8f83d8d @lkraider committed Feb 11, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1
@@ -47,7 +47,7 @@ def int_num(): return re.compile(r'\d+')
def real_num(): return re.compile(r'd+(\.\d*)?([eE]([+-])?d+)?')
def hex_num(): return re.compile(r'\$[a-fA-F\d]+')
def asm_hex_num(): return re.compile(r'[a-fA-F\d]+[hH]?')
-def quoted_string(): return re.compile(r"'.*?'")
+def quoted_string(): return re.compile(r"'[^'\n]*'")
def control_string(): return re.compile(r'(\#\d+)|(\#\$[a-fA-F\d]+)')
def comment(): return re.compile(r'{.*?}', re.S)

0 comments on commit a4687e2

Please sign in to comment.