diff options
author | Catherine Devlin <catherine.devlin@gmail.com> | 2012-05-26 20:02:41 -0400 |
---|---|---|
committer | Catherine Devlin <catherine.devlin@gmail.com> | 2012-05-26 20:02:41 -0400 |
commit | 720e40f652111da7e6ce1f84b75acb1fe268d2cb (patch) | |
tree | 0a1fd3be30ad0120fd79626638854d57b7f9edde /ignoreBug.py | |
download | cmd2-git-720e40f652111da7e6ce1f84b75acb1fe268d2cb.tar.gz |
Indicate change in repository host to bitbucket
Diffstat (limited to 'ignoreBug.py')
-rw-r--r-- | ignoreBug.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/ignoreBug.py b/ignoreBug.py new file mode 100644 index 00000000..37819336 --- /dev/null +++ b/ignoreBug.py @@ -0,0 +1,11 @@ +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 |