Subversion Repositories sysadmin_scripts

Rev

Details | Last modification | View Log | RSS feed

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