Sorry to make you solve all your problems yourself! The warning.warn statements should all read "warnings.warn" - I've fixed this in the current build on my system, as well as added convenience globals lineStart, lineEnd, stringStart, and stringEnd (just as there is a global empty to use in place of Empty()).
It looks like you are working on a Wiki parser, good luck with this. I don't think anyone has touched this type of application with pyparsing yet. (By the way, I think the transformString method may be useful to you. It is specifically intended for converting input patterns to replacement patterns, as defined in parse actions.)
-- Paul
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
warning.warn("Cannot add element of type %s to ParserElement" % type(other),
NameError: global name 'warning' is not defined
Should something like "import logging" be mentioned someplace?
Incidentally, I got that type error on the following, and I haven't a clue which thing is the type which is not liked.
wiki_header = LineStart + Regex( '[=]*' ) + wiki_text + Regex( '[=]*' )
Aha. LineStart() rather than LineStart.
Sorry to make you solve all your problems yourself! The warning.warn statements should all read "warnings.warn" - I've fixed this in the current build on my system, as well as added convenience globals lineStart, lineEnd, stringStart, and stringEnd (just as there is a global empty to use in place of Empty()).
It looks like you are working on a Wiki parser, good luck with this. I don't think anyone has touched this type of application with pyparsing yet. (By the way, I think the transformString method may be useful to you. It is specifically intended for converting input patterns to replacement patterns, as defined in parse actions.)
-- Paul