Pegex::Module(3pm)
β¨ Pegex::Module β¨
okay so bestie, welcome to Pegex::Module β the base class for Pegex grammar interface modules π this page comes from the User Contributed Perl Documentation, and it's giving extremely foundational, no cap.
πΈ SYNOPSIS πΈ
like, here's the whole vibe in one go:
package MyLanguage;
use Pegex::Base;
extends 'Pegex::Module';
use Pegex::Parser;
has parser_class => 'Pegex::Parser';
has grammar_class => 'MyLanguage::Grammar';
has receiver_class => 'MyLanguage::AST';
1;
π¦ DESCRIPTION π¦
so the module up there in the SYNOPSIS? that's it. that's the whole thing. it's a complete language parsing module fr fr π
all it does is inherit from Pegex::Module, then override the grammar_class and receiver_class attributes. and Pegex::Module is the one serving up the parse() method π
π XXX π
ngl, right now you have to specify the parser_class attribute too. the inheritance of this default is not working. so yeah, don't forget it, bestie, or the vibe check will fail π
π AUTHOR π
Ingy dΓΆt Net <ingy@cpan.org> π
π COPYRIGHT AND LICENSE π
Copyright 2010-2020. Ingy dΓΆt Net.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
See <http://www.perl.com/perl/misc/Artistic.html>
pearl v5.36.0 π 2022-11-19 π and that's the whole Pegex::Module(3pm) page, bestie β go parse something iconic π«Άβ¨
π¦ where this page comes from
- debian bookworm: libpegex-perl 0.75-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libpegex-perl 0.75-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libpegex-perl 0.75-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libpegex-perl 0.75-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libpegex-perl 0.75-2 Β· 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