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

SUPPORT

54       Support is by the author. Please file bug reports at
55       <http://rt.cpan.org>, or in electronic mail to the author.
56

AUTHOR

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