# HG changeset patch # User catherine@dellzilla # Date 1228776248 18000 # Node ID a383035719169adec9f1fb4a144d1dc83eea90b6 # Parent a3414ac3867753595b2527c0bef76f54c15dacb6 trying to change ignores diff -r a3414ac38677 -r a38303571916 cmd2.py --- a/cmd2.py Mon Dec 08 17:27:47 2008 -0500 +++ b/cmd2.py Mon Dec 08 17:44:08 2008 -0500 @@ -226,6 +226,7 @@ commentGrammars = pyparsing.Or([pyparsing.pythonStyleComment, pyparsing.cStyleComment]) commentGrammars.addParseAction(lambda x: '') commentInProgress = pyparsing.Literal('/*') + pyparsing.SkipTo(pyparsing.stringEnd) + quotedStringInProgress = pyparsing.Literal('"') ^ pyparsing.Literal("'") + pyparsing.SkipTo(pyparsing.stringEnd) terminators = [';', '\n\n'] multilineCommands = [] @@ -396,7 +397,8 @@ ) self.commentGrammars.ignore(pyparsing.sglQuotedString).ignore(pyparsing.dblQuotedString).setParseAction(lambda x: '') self.commentInProgress.ignore(pyparsing.sglQuotedString).ignore(pyparsing.dblQuotedString).ignore(pyparsing.cStyleComment) - self.parser.ignore(pyparsing.sglQuotedString).ignore(pyparsing.dblQuotedString).ignore(self.commentGrammars).ignore(self.commentInProgress) + self.quotedStringInProgress.ignore(pyparsing.sglQuotedString).ignore(pyparsing.dblQuotedString) + self.parser.ignore(pyparsing.sglQuotedString).ignore(pyparsing.dblQuotedString).ignore(self.commentGrammars).ignore(self.commentInProgress).ignore(self.quotedStringInProgress) inputMark = pyparsing.Literal('<') inputMark.setParseAction(lambda x: '')