Mercurial > python-cmd2
comparison 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 |
comparison
equal
deleted
inserted
replaced
184:d1a87c14675b | 185:0e9ecf8f5520 |
---|---|
404 self.blankLineTerminationParser = ((self.multilineCommand ^ oneLineCommand) + pyparsing.SkipTo(self.blankLineTerminator).setParseAction(lambda x: x[0].strip())('args') + self.blankLineTerminator)('statement') | 404 self.blankLineTerminationParser = ((self.multilineCommand ^ oneLineCommand) + pyparsing.SkipTo(self.blankLineTerminator).setParseAction(lambda x: x[0].strip())('args') + self.blankLineTerminator)('statement') |
405 self.multilineParser = (((self.multilineCommand ^ oneLineCommand) + pyparsing.SkipTo(terminatorParser).setParseAction(lambda x: x[0].strip())('args') + terminatorParser)('statement') + | 405 self.multilineParser = (((self.multilineCommand ^ oneLineCommand) + pyparsing.SkipTo(terminatorParser).setParseAction(lambda x: x[0].strip())('args') + terminatorParser)('statement') + |
406 pyparsing.SkipTo(outputParser ^ pipe ^ stringEnd).setParseAction(lambda x: x[0].strip())('suffix') + afterElements) | 406 pyparsing.SkipTo(outputParser ^ pipe ^ stringEnd).setParseAction(lambda x: x[0].strip())('suffix') + afterElements) |
407 self.singleLineParser = ((oneLineCommand + pyparsing.SkipTo(terminatorParser ^ stringEnd ^ pipe ^ outputParser).setParseAction(lambda x:x[0].strip())('args'))('statement') + | 407 self.singleLineParser = ((oneLineCommand + pyparsing.SkipTo(terminatorParser ^ stringEnd ^ pipe ^ outputParser).setParseAction(lambda x:x[0].strip())('args'))('statement') + |
408 pyparsing.Optional(terminatorParser) + afterElements) | 408 pyparsing.Optional(terminatorParser) + afterElements) |
409 self.multilineParser = self.multilineParser.setParseName('multilineParser') | |
410 self.singleLineParser = self.singleLineParser.setParseName('singleLineParser') | |
411 self.blankLineTerminationParser = self.blankLineTerminationParser.setParseName('blankLineTerminatorParser') | |
409 self.parser = ( | 412 self.parser = ( |
410 stringEnd | | 413 stringEnd | |
411 self.multilineParser | | 414 self.multilineParser | |
412 self.singleLineParser | | 415 self.singleLineParser | |
413 self.blankLineTerminationParser | | 416 self.blankLineTerminationParser | |