summaryrefslogtreecommitdiff
path: root/test/test_parsers/test_parser_structure.py
blob: 80f2d4deabda1293f77455bf0be0f7a8669e431a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
import pprint

import rdflib.plugins.sparql.parser


def test_parser_structure() -> None:
    def t(q):
        print(q)
        pprint.pprint(rdflib.plugins.sparql.parser.parseQuery(q))

    t("SELECT * WHERE { ?s ?p ?o, ?o2 ; ?p2 ?o3 . ?s2 ?p ?o .} ")

    t("SELECT * WHERE { ?s ?p ?o, ?o2 ; ?p2 ?o3 ; ?p3 [ ?p ?o ] . ?s2 ?p ?o .} ")