1PPIx::Regexp::Lexer(3)User Contributed Perl DocumentationPPIx::Regexp::Lexer(3)
2
3
4

NAME

6       PPIx::Regexp::Lexer - Assemble tokenizer output.
7

SYNOPSIS

9        use PPIx::Regexp::Lexer;
10        use PPIx::Regexp::Dumper;
11        my $lex = PPIx::Regexp::Lexer->new('qr{foo}smx');
12        my $dmp = PPIx::Regexp::Dumper->new( $lex );
13        $dmp->print();
14

INHERITANCE

16       "PPIx::Regexp::Lexer" is a PPIx::Regexp::Support.
17
18       "PPIx::Regexp::Lexer" has no descendants.
19

DESCRIPTION

21       This class takes the token stream generated by PPIx::Regexp::Tokenizer
22       and generates the parse tree.
23

METHODS

25       This class provides the following public methods. Methods not
26       documented here are private, and unsupported in the sense that the
27       author reserves the right to change or remove them without notice.
28
29   new
30       This method instantiates the lexer. It takes as its argument either a
31       PPIx::Regexp::Tokenizer or the text to be parsed. In the latter case
32       the tokenizer is instantiated from the text.
33
34       Any optional name/value pairs after the first argument are passed to
35       the tokenizer, which interprets them or not as the case may be.
36
37   errstr
38       This method returns the error string from the last attempt to
39       instantiate a "PPIx::Regexp::Lexer". If the last attempt succeeded, the
40       error will be "undef".
41
42   failures
43        print $lexer->failures(), " parse failures\n";
44
45       This method returns the number of parse failures encountered. A parse
46       failure is either a tokenization failure (see
47       PPIx::Regexp::Tokenizer->failures()) or a structural error.
48
49   lex
50       This method lexes the tokens in the text, and returns the lexed list of
51       elements.
52
53   strict
54       This method returns true or false based on the value of the 'strict'
55       argument to "new()".
56

SUPPORT

58       Support is by the author. Please file bug reports at
59       <https://rt.cpan.org>, or in electronic mail to the author.
60

AUTHOR

62       Thomas R. Wyant, III wyant at cpan dot org
63
65       Copyright (C) 2009-2020 by Thomas R. Wyant, III
66
67       This program is free software; you can redistribute it and/or modify it
68       under the same terms as Perl 5.10.0. For more details, see the full
69       text of the licenses in the directory LICENSES.
70
71       This program is distributed in the hope that it will be useful, but
72       without any warranty; without even the implied warranty of
73       merchantability or fitness for a particular purpose.
74
75
76
77perl v5.30.1                      2020-02-10            PPIx::Regexp::Lexer(3)
Impressum