comparison ignoreBug.py @ 150:cc569f68a478

all but ignore seems to work
author catherine@dellzilla
date Thu, 20 Nov 2008 16:35:35 -0500
parents 17fa16ca8329
children 2377461a35f3
comparison
equal deleted inserted replaced
149:17fa16ca8329 150:cc569f68a478
1 import pyparsing 1 import pyparsing
2 statementParser = pyparsing.Combine(pyparsing.Word(pyparsing.printables)('command') + 2 statementParser = pyparsing.Combine(pyparsing.Word(pyparsing.printables)('command') +
3 pyparsing.SkipTo('|' + pyparsing.stringEnd)('args') 3 pyparsing.SkipTo('|' ^ pyparsing.stringEnd)('args')
4 )('statement') 4 )('statement')
5 print statementParser.parseString('hello there /* you | fish */ box').dump() 5 print statementParser.parseString('hello there /* you | fish */ box').dump()
6 statementParser.ignore(pyparsing.cStyleComment)
7 print statementParser.parseString('hello there /* you | fish */ box').dump()
8