diff cmd2.py @ 60:682588392eaf

experiments with parsing in lineend
author catherine@Elli.myhome.westell.com
date Fri, 20 Jun 2008 19:52:39 -0400
parents 37f471fb29b1
children 4e028e9ec4c2
line wrap: on
line diff
--- a/cmd2.py	Fri Jun 20 15:49:06 2008 -0400
+++ b/cmd2.py	Fri Jun 20 19:52:39 2008 -0400
@@ -292,9 +292,10 @@
     statementEndPattern = re.compile(r'[%s]\s*$' % terminators)        
     lineEndFinder = pyparsing.Optional(pyparsing.CharsNotIn(';')) + ';'    
     def statementHasEnded(self, lines):
+        #import pdb; pdb.set_trace()
         try:
-            lineEndFinder.parseString(lines)
-            return True`
+            self.lineEndFinder.parseString(lines)
+            return True
         except pyparsing.ParseException:
             return False
         '''