1Pegex::Module(3)      User Contributed Perl Documentation     Pegex::Module(3)
2
3
4

NAME

6       Pegex::Module - Base Class for Pegex Grammar Interface Modules
7

SYNOPSIS

9           package MyLanguage;
10           use Pegex::Base;
11           extends 'Pegex::Module';
12
13           use Pegex::Parser;
14
15           has parser_class => 'Pegex::Parser';
16           has grammar_class => 'MyLanguage::Grammar';
17           has receiver_class => 'MyLanguage::AST';
18
19           1;
20

DESCRIPTION

22       The module in the Synopsis above is a complete language parsing module.
23       It just inherits from Pegex::Module, and then overrides the
24       "grammar_class" and "receiver_class" attributes. Pegex::Module provides
25       the "parse()" method.
26

XXX

28       At this point you must specify the "parser_class" attribute as well.
29       The inheritance of this default is not working.
30

AUTHOR

32       Ingy döt Net <ingy@cpan.org>
33
35       Copyright 2010-2020. Ingy döt Net.
36
37       This program is free software; you can redistribute it and/or modify it
38       under the same terms as Perl itself.
39
40       See <http://www.perl.com/perl/misc/Artistic.html>
41
42
43
44perl v5.34.0                      2022-01-21                  Pegex::Module(3)
Impressum