1#
2# This parser was generated with
3# Parse::RecDescent version 1.967015
4#
5
6package Mail::IMAPClient::Thread;
7use Parse::RecDescent;
8{ my $ERRORS;
9
10
11package Parse::RecDescent::Mail::IMAPClient::Thread;
12use strict;
13use vars qw($skip $AUTOLOAD  );
14@Parse::RecDescent::Mail::IMAPClient::Thread::ISA = ();
15$skip = '\\s*';
16
17
18
19{
20local $SIG{__WARN__} = sub {0};
21# PRETEND TO BE IN Parse::RecDescent NAMESPACE
22*Parse::RecDescent::Mail::IMAPClient::Thread::AUTOLOAD   = sub
23{
24    no strict 'refs';
25
26    ${"AUTOLOAD"} =~ s/^Parse::RecDescent::Mail::IMAPClient::Thread/Parse::RecDescent/;
27    goto &{${"AUTOLOAD"}};
28}
29}
30
31push @Parse::RecDescent::Mail::IMAPClient::Thread::ISA, 'Parse::RecDescent';
32# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args, $_itempos)
33sub Parse::RecDescent::Mail::IMAPClient::Thread::NUMBER
34{
35	my $thisparser = $_[0];
36	use vars q{$tracelevel};
37	local $tracelevel = ($tracelevel||0)+1;
38	$ERRORS = 0;
39    my $thisrule = $thisparser->{"rules"}{"NUMBER"};
40
41    Parse::RecDescent::_trace(q{Trying rule: [NUMBER]},
42                  Parse::RecDescent::_tracefirst($_[1]),
43                  q{NUMBER},
44                  $tracelevel)
45                    if defined $::RD_TRACE;
46
47
48    my $err_at = @{$thisparser->{errors}};
49
50    my $score;
51    my $score_return;
52    my $_tok;
53    my $return = undef;
54    my $_matched=0;
55    my $commit=0;
56    my @item = ();
57    my %item = ();
58    my $repeating =  $_[2];
59    my $_noactions = $_[3];
60    my @arg =    defined $_[4] ? @{ &{$_[4]} } : ();
61    my $_itempos = $_[5];
62    my %arg =    ($#arg & 01) ? @arg : (@arg, undef);
63    my $text;
64    my $lastsep;
65    my $current_match;
66    my $expectation = new Parse::RecDescent::Expectation(q{/\\d+/});
67    $expectation->at($_[1]);
68
69    my $thisline;
70    tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser;
71
72
73
74    while (!$_matched && !$commit)
75    {
76
77        Parse::RecDescent::_trace(q{Trying production: [/\\d+/]},
78                      Parse::RecDescent::_tracefirst($_[1]),
79                      q{NUMBER},
80                      $tracelevel)
81                        if defined $::RD_TRACE;
82        my $thisprod = $thisrule->{"prods"}[0];
83        $text = $_[1];
84        my $_savetext;
85        @item = (q{NUMBER});
86        %item = (__RULE__ => q{NUMBER});
87        my $repcount = 0;
88
89
90        Parse::RecDescent::_trace(q{Trying terminal: [/\\d+/]}, Parse::RecDescent::_tracefirst($text),
91                      q{NUMBER},
92                      $tracelevel)
93                        if defined $::RD_TRACE;
94        undef $lastsep;
95        $expectation->is(q{})->at($text);
96
97
98        unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and   $text =~ m/\A(?:\d+)/)
99        {
100            $text = $lastsep . $text if defined $lastsep;
101            $expectation->failed();
102            Parse::RecDescent::_trace(q{<<Didn't match terminal>>},
103                          Parse::RecDescent::_tracefirst($text))
104                    if defined $::RD_TRACE;
105
106            last;
107        }
108        $current_match = substr($text, $-[0], $+[0] - $-[0]);
109        substr($text,0,length($current_match),q{});
110        Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [}
111                        . $current_match . q{])},
112                          Parse::RecDescent::_tracefirst($text))
113                    if defined $::RD_TRACE;
114        push @item, $item{__PATTERN1__}=$current_match;
115
116
117        Parse::RecDescent::_trace(q{>>Matched production: [/\\d+/]<<},
118                      Parse::RecDescent::_tracefirst($text),
119                      q{NUMBER},
120                      $tracelevel)
121                        if defined $::RD_TRACE;
122
123
124
125        $_matched = 1;
126        last;
127    }
128
129
130    unless ( $_matched || defined($score) )
131    {
132
133
134        $_[1] = $text;  # NOT SURE THIS IS NEEDED
135        Parse::RecDescent::_trace(q{<<Didn't match rule>>},
136                     Parse::RecDescent::_tracefirst($_[1]),
137                     q{NUMBER},
138                     $tracelevel)
139                    if defined $::RD_TRACE;
140        return undef;
141    }
142    if (!defined($return) && defined($score))
143    {
144        Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "",
145                      q{NUMBER},
146                      $tracelevel)
147                        if defined $::RD_TRACE;
148        $return = $score_return;
149    }
150    splice @{$thisparser->{errors}}, $err_at;
151    $return = $item[$#item] unless defined $return;
152    if (defined $::RD_TRACE)
153    {
154        Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} .
155                      $return . q{])}, "",
156                      q{NUMBER},
157                      $tracelevel);
158        Parse::RecDescent::_trace(q{(consumed: [} .
159                      Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])},
160                      Parse::RecDescent::_tracefirst($text),
161                      , q{NUMBER},
162                      $tracelevel)
163    }
164    $_[1] = $text;
165    return $return;
166}
167
168# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args, $_itempos)
169sub Parse::RecDescent::Mail::IMAPClient::Thread::start
170{
171	my $thisparser = $_[0];
172	use vars q{$tracelevel};
173	local $tracelevel = ($tracelevel||0)+1;
174	$ERRORS = 0;
175    my $thisrule = $thisparser->{"rules"}{"start"};
176
177    Parse::RecDescent::_trace(q{Trying rule: [start]},
178                  Parse::RecDescent::_tracefirst($_[1]),
179                  q{start},
180                  $tracelevel)
181                    if defined $::RD_TRACE;
182
183
184    my $err_at = @{$thisparser->{errors}};
185
186    my $score;
187    my $score_return;
188    my $_tok;
189    my $return = undef;
190    my $_matched=0;
191    my $commit=0;
192    my @item = ();
193    my %item = ();
194    my $repeating =  $_[2];
195    my $_noactions = $_[3];
196    my @arg =    defined $_[4] ? @{ &{$_[4]} } : ();
197    my $_itempos = $_[5];
198    my %arg =    ($#arg & 01) ? @arg : (@arg, undef);
199    my $text;
200    my $lastsep;
201    my $current_match;
202    my $expectation = new Parse::RecDescent::Expectation(q{/^\\* THREAD /i});
203    $expectation->at($_[1]);
204
205    my $thisline;
206    tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser;
207
208
209
210    while (!$_matched && !$commit)
211    {
212
213        Parse::RecDescent::_trace(q{Trying production: [/^\\* THREAD /i thread]},
214                      Parse::RecDescent::_tracefirst($_[1]),
215                      q{start},
216                      $tracelevel)
217                        if defined $::RD_TRACE;
218        my $thisprod = $thisrule->{"prods"}[0];
219        $text = $_[1];
220        my $_savetext;
221        @item = (q{start});
222        %item = (__RULE__ => q{start});
223        my $repcount = 0;
224
225
226        Parse::RecDescent::_trace(q{Trying terminal: [/^\\* THREAD /i]}, Parse::RecDescent::_tracefirst($text),
227                      q{start},
228                      $tracelevel)
229                        if defined $::RD_TRACE;
230        undef $lastsep;
231        $expectation->is(q{})->at($text);
232
233
234        unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and   $text =~ m/\A(?:^\* THREAD )/i)
235        {
236            $text = $lastsep . $text if defined $lastsep;
237            $expectation->failed();
238            Parse::RecDescent::_trace(q{<<Didn't match terminal>>},
239                          Parse::RecDescent::_tracefirst($text))
240                    if defined $::RD_TRACE;
241
242            last;
243        }
244        $current_match = substr($text, $-[0], $+[0] - $-[0]);
245        substr($text,0,length($current_match),q{});
246        Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [}
247                        . $current_match . q{])},
248                          Parse::RecDescent::_tracefirst($text))
249                    if defined $::RD_TRACE;
250        push @item, $item{__PATTERN1__}=$current_match;
251
252
253        Parse::RecDescent::_trace(q{Trying repeated subrule: [thread]},
254                  Parse::RecDescent::_tracefirst($text),
255                  q{start},
256                  $tracelevel)
257                    if defined $::RD_TRACE;
258        $expectation->is(q{thread})->at($text);
259
260        unless (defined ($_tok = $thisparser->_parserepeat($text, \&Parse::RecDescent::Mail::IMAPClient::Thread::thread, 0, 100000000, $_noactions,$expectation,sub { \@arg },undef)))
261        {
262            Parse::RecDescent::_trace(q{<<Didn't match repeated subrule: [thread]>>},
263                          Parse::RecDescent::_tracefirst($text),
264                          q{start},
265                          $tracelevel)
266                            if defined $::RD_TRACE;
267            last;
268        }
269        Parse::RecDescent::_trace(q{>>Matched repeated subrule: [thread]<< (}
270                    . @$_tok . q{ times)},
271
272                      Parse::RecDescent::_tracefirst($text),
273                      q{start},
274                      $tracelevel)
275                        if defined $::RD_TRACE;
276        $item{q{thread(s?)}} = $_tok;
277        push @item, $_tok;
278
279
280
281        Parse::RecDescent::_trace(q{Trying action},
282                      Parse::RecDescent::_tracefirst($text),
283                      q{start},
284                      $tracelevel)
285                        if defined $::RD_TRACE;
286
287
288        $_tok = ($_noactions) ? 0 : do {
289	$return=$item{'thread(s?)'}||undef;
290};
291        unless (defined $_tok)
292        {
293            Parse::RecDescent::_trace(q{<<Didn't match action>> (return value: [undef])})
294                    if defined $::RD_TRACE;
295            last;
296        }
297        Parse::RecDescent::_trace(q{>>Matched action<< (return value: [}
298                      . $_tok . q{])},
299                      Parse::RecDescent::_tracefirst($text))
300                        if defined $::RD_TRACE;
301        push @item, $_tok;
302        $item{__ACTION1__}=$_tok;
303
304
305        Parse::RecDescent::_trace(q{>>Matched production: [/^\\* THREAD /i thread]<<},
306                      Parse::RecDescent::_tracefirst($text),
307                      q{start},
308                      $tracelevel)
309                        if defined $::RD_TRACE;
310
311
312
313        $_matched = 1;
314        last;
315    }
316
317
318    unless ( $_matched || defined($score) )
319    {
320
321
322        $_[1] = $text;  # NOT SURE THIS IS NEEDED
323        Parse::RecDescent::_trace(q{<<Didn't match rule>>},
324                     Parse::RecDescent::_tracefirst($_[1]),
325                     q{start},
326                     $tracelevel)
327                    if defined $::RD_TRACE;
328        return undef;
329    }
330    if (!defined($return) && defined($score))
331    {
332        Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "",
333                      q{start},
334                      $tracelevel)
335                        if defined $::RD_TRACE;
336        $return = $score_return;
337    }
338    splice @{$thisparser->{errors}}, $err_at;
339    $return = $item[$#item] unless defined $return;
340    if (defined $::RD_TRACE)
341    {
342        Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} .
343                      $return . q{])}, "",
344                      q{start},
345                      $tracelevel);
346        Parse::RecDescent::_trace(q{(consumed: [} .
347                      Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])},
348                      Parse::RecDescent::_tracefirst($text),
349                      , q{start},
350                      $tracelevel)
351    }
352    $_[1] = $text;
353    return $return;
354}
355
356# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args, $_itempos)
357sub Parse::RecDescent::Mail::IMAPClient::Thread::thread
358{
359	my $thisparser = $_[0];
360	use vars q{$tracelevel};
361	local $tracelevel = ($tracelevel||0)+1;
362	$ERRORS = 0;
363    my $thisrule = $thisparser->{"rules"}{"thread"};
364
365    Parse::RecDescent::_trace(q{Trying rule: [thread]},
366                  Parse::RecDescent::_tracefirst($_[1]),
367                  q{thread},
368                  $tracelevel)
369                    if defined $::RD_TRACE;
370
371
372    my $err_at = @{$thisparser->{errors}};
373
374    my $score;
375    my $score_return;
376    my $_tok;
377    my $return = undef;
378    my $_matched=0;
379    my $commit=0;
380    my @item = ();
381    my %item = ();
382    my $repeating =  $_[2];
383    my $_noactions = $_[3];
384    my @arg =    defined $_[4] ? @{ &{$_[4]} } : ();
385    my $_itempos = $_[5];
386    my %arg =    ($#arg & 01) ? @arg : (@arg, undef);
387    my $text;
388    my $lastsep;
389    my $current_match;
390    my $expectation = new Parse::RecDescent::Expectation(q{'('});
391    $expectation->at($_[1]);
392
393    my $thisline;
394    tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser;
395
396
397
398    while (!$_matched && !$commit)
399    {
400
401        Parse::RecDescent::_trace(q{Trying production: ['(' threadmember ')']},
402                      Parse::RecDescent::_tracefirst($_[1]),
403                      q{thread},
404                      $tracelevel)
405                        if defined $::RD_TRACE;
406        my $thisprod = $thisrule->{"prods"}[0];
407        $text = $_[1];
408        my $_savetext;
409        @item = (q{thread});
410        %item = (__RULE__ => q{thread});
411        my $repcount = 0;
412
413
414        Parse::RecDescent::_trace(q{Trying terminal: ['(']},
415                      Parse::RecDescent::_tracefirst($text),
416                      q{thread},
417                      $tracelevel)
418                        if defined $::RD_TRACE;
419        undef $lastsep;
420        $expectation->is(q{})->at($text);
421
422
423        unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and   do { $_tok = "("; 1 } and
424             substr($text,0,length($_tok)) eq $_tok and
425             do { substr($text,0,length($_tok)) = ""; 1; }
426        )
427        {
428            $text = $lastsep . $text if defined $lastsep;
429
430            $expectation->failed();
431            Parse::RecDescent::_trace(q{<<Didn't match terminal>>},
432                          Parse::RecDescent::_tracefirst($text))
433                            if defined $::RD_TRACE;
434            last;
435        }
436        Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [}
437                        . $_tok . q{])},
438                          Parse::RecDescent::_tracefirst($text))
439                            if defined $::RD_TRACE;
440        push @item, $item{__STRING1__}=$_tok;
441
442
443        Parse::RecDescent::_trace(q{Trying repeated subrule: [threadmember]},
444                  Parse::RecDescent::_tracefirst($text),
445                  q{thread},
446                  $tracelevel)
447                    if defined $::RD_TRACE;
448        $expectation->is(q{threadmember})->at($text);
449
450        unless (defined ($_tok = $thisparser->_parserepeat($text, \&Parse::RecDescent::Mail::IMAPClient::Thread::threadmember, 1, 100000000, $_noactions,$expectation,sub { \@arg },undef)))
451        {
452            Parse::RecDescent::_trace(q{<<Didn't match repeated subrule: [threadmember]>>},
453                          Parse::RecDescent::_tracefirst($text),
454                          q{thread},
455                          $tracelevel)
456                            if defined $::RD_TRACE;
457            last;
458        }
459        Parse::RecDescent::_trace(q{>>Matched repeated subrule: [threadmember]<< (}
460                    . @$_tok . q{ times)},
461
462                      Parse::RecDescent::_tracefirst($text),
463                      q{thread},
464                      $tracelevel)
465                        if defined $::RD_TRACE;
466        $item{q{threadmember(s)}} = $_tok;
467        push @item, $_tok;
468
469
470
471        Parse::RecDescent::_trace(q{Trying terminal: [')']},
472                      Parse::RecDescent::_tracefirst($text),
473                      q{thread},
474                      $tracelevel)
475                        if defined $::RD_TRACE;
476        undef $lastsep;
477        $expectation->is(q{')'})->at($text);
478
479
480        unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and   do { $_tok = ")"; 1 } and
481             substr($text,0,length($_tok)) eq $_tok and
482             do { substr($text,0,length($_tok)) = ""; 1; }
483        )
484        {
485            $text = $lastsep . $text if defined $lastsep;
486
487            $expectation->failed();
488            Parse::RecDescent::_trace(q{<<Didn't match terminal>>},
489                          Parse::RecDescent::_tracefirst($text))
490                            if defined $::RD_TRACE;
491            last;
492        }
493        Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [}
494                        . $_tok . q{])},
495                          Parse::RecDescent::_tracefirst($text))
496                            if defined $::RD_TRACE;
497        push @item, $item{__STRING2__}=$_tok;
498
499
500        Parse::RecDescent::_trace(q{Trying action},
501                      Parse::RecDescent::_tracefirst($text),
502                      q{thread},
503                      $tracelevel)
504                        if defined $::RD_TRACE;
505
506
507        $_tok = ($_noactions) ? 0 : do {
508		$return = $item{'threadmember(s)'}||undef;
509	};
510        unless (defined $_tok)
511        {
512            Parse::RecDescent::_trace(q{<<Didn't match action>> (return value: [undef])})
513                    if defined $::RD_TRACE;
514            last;
515        }
516        Parse::RecDescent::_trace(q{>>Matched action<< (return value: [}
517                      . $_tok . q{])},
518                      Parse::RecDescent::_tracefirst($text))
519                        if defined $::RD_TRACE;
520        push @item, $_tok;
521        $item{__ACTION1__}=$_tok;
522
523
524        Parse::RecDescent::_trace(q{>>Matched production: ['(' threadmember ')']<<},
525                      Parse::RecDescent::_tracefirst($text),
526                      q{thread},
527                      $tracelevel)
528                        if defined $::RD_TRACE;
529
530
531
532        $_matched = 1;
533        last;
534    }
535
536
537    unless ( $_matched || defined($score) )
538    {
539
540
541        $_[1] = $text;  # NOT SURE THIS IS NEEDED
542        Parse::RecDescent::_trace(q{<<Didn't match rule>>},
543                     Parse::RecDescent::_tracefirst($_[1]),
544                     q{thread},
545                     $tracelevel)
546                    if defined $::RD_TRACE;
547        return undef;
548    }
549    if (!defined($return) && defined($score))
550    {
551        Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "",
552                      q{thread},
553                      $tracelevel)
554                        if defined $::RD_TRACE;
555        $return = $score_return;
556    }
557    splice @{$thisparser->{errors}}, $err_at;
558    $return = $item[$#item] unless defined $return;
559    if (defined $::RD_TRACE)
560    {
561        Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} .
562                      $return . q{])}, "",
563                      q{thread},
564                      $tracelevel);
565        Parse::RecDescent::_trace(q{(consumed: [} .
566                      Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])},
567                      Parse::RecDescent::_tracefirst($text),
568                      , q{thread},
569                      $tracelevel)
570    }
571    $_[1] = $text;
572    return $return;
573}
574
575# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args, $_itempos)
576sub Parse::RecDescent::Mail::IMAPClient::Thread::threadmember
577{
578	my $thisparser = $_[0];
579	use vars q{$tracelevel};
580	local $tracelevel = ($tracelevel||0)+1;
581	$ERRORS = 0;
582    my $thisrule = $thisparser->{"rules"}{"threadmember"};
583
584    Parse::RecDescent::_trace(q{Trying rule: [threadmember]},
585                  Parse::RecDescent::_tracefirst($_[1]),
586                  q{threadmember},
587                  $tracelevel)
588                    if defined $::RD_TRACE;
589
590
591    my $err_at = @{$thisparser->{errors}};
592
593    my $score;
594    my $score_return;
595    my $_tok;
596    my $return = undef;
597    my $_matched=0;
598    my $commit=0;
599    my @item = ();
600    my %item = ();
601    my $repeating =  $_[2];
602    my $_noactions = $_[3];
603    my @arg =    defined $_[4] ? @{ &{$_[4]} } : ();
604    my $_itempos = $_[5];
605    my %arg =    ($#arg & 01) ? @arg : (@arg, undef);
606    my $text;
607    my $lastsep;
608    my $current_match;
609    my $expectation = new Parse::RecDescent::Expectation(q{NUMBER, or thread});
610    $expectation->at($_[1]);
611
612    my $thisline;
613    tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser;
614
615
616
617    while (!$_matched && !$commit)
618    {
619
620        Parse::RecDescent::_trace(q{Trying production: [NUMBER]},
621                      Parse::RecDescent::_tracefirst($_[1]),
622                      q{threadmember},
623                      $tracelevel)
624                        if defined $::RD_TRACE;
625        my $thisprod = $thisrule->{"prods"}[0];
626        $text = $_[1];
627        my $_savetext;
628        @item = (q{threadmember});
629        %item = (__RULE__ => q{threadmember});
630        my $repcount = 0;
631
632
633        Parse::RecDescent::_trace(q{Trying subrule: [NUMBER]},
634                  Parse::RecDescent::_tracefirst($text),
635                  q{threadmember},
636                  $tracelevel)
637                    if defined $::RD_TRACE;
638        if (1) { no strict qw{refs};
639        $expectation->is(q{})->at($text);
640        unless (defined ($_tok = Parse::RecDescent::Mail::IMAPClient::Thread::NUMBER($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef)))
641        {
642
643            Parse::RecDescent::_trace(q{<<Didn't match subrule: [NUMBER]>>},
644                          Parse::RecDescent::_tracefirst($text),
645                          q{threadmember},
646                          $tracelevel)
647                            if defined $::RD_TRACE;
648            $expectation->failed();
649            last;
650        }
651        Parse::RecDescent::_trace(q{>>Matched subrule: [NUMBER]<< (return value: [}
652                    . $_tok . q{]},
653
654                      Parse::RecDescent::_tracefirst($text),
655                      q{threadmember},
656                      $tracelevel)
657                        if defined $::RD_TRACE;
658        $item{q{NUMBER}} = $_tok;
659        push @item, $_tok;
660
661        }
662
663        Parse::RecDescent::_trace(q{Trying action},
664                      Parse::RecDescent::_tracefirst($text),
665                      q{threadmember},
666                      $tracelevel)
667                        if defined $::RD_TRACE;
668
669
670        $_tok = ($_noactions) ? 0 : do { $return = $item{NUMBER} ; };
671        unless (defined $_tok)
672        {
673            Parse::RecDescent::_trace(q{<<Didn't match action>> (return value: [undef])})
674                    if defined $::RD_TRACE;
675            last;
676        }
677        Parse::RecDescent::_trace(q{>>Matched action<< (return value: [}
678                      . $_tok . q{])},
679                      Parse::RecDescent::_tracefirst($text))
680                        if defined $::RD_TRACE;
681        push @item, $_tok;
682        $item{__ACTION1__}=$_tok;
683
684
685        Parse::RecDescent::_trace(q{>>Matched production: [NUMBER]<<},
686                      Parse::RecDescent::_tracefirst($text),
687                      q{threadmember},
688                      $tracelevel)
689                        if defined $::RD_TRACE;
690
691
692
693        $_matched = 1;
694        last;
695    }
696
697
698    while (!$_matched && !$commit)
699    {
700
701        Parse::RecDescent::_trace(q{Trying production: [thread]},
702                      Parse::RecDescent::_tracefirst($_[1]),
703                      q{threadmember},
704                      $tracelevel)
705                        if defined $::RD_TRACE;
706        my $thisprod = $thisrule->{"prods"}[1];
707        $text = $_[1];
708        my $_savetext;
709        @item = (q{threadmember});
710        %item = (__RULE__ => q{threadmember});
711        my $repcount = 0;
712
713
714        Parse::RecDescent::_trace(q{Trying subrule: [thread]},
715                  Parse::RecDescent::_tracefirst($text),
716                  q{threadmember},
717                  $tracelevel)
718                    if defined $::RD_TRACE;
719        if (1) { no strict qw{refs};
720        $expectation->is(q{})->at($text);
721        unless (defined ($_tok = Parse::RecDescent::Mail::IMAPClient::Thread::thread($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef)))
722        {
723
724            Parse::RecDescent::_trace(q{<<Didn't match subrule: [thread]>>},
725                          Parse::RecDescent::_tracefirst($text),
726                          q{threadmember},
727                          $tracelevel)
728                            if defined $::RD_TRACE;
729            $expectation->failed();
730            last;
731        }
732        Parse::RecDescent::_trace(q{>>Matched subrule: [thread]<< (return value: [}
733                    . $_tok . q{]},
734
735                      Parse::RecDescent::_tracefirst($text),
736                      q{threadmember},
737                      $tracelevel)
738                        if defined $::RD_TRACE;
739        $item{q{thread}} = $_tok;
740        push @item, $_tok;
741
742        }
743
744        Parse::RecDescent::_trace(q{Trying action},
745                      Parse::RecDescent::_tracefirst($text),
746                      q{threadmember},
747                      $tracelevel)
748                        if defined $::RD_TRACE;
749
750
751        $_tok = ($_noactions) ? 0 : do { $return = $item{thread} ; };
752        unless (defined $_tok)
753        {
754            Parse::RecDescent::_trace(q{<<Didn't match action>> (return value: [undef])})
755                    if defined $::RD_TRACE;
756            last;
757        }
758        Parse::RecDescent::_trace(q{>>Matched action<< (return value: [}
759                      . $_tok . q{])},
760                      Parse::RecDescent::_tracefirst($text))
761                        if defined $::RD_TRACE;
762        push @item, $_tok;
763        $item{__ACTION1__}=$_tok;
764
765
766        Parse::RecDescent::_trace(q{>>Matched production: [thread]<<},
767                      Parse::RecDescent::_tracefirst($text),
768                      q{threadmember},
769                      $tracelevel)
770                        if defined $::RD_TRACE;
771
772
773
774        $_matched = 1;
775        last;
776    }
777
778
779    unless ( $_matched || defined($score) )
780    {
781
782
783        $_[1] = $text;  # NOT SURE THIS IS NEEDED
784        Parse::RecDescent::_trace(q{<<Didn't match rule>>},
785                     Parse::RecDescent::_tracefirst($_[1]),
786                     q{threadmember},
787                     $tracelevel)
788                    if defined $::RD_TRACE;
789        return undef;
790    }
791    if (!defined($return) && defined($score))
792    {
793        Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "",
794                      q{threadmember},
795                      $tracelevel)
796                        if defined $::RD_TRACE;
797        $return = $score_return;
798    }
799    splice @{$thisparser->{errors}}, $err_at;
800    $return = $item[$#item] unless defined $return;
801    if (defined $::RD_TRACE)
802    {
803        Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} .
804                      $return . q{])}, "",
805                      q{threadmember},
806                      $tracelevel);
807        Parse::RecDescent::_trace(q{(consumed: [} .
808                      Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])},
809                      Parse::RecDescent::_tracefirst($text),
810                      , q{threadmember},
811                      $tracelevel)
812    }
813    $_[1] = $text;
814    return $return;
815}
816}
817package Mail::IMAPClient::Thread; sub new { my $self = bless( {
818                 '_AUTOACTION' => undef,
819                 '_AUTOTREE' => undef,
820                 '_check' => {
821                               'itempos' => '',
822                               'prevcolumn' => '',
823                               'prevline' => '',
824                               'prevoffset' => '',
825                               'thiscolumn' => '',
826                               'thisoffset' => ''
827                             },
828                 'localvars' => '',
829                 'namespace' => 'Parse::RecDescent::Mail::IMAPClient::Thread',
830                 'rules' => {
831                              'NUMBER' => bless( {
832                                                   'calls' => [],
833                                                   'changed' => 0,
834                                                   'impcount' => 0,
835                                                   'line' => 1,
836                                                   'name' => 'NUMBER',
837                                                   'opcount' => 0,
838                                                   'prods' => [
839                                                                bless( {
840                                                                         'actcount' => 0,
841                                                                         'dircount' => 0,
842                                                                         'error' => undef,
843                                                                         'items' => [
844                                                                                      bless( {
845                                                                                               'description' => '/\\\\d+/',
846                                                                                               'hashname' => '__PATTERN1__',
847                                                                                               'ldelim' => '/',
848                                                                                               'line' => 3,
849                                                                                               'lookahead' => 0,
850                                                                                               'mod' => '',
851                                                                                               'pattern' => '\\d+',
852                                                                                               'rdelim' => '/'
853                                                                                             }, 'Parse::RecDescent::Token' )
854                                                                                    ],
855                                                                         'line' => undef,
856                                                                         'number' => 0,
857                                                                         'patcount' => 1,
858                                                                         'strcount' => 0,
859                                                                         'uncommit' => undef
860                                                                       }, 'Parse::RecDescent::Production' )
861                                                              ],
862                                                   'vars' => ''
863                                                 }, 'Parse::RecDescent::Rule' ),
864                              'start' => bless( {
865                                                  'calls' => [
866                                                               'thread'
867                                                             ],
868                                                  'changed' => 0,
869                                                  'impcount' => 0,
870                                                  'line' => 15,
871                                                  'name' => 'start',
872                                                  'opcount' => 0,
873                                                  'prods' => [
874                                                               bless( {
875                                                                        'actcount' => 1,
876                                                                        'dircount' => 0,
877                                                                        'error' => undef,
878                                                                        'items' => [
879                                                                                     bless( {
880                                                                                              'description' => '/^\\\\* THREAD /i',
881                                                                                              'hashname' => '__PATTERN1__',
882                                                                                              'ldelim' => '/',
883                                                                                              'line' => 16,
884                                                                                              'lookahead' => 0,
885                                                                                              'mod' => 'i',
886                                                                                              'pattern' => '^\\* THREAD ',
887                                                                                              'rdelim' => '/'
888                                                                                            }, 'Parse::RecDescent::Token' ),
889                                                                                     bless( {
890                                                                                              'argcode' => undef,
891                                                                                              'expected' => undef,
892                                                                                              'line' => 16,
893                                                                                              'lookahead' => 0,
894                                                                                              'matchrule' => 0,
895                                                                                              'max' => 100000000,
896                                                                                              'min' => 0,
897                                                                                              'repspec' => 's?',
898                                                                                              'subrule' => 'thread'
899                                                                                            }, 'Parse::RecDescent::Repetition' ),
900                                                                                     bless( {
901                                                                                              'code' => '{
902	$return=$item{\'thread(s?)\'}||undef;
903}',
904                                                                                              'hashname' => '__ACTION1__',
905                                                                                              'line' => 16,
906                                                                                              'lookahead' => 0
907                                                                                            }, 'Parse::RecDescent::Action' )
908                                                                                   ],
909                                                                        'line' => undef,
910                                                                        'number' => 0,
911                                                                        'patcount' => 1,
912                                                                        'strcount' => 0,
913                                                                        'uncommit' => undef
914                                                                      }, 'Parse::RecDescent::Production' )
915                                                             ],
916                                                  'vars' => ''
917                                                }, 'Parse::RecDescent::Rule' ),
918                              'thread' => bless( {
919                                                   'calls' => [
920                                                                'threadmember'
921                                                              ],
922                                                   'changed' => 0,
923                                                   'impcount' => 0,
924                                                   'line' => 10,
925                                                   'name' => 'thread',
926                                                   'opcount' => 0,
927                                                   'prods' => [
928                                                                bless( {
929                                                                         'actcount' => 1,
930                                                                         'dircount' => 0,
931                                                                         'error' => undef,
932                                                                         'items' => [
933                                                                                      bless( {
934                                                                                               'description' => '\'(\'',
935                                                                                               'hashname' => '__STRING1__',
936                                                                                               'line' => 10,
937                                                                                               'lookahead' => 0,
938                                                                                               'pattern' => '('
939                                                                                             }, 'Parse::RecDescent::InterpLit' ),
940                                                                                      bless( {
941                                                                                               'argcode' => undef,
942                                                                                               'expected' => undef,
943                                                                                               'line' => 10,
944                                                                                               'lookahead' => 0,
945                                                                                               'matchrule' => 0,
946                                                                                               'max' => 100000000,
947                                                                                               'min' => 1,
948                                                                                               'repspec' => 's',
949                                                                                               'subrule' => 'threadmember'
950                                                                                             }, 'Parse::RecDescent::Repetition' ),
951                                                                                      bless( {
952                                                                                               'description' => '\')\'',
953                                                                                               'hashname' => '__STRING2__',
954                                                                                               'line' => 10,
955                                                                                               'lookahead' => 0,
956                                                                                               'pattern' => ')'
957                                                                                             }, 'Parse::RecDescent::InterpLit' ),
958                                                                                      bless( {
959                                                                                               'code' => '{
960		$return = $item{\'threadmember(s)\'}||undef;
961	}',
962                                                                                               'hashname' => '__ACTION1__',
963                                                                                               'line' => 11,
964                                                                                               'lookahead' => 0
965                                                                                             }, 'Parse::RecDescent::Action' )
966                                                                                    ],
967                                                                         'line' => undef,
968                                                                         'number' => 0,
969                                                                         'patcount' => 0,
970                                                                         'strcount' => 2,
971                                                                         'uncommit' => undef
972                                                                       }, 'Parse::RecDescent::Production' )
973                                                              ],
974                                                   'vars' => ''
975                                                 }, 'Parse::RecDescent::Rule' ),
976                              'threadmember' => bless( {
977                                                         'calls' => [
978                                                                      'NUMBER',
979                                                                      'thread'
980                                                                    ],
981                                                         'changed' => 0,
982                                                         'impcount' => 0,
983                                                         'line' => 5,
984                                                         'name' => 'threadmember',
985                                                         'opcount' => 0,
986                                                         'prods' => [
987                                                                      bless( {
988                                                                               'actcount' => 1,
989                                                                               'dircount' => 0,
990                                                                               'error' => undef,
991                                                                               'items' => [
992                                                                                            bless( {
993                                                                                                     'argcode' => undef,
994                                                                                                     'implicit' => undef,
995                                                                                                     'line' => 7,
996                                                                                                     'lookahead' => 0,
997                                                                                                     'matchrule' => 0,
998                                                                                                     'subrule' => 'NUMBER'
999                                                                                                   }, 'Parse::RecDescent::Subrule' ),
1000                                                                                            bless( {
1001                                                                                                     'code' => '{ $return = $item{NUMBER} ; }',
1002                                                                                                     'hashname' => '__ACTION1__',
1003                                                                                                     'line' => 7,
1004                                                                                                     'lookahead' => 0
1005                                                                                                   }, 'Parse::RecDescent::Action' )
1006                                                                                          ],
1007                                                                               'line' => undef,
1008                                                                               'number' => 0,
1009                                                                               'patcount' => 0,
1010                                                                               'strcount' => 0,
1011                                                                               'uncommit' => undef
1012                                                                             }, 'Parse::RecDescent::Production' ),
1013                                                                      bless( {
1014                                                                               'actcount' => 1,
1015                                                                               'dircount' => 0,
1016                                                                               'error' => undef,
1017                                                                               'items' => [
1018                                                                                            bless( {
1019                                                                                                     'argcode' => undef,
1020                                                                                                     'implicit' => undef,
1021                                                                                                     'line' => 8,
1022                                                                                                     'lookahead' => 0,
1023                                                                                                     'matchrule' => 0,
1024                                                                                                     'subrule' => 'thread'
1025                                                                                                   }, 'Parse::RecDescent::Subrule' ),
1026                                                                                            bless( {
1027                                                                                                     'code' => '{ $return = $item{thread} ; }',
1028                                                                                                     'hashname' => '__ACTION1__',
1029                                                                                                     'line' => 8,
1030                                                                                                     'lookahead' => 0
1031                                                                                                   }, 'Parse::RecDescent::Action' )
1032                                                                                          ],
1033                                                                               'line' => 7,
1034                                                                               'number' => 1,
1035                                                                               'patcount' => 0,
1036                                                                               'strcount' => 0,
1037                                                                               'uncommit' => undef
1038                                                                             }, 'Parse::RecDescent::Production' )
1039                                                                    ],
1040                                                         'vars' => ''
1041                                                       }, 'Parse::RecDescent::Rule' )
1042                            },
1043                 'startcode' => ''
1044               }, 'Parse::RecDescent' );
1045}