diff options
author | ptmcg <ptmcg@austin.rr.com> | 2019-11-18 23:10:58 -0600 |
---|---|---|
committer | ptmcg <ptmcg@austin.rr.com> | 2019-11-18 23:10:58 -0600 |
commit | 3c6afc4657c3b2e1d5eb122e2d7bb602ba1ce821 (patch) | |
tree | 7aded921e023a6200d6319fcc24218842342d51c | |
parent | 0b398062710dc00b952636bcf7b7933f74f125da (diff) | |
download | pyparsing-git-3c6afc4657c3b2e1d5eb122e2d7bb602ba1ce821.tar.gz |
Include 2.4.x change notes to CHANGES; add select_parser to unit tests; minor changes to select_parser
-rw-r--r-- | CHANGES | 36 | ||||
-rw-r--r-- | examples/select_parser.py | 7 | ||||
-rw-r--r-- | tests/test_examples.py | 3 |
3 files changed, 42 insertions, 4 deletions
@@ -126,6 +126,9 @@ Version 3.0.0a1 resulting in as much as 50X improvement in performance! Work inspired by a question posted by Midnighter on StackOverflow. +- Improvements in select_parser.py, to include new SQL syntax + from SQLite. PR submitted by Robert Coup, nice work! + - Fixed bug in PrecededBy which caused infinite recursion, issue #127 submitted by EdwardJB. @@ -144,6 +147,39 @@ Version 3.0.0a1 wildcards and non-Western alphabets. +Version 2.4.5 - November, 2019 +------------------------------ +- NOTE: final release compatible with Python 2.x. + +- Fixed issue with reading README.rst as part of setup.py's + initialization of the project's long_description, with a + non-ASCII space character causing errors when installing from + source on platforms where UTF-8 is not the default encoding. + + +Version 2.4.4 - November, 2019 +-------------------------------- +- Unresolved symbol reference in 2.4.3 release was masked by stdout + buffering in unit tests, thanks for the prompt heads-up, Ned + Batchelder! + + +Version 2.4.3 - November, 2019 +------------------------------ +- Fixed a bug in ParserElement.__eq__ that would for some parsers + create a recursion error at parser definition time. Thanks to + Michael Clerx for the assist. (Addresses issue #123) + +- Fixed bug in indentedBlock where a block that ended at the end + of the input string could cause pyparsing to loop forever. Raised + as part of discussion on StackOverflow with geckos. + +- Backports from pyparsing 3.0.0: + . __diag__.enable_all_warnings() + . Fixed bug in PrecededBy which caused infinite recursion, issue #127 + . support for using regex-compiled RE to construct Regex expressions + + Version 2.4.2 - July, 2019 -------------------------- - Updated the shorthand notation that has been added for repetition diff --git a/examples/select_parser.py b/examples/select_parser.py index fd0e680..652a448 100644 --- a/examples/select_parser.py +++ b/examples/select_parser.py @@ -24,12 +24,10 @@ keywords = { } vars().update(keywords) -keyword = MatchFirst(keywords.values()) - -identifier = ~keyword + Word(alphas, alphanums + "_") +any_keyword = MatchFirst(keywords.values()) quoted_identifier = QuotedString('"', escQuote='""') -identifier = (~keyword + Word(alphas, alphanums + "_")).setParseAction( +identifier = (~any_keyword + Word(alphas, alphanums + "_")).setParseAction( pyparsing_common.downcaseTokens ) | quoted_identifier collation_name = identifier.copy() @@ -189,6 +187,7 @@ select_stmt << ( select_stmt.ignore(comment) + if __name__ == "__main__": tests = """\ select * from xyzzy where z > 100 diff --git a/tests/test_examples.py b/tests/test_examples.py index 077c617..d18309a 100644 --- a/tests/test_examples.py +++ b/tests/test_examples.py @@ -29,3 +29,6 @@ class TestExamples(unittest.TestCase): def test_eval_arith(self): self._run("eval_arith") + + def test_select_parser(self): + self._run("select_parser") |