Pegex::Module(3pm)

πŸ“¦
version 0.75 Β· 6 versions
, in debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking

✨ 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 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