|
Posted by Jimi-Carlo Bukowski-Wills on December 5, 2005, 1:48 am
Please log in for more thread options
What system are you running?... what version of perl did you install and
where di you get it?
How did you install it... did you have a previous installation... is there
an old installation before it in your path??
>I recently installed PERL on my system but am having a problem with the
> parser.pm file. Whenever I try to run a script the following error
> shows up"
>
> Can't locate object method "empty_element_tags" via package
> "HTML::TokeParser" at C:/Perl/site/lib/HTML/Parser.pm line 80.
>
> I tried looking for an answer on the web, but no go. I tried searching
> this Usenet group, but again I couldn't find a solution. Below is a
> copy of the code for you to examine.
>
> Thanks for all of your help.
>
> ****************Begin Code***********************
>
> package HTML::Parser;
>
> # Copyright 1996-2005, Gisle Aas.
> # Copyright 1999-2000, Michael A. Chase.
> #
> # This library is free software; you can redistribute it and/or
> # modify it under the same terms as Perl itself.
>
> use strict;
> use vars qw($VERSION @ISA);
>
> $VERSION = '3.46'; # $Date: 2005/10/24 11:17:49 $
>
> require HTML::Entities;
>
> require XSLoader;
> XSLoader::load('HTML::Parser', $VERSION);
>
> sub new
> {
> my $class = shift;
> my $self = bless {}, $class;
> return $self->init(@_);
> }
>
>
> sub init
> {
> my $self = shift;
> $self->_alloc_pstate;
>
> my %arg = @_;
> my $api_version = delete $arg || (@_ ? 3 : 2);
> if ($api_version >= 4) {
> require Carp;
> Carp::croak("API version $api_version not supported " .
> "by HTML::Parser $VERSION");
> }
>
> if ($api_version < 3) {
> # Set up method callbacks compatible with HTML-Parser-2.xx
> $self->handler(text => "text", "self,text,is_cdata");
> $self->handler(end => "end", "self,tagname,text");
> $self->handler(process => "process", "self,token0,text");
> $self->handler(start => "start",
> "self,tagname,attr,attrseq,text");
>
> $self->handler(comment =>
> sub {
> my($self, $tokens) = @_;
> for (@$tokens) {
> $self->comment($_);
> }
> }, "self,tokens");
>
> $self->handler(declaration =>
> sub {
> my $self = shift;
> $self->declaration(substr($_[0], 2, -1));
> }, "self,text");
> }
>
> if (my $h = delete $arg) {
> $h = if ref($h) eq "ARRAY";
> while (my($event, $cb) = each %$h) {
> $self->handler($event => @$cb);
> }
> }
>
> # In the end we try to assume plain attribute or handler
> while (my($option, $val) = each %arg) {
> if ($option =~ /^(\w+)_h$/) {
> $self->handler($1 => @$val);
> }
> elsif ($option =~
> /^(text|start|end|process|declaration|comment)$/) {
> require Carp;
> Carp::croak("Bad constructor option '$option'");
> }
> else {
> $self->$option($val);
> }
> }
>
> return $self;
> }
>
>
> sub parse_file
> {
> my($self, $file) = @_;
> my $opened;
> if (!ref($file) && ref($file) ne "GLOB") {
> # Assume $file is a filename
> local(*F);
> open(F, $file) || return undef;
> binmode(F); # should we? good for byte counts
> $opened++;
> $file = *F;
> }
> my $chunk = '';
> while (read($file, $chunk, 512)) {
> $self->parse($chunk) || last;
> }
> close($file) if $opened;
> $self->eof;
> }
>
>
> sub netscape_buggy_comment # legacy
> {
> my $self = shift;
> require Carp;
> Carp::carp("netscape_buggy_comment() is deprecated. " .
> "Please use the strict_comment() method instead");
> my $old = !$self->strict_comment;
> $self->strict_comment(!shift) if @_;
> return $old;
> }
>
> # set up method stubs
> sub text { }
> *start = \&text;
> *end = \&text;
> *comment = \&text;
> *declaration = \&text;
> *process = \&text;
>
> 1;
>
> __END__
>
>
> =head1 NAME
>
> HTML::Parser - HTML parser class
>
> =head1 SYNOPSIS
>
> use HTML::Parser ();
>
> # Create parser object
> $p = HTML::Parser->new( api_version => 3,
> start_h => [\&start, "tagname, attr"],
> end_h => [\&end, "tagname"],
> marked_sections => 1,
> );
>
> # Parse document text chunk by chunk
> $p->parse($chunk1);
> $p->parse($chunk2);
> #...
> $p->eof; # signal end of document
>
> # Parse directly from file
> $p->parse_file("foo.html");
> # or
> open(my $fh, "<:utf8", "foo.html") || die;
> $p->parse_file($fh);
>
> =head1 DESCRIPTION
>
> Objects of the C<HTML::Parser> class will recognize markup and
> separate it from plain text (alias data content) in HTML
> documents. As different kinds of markup and text are recognized, the
> corresponding event handlers are invoked.
>
> C<HTML::Parser> is not a generic SGML parser. We have tried to
> make it able to deal with the HTML that is actually "out there", and
> it normally parses as closely as possible to the way the popular web
> browsers do it instead of strictly following one of the many HTML
> specifications from W3C. Where there is disagreement, there is often
> an option that you can enable to get the official behaviour.
>
> The document to be parsed may be supplied in arbitrary chunks. This
> makes on-the-fly parsing as documents are received from the network
> possible.
>
> If event driven parsing does not feel right for your application, you
> might want to use C<HTML::PullParser>. This is an C<HTML::Parser>
> subclass that allows a more conventional program structure.
>
>
> =head1 METHODS
>
> The following method is used to construct a new C<HTML::Parser> object:
>
> =over
>
> =item $p = HTML::Parser->new( %options_and_handlers )
>
> This class method creates a new C<HTML::Parser> object and
> returns it. Key/value argument pairs may be provided to assign event
> handlers or initialize parser options. The handlers and parser
> options can also be set or modified later by the method calls described
> below.
>
> If a top level key is in the form "<event>_h" (e.g., "text_h") then it
> assigns a handler to that event, otherwise it initializes a parser
> option. The event handler specification value must be an array
> reference. Multiple handlers may also be assigned with the 'handlers
> => [%handlers]' option. See examples below.
>
> If new() is called without any arguments, it will create a parser that
> uses callback methods compatible with version 2 of C<HTML::Parser>.
> See the section on "version 2 compatibility" below for details.
>
> The special constructor option 'api_version => 2' can be used to
> initialize version 2 callbacks while still setting other options and
> handlers. The 'api_version => 3' option can be used if you don't want
> to set any options and don't want to fall back to v2 compatible
> mode.
>
> Examples:
>
> $p = HTML::Parser->new(api_version => 3,
> text_h => [ sub , "dtext" ]);
>
> This creates a new parser object with a text event handler subroutine
> that receives the original text with general entities decoded.
>
> $p = HTML::Parser->new(api_version => 3,
> start_h => [ 'my_start', "self,tokens" ]);
>
> This creates a new parser object with a start event handler method
> that receives the $p and the tokens array.
>
> $p = HTML::Parser->new(api_version => 3,
> handlers => { text => [\@array, "event,text"],
> comment => [\@array,
> "event,text"],
> });
>
> This creates a new parser object that stores the event type and the
> original text in @array for text and comment events.
>
> =back
>
> The following methods feed the HTML document
> to the C<HTML::Parser> object:
>
> =over
>
> =item $p->parse( $string )
>
> Parse $string as the next chunk of the HTML document. The return
> value is normally a reference to the parser object (i.e. $p).
> Handlers invoked should not attempt to modify the $string in-place
> until
> $p->parse returns.
>
> If an invoked event handler aborts parsing by calling $p->eof, then
> $p->parse() will return a FALSE value.
>
> =item $p->parse( $code_ref )
>
> If a code reference is passed as the argument to be parsed, then the
> chunks to be parsed are obtained by invoking this function repeatedly.
> Parsing continues until the function returns an empty (or undefined)
> result. When this happens $p->eof is automatically signalled.
>
> Parsing will also abort if one of the event handlers calls $p->eof.
>
> The effect of this is the same as:
>
> while (1) {
> my $chunk = &$code_ref();
> if (!defined($chunk) || !length($chunk)) {
> $p->eof;
> return $p;
> }
> $p->parse($chunk) || return undef;
> }
>
> But it is more efficient as this loop runs internally in XS code.
>
> =item $p->parse_file( $file )
>
> Parse text directly from a file. The $file argument can be a
> filename, an open file handle, or a reference to an open file
> handle.
>
> If $file contains a filename and the file can't be opened, then the
> method returns an undefined value and $! tells why it failed.
> Otherwise the return value is a reference to the parser object.
>
> If a file handle is passed as the $file argument, then the file will
> normally be read until EOF, but not closed.
>
> If an invoked event handler aborts parsing by calling $p->eof,
> then $p->parse_file() may not have read the entire file.
>
> On systems with multi-byte line terminators, the values passed for the
> offset and length argspecs may be too low if parse_file() is called on
> a file handle that is not in binary mode.
>
> If a filename is passed in, then parse_file() will open the file in
> binary mode.
>
> =item $p->eof
>
> Signals the end of the HTML document. Calling the $p->eof method
> outside a handler callback will flush any remaining buffered text
> (which triggers the C<text> event if there is any remaining text).
>
> Calling $p->eof inside a handler will terminate parsing at that point
> and cause $p->parse to return a FALSE value. This also terminates
> parsing by $p->parse_file().
>
> After $p->eof has been called, the parse() and parse_file() methods
> can be invoked to feed new documents with the parser object.
>
> The return value from eof() is a reference to the parser object.
>
> =back
>
>
> Most parser options are controlled by boolean attributes.
> Each boolean attribute is enabled by calling the corresponding method
> with a TRUE argument and disabled with a FALSE argument. The
> attribute value is left unchanged if no argument is given. The return
> value from each method is the old attribute value.
>
> Methods that can be used to get and/or set parser options are:
>
> =over
>
> =item $p->attr_encoded
>
> =item $p->attr_encoded( $bool )
>
> entities for attribute values decoded. Enabling this attribute leaves
> entities alone.
>
> =item $p->boolean_attribute_value( $val )
>
> This method sets the value reported for boolean attributes inside HTML
> start tags. By default, the name of the attribute is also used as its
> value. This affects the values reported for C<tokens> and C<attr>
> argspecs.
>
> =item $p->case_sensitive
>
> =item $p->case_sensitive( $bool )
>
> By default, tagnames and attribute names are down-cased. Enabling this
> attribute leaves them as found in the HTML source document.
>
> =item $p->closing_plaintext
>
> =item $p->closing_plaintext( $bool )
>
> By default, "plaintext" element can never be closed. Everything up to
> the end of the document is parsed in CDATA mode. This historical
> behaviour is what at least MSIE does. Enabling this attribute makes
> closing "</plaintext>" tag effective and the parsing process will
> resume
> after seeing this tag. This emulates gecko-based browsers.
>
> =item $p->marked_sections
>
> =item $p->marked_sections( $bool )
>
> By default, section markings like <![CDATA[...]]> are treated like
> ordinary text. When this attribute is enabled section markings are
> honoured.
>
> There are currently no events associated with the marked section
> markup, but the text can be returned as C<skipped_text>.
>
> =item $p->strict_comment
>
> =item $p->strict_comment( $bool )
>
> By default, comments are terminated by the first occurrence of "-->".
> This is the behaviour of most popular browsers (like Mozilla, Opera and
> MSIE), but it is not correct according to the official HTML
> standard. Officially, you need an even number of "--" tokens before
> the closing ">" is recognized and there may not be anything but
> whitespace between an even and an odd "--".
>
> The official behaviour is enabled by enabling this attribute.
>
> Enabling of 'strict_comment' also disables recognizing these forms as
> comments:
>
> </ comment>
> <! comment>
>
>
> =item $p->strict_end
>
> =item $p->strict_end( $bool )
>
> By default, attributes and other junk are allowed to be present on end
> tags in a
> manner that emulates MSIE's behaviour.
>
> The official behaviour is enabled with this attribute. If enabled,
> only whitespace is allowed between the tagname and the final ">".
>
> =item $p->strict_names
>
> =item $p->strict_names( $bool )
>
> By default, almost anything is allowed in tag and attribute names.
> This is the behaviour of most popular browsers and allows us to parse
> some broken tags with invalid attribute values like:
>
> <IMG SRC=newprevlstGr.gif ALT=[PREV LIST] BORDER=0>
>
> By default, "LIST]" is parsed as a boolean attribute, not as
> part of the ALT value as was clearly intended. This is also what
> Mozilla sees.
>
> The official behaviour is enabled by enabling this attribute. If
> enabled, it will cause the tag above to be reported as text
> since "LIST]" is not a legal attribute name.
>
> =item $p->unbroken_text
>
> =item $p->unbroken_text( $bool )
>
> By default, blocks of text are given to the text handler as soon as
> possible (but the parser takes care always to break text at a
> boundary between whitespace and non-whitespace so single words and
> entities can always be decoded safely). This might create breaks that
> make it hard to do transformations on the text. When this attribute is
> enabled, blocks of text are always reported in one piece. This will
> delay the text event until the following (non-text) event has been
> recognized by the parser.
>
> Note that the C<offset> argspec will give you the offset of the first
> segment of text and C<length> is the combined length of the segments.
> Since there might be ignored tags in between, these numbers can't be
> used to directly index in the original document file.
>
> =item $p->utf8_mode
>
> =item $p->utf8_mode( $bool )
>
> Enable this option when parsing raw undecoded UTF-8. This tells the
> parser that the entities expanded for strings reported by C<attr>,
> up compatible with the surrounding text.
>
> If C<utf8_mode> is enabled then it is an error to pass strings
> containing characters with code above 255 to the parse() method, and
> the parse() method will croak if you try.
>
> Example: The Unicode character "\x" is "\xE2\x99\xA5" when UTF-8
> encoded. The character can also be represented by the entity
> "♥" or "♥". If we feed the parser:
>
> $p->parse("\xE2\x99\xA5♥");
>
> then C<dtext> will be reported as "\xE2\x99\xA5\x" without
> C<utf8_mode> enabled, but as "\xE2\x99\xA5\xE2\x99\xA5" when enabled.
> The later string is what you want.
>
> This option is only available with perl-5.8 or better.
>
> =item $p->xml_mode
>
> =item $p->xml_mode( $bool )
>
> Enabling this attribute changes the parser to allow some XML
> constructs such as I<empty element tags> and I<XML processing
> instructions>. It disables forcing tag and attribute names to lower
> case when they are reported by the C<tagname> and C<attr> argspecs,
> and suppresses special treatment of elements that are parsed as CDATA
> for HTML.
>
> I<Empty element tags> look like start tags, but end with the character
> sequence "/>". When recognized by C<HTML::Parser> they cause an
> artificial end event in addition to the start event. The C<text> for
> the artificial end event will be empty and the C<tokenpos> array will
> be undefined even though the only element in the token array will have
> the correct tag name.
>
> I<XML processing instructions> are terminated by "?>" instead of a
> simple ">" as is the case for HTML.
>
> =back
>
> As markup and text is recognized, handlers are invoked. The following
> method is used to set up handlers for different events:
>
> =over
>
> =item $p->handler( event => \&subroutine, $argspec )
>
> =item $p->handler( event => $method_name, $argspec )
>
> =item $p->handler( event => \@accum, $argspec )
>
> =item $p->handler( event => "" );
>
> =item $p->handler( event => undef );
>
> =item $p->handler( event );
>
> This method assigns a subroutine, method, or array to handle an event.
>
> Event is one of C<text>, C<start>, C<end>, C<declaration>, C<comment>,
> C<process>, C<start_document>, C<end_document> or C<default>.
>
> The C<\&subroutine> is a reference to a subroutine which is called to
> handle
> the event.
>
> The C<$method_name> is the name of a method of $p which is called to
> handle
> the event.
>
> sub-arrays.
>
> If the second argument is "", the event is ignored.
> If it is undef, the default handler is invoked for the event.
>
> The C<$argspec> is a string that describes the information to be
> reported
> for the event. Any requested information that does not apply to a
> specific event is passed as C<undef>. If argspec is omitted, then it
> is left unchanged.
>
> The return value from $p->handler is the old callback routine or a
> reference to the accumulator array.
>
> Any return values from handler callback routines/methods are always
> ignored. A handler callback can request parsing to be aborted by
> invoking the $p->eof method. A handler callback is not allowed to
> invoke the $p->parse() or $p->parse_file() method. An exception will
> be raised if it tries.
>
> Examples:
>
> $p->handler(start => "start", 'self, attr, attrseq, text' );
>
> This causes the "start" method of object $p to be called for 'start'
> events.
> The callback signature is $p->start(\%attr, \@attr_seq, $text).
>
> $p->handler(start => \&start, 'attr, attrseq, text' );
>
> This causes subroutine start() to be called for 'start' events.
> The callback signature is start(\%attr, \@attr_seq, $text).
>
> $p->handler(start => \@accum, '"S", attr, attrseq, text' );
>
> This causes 'start' event information to be saved in @accum.
> The array elements will be ['S', \%attr, \@attr_seq, $text].
>
> $p->handler(start => "");
>
> This causes 'start' events to be ignored. It also suppresses
> invocations of any default handler for start events. It is in most
> cases equivalent to $p->handler(start => sub {}), but is more
> efficient. It is different from the empty-sub-handler in that
> C<skipped_text> is not reset by it.
>
> $p->handler(start => undef);
>
> This causes no handler to be associated with start events.
> If there is a default handler it will be invoked.
>
> =back
>
> Filters based on tags can be set up to limit the number of events
> reported. The main bottleneck during parsing is often the huge number
> of callbacks made from the parser. Applying filters can improve
> performance significantly.
>
> The following methods control filters:
>
> =over
>
> =item $p->ignore_elements( @tags )
>
> Both the C<start> event and the C<end> event as well as any events that
> would be reported in between are suppressed. The ignored elements can
> contain nested occurrences of itself. Example:
>
> $p->ignore_elements(qw(script style));
>
> The C<script> and C<style> tags will always nest properly since their
> content is parsed in CDATA mode. For most other tags
> C<ignore_elements> must be used with caution since HTML is often not
> I<well formed>.
>
> =item $p->ignore_tags( @tags )
>
> Any C<start> and C<end> events involving any of the tags given are
> suppressed. To reset the filter (i.e. don't suppress any C<start> and
> C<end> events), call C<ignore_tags> without an argument.
>
> =item $p->report_tags( @tags )
>
> Any C<start> and C<end> events involving any of the tags I<not> given
> are suppressed. To reset the filter (i.e. report all C<start> and
> C<end> events), call C<report_tags> without an argument.
>
> =back
>
> Internally, the system has two filter lists, one for C<report_tags>
> and one for C<ignore_tags>, and both filters are applied. This
> effectivly gives C<ignore_tags> precendence over C<report_tags>.
>
> Examples:
>
> $p->ignore_tags(qw(style));
> $p->report_tags(qw(script style));
>
> results in only C<script> events being reported.
>
> =head2 Argspec
>
> Argspec is a string containing a comma-separated list that describes
> the information reported by the event. The following argspec
> identifier names can be used:
>
> =over
>
> =item C<attr>
>
> Attr causes a reference to a hash of attribute name/value pairs to be
> passed.
>
> Boolean attributes' values are either the value set by
> $p->boolean_attribute_value, or the attribute name if no value has been
> set by $p->boolean_attribute_value.
>
> This passes undef except for C<start> events.
>
> Unless C<xml_mode> or C<case_sensitive> is enabled, the attribute
> names are forced to lower case.
>
> General entities are decoded in the attribute values and
> one layer of matching quotes enclosing the attribute values is removed.
>
> The Unicode character set is assumed for entity decoding. With Perl
> version 5.6 or earlier only the Latin-1 range is supported, and
> entities for characters outside the range 0..255 are left unchanged.
>
>
> Basically the same as C<attr>, but keys and values are passed as
> individual arguments and the original sequence of the attributes is
> kept. The parameters passed will be the same as the @attr calculated
> here:
>
> @attr = map { $_ => $attr-> } @$attrseq;
>
> assuming $attr and $attrseq here are the hash and array passed as the
> result of C<attr> and C<attrseq> argspecs.
>
> This passes no values for events besides C<start>.
>
> =item C<attrseq>
>
> Attrseq causes a reference to an array of attribute names to be
> passed. This can be useful if you want to walk the C<attr> hash in
> the original sequence.
>
> This passes undef except for C<start> events.
>
> Unless C<xml_mode> or C<case_sensitive> is enabled, the attribute
> names are forced to lower case.
>
> =item C<column>
>
> Column causes the column number of the start of the event to be passed.
> The first column on a line is 0.
>
> =item C<dtext>
>
> Dtext causes the decoded text to be passed. General entities are
> automatically decoded unless the event was inside a CDATA section or
> was between literal start and end tags (C<script>, C<style>,
> C<xmp>, and C<plaintext>).
>
> The Unicode character set is assumed for entity decoding. With Perl
> version 5.6 or earlier only the Latin-1 range is supported, and
> entities for characters outside the range 0..255 are left unchanged.
>
> This passes undef except for C<text> events.
>
> =item C<event>
>
> Event causes the event name to be passed.
>
> The event name is one of C<text>, C<start>, C<end>, C<declaration>,
> C<comment>, C<process>, C<start_document> or C<end_document>.
>
> =item C<is_cdata>
>
> Is_cdata causes a TRUE value to be passed if the event is inside a
> CDATA
> section or between literal start and end tags (C<script>,
> C<style>, C<xmp>, and C<plaintext>).
>
> if the flag is FALSE for a text event, then you should normally
> either use C<dtext> or decode the entities yourself before the text is
> processed further.
>
> =item C<length>
>
> Length causes the number of bytes of the source text of the event to
> be passed.
>
> =item C<line>
>
> Line causes the line number of the start of the event to be passed.
> The first line in the document is 1. Line counting doesn't start
> until at least one handler requests this value to be reported.
>
> =item C<offset>
>
> Offset causes the byte position in the HTML document of the start of
> the event to be passed. The first byte in the document has offset 0.
>
> =item C<offset_end>
>
> Offset_end causes the byte position in the HTML document of the end of
> the event to be passed. This is the same as C<offset> + C<length>.
>
> =item C<self>
>
> Self causes the current object to be passed to the handler. If the
> handler is a method, this must be the first element in the argspec.
>
> An alternative to passing self as an argspec is to register closures
> that capture $self by themselves as handlers. Unfortunately this
> creates circular references which prevent the HTML::Parser object
> from being garbage collected. Using the C<self> argspec avoids this
> problem.
>
> =item C<skipped_text>
>
> Skipped_text returns the concatenated text of all the events that have
> been skipped since the last time an event was reported. Events might
> be skipped because no handler is registered for them or because some
> filter applies. Skipped text also includes marked section markup,
> since there are no events that can catch it.
>
> If an C<"">-handler is registered for an event, then the text for this
> event is not included in C<skipped_text>. Skipped text both before
> and after the C<"">-event is included in the next reported
> C<skipped_text>.
>
> =item C<tag>
>
> Same as C<tagname>, but prefixed with "/" if it belongs to an C<end>
> event and "!" for a declaration. The C<tag> does not have any prefix
> for C<start> events, and is in this case identical to C<tagname>.
>
> =item C<tagname>
>
> This is the element name (or I<generic identifier> in SGML jargon) for
> start and end tags. Since HTML is case insensitive, this name is
> forced to lower case to ease string matching.
>
> Since XML is case sensitive, the tagname case is not changed when
> C<xml_mode> is enabled. The same happens if the C<case_sensitive>
> attribute
> is set.
>
> The declaration type of declaration elements is also passed as a
> tagname,
> even if that is a bit strange.
> In fact, in the current implementation tagname is
> identical to C<token0> except that the name may be forced to lower
> case.
>
> =item C<token0>
>
> Token0 causes the original text of the first token string to be
> passed. This should always be the same as $tokens->[0].
>
> For C<declaration> events, this is the declaration type.
>
> For C<start> and C<end> events, this is the tag name.
>
> For C<process> and non-strict C<comment> events, this is everything
> inside the tag.
>
> This passes undef if there are no tokens in the event.
>
> =item C<tokenpos>
>
> Tokenpos causes a reference to an array of token positions to be
> passed. For each string that appears in C<tokens>, this array
> contains two numbers. The first number is the offset of the start of
> the token in the original C<text> and the second number is the length
> of the token.
>
> Boolean attributes in a C<start> event will have (0,0) for the
> attribute value offset and length.
>
> This passes undef if there are no tokens in the event (e.g., C<text>)
> and for artificial C<end> events triggered by empty element tags.
>
> If you are using these offsets and lengths to modify C<text>, you
> should either work from right to left, or be very careful to calculate
> the changes to the offsets.
>
> =item C<tokens>
>
> Tokens causes a reference to an array of token strings to be passed.
> The strings are exactly as they were found in the original text,
> no decoding or case changes are applied.
>
> For C<declaration> events, the array contains each word, comment, and
> delimited string starting with the declaration type.
> |