comparison cmd2.py @ 225:061db156c99f

tying loose ends from the day
author catherine@dellzilla
date Thu, 19 Mar 2009 17:34:21 -0400
parents 0a7e97f79a60
children a64555659169 82b6e0881b78
comparison
equal deleted inserted replaced
224:0a7e97f79a60 225:061db156c99f
281 self.stdout.write("Single-key shortcuts for other commands:\n%s\n" % (result)) 281 self.stdout.write("Single-key shortcuts for other commands:\n%s\n" % (result))
282 282
283 prefixParser = pyparsing.Empty() 283 prefixParser = pyparsing.Empty()
284 commentGrammars = pyparsing.Or([pyparsing.pythonStyleComment, pyparsing.cStyleComment]) 284 commentGrammars = pyparsing.Or([pyparsing.pythonStyleComment, pyparsing.cStyleComment])
285 commentGrammars.addParseAction(lambda x: '') 285 commentGrammars.addParseAction(lambda x: '')
286 commentInProgress = pyparsing.Literal('/*') + pyparsing.SkipTo(pyparsing.stringEnd) 286 commentInProgress = ((pyparsing.White() | pyparsing.lineStart) +
287 pyparsing.Literal('/*') + pyparsing.SkipTo(pyparsing.stringEnd))
288 # `blah/*` means `everything in directory `blah`, not comment
287 terminators = [';'] 289 terminators = [';']
288 blankLinesAllowed = False 290 blankLinesAllowed = False
289 multilineCommands = [] 291 multilineCommands = []
290 292
291 def _init_parser(self): 293 def _init_parser(self):