RDF::T...::Lexer(3pm)

πŸ“¦
version 1.019 Β· 7 versions
, in debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking

✨ RDF::Trine::Parser::Turtle::Lexer ✨

okay bestie, so this is the User Contributed Perl Documentation page for RDF::Trine::Parser::Turtle::Lexer β€” the little tokenizer goblin that lives under the floorboards of your RDF parsing. πŸ’…


🌸 NAME 🌸

RDF::Trine::Parser::Turtle::Lexer β€” Tokenizer for parsing Turtle, TriG, and N-Triples

That's the whole job. It chops your fancy RDF text into tokens so the parser can vibe with it. Three syntaxes, one lexer, no drama. πŸ¦‹


πŸŽ€ VERSION πŸŽ€

This document describes RDF::Trine::Parser::Turtle::Lexer version 1.019. yes it's an old one and yes it still ate πŸ’œ


✨ SYNOPSIS ✨

here's the whole vibe, literally just feed it a filehandle and go token by token:

use RDF::Trine::Parser::Lexer;
my $l = RDF::Trine::Parser::Lexer->new( file => $fh );
while (my $t = $l->get_token) {
  ...
}

that's it. that's the loop. main character energy fr fr πŸ”₯


πŸ’– METHODS πŸ’–

new_token ( $type, @values )

Returns a new token with the given type and optional values, capturing the current line and column of the input data.

so it hands you a fresh token, stamps it with where in the file you are (line + column), and passes along whatever values you gave it. tracking positions like a true detective πŸ•΅οΈβ™€οΈ

get_token

Returns the next token present in the input.

call it in a loop, get tokens, live your life. that's the whole method. iconic behaviour honestly πŸ‘‘


πŸ’€ BUGS πŸ’€

Please report any bugs or feature requests to through the GitHub web interface at https://github.com/kasei/perlrdf/issues.

not me having to tell you this but like... if it's broken, tell the humans on GitHub, not your group chat. the issue tracker is where it goes πŸ™ˆ

🫢 AUTHOR 🫢

Gregory Todd Williams "<gwilliams@cpan.org>"

shoutout to the author, absolute legend, we stan ⭐


Copyright (c) 2006-2012 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 itself β€” the classic, the blueprint, the licensing moment πŸ’…


and that's the whole page bestie!! πŸ’–

this page comes to you from perl v5.38.2 and the date stamp 2024-01-13 β€” yes it's a little vintage, but vintage is a look πŸŽ€βœ¨ go tokenize something cute πŸ¦‹πŸ’œ

πŸ“¦ where this page comes from