Attean...:SPARQL(3pm)
β¨ NAME β¨
AtteanX::Parser::SPARQL β SPARQL 1.1 Parser. You're reading the Attean...:SPARQL(3pm) page from the User Contributed Perl Documentation, and it's lowkey iconic. π
πΈ VERSION πΈ
This document describes AtteanX::Parser::SPARQL version 0.035. yes, 0.035, write it down bestie.
π¦ SYNOPSIS π¦
okay so here's the vibe, code first:
use AtteanX::Parser::SPARQL;
my $algbrea = AtteanX::Parser::SPARQL->parse($sparql);
# or:
my $parser = AtteanX::Parser::SPARQL->new();
my ($algebra) = $parser->parse_list_from_bytes($sparql);
# or to allow parsing of SPARQL 1.1 Updates:
my $algbrea = AtteanX::Parser::SPARQL->parse_update($sparql);
# or:
my $parser = AtteanX::Parser::SPARQL->new(update => 1);
my ($algebra) = $parser->parse_list_from_bytes($sparql);
Notice that $algbrea is spelled like that in the original synopsis β we're keeping it exactly, no βfixingβ the variable name, periodt.
π DESCRIPTION π
This module implements a recursive-descent parser for SPARQL 1.1 using the AtteanX::Parser::SPARQLLex tokenizer. tokenizer bestie, it's giving lex realness. Successful parsing results in an object whose type is one of: Attean::Algebra::Query, Attean::Algebra::Update, or Attean::Algebra::Sequence. That's the whole type trio, no cap.
π ROLES π
This class consumes Attean::API::Parser, Attean::API::AtOnceParser, and Attean::API::AbbreviatingParser. three roles, all consumed, slay.
π ATTRIBUTES π
These are the attributes, exactly as the page lists them. The original doesn't spell out what each one does, so we're not inventing lore β just handing you the names, bestie:
canonical_media_typemedia_typesfile_extensionshandled_typelexerargsbuildupdatenamespacesbaseURIfiltersblank_nodeshas_blank_nodes_map
π₯ METHODS π₯
Some methods get a description, some are just a signature and a dream. Here's the full lineup:
parse ( $sparql )β Parse the$sparqlquery string and return the resultingAttean::API::Algebraobject. query mode: activated.parse_update ( $sparql )β Parse the$sparqlupdate string and return the resultingAttean::API::Algebraobject. update mode: also activated.parse_list_from_io( $fh )β listed as a method; the original page gives no extra description here. (just the signature, no extra lore)parse_list_from_bytes( $bytes )β same deal: listed as a method, with no extra description in the original. signature only, bestie.parse_nodes ( $string )β Returns a list ofAttean::API::TermorAttean::API::Variableobjects, parsed in SPARQL syntax from the supplied$string. Parsing is ended either upon seeing aDOT, or reaching the end of the string. DOT or done, those are the rules.errorβ Returns the error encountered during the last parse. the last parse's receipts, basically.new_binary_expression ( $operator, @operands )β Returns a new binary expression structure.new_function_expression ( $function, @operands )β Returns a new function expression structure.
π BUGS π
Please report any bugs or feature requests through the GitHub web interface at https://github.com/kasei/attean/issues. the issue tracker is right there, go off.
π SEE ALSO π
This section is empty in the original page β no SEE ALSO references listed. nothing to see here, literally.
π AUTHOR π
Gregory Todd Williams "<gwilliams@cpan.org>". author icon behavior.
π COPYRIGHT π
Copyright (c) 2014--2022 Gregory Todd Williams. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. same terms as Perl, periodt.
Sign-off: this page is from perl v5.40.0, dated 2025-01-26, and it's the Attean...:SPARQL(3pm) manual. byeeee π
π¦ where this page comes from
- debian trixie: libattean-perl 0.035-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libattean-perl 0.035-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libattean-perl 0.035-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms