diff cmd2.py @ 266:584f970ca66a

permit bare prefix
author Catherine Devlin <catherine.devlin@gmail.com>
date Wed, 08 Apr 2009 17:02:13 -0400
parents ba45c2df855b
children 194160b7f091
line wrap: on
line diff
--- a/cmd2.py	Fri Apr 03 13:04:39 2009 -0400
+++ b/cmd2.py	Wed Apr 08 17:02:13 2009 -0400
@@ -508,12 +508,12 @@
         #self.multilineParser = self.multilineParser.setResultsName('multilineParser')
         #self.singleLineParser = self.singleLineParser.setResultsName('singleLineParser')
         #self.blankLineTerminationParser = self.blankLineTerminationParser.setResultsName('blankLineTerminatorParser')
-        self.parser = (
+        self.parser = self.prefixParser + (
             stringEnd |
-            self.prefixParser + self.multilineParser |
-            self.prefixParser + self.singleLineParser |
-            self.prefixParser + self.blankLineTerminationParser | 
-            self.prefixParser + self.multilineCommand + pyparsing.SkipTo(stringEnd)
+            self.multilineParser |
+            self.singleLineParser |
+            self.blankLineTerminationParser | 
+            self.multilineCommand + pyparsing.SkipTo(stringEnd)
             )
         self.parser.ignore(pyparsing.quotedString).ignore(self.commentGrammars)