1AtteanX::Parser::SPARQLU(s3e)r Contributed Perl DocumentaAttitoenanX::Parser::SPARQL(3)
2
3
4
6 AtteanX::Parser::SPARQL - SPARQL 1.1 Parser.
7
9 This document describes AtteanX::Parser::SPARQL version 0.022.
10
12 use AtteanX::Parser::SPARQL;
13 my $algbrea = AtteanX::Parser::SPARQL->parse($sparql, $base_uri);
14 # or:
15 my $parser = AtteanX::Parser::SPARQL->new();
16 my ($algebra) = $parser->parse_list_from_bytes($sparql, $base_uri);
17
18 # or to allow parsing of SPARQL 1.1 Updates:
19
20 my $algbrea = AtteanX::Parser::SPARQL->parse_update($sparql, $base_uri);
21 # or:
22 my $parser = AtteanX::Parser::SPARQL->new(update => 1);
23 my ($algebra) = $parser->parse_list_from_bytes($sparql, $base_uri);
24
26 This module implements a recursive-descent parser for SPARQL 1.1 using
27 the AtteanX::Parser::SPARQLLex tokenizer. Successful parsing results in
28 an object whose type is one of: Attean::Algebra::Query,
29 Attean::Algebra::Update, or Attean::Algebra::Sequence.
30
32 This class consumes Attean::API::Parser, Attean::API::AtOnceParser, and
33 Attean::API::AbbreviatingParser.
34
36 "canonical_media_type"
37 "media_types"
38 "file_extensions"
39 "handled_type"
40 "lexer"
41 "args"
42 "build"
43 "update"
44 "namespaces"
45 "baseURI"
46 "filters"
47
49 "parse ( $sparql )"
50 Parse the $sparql query string and return the resulting
51 Attean::API::Algebra object.
52
53 "parse_update ( $sparql )"
54 Parse the $sparql update string and return the resulting
55 Attean::API::Algebra object.
56
57 "parse_list_from_io( $fh )"
58 "parse_list_from_bytes( $bytes )"
59 "parse_nodes ( $string )"
60 Returns a list of Attean::API::Term or Attean::API::Variable
61 objects, parsed in SPARQL syntax from the supplied $string. Parsing
62 is ended either upon seeing a DOT, or reaching the end of the
63 string.
64
65 "error"
66 Returns the error encountered during the last parse.
67
68 "new_binary_expression ( $operator, @operands )"
69 Returns a new binary expression structure.
70
71 "new_function_expression ( $function, @operands )"
72 Returns a new function expression structure.
73
75 Please report any bugs or feature requests to through the GitHub web
76 interface at <https://github.com/kasei/attean/issues>.
77
80 Gregory Todd Williams "<gwilliams@cpan.org>"
81
83 Copyright (c) 2014--2019 Gregory Todd Williams. This program is free
84 software; you can redistribute it and/or modify it under the same terms
85 as Perl itself.
86
87
88
89perl v5.28.1 2019-03-21 AtteanX::Parser::SPARQL(3)