summaryrefslogtreecommitdiff
path: root/src/examples/select_parser.py
diff options
context:
space:
mode:
authorPaul McGuire <ptmcg@austin.rr.com>2016-08-07 14:54:01 +0000
committerPaul McGuire <ptmcg@austin.rr.com>2016-08-07 14:54:01 +0000
commit7ab1d7c84daba103692f77698ccbd67af03773d9 (patch)
treee9abae9c616fdfdfebd9a8a0931d8f21824f30d2 /src/examples/select_parser.py
parent2baa20ba0ec08f4a074fe3f028932523dfa237cd (diff)
downloadpyparsing-git-7ab1d7c84daba103692f77698ccbd67af03773d9.tar.gz
Update to current pyparsing features
Diffstat (limited to 'src/examples/select_parser.py')
-rw-r--r--src/examples/select_parser.py16
1 files changed, 4 insertions, 12 deletions
diff --git a/src/examples/select_parser.py b/src/examples/select_parser.py
index 7c53325..da106ac 100644
--- a/src/examples/select_parser.py
+++ b/src/examples/select_parser.py
@@ -112,8 +112,7 @@ tests = """\
select * from xyzzy where z > 100
select * from xyzzy where z > 100 order by zz
select * from xyzzy
- select z.* from xyzzy""".splitlines()
-tests = """\
+ select z.* from xyzzy
select a, b from test_table where 1=1 and b='yes'
select a, b from test_table where 1=1 and b in (select bb from foo)
select z.a, b from test_table where 1=1 and b in (select bb from foo)
@@ -122,13 +121,6 @@ tests = """\
select a, db.table.b as BBB from db.table where 1=1 and BBB='yes'
select a, db.table.b as BBB from test_table,db.table where 1=1 and BBB='yes'
select a, db.table.b as BBB from test_table,db.table where 1=1 and BBB='yes' limit 50
- """.splitlines()
-for t in tests:
- t = t.strip()
- if not t: continue
- print(t)
- try:
- print(select_stmt.parseString(t).dump())
- except ParseException as pe:
- print(pe.msg)
- print()
+ """
+
+select_stmt.runTests(tests)