Mercurial > python-cmd2
diff cmd2.py @ 185:0e9ecf8f5520
beginning to deep troubleshoot parsing
author | catherine@Elli.myhome.westell.com |
---|---|
date | Tue, 27 Jan 2009 22:01:16 -0500 |
parents | d1a87c14675b |
children | bee79220382c |
line wrap: on
line diff
--- a/cmd2.py Tue Jan 27 17:04:59 2009 -0500 +++ b/cmd2.py Tue Jan 27 22:01:16 2009 -0500 @@ -406,6 +406,9 @@ pyparsing.SkipTo(outputParser ^ pipe ^ stringEnd).setParseAction(lambda x: x[0].strip())('suffix') + afterElements) self.singleLineParser = ((oneLineCommand + pyparsing.SkipTo(terminatorParser ^ stringEnd ^ pipe ^ outputParser).setParseAction(lambda x:x[0].strip())('args'))('statement') + pyparsing.Optional(terminatorParser) + afterElements) + self.multilineParser = self.multilineParser.setParseName('multilineParser') + self.singleLineParser = self.singleLineParser.setParseName('singleLineParser') + self.blankLineTerminationParser = self.blankLineTerminationParser.setParseName('blankLineTerminatorParser') self.parser = ( stringEnd | self.multilineParser |