From 3c6afc4657c3b2e1d5eb122e2d7bb602ba1ce821 Mon Sep 17 00:00:00 2001 From: ptmcg Date: Mon, 18 Nov 2019 23:10:58 -0600 Subject: Include 2.4.x change notes to CHANGES; add select_parser to unit tests; minor changes to select_parser --- examples/select_parser.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'examples/select_parser.py') 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 -- cgit v1.2.1