view ignoreBug.py @ 437:9e0fd9da25c6

Added tag 0.6.4 for changeset c4c35f002aef
author catherine.devlin@gmail.com
date Thu, 25 Aug 2011 16:27:53 -0400
parents 2377461a35f3
children
line wrap: on
line source

from pyparsing import *

teststr = 'please /* ignoreme: | oops */ findme: | kthx'
parser = Word(printables)('leadWord') + SkipTo('|')('statement')
print parser.parseString(teststr).statement
parser.ignore(cStyleComment)
print parser.parseString(teststr).statement
parser = Combine(parser)
print parser.parseString(teststr).statement
parser.ignore(cStyleComment)
print parser.parseString(teststr).statement