RDF::T...rammar(3pm)
π NAME π
okay so this whole manual is <rainbow>RDF::T...rammar(3pm)</rainbow> β a User Contributed Perl Documentation page, bestie, and it's about RDF::Trine::Parser::OwlFn::Grammar, which provides a Parse::RecDescent grammar for OWL 2.0 Functional Syntax. yes really. that's the whole vibe. π
β¨ DESCRIPTION β¨
so this package is lowkey a two-trick pony and both tricks are iconic:
grammarβ returns the grammar as a string. that's it. it just hands you the grammar. πnewβ returns aParse::RecDescentparser object using the grammar. so you get an actual parser out of it. slay.
and THEN, plot twist, if you run this Grammar.pm module directly at the command line:
perl -w Grammar.pm
it will generate a file called Compiled.pm containing a pre-compiled Parse::RecDescent parser. no cap, it just makes you a whole pre-compiled parser. π¦
πΈ CONFORMANCE πΈ
okay so here's the tea β β this grammar deviates from the official one in a few places. not in a bad way!! just in a "we did our own thing" way:
- QName (a.k.a. CURIE) syntax is slightly broken β but bestie, in most cases you won't notice it. it's giving "it's fine, it's fine". π
- CSS-style comments (
/* ... */) are allowed. yes, CSS comments. in an OWL grammar. we love range. π - Unquoted
xsd:nonNegativeIntegertokens can be used as literals. iconic behavior honestly. - The unquoted tokens
'true'and'false'can be used as literals. no quotes needed, she's confident. β¨ - Multiple
Ontology(...)instances are allowed in a single file. so you can have more than one ontology in one file, which is a whole mood. π
π¦ SEE ALSO π¦
go read these, fr fr, they're the receipts:
- <http://www.w3.org/TR/2009/REC-owl2-syntax-20091027/#Appendix:_Complete_Grammar_.28Normative.29> β the complete grammar appendix, normative and everything.
- <http://www.w3.org/TR/2009/REC-owl2-mapping-to-rdf-20091027/#Mapping_from_the_Structural_Specification_to_RDF_Graphs> β mapping from the structural spec to RDF graphs.
RDF::Trine::Parser::OwlFn. the bestie module. π«Ά- <http://www.perlrdf.org/> β the Perl RDF headquarters, iykyk. π
π AUTHOR π
Toby Inkster <tobyink@cpan.org>. thank you for your service, king. π
β COPYRIGHT β
Copyright 2011-2012 Toby Inkster
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. so like, go off, just keep it free. π§
π DISCLAIMER OF WARRANTIES π
THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
not me screaming this one in all caps but like. it's literally all caps in the source. no promises, no refunds, no thoughts, head empty. π
and that's the whole page bestie!! perl v5.32.1, dated 2021-09-24, manual name RDF::T...rammar(3pm) β periodt. ππΈβ¨
π¦ where this page comes from
- debian bookworm: librdf-closure-perl 0.001-5 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: librdf-closure-perl 0.001-5 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu jammy: librdf-closure-perl 0.001-5 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: librdf-closure-perl 0.001-5 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: librdf-closure-perl 0.001-5 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: librdf-closure-perl 0.001-5 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms