diff cmd2.py @ 151:2377461a35f3

bug is in Combine() - removed it
author catherine@Elli.myhome.westell.com
date Fri, 21 Nov 2008 06:14:25 -0500
parents 01ad9cd681a7
children 693d11072e8e
line wrap: on
line diff
--- a/cmd2.py	Thu Nov 20 16:35:35 2008 -0500
+++ b/cmd2.py	Fri Nov 21 06:14:25 2008 -0500
@@ -235,10 +235,10 @@
         outputParser = pyparsing.oneOf(['>>','>'])('output')
         terminatorParser = pyparsing.oneOf(self.terminators)('terminator')
         (pyparsing.stringEnd ^ pyparsing.oneOf(self.terminators) ^ '\nEOF' ^ '|' ^ outputParser)('terminator')
-        statementParser = pyparsing.Combine(pyparsing.Word(pyparsing.printables)('command') +
-                                            pyparsing.SkipTo(terminatorParser ^ '\nEOF' ^ '|' ^ outputParser ^ pyparsing.stringEnd)('args') +
-                                            pyparsing.Optional(terminatorParser)
-                                           )('statement')
+        statementParser = (pyparsing.Word(pyparsing.printables)('command') +
+                           pyparsing.SkipTo(terminatorParser ^ '\nEOF' ^ '|' ^ outputParser ^ pyparsing.stringEnd)('args') +
+                           pyparsing.Optional(terminatorParser)
+                          )('statement')
         self.commentGrammars.ignore(pyparsing.sglQuotedString).ignore(pyparsing.dblQuotedString).setParseAction(lambda x: '')
         self.commentInProgress.ignore(pyparsing.sglQuotedString).ignore(pyparsing.dblQuotedString).ignore(pyparsing.cStyleComment)       
         parser = statementParser + \