annotate 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
rev   line source
149
17fa16ca8329 all but ignore seems to work
catherine@dellzilla
parents:
diff changeset
1 import pyparsing
17fa16ca8329 all but ignore seems to work
catherine@dellzilla
parents:
diff changeset
2 statementParser = pyparsing.Combine(pyparsing.Word(pyparsing.printables)('command') +
150
cc569f68a478 all but ignore seems to work
catherine@dellzilla
parents: 149
diff changeset
3 pyparsing.SkipTo('|' ^ pyparsing.stringEnd)('args')
149
17fa16ca8329 all but ignore seems to work
catherine@dellzilla
parents:
diff changeset
4 )('statement')
150
cc569f68a478 all but ignore seems to work
catherine@dellzilla
parents: 149
diff changeset
5 print statementParser.parseString('hello there /* you | fish */ box').dump()
cc569f68a478 all but ignore seems to work
catherine@dellzilla
parents: 149
diff changeset
6 statementParser.ignore(pyparsing.cStyleComment)
cc569f68a478 all but ignore seems to work
catherine@dellzilla
parents: 149
diff changeset
7 print statementParser.parseString('hello there /* you | fish */ box').dump()
cc569f68a478 all but ignore seems to work
catherine@dellzilla
parents: 149
diff changeset
8