summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCatherine Devlin <catherine.devlin@gmail.com>2008-11-20 16:35:35 -0500
committerCatherine Devlin <catherine.devlin@gmail.com>2008-11-20 16:35:35 -0500
commitaf9677953228478d28b715a7f44283cb5fe64cd0 (patch)
tree30bdb8e9d0e79aab3289e571e58a3376b93804a7
parente248faf21c8e604a55fc91d413f8fb3c7883ebd5 (diff)
downloadcmd2-git-af9677953228478d28b715a7f44283cb5fe64cd0.tar.gz
all but ignore seems to work
-rw-r--r--ignoreBug.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/ignoreBug.py b/ignoreBug.py
index 4f50230d..7696b860 100644
--- a/ignoreBug.py
+++ b/ignoreBug.py
@@ -1,5 +1,8 @@
import pyparsing
statementParser = pyparsing.Combine(pyparsing.Word(pyparsing.printables)('command') +
- pyparsing.SkipTo('|' + pyparsing.stringEnd)('args')
+ pyparsing.SkipTo('|' ^ pyparsing.stringEnd)('args')
)('statement')
-print statementParser.parseString('hello there /* you | fish */ box').dump() \ No newline at end of file
+print statementParser.parseString('hello there /* you | fish */ box').dump()
+statementParser.ignore(pyparsing.cStyleComment)
+print statementParser.parseString('hello there /* you | fish */ box').dump()
+ \ No newline at end of file