- Timestamp:
- 10/21/04 16:55:26 (20 years ago)
- Location:
- trunk/lib/Text/FormBuilder
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/Text/FormBuilder/Parser.pm
r1 r10 569 569 { 570 570 571 Parse::RecDescent::_trace(q{Trying production: ['!list' list_name '\{' <leftop: option /,\\s*/ option> /,?/ '\}']},571 Parse::RecDescent::_trace(q{Trying production: ['!list' list_name static_list, or dynamic_list]}, 572 572 Parse::RecDescent::_tracefirst($_[1]), 573 573 q{list_def}, … … 637 637 } 638 638 639 Parse::RecDescent::_trace(q{Trying terminal: ['\{']}, 640 Parse::RecDescent::_tracefirst($text), 641 q{list_def}, 642 $tracelevel) 643 if defined $::RD_TRACE; 644 $lastsep = ""; 645 $expectation->is(q{'\{'})->at($text); 646 647 648 unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\{//) 649 { 650 651 $expectation->failed(); 652 Parse::RecDescent::_trace(qq{<<Didn't match terminal>>}, 653 Parse::RecDescent::_tracefirst($text)) 654 if defined $::RD_TRACE; 655 last; 656 } 657 Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} 658 . $& . q{])}, 659 Parse::RecDescent::_tracefirst($text)) 660 if defined $::RD_TRACE; 661 push @item, $item{__STRING2__}=$&; 662 663 664 Parse::RecDescent::_trace(q{Trying operator: [<leftop: option /,\\s*/ option>]}, 639 Parse::RecDescent::_trace(q{Trying subrule: [_alternation_1_of_production_1_of_rule_list_def]}, 665 640 Parse::RecDescent::_tracefirst($text), 666 641 q{list_def}, 667 642 $tracelevel) 668 643 if defined $::RD_TRACE; 669 $expectation->is(q{<leftop: option /,\\s*/ option>})->at($text);670 671 $_tok = undef;672 OPLOOP: while (1)673 {674 $repcount = 0;675 my @item;676 677 # MATCH LEFTARG678 679 Parse::RecDescent::_trace(q{Trying subrule: [option]},680 Parse::RecDescent::_tracefirst($text),681 q{list_def},682 $tracelevel)683 if defined $::RD_TRACE;684 644 if (1) { no strict qw{refs}; 685 $expectation->is(q{ option})->at($text);686 unless (defined ($_tok = Parse::RecDescent::Text::FormBuilder::Parser:: option($thisparser,$text,$repeating,$_noactions,sub { \@arg })))645 $expectation->is(q{static_list, or dynamic_list})->at($text); 646 unless (defined ($_tok = Parse::RecDescent::Text::FormBuilder::Parser::_alternation_1_of_production_1_of_rule_list_def($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) 687 647 { 688 648 689 Parse::RecDescent::_trace(q{<<Didn't match subrule: [ option]>>},649 Parse::RecDescent::_trace(q{<<Didn't match subrule: [_alternation_1_of_production_1_of_rule_list_def]>>}, 690 650 Parse::RecDescent::_tracefirst($text), 691 651 q{list_def}, … … 695 655 last; 696 656 } 697 Parse::RecDescent::_trace(q{>>Matched subrule: [ option]<< (return value: [}657 Parse::RecDescent::_trace(q{>>Matched subrule: [_alternation_1_of_production_1_of_rule_list_def]<< (return value: [} 698 658 . $_tok . q{]}, 699 659 … … 702 662 $tracelevel) 703 663 if defined $::RD_TRACE; 704 $item{q{ option}} = $_tok;664 $item{q{_alternation_1_of_production_1_of_rule_list_def}} = $_tok; 705 665 push @item, $_tok; 706 666 707 667 } 708 709 710 $repcount++;711 712 my $savetext = $text;713 my $backtrack;714 715 # MATCH (OP RIGHTARG)(s)716 while ($repcount < 100000000)717 {718 $backtrack = 0;719 720 Parse::RecDescent::_trace(q{Trying terminal: [/,\\s*/]}, Parse::RecDescent::_tracefirst($text),721 q{list_def},722 $tracelevel)723 if defined $::RD_TRACE;724 $lastsep = "";725 $expectation->is(q{/,\\s*/})->at($text);726 727 728 unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A(?:,\s*)//)729 {730 731 $expectation->failed();732 Parse::RecDescent::_trace(q{<<Didn't match terminal>>},733 Parse::RecDescent::_tracefirst($text))734 if defined $::RD_TRACE;735 736 last;737 }738 Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [}739 . $& . q{])},740 Parse::RecDescent::_tracefirst($text))741 if defined $::RD_TRACE;742 push @item, $item{__PATTERN1__}=$&;743 744 745 pop @item;746 if (defined $1) {push @item, $item{'option(s)'}=$1; $backtrack=1;}747 748 Parse::RecDescent::_trace(q{Trying subrule: [option]},749 Parse::RecDescent::_tracefirst($text),750 q{list_def},751 $tracelevel)752 if defined $::RD_TRACE;753 if (1) { no strict qw{refs};754 $expectation->is(q{option})->at($text);755 unless (defined ($_tok = Parse::RecDescent::Text::FormBuilder::Parser::option($thisparser,$text,$repeating,$_noactions,sub { \@arg })))756 {757 758 Parse::RecDescent::_trace(q{<<Didn't match subrule: [option]>>},759 Parse::RecDescent::_tracefirst($text),760 q{list_def},761 $tracelevel)762 if defined $::RD_TRACE;763 $expectation->failed();764 last;765 }766 Parse::RecDescent::_trace(q{>>Matched subrule: [option]<< (return value: [}767 . $_tok . q{]},768 769 Parse::RecDescent::_tracefirst($text),770 q{list_def},771 $tracelevel)772 if defined $::RD_TRACE;773 $item{q{option}} = $_tok;774 push @item, $_tok;775 776 }777 778 $savetext = $text;779 $repcount++;780 }781 $text = $savetext;782 pop @item if $backtrack;783 784 unless (@item) { undef $_tok; last }785 $_tok = [ @item ];786 last;787 }788 789 unless ($repcount>=1)790 {791 Parse::RecDescent::_trace(q{<<Didn't match operator: [<leftop: option /,\\s*/ option>]>>},792 Parse::RecDescent::_tracefirst($text),793 q{list_def},794 $tracelevel)795 if defined $::RD_TRACE;796 $expectation->failed();797 last;798 }799 Parse::RecDescent::_trace(q{>>Matched operator: [<leftop: option /,\\s*/ option>]<< (return value: [}800 . qq{@{$_tok||[]}} . q{]},801 Parse::RecDescent::_tracefirst($text),802 q{list_def},803 $tracelevel)804 if defined $::RD_TRACE;805 806 push @item, $item{'option(s)'}=$_tok||[];807 808 809 Parse::RecDescent::_trace(q{Trying terminal: [/,?/]}, Parse::RecDescent::_tracefirst($text),810 q{list_def},811 $tracelevel)812 if defined $::RD_TRACE;813 $lastsep = "";814 $expectation->is(q{/,?/})->at($text);815 816 817 unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A(?:,?)//)818 {819 820 $expectation->failed();821 Parse::RecDescent::_trace(q{<<Didn't match terminal>>},822 Parse::RecDescent::_tracefirst($text))823 if defined $::RD_TRACE;824 825 last;826 }827 Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [}828 . $& . q{])},829 Parse::RecDescent::_tracefirst($text))830 if defined $::RD_TRACE;831 push @item, $item{__PATTERN2__}=$&;832 833 834 Parse::RecDescent::_trace(q{Trying terminal: ['\}']},835 Parse::RecDescent::_tracefirst($text),836 q{list_def},837 $tracelevel)838 if defined $::RD_TRACE;839 $lastsep = "";840 $expectation->is(q{'\}'})->at($text);841 842 843 unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\}//)844 {845 846 $expectation->failed();847 Parse::RecDescent::_trace(qq{<<Didn't match terminal>>},848 Parse::RecDescent::_tracefirst($text))849 if defined $::RD_TRACE;850 last;851 }852 Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [}853 . $& . q{])},854 Parse::RecDescent::_tracefirst($text))855 if defined $::RD_TRACE;856 push @item, $item{__STRING3__}=$&;857 858 668 859 669 Parse::RecDescent::_trace(q{Trying action}, … … 880 690 881 691 882 Parse::RecDescent::_trace(q{>>Matched production: ['!list' list_name '\{' <leftop: option /,\\s*/ option> /,?/ '\}']<<},692 Parse::RecDescent::_trace(q{>>Matched production: ['!list' list_name static_list, or dynamic_list]<<}, 883 693 Parse::RecDescent::_tracefirst($text), 884 694 q{list_def}, … … 4626 4436 4627 4437 # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) 4628 sub Parse::RecDescent::Text::FormBuilder::Parser:: form_spec4438 sub Parse::RecDescent::Text::FormBuilder::Parser::_alternation_1_of_production_1_of_rule_list_def 4629 4439 { 4630 4440 my $thisparser = $_[0]; … … 4632 4442 local $tracelevel = ($tracelevel||0)+1; 4633 4443 $ERRORS = 0; 4634 my $thisrule = $thisparser->{"rules"}{" form_spec"};4635 4636 Parse::RecDescent::_trace(q{Trying rule: [ form_spec]},4444 my $thisrule = $thisparser->{"rules"}{"_alternation_1_of_production_1_of_rule_list_def"}; 4445 4446 Parse::RecDescent::_trace(q{Trying rule: [_alternation_1_of_production_1_of_rule_list_def]}, 4637 4447 Parse::RecDescent::_tracefirst($_[1]), 4638 q{ form_spec},4448 q{_alternation_1_of_production_1_of_rule_list_def}, 4639 4449 $tracelevel) 4640 4450 if defined $::RD_TRACE; … … 4668 4478 { 4669 4479 4670 Parse::RecDescent::_trace(q{Trying production: [ list_def, or line]},4480 Parse::RecDescent::_trace(q{Trying production: [static_list]}, 4671 4481 Parse::RecDescent::_tracefirst($_[1]), 4672 q{ form_spec},4482 q{_alternation_1_of_production_1_of_rule_list_def}, 4673 4483 $tracelevel) 4674 4484 if defined $::RD_TRACE; … … 4676 4486 $text = $_[1]; 4677 4487 my $_savetext; 4678 @item = (q{ form_spec});4679 %item = (__RULE__ => q{ form_spec});4488 @item = (q{_alternation_1_of_production_1_of_rule_list_def}); 4489 %item = (__RULE__ => q{_alternation_1_of_production_1_of_rule_list_def}); 4680 4490 my $repcount = 0; 4681 4491 4682 4492 4683 Parse::RecDescent::_trace(q{Trying repeated subrule: [list_def, or line]},4493 Parse::RecDescent::_trace(q{Trying subrule: [static_list]}, 4684 4494 Parse::RecDescent::_tracefirst($text), 4685 q{ form_spec},4495 q{_alternation_1_of_production_1_of_rule_list_def}, 4686 4496 $tracelevel) 4687 4497 if defined $::RD_TRACE; 4498 if (1) { no strict qw{refs}; 4688 4499 $expectation->is(q{})->at($text); 4689 4690 unless (defined ($_tok = $thisparser->_parserepeat($text, \&Parse::RecDescent::Text::FormBuilder::Parser::_alternation_1_of_production_1_of_rule_form_spec, 1, 100000000, $_noactions,$expectation,undef)))4691 {4692 Parse::RecDescent::_trace(q{<<Didn't match repeated subrule: [list_def, or line]>>},4500 unless (defined ($_tok = Parse::RecDescent::Text::FormBuilder::Parser::static_list($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) 4501 { 4502 4503 Parse::RecDescent::_trace(q{<<Didn't match subrule: [static_list]>>}, 4693 4504 Parse::RecDescent::_tracefirst($text), 4694 q{ form_spec},4505 q{_alternation_1_of_production_1_of_rule_list_def}, 4695 4506 $tracelevel) 4696 4507 if defined $::RD_TRACE; 4697 last; 4698 } 4699 Parse::RecDescent::_trace(q{>>Matched repeated subrule: [_alternation_1_of_production_1_of_rule_form_spec]<< (} 4700 . @$_tok . q{ times)}, 4508 $expectation->failed(); 4509 last; 4510 } 4511 Parse::RecDescent::_trace(q{>>Matched subrule: [static_list]<< (return value: [} 4512 . $_tok . q{]}, 4701 4513 4702 4514 Parse::RecDescent::_tracefirst($text), 4703 q{ form_spec},4704 $tracelevel) 4705 if defined $::RD_TRACE; 4706 $item{q{ _alternation_1_of_production_1_of_rule_form_spec(s)}} = $_tok;4515 q{_alternation_1_of_production_1_of_rule_list_def}, 4516 $tracelevel) 4517 if defined $::RD_TRACE; 4518 $item{q{static_list}} = $_tok; 4707 4519 push @item, $_tok; 4708 4520 4709 4710 4711 Parse::RecDescent::_trace(q{Trying action}, 4712 Parse::RecDescent::_tracefirst($text), 4713 q{form_spec}, 4714 $tracelevel) 4715 if defined $::RD_TRACE; 4716 4717 4718 $_tok = ($_noactions) ? 0 : do { 4719 $return = { 4720 title => $title, 4721 author => $author, 4722 lists => \%lists, 4723 patterns => \%patterns, 4724 fields => \@fields, 4725 } 4726 }; 4727 unless (defined $_tok) 4728 { 4729 Parse::RecDescent::_trace(q{<<Didn't match action>> (return value: [undef])}) 4730 if defined $::RD_TRACE; 4731 last; 4732 } 4733 Parse::RecDescent::_trace(q{>>Matched action<< (return value: [} 4734 . $_tok . q{])}, 4735 Parse::RecDescent::_tracefirst($text)) 4736 if defined $::RD_TRACE; 4521 } 4522 4523 4524 Parse::RecDescent::_trace(q{>>Matched production: [static_list]<<}, 4525 Parse::RecDescent::_tracefirst($text), 4526 q{_alternation_1_of_production_1_of_rule_list_def}, 4527 $tracelevel) 4528 if defined $::RD_TRACE; 4529 $_matched = 1; 4530 last; 4531 } 4532 4533 4534 while (!$_matched && !$commit) 4535 { 4536 4537 Parse::RecDescent::_trace(q{Trying production: [dynamic_list]}, 4538 Parse::RecDescent::_tracefirst($_[1]), 4539 q{_alternation_1_of_production_1_of_rule_list_def}, 4540 $tracelevel) 4541 if defined $::RD_TRACE; 4542 my $thisprod = $thisrule->{"prods"}[1]; 4543 $text = $_[1]; 4544 my $_savetext; 4545 @item = (q{_alternation_1_of_production_1_of_rule_list_def}); 4546 %item = (__RULE__ => q{_alternation_1_of_production_1_of_rule_list_def}); 4547 my $repcount = 0; 4548 4549 4550 Parse::RecDescent::_trace(q{Trying subrule: [dynamic_list]}, 4551 Parse::RecDescent::_tracefirst($text), 4552 q{_alternation_1_of_production_1_of_rule_list_def}, 4553 $tracelevel) 4554 if defined $::RD_TRACE; 4555 if (1) { no strict qw{refs}; 4556 $expectation->is(q{})->at($text); 4557 unless (defined ($_tok = Parse::RecDescent::Text::FormBuilder::Parser::dynamic_list($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) 4558 { 4559 4560 Parse::RecDescent::_trace(q{<<Didn't match subrule: [dynamic_list]>>}, 4561 Parse::RecDescent::_tracefirst($text), 4562 q{_alternation_1_of_production_1_of_rule_list_def}, 4563 $tracelevel) 4564 if defined $::RD_TRACE; 4565 $expectation->failed(); 4566 last; 4567 } 4568 Parse::RecDescent::_trace(q{>>Matched subrule: [dynamic_list]<< (return value: [} 4569 . $_tok . q{]}, 4570 4571 Parse::RecDescent::_tracefirst($text), 4572 q{_alternation_1_of_production_1_of_rule_list_def}, 4573 $tracelevel) 4574 if defined $::RD_TRACE; 4575 $item{q{dynamic_list}} = $_tok; 4737 4576 push @item, $_tok; 4738 $item{__ACTION1__}=$_tok;4739 4740 4741 4742 Parse::RecDescent::_trace(q{>>Matched production: [ list_def, or line]<<},4743 Parse::RecDescent::_tracefirst($text), 4744 q{ form_spec},4577 4578 } 4579 4580 4581 Parse::RecDescent::_trace(q{>>Matched production: [dynamic_list]<<}, 4582 Parse::RecDescent::_tracefirst($text), 4583 q{_alternation_1_of_production_1_of_rule_list_def}, 4745 4584 $tracelevel) 4746 4585 if defined $::RD_TRACE; … … 4757 4596 Parse::RecDescent::_trace(q{<<Didn't match rule>>}, 4758 4597 Parse::RecDescent::_tracefirst($_[1]), 4759 q{ form_spec},4598 q{_alternation_1_of_production_1_of_rule_list_def}, 4760 4599 $tracelevel) 4761 4600 if defined $::RD_TRACE; … … 4765 4604 { 4766 4605 Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", 4767 q{ form_spec},4606 q{_alternation_1_of_production_1_of_rule_list_def}, 4768 4607 $tracelevel) 4769 4608 if defined $::RD_TRACE; … … 4776 4615 Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . 4777 4616 $return . q{])}, "", 4778 q{ form_spec},4617 q{_alternation_1_of_production_1_of_rule_list_def}, 4779 4618 $tracelevel); 4780 4619 Parse::RecDescent::_trace(q{(consumed: [} . 4781 4620 Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, 4782 4621 Parse::RecDescent::_tracefirst($text), 4783 , q{ form_spec},4622 , q{_alternation_1_of_production_1_of_rule_list_def}, 4784 4623 $tracelevel) 4785 4624 } … … 4789 4628 4790 4629 # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) 4791 sub Parse::RecDescent::Text::FormBuilder::Parser:: pattern4630 sub Parse::RecDescent::Text::FormBuilder::Parser::form_spec 4792 4631 { 4793 4632 my $thisparser = $_[0]; … … 4795 4634 local $tracelevel = ($tracelevel||0)+1; 4796 4635 $ERRORS = 0; 4797 my $thisrule = $thisparser->{"rules"}{" pattern"};4798 4799 Parse::RecDescent::_trace(q{Trying rule: [ pattern]},4636 my $thisrule = $thisparser->{"rules"}{"form_spec"}; 4637 4638 Parse::RecDescent::_trace(q{Trying rule: [form_spec]}, 4800 4639 Parse::RecDescent::_tracefirst($_[1]), 4801 q{ pattern},4640 q{form_spec}, 4802 4641 $tracelevel) 4803 4642 if defined $::RD_TRACE; … … 4831 4670 { 4832 4671 4833 Parse::RecDescent::_trace(q{Trying production: [ /.*/]},4672 Parse::RecDescent::_trace(q{Trying production: [list_def, or line]}, 4834 4673 Parse::RecDescent::_tracefirst($_[1]), 4835 q{ pattern},4674 q{form_spec}, 4836 4675 $tracelevel) 4837 4676 if defined $::RD_TRACE; … … 4839 4678 $text = $_[1]; 4840 4679 my $_savetext; 4841 @item = (q{ pattern});4842 %item = (__RULE__ => q{ pattern});4680 @item = (q{form_spec}); 4681 %item = (__RULE__ => q{form_spec}); 4843 4682 my $repcount = 0; 4844 4683 4845 4684 4846 Parse::RecDescent::_trace(q{Trying terminal: [/.*/]}, Parse::RecDescent::_tracefirst($text),4847 q{pattern},4848 $tracelevel)4849 if defined $::RD_TRACE;4850 $lastsep = "";4685 Parse::RecDescent::_trace(q{Trying repeated subrule: [list_def, or line]}, 4686 Parse::RecDescent::_tracefirst($text), 4687 q{form_spec}, 4688 $tracelevel) 4689 if defined $::RD_TRACE; 4851 4690 $expectation->is(q{})->at($text); 4852 4691 4853 4854 unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A(?:.*)//) 4855 { 4856 4857 $expectation->failed(); 4858 Parse::RecDescent::_trace(q{<<Didn't match terminal>>}, 4859 Parse::RecDescent::_tracefirst($text)) 4860 if defined $::RD_TRACE; 4861 4862 last; 4863 } 4864 Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} 4865 . $& . q{])}, 4866 Parse::RecDescent::_tracefirst($text)) 4867 if defined $::RD_TRACE; 4868 push @item, $item{__PATTERN1__}=$&; 4869 4870 4871 4872 Parse::RecDescent::_trace(q{>>Matched production: [/.*/]<<}, 4873 Parse::RecDescent::_tracefirst($text), 4874 q{pattern}, 4692 unless (defined ($_tok = $thisparser->_parserepeat($text, \&Parse::RecDescent::Text::FormBuilder::Parser::_alternation_1_of_production_1_of_rule_form_spec, 1, 100000000, $_noactions,$expectation,undef))) 4693 { 4694 Parse::RecDescent::_trace(q{<<Didn't match repeated subrule: [list_def, or line]>>}, 4695 Parse::RecDescent::_tracefirst($text), 4696 q{form_spec}, 4697 $tracelevel) 4698 if defined $::RD_TRACE; 4699 last; 4700 } 4701 Parse::RecDescent::_trace(q{>>Matched repeated subrule: [_alternation_1_of_production_1_of_rule_form_spec]<< (} 4702 . @$_tok . q{ times)}, 4703 4704 Parse::RecDescent::_tracefirst($text), 4705 q{form_spec}, 4706 $tracelevel) 4707 if defined $::RD_TRACE; 4708 $item{q{_alternation_1_of_production_1_of_rule_form_spec(s)}} = $_tok; 4709 push @item, $_tok; 4710 4711 4712 4713 Parse::RecDescent::_trace(q{Trying action}, 4714 Parse::RecDescent::_tracefirst($text), 4715 q{form_spec}, 4716 $tracelevel) 4717 if defined $::RD_TRACE; 4718 4719 4720 $_tok = ($_noactions) ? 0 : do { 4721 $return = { 4722 title => $title, 4723 author => $author, 4724 lists => \%lists, 4725 patterns => \%patterns, 4726 fields => \@fields, 4727 } 4728 }; 4729 unless (defined $_tok) 4730 { 4731 Parse::RecDescent::_trace(q{<<Didn't match action>> (return value: [undef])}) 4732 if defined $::RD_TRACE; 4733 last; 4734 } 4735 Parse::RecDescent::_trace(q{>>Matched action<< (return value: [} 4736 . $_tok . q{])}, 4737 Parse::RecDescent::_tracefirst($text)) 4738 if defined $::RD_TRACE; 4739 push @item, $_tok; 4740 $item{__ACTION1__}=$_tok; 4741 4742 4743 4744 Parse::RecDescent::_trace(q{>>Matched production: [list_def, or line]<<}, 4745 Parse::RecDescent::_tracefirst($text), 4746 q{form_spec}, 4875 4747 $tracelevel) 4876 4748 if defined $::RD_TRACE; … … 4887 4759 Parse::RecDescent::_trace(q{<<Didn't match rule>>}, 4888 4760 Parse::RecDescent::_tracefirst($_[1]), 4889 q{ pattern},4761 q{form_spec}, 4890 4762 $tracelevel) 4891 4763 if defined $::RD_TRACE; … … 4895 4767 { 4896 4768 Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", 4897 q{ pattern},4769 q{form_spec}, 4898 4770 $tracelevel) 4899 4771 if defined $::RD_TRACE; … … 4906 4778 Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . 4907 4779 $return . q{])}, "", 4908 q{ pattern},4780 q{form_spec}, 4909 4781 $tracelevel); 4910 4782 Parse::RecDescent::_trace(q{(consumed: [} . 4911 4783 Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, 4912 4784 Parse::RecDescent::_tracefirst($text), 4913 , q{ pattern},4785 , q{form_spec}, 4914 4786 $tracelevel) 4915 4787 } … … 4919 4791 4920 4792 # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) 4921 sub Parse::RecDescent::Text::FormBuilder::Parser:: comment4793 sub Parse::RecDescent::Text::FormBuilder::Parser::pattern 4922 4794 { 4923 4795 my $thisparser = $_[0]; … … 4925 4797 local $tracelevel = ($tracelevel||0)+1; 4926 4798 $ERRORS = 0; 4927 my $thisrule = $thisparser->{"rules"}{" comment"};4928 4929 Parse::RecDescent::_trace(q{Trying rule: [ comment]},4799 my $thisrule = $thisparser->{"rules"}{"pattern"}; 4800 4801 Parse::RecDescent::_trace(q{Trying rule: [pattern]}, 4930 4802 Parse::RecDescent::_tracefirst($_[1]), 4931 q{ comment},4803 q{pattern}, 4932 4804 $tracelevel) 4933 4805 if defined $::RD_TRACE; … … 4961 4833 { 4962 4834 4963 Parse::RecDescent::_trace(q{Trying production: [ '#'/.*/]},4835 Parse::RecDescent::_trace(q{Trying production: [/.*/]}, 4964 4836 Parse::RecDescent::_tracefirst($_[1]), 4965 q{ comment},4837 q{pattern}, 4966 4838 $tracelevel) 4967 4839 if defined $::RD_TRACE; … … 4969 4841 $text = $_[1]; 4970 4842 my $_savetext; 4971 @item = (q{ comment});4972 %item = (__RULE__ => q{ comment});4843 @item = (q{pattern}); 4844 %item = (__RULE__ => q{pattern}); 4973 4845 my $repcount = 0; 4974 4846 4975 4847 4976 Parse::RecDescent::_trace(q{Trying terminal: ['#']}, 4977 Parse::RecDescent::_tracefirst($text), 4978 q{comment}, 4848 Parse::RecDescent::_trace(q{Trying terminal: [/.*/]}, Parse::RecDescent::_tracefirst($text), 4849 q{pattern}, 4979 4850 $tracelevel) 4980 4851 if defined $::RD_TRACE; 4981 4852 $lastsep = ""; 4982 4853 $expectation->is(q{})->at($text); 4983 4984 4985 unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\#//)4986 {4987 4988 $expectation->failed();4989 Parse::RecDescent::_trace(qq{<<Didn't match terminal>>},4990 Parse::RecDescent::_tracefirst($text))4991 if defined $::RD_TRACE;4992 last;4993 }4994 Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [}4995 . $& . q{])},4996 Parse::RecDescent::_tracefirst($text))4997 if defined $::RD_TRACE;4998 push @item, $item{__STRING1__}=$&;4999 5000 5001 Parse::RecDescent::_trace(q{Trying terminal: [/.*/]}, Parse::RecDescent::_tracefirst($text),5002 q{comment},5003 $tracelevel)5004 if defined $::RD_TRACE;5005 $lastsep = "";5006 $expectation->is(q{/.*/})->at($text);5007 4854 5008 4855 … … 5025 4872 5026 4873 5027 Parse::RecDescent::_trace(q{>>Matched production: [ '#'/.*/]<<},5028 Parse::RecDescent::_tracefirst($text), 5029 q{ comment},4874 Parse::RecDescent::_trace(q{>>Matched production: [/.*/]<<}, 4875 Parse::RecDescent::_tracefirst($text), 4876 q{pattern}, 5030 4877 $tracelevel) 5031 4878 if defined $::RD_TRACE; … … 5042 4889 Parse::RecDescent::_trace(q{<<Didn't match rule>>}, 5043 4890 Parse::RecDescent::_tracefirst($_[1]), 5044 q{ comment},4891 q{pattern}, 5045 4892 $tracelevel) 5046 4893 if defined $::RD_TRACE; … … 5050 4897 { 5051 4898 Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", 5052 q{ comment},4899 q{pattern}, 5053 4900 $tracelevel) 5054 4901 if defined $::RD_TRACE; … … 5061 4908 Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . 5062 4909 $return . q{])}, "", 5063 q{ comment},4910 q{pattern}, 5064 4911 $tracelevel); 5065 4912 Parse::RecDescent::_trace(q{(consumed: [} . 5066 4913 Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, 5067 4914 Parse::RecDescent::_tracefirst($text), 5068 , q{ comment},4915 , q{pattern}, 5069 4916 $tracelevel) 5070 4917 } … … 5074 4921 5075 4922 # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) 5076 sub Parse::RecDescent::Text::FormBuilder::Parser:: hint4923 sub Parse::RecDescent::Text::FormBuilder::Parser::comment 5077 4924 { 5078 4925 my $thisparser = $_[0]; … … 5080 4927 local $tracelevel = ($tracelevel||0)+1; 5081 4928 $ERRORS = 0; 5082 my $thisrule = $thisparser->{"rules"}{" hint"};5083 5084 Parse::RecDescent::_trace(q{Trying rule: [ hint]},4929 my $thisrule = $thisparser->{"rules"}{"comment"}; 4930 4931 Parse::RecDescent::_trace(q{Trying rule: [comment]}, 5085 4932 Parse::RecDescent::_tracefirst($_[1]), 5086 q{ hint},4933 q{comment}, 5087 4934 $tracelevel) 5088 4935 if defined $::RD_TRACE; … … 5116 4963 { 5117 4964 5118 Parse::RecDescent::_trace(q{Trying production: [' [' /[^\\]]+/ ']']},4965 Parse::RecDescent::_trace(q{Trying production: ['#' /.*/]}, 5119 4966 Parse::RecDescent::_tracefirst($_[1]), 5120 q{ hint},4967 q{comment}, 5121 4968 $tracelevel) 5122 4969 if defined $::RD_TRACE; … … 5124 4971 $text = $_[1]; 5125 4972 my $_savetext; 5126 @item = (q{ hint});5127 %item = (__RULE__ => q{ hint});4973 @item = (q{comment}); 4974 %item = (__RULE__ => q{comment}); 5128 4975 my $repcount = 0; 5129 4976 5130 4977 5131 Parse::RecDescent::_trace(q{Trying terminal: [' [']},5132 Parse::RecDescent::_tracefirst($text), 5133 q{ hint},4978 Parse::RecDescent::_trace(q{Trying terminal: ['#']}, 4979 Parse::RecDescent::_tracefirst($text), 4980 q{comment}, 5134 4981 $tracelevel) 5135 4982 if defined $::RD_TRACE; … … 5138 4985 5139 4986 5140 unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\ [//)4987 unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\#//) 5141 4988 { 5142 4989 … … 5154 5001 5155 5002 5156 Parse::RecDescent::_trace(q{Trying terminal: [/ [^\\]]+/]}, Parse::RecDescent::_tracefirst($text),5157 q{ hint},5003 Parse::RecDescent::_trace(q{Trying terminal: [/.*/]}, Parse::RecDescent::_tracefirst($text), 5004 q{comment}, 5158 5005 $tracelevel) 5159 5006 if defined $::RD_TRACE; 5160 5007 $lastsep = ""; 5161 $expectation->is(q{/ [^\\]]+/})->at($text);5162 5163 5164 unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A(?: [^\]]+)//)5008 $expectation->is(q{/.*/})->at($text); 5009 5010 5011 unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A(?:.*)//) 5165 5012 { 5166 5013 … … 5179 5026 5180 5027 5181 Parse::RecDescent::_trace(q{Trying terminal: [']']}, 5182 Parse::RecDescent::_tracefirst($text), 5183 q{hint}, 5184 $tracelevel) 5185 if defined $::RD_TRACE; 5186 $lastsep = ""; 5187 $expectation->is(q{']'})->at($text); 5188 5189 5190 unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\]//) 5191 { 5192 5193 $expectation->failed(); 5194 Parse::RecDescent::_trace(qq{<<Didn't match terminal>>}, 5195 Parse::RecDescent::_tracefirst($text)) 5196 if defined $::RD_TRACE; 5197 last; 5198 } 5199 Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} 5200 . $& . q{])}, 5201 Parse::RecDescent::_tracefirst($text)) 5202 if defined $::RD_TRACE; 5203 push @item, $item{__STRING2__}=$&; 5204 5205 5206 Parse::RecDescent::_trace(q{Trying action}, 5207 Parse::RecDescent::_tracefirst($text), 5208 q{hint}, 5209 $tracelevel) 5210 if defined $::RD_TRACE; 5211 5212 5213 $_tok = ($_noactions) ? 0 : do { $item[2] }; 5214 unless (defined $_tok) 5215 { 5216 Parse::RecDescent::_trace(q{<<Didn't match action>> (return value: [undef])}) 5217 if defined $::RD_TRACE; 5218 last; 5219 } 5220 Parse::RecDescent::_trace(q{>>Matched action<< (return value: [} 5221 . $_tok . q{])}, 5222 Parse::RecDescent::_tracefirst($text)) 5223 if defined $::RD_TRACE; 5224 push @item, $_tok; 5225 $item{__ACTION1__}=$_tok; 5226 5227 5228 5229 Parse::RecDescent::_trace(q{>>Matched production: ['[' /[^\\]]+/ ']']<<}, 5230 Parse::RecDescent::_tracefirst($text), 5231 q{hint}, 5028 5029 Parse::RecDescent::_trace(q{>>Matched production: ['#' /.*/]<<}, 5030 Parse::RecDescent::_tracefirst($text), 5031 q{comment}, 5232 5032 $tracelevel) 5233 5033 if defined $::RD_TRACE; … … 5244 5044 Parse::RecDescent::_trace(q{<<Didn't match rule>>}, 5245 5045 Parse::RecDescent::_tracefirst($_[1]), 5246 q{ hint},5046 q{comment}, 5247 5047 $tracelevel) 5248 5048 if defined $::RD_TRACE; … … 5252 5052 { 5253 5053 Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", 5254 q{ hint},5054 q{comment}, 5255 5055 $tracelevel) 5256 5056 if defined $::RD_TRACE; … … 5263 5063 Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . 5264 5064 $return . q{])}, "", 5265 q{ hint},5065 q{comment}, 5266 5066 $tracelevel); 5267 5067 Parse::RecDescent::_trace(q{(consumed: [} . 5268 5068 Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, 5269 5069 Parse::RecDescent::_tracefirst($text), 5270 , q{ hint},5070 , q{comment}, 5271 5071 $tracelevel) 5272 5072 } … … 5276 5076 5277 5077 # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) 5278 sub Parse::RecDescent::Text::FormBuilder::Parser:: type5078 sub Parse::RecDescent::Text::FormBuilder::Parser::hint 5279 5079 { 5280 5080 my $thisparser = $_[0]; … … 5282 5082 local $tracelevel = ($tracelevel||0)+1; 5283 5083 $ERRORS = 0; 5284 my $thisrule = $thisparser->{"rules"}{" type"};5285 5286 Parse::RecDescent::_trace(q{Trying rule: [ type]},5084 my $thisrule = $thisparser->{"rules"}{"hint"}; 5085 5086 Parse::RecDescent::_trace(q{Trying rule: [hint]}, 5287 5087 Parse::RecDescent::_tracefirst($_[1]), 5288 q{ type},5088 q{hint}, 5289 5089 $tracelevel) 5290 5090 if defined $::RD_TRACE; … … 5318 5118 { 5319 5119 5320 Parse::RecDescent::_trace(q{Trying production: [' :' /textarea|text|password|file|checkbox|radio|select|hidden|static/]},5120 Parse::RecDescent::_trace(q{Trying production: ['[' /[^\\]]+/ ']']}, 5321 5121 Parse::RecDescent::_tracefirst($_[1]), 5322 q{ type},5122 q{hint}, 5323 5123 $tracelevel) 5324 5124 if defined $::RD_TRACE; … … 5326 5126 $text = $_[1]; 5327 5127 my $_savetext; 5328 @item = (q{ type});5329 %item = (__RULE__ => q{ type});5128 @item = (q{hint}); 5129 %item = (__RULE__ => q{hint}); 5330 5130 my $repcount = 0; 5331 5131 5332 5132 5333 Parse::RecDescent::_trace(q{Trying terminal: [' :']},5334 Parse::RecDescent::_tracefirst($text), 5335 q{ type},5133 Parse::RecDescent::_trace(q{Trying terminal: ['[']}, 5134 Parse::RecDescent::_tracefirst($text), 5135 q{hint}, 5336 5136 $tracelevel) 5337 5137 if defined $::RD_TRACE; … … 5340 5140 5341 5141 5342 unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\ ://)5142 unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\[//) 5343 5143 { 5344 5144 … … 5356 5156 5357 5157 5358 Parse::RecDescent::_trace(q{Trying terminal: [/ textarea|text|password|file|checkbox|radio|select|hidden|static/]}, Parse::RecDescent::_tracefirst($text),5359 q{ type},5158 Parse::RecDescent::_trace(q{Trying terminal: [/[^\\]]+/]}, Parse::RecDescent::_tracefirst($text), 5159 q{hint}, 5360 5160 $tracelevel) 5361 5161 if defined $::RD_TRACE; 5362 5162 $lastsep = ""; 5363 $expectation->is(q{/ textarea|text|password|file|checkbox|radio|select|hidden|static/})->at($text);5364 5365 5366 unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A(?: textarea|text|password|file|checkbox|radio|select|hidden|static)//)5163 $expectation->is(q{/[^\\]]+/})->at($text); 5164 5165 5166 unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A(?:[^\]]+)//) 5367 5167 { 5368 5168 … … 5381 5181 5382 5182 5383 5384 Parse::RecDescent::_trace(q{>>Matched production: [':' /textarea|text|password|file|checkbox|radio|select|hidden|static/]<<}, 5385 Parse::RecDescent::_tracefirst($text), 5386 q{type}, 5183 Parse::RecDescent::_trace(q{Trying terminal: [']']}, 5184 Parse::RecDescent::_tracefirst($text), 5185 q{hint}, 5186 $tracelevel) 5187 if defined $::RD_TRACE; 5188 $lastsep = ""; 5189 $expectation->is(q{']'})->at($text); 5190 5191 5192 unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\]//) 5193 { 5194 5195 $expectation->failed(); 5196 Parse::RecDescent::_trace(qq{<<Didn't match terminal>>}, 5197 Parse::RecDescent::_tracefirst($text)) 5198 if defined $::RD_TRACE; 5199 last; 5200 } 5201 Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} 5202 . $& . q{])}, 5203 Parse::RecDescent::_tracefirst($text)) 5204 if defined $::RD_TRACE; 5205 push @item, $item{__STRING2__}=$&; 5206 5207 5208 Parse::RecDescent::_trace(q{Trying action}, 5209 Parse::RecDescent::_tracefirst($text), 5210 q{hint}, 5211 $tracelevel) 5212 if defined $::RD_TRACE; 5213 5214 5215 $_tok = ($_noactions) ? 0 : do { $item[2] }; 5216 unless (defined $_tok) 5217 { 5218 Parse::RecDescent::_trace(q{<<Didn't match action>> (return value: [undef])}) 5219 if defined $::RD_TRACE; 5220 last; 5221 } 5222 Parse::RecDescent::_trace(q{>>Matched action<< (return value: [} 5223 . $_tok . q{])}, 5224 Parse::RecDescent::_tracefirst($text)) 5225 if defined $::RD_TRACE; 5226 push @item, $_tok; 5227 $item{__ACTION1__}=$_tok; 5228 5229 5230 5231 Parse::RecDescent::_trace(q{>>Matched production: ['[' /[^\\]]+/ ']']<<}, 5232 Parse::RecDescent::_tracefirst($text), 5233 q{hint}, 5387 5234 $tracelevel) 5388 5235 if defined $::RD_TRACE; … … 5399 5246 Parse::RecDescent::_trace(q{<<Didn't match rule>>}, 5400 5247 Parse::RecDescent::_tracefirst($_[1]), 5401 q{ type},5248 q{hint}, 5402 5249 $tracelevel) 5403 5250 if defined $::RD_TRACE; … … 5407 5254 { 5408 5255 Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", 5409 q{ type},5256 q{hint}, 5410 5257 $tracelevel) 5411 5258 if defined $::RD_TRACE; … … 5418 5265 Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . 5419 5266 $return . q{])}, "", 5420 q{ type},5267 q{hint}, 5421 5268 $tracelevel); 5422 5269 Parse::RecDescent::_trace(q{(consumed: [} . 5423 5270 Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, 5424 5271 Parse::RecDescent::_tracefirst($text), 5425 , q{ type},5272 , q{hint}, 5426 5273 $tracelevel) 5427 5274 } … … 5431 5278 5432 5279 # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) 5433 sub Parse::RecDescent::Text::FormBuilder::Parser::t itle5280 sub Parse::RecDescent::Text::FormBuilder::Parser::type 5434 5281 { 5435 5282 my $thisparser = $_[0]; … … 5437 5284 local $tracelevel = ($tracelevel||0)+1; 5438 5285 $ERRORS = 0; 5439 my $thisrule = $thisparser->{"rules"}{"t itle"};5440 5441 Parse::RecDescent::_trace(q{Trying rule: [t itle]},5286 my $thisrule = $thisparser->{"rules"}{"type"}; 5287 5288 Parse::RecDescent::_trace(q{Trying rule: [type]}, 5442 5289 Parse::RecDescent::_tracefirst($_[1]), 5443 q{t itle},5290 q{type}, 5444 5291 $tracelevel) 5445 5292 if defined $::RD_TRACE; … … 5473 5320 { 5474 5321 5475 Parse::RecDescent::_trace(q{Trying production: [' !title' /.*/]},5322 Parse::RecDescent::_trace(q{Trying production: [':' /textarea|text|password|file|checkbox|radio|select|hidden|static/]}, 5476 5323 Parse::RecDescent::_tracefirst($_[1]), 5477 q{t itle},5324 q{type}, 5478 5325 $tracelevel) 5479 5326 if defined $::RD_TRACE; … … 5481 5328 $text = $_[1]; 5482 5329 my $_savetext; 5483 @item = (q{t itle});5484 %item = (__RULE__ => q{t itle});5330 @item = (q{type}); 5331 %item = (__RULE__ => q{type}); 5485 5332 my $repcount = 0; 5486 5333 5487 5334 5488 Parse::RecDescent::_trace(q{Trying terminal: [' !title']},5489 Parse::RecDescent::_tracefirst($text), 5490 q{t itle},5335 Parse::RecDescent::_trace(q{Trying terminal: [':']}, 5336 Parse::RecDescent::_tracefirst($text), 5337 q{type}, 5491 5338 $tracelevel) 5492 5339 if defined $::RD_TRACE; … … 5495 5342 5496 5343 5497 unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\ !title//)5344 unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\://) 5498 5345 { 5499 5346 … … 5511 5358 5512 5359 5513 Parse::RecDescent::_trace(q{Trying terminal: [/ .*/]}, Parse::RecDescent::_tracefirst($text),5514 q{t itle},5360 Parse::RecDescent::_trace(q{Trying terminal: [/textarea|text|password|file|checkbox|radio|select|hidden|static/]}, Parse::RecDescent::_tracefirst($text), 5361 q{type}, 5515 5362 $tracelevel) 5516 5363 if defined $::RD_TRACE; 5517 5364 $lastsep = ""; 5518 $expectation->is(q{/ .*/})->at($text);5519 5520 5521 unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A(?: .*)//)5365 $expectation->is(q{/textarea|text|password|file|checkbox|radio|select|hidden|static/})->at($text); 5366 5367 5368 unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A(?:textarea|text|password|file|checkbox|radio|select|hidden|static)//) 5522 5369 { 5523 5370 … … 5536 5383 5537 5384 5538 Parse::RecDescent::_trace(q{Trying action}, 5539 Parse::RecDescent::_tracefirst($text), 5540 q{title}, 5541 $tracelevel) 5542 if defined $::RD_TRACE; 5543 5544 5545 $_tok = ($_noactions) ? 0 : do { warn "[Text::Formbuilder] Title redefined at input text line $thisline\n" if defined $title; 5546 $title = $item[2] }; 5547 unless (defined $_tok) 5548 { 5549 Parse::RecDescent::_trace(q{<<Didn't match action>> (return value: [undef])}) 5550 if defined $::RD_TRACE; 5551 last; 5552 } 5553 Parse::RecDescent::_trace(q{>>Matched action<< (return value: [} 5554 . $_tok . q{])}, 5555 Parse::RecDescent::_tracefirst($text)) 5556 if defined $::RD_TRACE; 5557 push @item, $_tok; 5558 $item{__ACTION1__}=$_tok; 5559 5560 5561 5562 Parse::RecDescent::_trace(q{>>Matched production: ['!title' /.*/]<<}, 5563 Parse::RecDescent::_tracefirst($text), 5564 q{title}, 5385 5386 Parse::RecDescent::_trace(q{>>Matched production: [':' /textarea|text|password|file|checkbox|radio|select|hidden|static/]<<}, 5387 Parse::RecDescent::_tracefirst($text), 5388 q{type}, 5565 5389 $tracelevel) 5566 5390 if defined $::RD_TRACE; … … 5577 5401 Parse::RecDescent::_trace(q{<<Didn't match rule>>}, 5578 5402 Parse::RecDescent::_tracefirst($_[1]), 5579 q{t itle},5403 q{type}, 5580 5404 $tracelevel) 5581 5405 if defined $::RD_TRACE; … … 5585 5409 { 5586 5410 Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", 5587 q{t itle},5411 q{type}, 5588 5412 $tracelevel) 5589 5413 if defined $::RD_TRACE; … … 5596 5420 Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . 5597 5421 $return . q{])}, "", 5598 q{t itle},5422 q{type}, 5599 5423 $tracelevel); 5600 5424 Parse::RecDescent::_trace(q{(consumed: [} . 5601 5425 Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, 5602 5426 Parse::RecDescent::_tracefirst($text), 5603 , q{t itle},5427 , q{type}, 5604 5428 $tracelevel) 5605 5429 } … … 5764 5588 5765 5589 # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) 5766 sub Parse::RecDescent::Text::FormBuilder::Parser:: pattern_def5590 sub Parse::RecDescent::Text::FormBuilder::Parser::title 5767 5591 { 5768 5592 my $thisparser = $_[0]; … … 5770 5594 local $tracelevel = ($tracelevel||0)+1; 5771 5595 $ERRORS = 0; 5772 my $thisrule = $thisparser->{"rules"}{" pattern_def"};5773 5774 Parse::RecDescent::_trace(q{Trying rule: [ pattern_def]},5596 my $thisrule = $thisparser->{"rules"}{"title"}; 5597 5598 Parse::RecDescent::_trace(q{Trying rule: [title]}, 5775 5599 Parse::RecDescent::_tracefirst($_[1]), 5776 q{ pattern_def},5600 q{title}, 5777 5601 $tracelevel) 5778 5602 if defined $::RD_TRACE; … … 5806 5630 { 5807 5631 5632 Parse::RecDescent::_trace(q{Trying production: ['!title' /.*/]}, 5633 Parse::RecDescent::_tracefirst($_[1]), 5634 q{title}, 5635 $tracelevel) 5636 if defined $::RD_TRACE; 5637 my $thisprod = $thisrule->{"prods"}[0]; 5638 $text = $_[1]; 5639 my $_savetext; 5640 @item = (q{title}); 5641 %item = (__RULE__ => q{title}); 5642 my $repcount = 0; 5643 5644 5645 Parse::RecDescent::_trace(q{Trying terminal: ['!title']}, 5646 Parse::RecDescent::_tracefirst($text), 5647 q{title}, 5648 $tracelevel) 5649 if defined $::RD_TRACE; 5650 $lastsep = ""; 5651 $expectation->is(q{})->at($text); 5652 5653 5654 unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\!title//) 5655 { 5656 5657 $expectation->failed(); 5658 Parse::RecDescent::_trace(qq{<<Didn't match terminal>>}, 5659 Parse::RecDescent::_tracefirst($text)) 5660 if defined $::RD_TRACE; 5661 last; 5662 } 5663 Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} 5664 . $& . q{])}, 5665 Parse::RecDescent::_tracefirst($text)) 5666 if defined $::RD_TRACE; 5667 push @item, $item{__STRING1__}=$&; 5668 5669 5670 Parse::RecDescent::_trace(q{Trying terminal: [/.*/]}, Parse::RecDescent::_tracefirst($text), 5671 q{title}, 5672 $tracelevel) 5673 if defined $::RD_TRACE; 5674 $lastsep = ""; 5675 $expectation->is(q{/.*/})->at($text); 5676 5677 5678 unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A(?:.*)//) 5679 { 5680 5681 $expectation->failed(); 5682 Parse::RecDescent::_trace(q{<<Didn't match terminal>>}, 5683 Parse::RecDescent::_tracefirst($text)) 5684 if defined $::RD_TRACE; 5685 5686 last; 5687 } 5688 Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} 5689 . $& . q{])}, 5690 Parse::RecDescent::_tracefirst($text)) 5691 if defined $::RD_TRACE; 5692 push @item, $item{__PATTERN1__}=$&; 5693 5694 5695 Parse::RecDescent::_trace(q{Trying action}, 5696 Parse::RecDescent::_tracefirst($text), 5697 q{title}, 5698 $tracelevel) 5699 if defined $::RD_TRACE; 5700 5701 5702 $_tok = ($_noactions) ? 0 : do { warn "[Text::Formbuilder] Title redefined at input text line $thisline\n" if defined $title; 5703 $title = $item[2] }; 5704 unless (defined $_tok) 5705 { 5706 Parse::RecDescent::_trace(q{<<Didn't match action>> (return value: [undef])}) 5707 if defined $::RD_TRACE; 5708 last; 5709 } 5710 Parse::RecDescent::_trace(q{>>Matched action<< (return value: [} 5711 . $_tok . q{])}, 5712 Parse::RecDescent::_tracefirst($text)) 5713 if defined $::RD_TRACE; 5714 push @item, $_tok; 5715 $item{__ACTION1__}=$_tok; 5716 5717 5718 5719 Parse::RecDescent::_trace(q{>>Matched production: ['!title' /.*/]<<}, 5720 Parse::RecDescent::_tracefirst($text), 5721 q{title}, 5722 $tracelevel) 5723 if defined $::RD_TRACE; 5724 $_matched = 1; 5725 last; 5726 } 5727 5728 5729 unless ( $_matched || defined($return) || defined($score) ) 5730 { 5731 5732 5733 $_[1] = $text; # NOT SURE THIS IS NEEDED 5734 Parse::RecDescent::_trace(q{<<Didn't match rule>>}, 5735 Parse::RecDescent::_tracefirst($_[1]), 5736 q{title}, 5737 $tracelevel) 5738 if defined $::RD_TRACE; 5739 return undef; 5740 } 5741 if (!defined($return) && defined($score)) 5742 { 5743 Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", 5744 q{title}, 5745 $tracelevel) 5746 if defined $::RD_TRACE; 5747 $return = $score_return; 5748 } 5749 splice @{$thisparser->{errors}}, $err_at; 5750 $return = $item[$#item] unless defined $return; 5751 if (defined $::RD_TRACE) 5752 { 5753 Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . 5754 $return . q{])}, "", 5755 q{title}, 5756 $tracelevel); 5757 Parse::RecDescent::_trace(q{(consumed: [} . 5758 Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, 5759 Parse::RecDescent::_tracefirst($text), 5760 , q{title}, 5761 $tracelevel) 5762 } 5763 $_[1] = $text; 5764 return $return; 5765 } 5766 5767 # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) 5768 sub Parse::RecDescent::Text::FormBuilder::Parser::pattern_def 5769 { 5770 my $thisparser = $_[0]; 5771 use vars q{$tracelevel}; 5772 local $tracelevel = ($tracelevel||0)+1; 5773 $ERRORS = 0; 5774 my $thisrule = $thisparser->{"rules"}{"pattern_def"}; 5775 5776 Parse::RecDescent::_trace(q{Trying rule: [pattern_def]}, 5777 Parse::RecDescent::_tracefirst($_[1]), 5778 q{pattern_def}, 5779 $tracelevel) 5780 if defined $::RD_TRACE; 5781 5782 5783 my $err_at = @{$thisparser->{errors}}; 5784 5785 my $score; 5786 my $score_return; 5787 my $_tok; 5788 my $return = undef; 5789 my $_matched=0; 5790 my $commit=0; 5791 my @item = (); 5792 my %item = (); 5793 my $repeating = defined($_[2]) && $_[2]; 5794 my $_noactions = defined($_[3]) && $_[3]; 5795 my @arg = defined $_[4] ? @{ &{$_[4]} } : (); 5796 my %arg = ($#arg & 01) ? @arg : (@arg, undef); 5797 my $text; 5798 my $lastsep=""; 5799 my $expectation = new Parse::RecDescent::Expectation($thisrule->expected()); 5800 $expectation->at($_[1]); 5801 5802 my $thisline; 5803 tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; 5804 5805 5806 5807 while (!$_matched && !$commit) 5808 { 5809 5808 5810 Parse::RecDescent::_trace(q{Trying production: ['!pattern' pattern_name pattern]}, 5809 5811 Parse::RecDescent::_tracefirst($_[1]), … … 5969 5971 Parse::RecDescent::_tracefirst($text), 5970 5972 , q{pattern_def}, 5973 $tracelevel) 5974 } 5975 $_[1] = $text; 5976 return $return; 5977 } 5978 5979 # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) 5980 sub Parse::RecDescent::Text::FormBuilder::Parser::dynamic_list 5981 { 5982 my $thisparser = $_[0]; 5983 use vars q{$tracelevel}; 5984 local $tracelevel = ($tracelevel||0)+1; 5985 $ERRORS = 0; 5986 my $thisrule = $thisparser->{"rules"}{"dynamic_list"}; 5987 5988 Parse::RecDescent::_trace(q{Trying rule: [dynamic_list]}, 5989 Parse::RecDescent::_tracefirst($_[1]), 5990 q{dynamic_list}, 5991 $tracelevel) 5992 if defined $::RD_TRACE; 5993 5994 5995 my $err_at = @{$thisparser->{errors}}; 5996 5997 my $score; 5998 my $score_return; 5999 my $_tok; 6000 my $return = undef; 6001 my $_matched=0; 6002 my $commit=0; 6003 my @item = (); 6004 my %item = (); 6005 my $repeating = defined($_[2]) && $_[2]; 6006 my $_noactions = defined($_[3]) && $_[3]; 6007 my @arg = defined $_[4] ? @{ &{$_[4]} } : (); 6008 my %arg = ($#arg & 01) ? @arg : (@arg, undef); 6009 my $text; 6010 my $lastsep=""; 6011 my $expectation = new Parse::RecDescent::Expectation($thisrule->expected()); 6012 $expectation->at($_[1]); 6013 6014 my $thisline; 6015 tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; 6016 6017 6018 6019 while (!$_matched && !$commit) 6020 { 6021 local $skip = defined($skip) ? $skip : $Parse::RecDescent::skip; 6022 Parse::RecDescent::_trace(q{Trying production: ['&' <perl_codeblock>]}, 6023 Parse::RecDescent::_tracefirst($_[1]), 6024 q{dynamic_list}, 6025 $tracelevel) 6026 if defined $::RD_TRACE; 6027 my $thisprod = $thisrule->{"prods"}[0]; 6028 $text = $_[1]; 6029 my $_savetext; 6030 @item = (q{dynamic_list}); 6031 %item = (__RULE__ => q{dynamic_list}); 6032 my $repcount = 0; 6033 6034 6035 Parse::RecDescent::_trace(q{Trying terminal: ['&']}, 6036 Parse::RecDescent::_tracefirst($text), 6037 q{dynamic_list}, 6038 $tracelevel) 6039 if defined $::RD_TRACE; 6040 $lastsep = ""; 6041 $expectation->is(q{})->at($text); 6042 6043 6044 unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\&//) 6045 { 6046 6047 $expectation->failed(); 6048 Parse::RecDescent::_trace(qq{<<Didn't match terminal>>}, 6049 Parse::RecDescent::_tracefirst($text)) 6050 if defined $::RD_TRACE; 6051 last; 6052 } 6053 Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} 6054 . $& . q{])}, 6055 Parse::RecDescent::_tracefirst($text)) 6056 if defined $::RD_TRACE; 6057 push @item, $item{__STRING1__}=$&; 6058 6059 6060 6061 6062 Parse::RecDescent::_trace(q{Trying directive: [<perl_codeblock>]}, 6063 Parse::RecDescent::_tracefirst($text), 6064 q{dynamic_list}, 6065 $tracelevel) 6066 if defined $::RD_TRACE; 6067 $_tok = do { Text::Balanced::extract_codeblock($text,undef,$skip,'{}'); 6068 }; 6069 if (defined($_tok)) 6070 { 6071 Parse::RecDescent::_trace(q{>>Matched directive<< (return value: [} 6072 . $_tok . q{])}, 6073 Parse::RecDescent::_tracefirst($text)) 6074 if defined $::RD_TRACE; 6075 } 6076 else 6077 { 6078 Parse::RecDescent::_trace(q{<<Didn't match directive>>}, 6079 Parse::RecDescent::_tracefirst($text)) 6080 if defined $::RD_TRACE; 6081 } 6082 6083 last unless defined $_tok; 6084 push @item, $item{__DIRECTIVE1__}=$_tok; 6085 6086 6087 Parse::RecDescent::_trace(q{Trying action}, 6088 Parse::RecDescent::_tracefirst($text), 6089 q{dynamic_list}, 6090 $tracelevel) 6091 if defined $::RD_TRACE; 6092 6093 6094 $_tok = ($_noactions) ? 0 : do { 6095 my @results = (eval $item[2]); 6096 if (ref $results[0] eq 'HASH') { 6097 @options = @results; 6098 } else { 6099 @options = map { { $_ => $_ } } @results; 6100 } 6101 }; 6102 unless (defined $_tok) 6103 { 6104 Parse::RecDescent::_trace(q{<<Didn't match action>> (return value: [undef])}) 6105 if defined $::RD_TRACE; 6106 last; 6107 } 6108 Parse::RecDescent::_trace(q{>>Matched action<< (return value: [} 6109 . $_tok . q{])}, 6110 Parse::RecDescent::_tracefirst($text)) 6111 if defined $::RD_TRACE; 6112 push @item, $_tok; 6113 $item{__ACTION1__}=$_tok; 6114 6115 6116 6117 Parse::RecDescent::_trace(q{>>Matched production: ['&' <perl_codeblock>]<<}, 6118 Parse::RecDescent::_tracefirst($text), 6119 q{dynamic_list}, 6120 $tracelevel) 6121 if defined $::RD_TRACE; 6122 $_matched = 1; 6123 last; 6124 } 6125 6126 6127 unless ( $_matched || defined($return) || defined($score) ) 6128 { 6129 6130 6131 $_[1] = $text; # NOT SURE THIS IS NEEDED 6132 Parse::RecDescent::_trace(q{<<Didn't match rule>>}, 6133 Parse::RecDescent::_tracefirst($_[1]), 6134 q{dynamic_list}, 6135 $tracelevel) 6136 if defined $::RD_TRACE; 6137 return undef; 6138 } 6139 if (!defined($return) && defined($score)) 6140 { 6141 Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", 6142 q{dynamic_list}, 6143 $tracelevel) 6144 if defined $::RD_TRACE; 6145 $return = $score_return; 6146 } 6147 splice @{$thisparser->{errors}}, $err_at; 6148 $return = $item[$#item] unless defined $return; 6149 if (defined $::RD_TRACE) 6150 { 6151 Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . 6152 $return . q{])}, "", 6153 q{dynamic_list}, 6154 $tracelevel); 6155 Parse::RecDescent::_trace(q{(consumed: [} . 6156 Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, 6157 Parse::RecDescent::_tracefirst($text), 6158 , q{dynamic_list}, 6159 $tracelevel) 6160 } 6161 $_[1] = $text; 6162 return $return; 6163 } 6164 6165 # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) 6166 sub Parse::RecDescent::Text::FormBuilder::Parser::static_list 6167 { 6168 my $thisparser = $_[0]; 6169 use vars q{$tracelevel}; 6170 local $tracelevel = ($tracelevel||0)+1; 6171 $ERRORS = 0; 6172 my $thisrule = $thisparser->{"rules"}{"static_list"}; 6173 6174 Parse::RecDescent::_trace(q{Trying rule: [static_list]}, 6175 Parse::RecDescent::_tracefirst($_[1]), 6176 q{static_list}, 6177 $tracelevel) 6178 if defined $::RD_TRACE; 6179 6180 6181 my $err_at = @{$thisparser->{errors}}; 6182 6183 my $score; 6184 my $score_return; 6185 my $_tok; 6186 my $return = undef; 6187 my $_matched=0; 6188 my $commit=0; 6189 my @item = (); 6190 my %item = (); 6191 my $repeating = defined($_[2]) && $_[2]; 6192 my $_noactions = defined($_[3]) && $_[3]; 6193 my @arg = defined $_[4] ? @{ &{$_[4]} } : (); 6194 my %arg = ($#arg & 01) ? @arg : (@arg, undef); 6195 my $text; 6196 my $lastsep=""; 6197 my $expectation = new Parse::RecDescent::Expectation($thisrule->expected()); 6198 $expectation->at($_[1]); 6199 6200 my $thisline; 6201 tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; 6202 6203 6204 6205 while (!$_matched && !$commit) 6206 { 6207 6208 Parse::RecDescent::_trace(q{Trying production: ['\{' <leftop: option /,\\s*/ option> /,?/ '\}']}, 6209 Parse::RecDescent::_tracefirst($_[1]), 6210 q{static_list}, 6211 $tracelevel) 6212 if defined $::RD_TRACE; 6213 my $thisprod = $thisrule->{"prods"}[0]; 6214 $text = $_[1]; 6215 my $_savetext; 6216 @item = (q{static_list}); 6217 %item = (__RULE__ => q{static_list}); 6218 my $repcount = 0; 6219 6220 6221 Parse::RecDescent::_trace(q{Trying terminal: ['\{']}, 6222 Parse::RecDescent::_tracefirst($text), 6223 q{static_list}, 6224 $tracelevel) 6225 if defined $::RD_TRACE; 6226 $lastsep = ""; 6227 $expectation->is(q{})->at($text); 6228 6229 6230 unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\{//) 6231 { 6232 6233 $expectation->failed(); 6234 Parse::RecDescent::_trace(qq{<<Didn't match terminal>>}, 6235 Parse::RecDescent::_tracefirst($text)) 6236 if defined $::RD_TRACE; 6237 last; 6238 } 6239 Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} 6240 . $& . q{])}, 6241 Parse::RecDescent::_tracefirst($text)) 6242 if defined $::RD_TRACE; 6243 push @item, $item{__STRING1__}=$&; 6244 6245 6246 Parse::RecDescent::_trace(q{Trying operator: [<leftop: option /,\\s*/ option>]}, 6247 Parse::RecDescent::_tracefirst($text), 6248 q{static_list}, 6249 $tracelevel) 6250 if defined $::RD_TRACE; 6251 $expectation->is(q{<leftop: option /,\\s*/ option>})->at($text); 6252 6253 $_tok = undef; 6254 OPLOOP: while (1) 6255 { 6256 $repcount = 0; 6257 my @item; 6258 6259 # MATCH LEFTARG 6260 6261 Parse::RecDescent::_trace(q{Trying subrule: [option]}, 6262 Parse::RecDescent::_tracefirst($text), 6263 q{static_list}, 6264 $tracelevel) 6265 if defined $::RD_TRACE; 6266 if (1) { no strict qw{refs}; 6267 $expectation->is(q{option})->at($text); 6268 unless (defined ($_tok = Parse::RecDescent::Text::FormBuilder::Parser::option($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) 6269 { 6270 6271 Parse::RecDescent::_trace(q{<<Didn't match subrule: [option]>>}, 6272 Parse::RecDescent::_tracefirst($text), 6273 q{static_list}, 6274 $tracelevel) 6275 if defined $::RD_TRACE; 6276 $expectation->failed(); 6277 last; 6278 } 6279 Parse::RecDescent::_trace(q{>>Matched subrule: [option]<< (return value: [} 6280 . $_tok . q{]}, 6281 6282 Parse::RecDescent::_tracefirst($text), 6283 q{static_list}, 6284 $tracelevel) 6285 if defined $::RD_TRACE; 6286 $item{q{option}} = $_tok; 6287 push @item, $_tok; 6288 6289 } 6290 6291 6292 $repcount++; 6293 6294 my $savetext = $text; 6295 my $backtrack; 6296 6297 # MATCH (OP RIGHTARG)(s) 6298 while ($repcount < 100000000) 6299 { 6300 $backtrack = 0; 6301 6302 Parse::RecDescent::_trace(q{Trying terminal: [/,\\s*/]}, Parse::RecDescent::_tracefirst($text), 6303 q{static_list}, 6304 $tracelevel) 6305 if defined $::RD_TRACE; 6306 $lastsep = ""; 6307 $expectation->is(q{/,\\s*/})->at($text); 6308 6309 6310 unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A(?:,\s*)//) 6311 { 6312 6313 $expectation->failed(); 6314 Parse::RecDescent::_trace(q{<<Didn't match terminal>>}, 6315 Parse::RecDescent::_tracefirst($text)) 6316 if defined $::RD_TRACE; 6317 6318 last; 6319 } 6320 Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} 6321 . $& . q{])}, 6322 Parse::RecDescent::_tracefirst($text)) 6323 if defined $::RD_TRACE; 6324 push @item, $item{__PATTERN1__}=$&; 6325 6326 6327 pop @item; 6328 if (defined $1) {push @item, $item{'option(s)'}=$1; $backtrack=1;} 6329 6330 Parse::RecDescent::_trace(q{Trying subrule: [option]}, 6331 Parse::RecDescent::_tracefirst($text), 6332 q{static_list}, 6333 $tracelevel) 6334 if defined $::RD_TRACE; 6335 if (1) { no strict qw{refs}; 6336 $expectation->is(q{option})->at($text); 6337 unless (defined ($_tok = Parse::RecDescent::Text::FormBuilder::Parser::option($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) 6338 { 6339 6340 Parse::RecDescent::_trace(q{<<Didn't match subrule: [option]>>}, 6341 Parse::RecDescent::_tracefirst($text), 6342 q{static_list}, 6343 $tracelevel) 6344 if defined $::RD_TRACE; 6345 $expectation->failed(); 6346 last; 6347 } 6348 Parse::RecDescent::_trace(q{>>Matched subrule: [option]<< (return value: [} 6349 . $_tok . q{]}, 6350 6351 Parse::RecDescent::_tracefirst($text), 6352 q{static_list}, 6353 $tracelevel) 6354 if defined $::RD_TRACE; 6355 $item{q{option}} = $_tok; 6356 push @item, $_tok; 6357 6358 } 6359 6360 $savetext = $text; 6361 $repcount++; 6362 } 6363 $text = $savetext; 6364 pop @item if $backtrack; 6365 6366 unless (@item) { undef $_tok; last } 6367 $_tok = [ @item ]; 6368 last; 6369 } 6370 6371 unless ($repcount>=1) 6372 { 6373 Parse::RecDescent::_trace(q{<<Didn't match operator: [<leftop: option /,\\s*/ option>]>>}, 6374 Parse::RecDescent::_tracefirst($text), 6375 q{static_list}, 6376 $tracelevel) 6377 if defined $::RD_TRACE; 6378 $expectation->failed(); 6379 last; 6380 } 6381 Parse::RecDescent::_trace(q{>>Matched operator: [<leftop: option /,\\s*/ option>]<< (return value: [} 6382 . qq{@{$_tok||[]}} . q{]}, 6383 Parse::RecDescent::_tracefirst($text), 6384 q{static_list}, 6385 $tracelevel) 6386 if defined $::RD_TRACE; 6387 6388 push @item, $item{'option(s)'}=$_tok||[]; 6389 6390 6391 Parse::RecDescent::_trace(q{Trying terminal: [/,?/]}, Parse::RecDescent::_tracefirst($text), 6392 q{static_list}, 6393 $tracelevel) 6394 if defined $::RD_TRACE; 6395 $lastsep = ""; 6396 $expectation->is(q{/,?/})->at($text); 6397 6398 6399 unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A(?:,?)//) 6400 { 6401 6402 $expectation->failed(); 6403 Parse::RecDescent::_trace(q{<<Didn't match terminal>>}, 6404 Parse::RecDescent::_tracefirst($text)) 6405 if defined $::RD_TRACE; 6406 6407 last; 6408 } 6409 Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} 6410 . $& . q{])}, 6411 Parse::RecDescent::_tracefirst($text)) 6412 if defined $::RD_TRACE; 6413 push @item, $item{__PATTERN2__}=$&; 6414 6415 6416 Parse::RecDescent::_trace(q{Trying terminal: ['\}']}, 6417 Parse::RecDescent::_tracefirst($text), 6418 q{static_list}, 6419 $tracelevel) 6420 if defined $::RD_TRACE; 6421 $lastsep = ""; 6422 $expectation->is(q{'\}'})->at($text); 6423 6424 6425 unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\}//) 6426 { 6427 6428 $expectation->failed(); 6429 Parse::RecDescent::_trace(qq{<<Didn't match terminal>>}, 6430 Parse::RecDescent::_tracefirst($text)) 6431 if defined $::RD_TRACE; 6432 last; 6433 } 6434 Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} 6435 . $& . q{])}, 6436 Parse::RecDescent::_tracefirst($text)) 6437 if defined $::RD_TRACE; 6438 push @item, $item{__STRING2__}=$&; 6439 6440 6441 6442 Parse::RecDescent::_trace(q{>>Matched production: ['\{' <leftop: option /,\\s*/ option> /,?/ '\}']<<}, 6443 Parse::RecDescent::_tracefirst($text), 6444 q{static_list}, 6445 $tracelevel) 6446 if defined $::RD_TRACE; 6447 $_matched = 1; 6448 last; 6449 } 6450 6451 6452 unless ( $_matched || defined($return) || defined($score) ) 6453 { 6454 6455 6456 $_[1] = $text; # NOT SURE THIS IS NEEDED 6457 Parse::RecDescent::_trace(q{<<Didn't match rule>>}, 6458 Parse::RecDescent::_tracefirst($_[1]), 6459 q{static_list}, 6460 $tracelevel) 6461 if defined $::RD_TRACE; 6462 return undef; 6463 } 6464 if (!defined($return) && defined($score)) 6465 { 6466 Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", 6467 q{static_list}, 6468 $tracelevel) 6469 if defined $::RD_TRACE; 6470 $return = $score_return; 6471 } 6472 splice @{$thisparser->{errors}}, $err_at; 6473 $return = $item[$#item] unless defined $return; 6474 if (defined $::RD_TRACE) 6475 { 6476 Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . 6477 $return . q{])}, "", 6478 q{static_list}, 6479 $tracelevel); 6480 Parse::RecDescent::_trace(q{(consumed: [} . 6481 Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, 6482 Parse::RecDescent::_tracefirst($text), 6483 , q{static_list}, 5971 6484 $tracelevel) 5972 6485 } … … 6011 6524 'lookahead' => 0, 6012 6525 'rdelim' => '/', 6013 'line' => 70,6526 'line' => 82, 6014 6527 'mod' => '', 6015 6528 'ldelim' => '/' … … 6021 6534 'lookahead' => 0, 6022 6535 'rdelim' => '/', 6023 'line' => 70,6536 'line' => 82, 6024 6537 'mod' => '', 6025 6538 'ldelim' => '/' … … 6031 6544 'lookahead' => 0, 6032 6545 'rdelim' => '/', 6033 'line' => 70,6546 'line' => 82, 6034 6547 'mod' => '', 6035 6548 'ldelim' => '/' … … 6038 6551 'hashname' => '__ACTION1__', 6039 6552 'lookahead' => 0, 6040 'line' => 71,6553 'line' => 83, 6041 6554 'code' => '{ $rows = $item[1]; $cols = $item[3] }' 6042 6555 }, 'Parse::RecDescent::Action' ) … … 6047 6560 'name' => 'row_col', 6048 6561 'vars' => '', 6049 'line' => 706562 'line' => 82 6050 6563 }, 'Parse::RecDescent::Rule' ), 6051 6564 'options' => bless( { … … 6072 6585 'description' => '\'\\{\'', 6073 6586 'lookahead' => 0, 6074 'line' => 836587 'line' => 95 6075 6588 }, 'Parse::RecDescent::Literal' ), 6076 6589 bless( { … … 6085 6598 'argcode' => undef, 6086 6599 'lookahead' => 0, 6087 'line' => 836600 'line' => 95 6088 6601 }, 'Parse::RecDescent::Subrule' ), 6089 6602 'rightarg' => bless( { … … 6093 6606 'argcode' => undef, 6094 6607 'lookahead' => 0, 6095 'line' => 836608 'line' => 95 6096 6609 }, 'Parse::RecDescent::Subrule' ), 6097 6610 'hashname' => '__DIRECTIVE1__', … … 6103 6616 'lookahead' => 0, 6104 6617 'rdelim' => '/', 6105 'line' => 83,6618 'line' => 95, 6106 6619 'mod' => '', 6107 6620 'ldelim' => '/' … … 6113 6626 'description' => '\'\\}\'', 6114 6627 'lookahead' => 0, 6115 'line' => 836628 'line' => 95 6116 6629 }, 'Parse::RecDescent::Literal' ) 6117 6630 ], … … 6121 6634 'name' => 'options', 6122 6635 'vars' => '', 6123 'line' => 836636 'line' => 95 6124 6637 }, 'Parse::RecDescent::Rule' ), 6125 6638 'list_def' => bless( { 6126 'impcount' => 0,6639 'impcount' => 1, 6127 6640 'calls' => [ 6128 6641 'list_name', 6129 ' option'6642 '_alternation_1_of_production_1_of_rule_list_def' 6130 6643 ], 6131 6644 'changed' => 0, … … 6134 6647 bless( { 6135 6648 'number' => '0', 6136 'strcount' => 3,6137 'dircount' => 1,6649 'strcount' => 1, 6650 'dircount' => 0, 6138 6651 'uncommit' => undef, 6139 6652 'error' => undef, 6140 'patcount' => 2,6653 'patcount' => 0, 6141 6654 'actcount' => 1, 6142 'op' => [],6143 6655 'items' => [ 6144 6656 bless( { … … 6158 6670 }, 'Parse::RecDescent::Subrule' ), 6159 6671 bless( { 6160 'pattern' => '{', 6161 'hashname' => '__STRING2__', 6162 'description' => '\'\\{\'', 6672 'subrule' => '_alternation_1_of_production_1_of_rule_list_def', 6673 'matchrule' => 0, 6674 'implicit' => 'static_list, or dynamic_list', 6675 'argcode' => undef, 6163 6676 'lookahead' => 0, 6164 6677 'line' => 14 6165 }, 'Parse::RecDescent::Literal' ), 6166 bless( { 6167 'expected' => '<leftop: option /,\\\\s*/ option>', 6168 'min' => 1, 6169 'name' => '\'option(s)\'', 6170 'max' => 100000000, 6171 'leftarg' => bless( { 6172 'subrule' => 'option', 6173 'matchrule' => 0, 6174 'implicit' => undef, 6175 'argcode' => undef, 6176 'lookahead' => 0, 6177 'line' => 14 6178 }, 'Parse::RecDescent::Subrule' ), 6179 'rightarg' => bless( { 6180 'subrule' => 'option', 6181 'matchrule' => 0, 6182 'implicit' => undef, 6183 'argcode' => undef, 6184 'lookahead' => 0, 6185 'line' => 14 6186 }, 'Parse::RecDescent::Subrule' ), 6187 'hashname' => '__DIRECTIVE1__', 6188 'type' => 'leftop', 6189 'op' => bless( { 6190 'pattern' => ',\\s*', 6191 'hashname' => '__PATTERN1__', 6192 'description' => '/,\\\\s*/', 6193 'lookahead' => 0, 6194 'rdelim' => '/', 6195 'line' => 14, 6196 'mod' => '', 6197 'ldelim' => '/' 6198 }, 'Parse::RecDescent::Token' ) 6199 }, 'Parse::RecDescent::Operator' ), 6200 bless( { 6201 'pattern' => ',?', 6202 'hashname' => '__PATTERN2__', 6203 'description' => '/,?/', 6204 'lookahead' => 0, 6205 'rdelim' => '/', 6206 'line' => 14, 6207 'mod' => '', 6208 'ldelim' => '/' 6209 }, 'Parse::RecDescent::Token' ), 6210 bless( { 6211 'pattern' => '}', 6212 'hashname' => '__STRING3__', 6213 'description' => '\'\\}\'', 6214 'lookahead' => 0, 6215 'line' => 14 6216 }, 'Parse::RecDescent::Literal' ), 6678 }, 'Parse::RecDescent::Subrule' ), 6217 6679 bless( { 6218 6680 'hashname' => '__ACTION1__', … … 6251 6713 'description' => '\'[\'', 6252 6714 'lookahead' => 0, 6253 'line' => 656715 'line' => 77 6254 6716 }, 'Parse::RecDescent::Literal' ), 6255 6717 bless( { … … 6259 6721 'argcode' => undef, 6260 6722 'lookahead' => 0, 6261 'line' => 656723 'line' => 77 6262 6724 }, 'Parse::RecDescent::Subrule' ), 6263 6725 bless( { … … 6266 6728 'description' => '\']\'', 6267 6729 'lookahead' => 0, 6268 'line' => 656730 'line' => 77 6269 6731 }, 'Parse::RecDescent::Literal' ) 6270 6732 ], … … 6274 6736 'name' => 'field_size', 6275 6737 'vars' => '', 6276 'line' => 656738 'line' => 77 6277 6739 }, 'Parse::RecDescent::Rule' ), 6278 6740 'author' => bless( { … … 6296 6758 'description' => '\'!author\'', 6297 6759 'lookahead' => 0, 6298 'line' => 256760 'line' => 37 6299 6761 }, 'Parse::RecDescent::Literal' ), 6300 6762 bless( { … … 6304 6766 'lookahead' => 0, 6305 6767 'rdelim' => '/', 6306 'line' => 25,6768 'line' => 37, 6307 6769 'mod' => '', 6308 6770 'ldelim' => '/' … … 6311 6773 'hashname' => '__ACTION1__', 6312 6774 'lookahead' => 0, 6313 'line' => 26,6775 'line' => 38, 6314 6776 'code' => '{ $author = $item[2] }' 6315 6777 }, 'Parse::RecDescent::Action' ) … … 6320 6782 'name' => 'author', 6321 6783 'vars' => '', 6322 'line' => 256784 'line' => 37 6323 6785 }, 'Parse::RecDescent::Rule' ), 6324 6786 'list_name' => bless( { … … 6343 6805 'lookahead' => 0, 6344 6806 'rdelim' => '/', 6345 'line' => 17,6807 'line' => 29, 6346 6808 'mod' => '', 6347 6809 'ldelim' => '/' … … 6353 6815 'name' => 'list_name', 6354 6816 'vars' => '', 6355 'line' => 176817 'line' => 29 6356 6818 }, 'Parse::RecDescent::Rule' ), 6357 6819 'size' => bless( { … … 6376 6838 'lookahead' => 0, 6377 6839 'rdelim' => '/', 6378 'line' => 67,6840 'line' => 79, 6379 6841 'mod' => '', 6380 6842 'ldelim' => '/' … … 6383 6845 'hashname' => '__ACTION1__', 6384 6846 'lookahead' => 0, 6385 'line' => 68,6847 'line' => 80, 6386 6848 'code' => '{ $size = $item[1] }' 6387 6849 }, 'Parse::RecDescent::Action' ) … … 6392 6854 'name' => 'size', 6393 6855 'vars' => '', 6394 'line' => 676856 'line' => 79 6395 6857 }, 'Parse::RecDescent::Rule' ), 6396 6858 'identifier' => bless( { … … 6415 6877 'lookahead' => 0, 6416 6878 'rdelim' => '/', 6417 'line' => 99,6879 'line' => 111, 6418 6880 'mod' => '', 6419 6881 'ldelim' => '/' … … 6425 6887 'name' => 'identifier', 6426 6888 'vars' => '', 6427 'line' => 996889 'line' => 111 6428 6890 }, 'Parse::RecDescent::Rule' ), 6429 6891 'blank' => bless( { … … 6447 6909 'name' => 'blank', 6448 6910 'vars' => '', 6449 'line' => 976911 'line' => 109 6450 6912 }, 'Parse::RecDescent::Rule' ), 6451 6913 'option' => bless( { … … 6473 6935 'argcode' => undef, 6474 6936 'lookahead' => 0, 6475 'line' => 876937 'line' => 99 6476 6938 }, 'Parse::RecDescent::Subrule' ), 6477 6939 bless( { … … 6484 6946 'repspec' => '?', 6485 6947 'lookahead' => 0, 6486 'line' => 876948 'line' => 99 6487 6949 }, 'Parse::RecDescent::Repetition' ), 6488 6950 bless( { 6489 6951 'hashname' => '__ACTION1__', 6490 6952 'lookahead' => 0, 6491 'line' => 88,6953 'line' => 100, 6492 6954 'code' => '{ push @options, { $item{value} => $item{\'display_text(?)\'}[0] } }' 6493 6955 }, 'Parse::RecDescent::Action' ) … … 6498 6960 'name' => 'option', 6499 6961 'vars' => '', 6500 'line' => 876962 'line' => 99 6501 6963 }, 'Parse::RecDescent::Rule' ), 6502 6964 'pattern_name' => bless( { … … 6521 6983 'lookahead' => 0, 6522 6984 'rdelim' => '/', 6523 'line' => 31,6985 'line' => 43, 6524 6986 'mod' => '', 6525 6987 'ldelim' => '/' … … 6531 6993 'name' => 'pattern_name', 6532 6994 'vars' => '', 6533 'line' => 316995 'line' => 43 6534 6996 }, 'Parse::RecDescent::Rule' ), 6535 6997 'validate' => bless( { … … 6555 7017 'description' => '\'//\'', 6556 7018 'lookahead' => 0, 6557 'line' => 947019 'line' => 106 6558 7020 }, 'Parse::RecDescent::Literal' ), 6559 7021 bless( { … … 6563 7025 'argcode' => undef, 6564 7026 'lookahead' => 0, 6565 'line' => 947027 'line' => 106 6566 7028 }, 'Parse::RecDescent::Subrule' ) 6567 7029 ], … … 6571 7033 'name' => 'validate', 6572 7034 'vars' => '', 6573 'line' => 947035 'line' => 106 6574 7036 }, 'Parse::RecDescent::Rule' ), 6575 7037 'list_var' => bless( { … … 6594 7056 'lookahead' => 0, 6595 7057 'rdelim' => '/', 6596 'line' => 85,7058 'line' => 97, 6597 7059 'mod' => '', 6598 7060 'ldelim' => '/' … … 6601 7063 'hashname' => '__ACTION1__', 6602 7064 'lookahead' => 0, 6603 'line' => 85,7065 'line' => 97, 6604 7066 'code' => '{ $list_var = $item[1] }' 6605 7067 }, 'Parse::RecDescent::Action' ) … … 6610 7072 'name' => 'list_var', 6611 7073 'vars' => '', 6612 'line' => 857074 'line' => 97 6613 7075 }, 'Parse::RecDescent::Rule' ), 6614 7076 'field' => bless( { … … 6642 7104 'argcode' => undef, 6643 7105 'lookahead' => 0, 6644 'line' => 347106 'line' => 46 6645 7107 }, 'Parse::RecDescent::Subrule' ), 6646 7108 bless( { … … 6653 7115 'repspec' => '?', 6654 7116 'lookahead' => 0, 6655 'line' => 347117 'line' => 46 6656 7118 }, 'Parse::RecDescent::Repetition' ), 6657 7119 bless( { … … 6664 7126 'repspec' => '?', 6665 7127 'lookahead' => 0, 6666 'line' => 347128 'line' => 46 6667 7129 }, 'Parse::RecDescent::Repetition' ), 6668 7130 bless( { … … 6675 7137 'repspec' => '?', 6676 7138 'lookahead' => 0, 6677 'line' => 347139 'line' => 46 6678 7140 }, 'Parse::RecDescent::Repetition' ), 6679 7141 bless( { … … 6686 7148 'repspec' => '?', 6687 7149 'lookahead' => 0, 6688 'line' => 347150 'line' => 46 6689 7151 }, 'Parse::RecDescent::Repetition' ), 6690 7152 bless( { … … 6697 7159 'repspec' => '?', 6698 7160 'lookahead' => 0, 6699 'line' => 347161 'line' => 46 6700 7162 }, 'Parse::RecDescent::Repetition' ), 6701 7163 bless( { … … 6708 7170 'repspec' => '?', 6709 7171 'lookahead' => 0, 6710 'line' => 347172 'line' => 46 6711 7173 }, 'Parse::RecDescent::Repetition' ), 6712 7174 bless( { … … 6719 7181 'repspec' => '?', 6720 7182 'lookahead' => 0, 6721 'line' => 347183 'line' => 46 6722 7184 }, 'Parse::RecDescent::Repetition' ), 6723 7185 bless( { 6724 7186 'hashname' => '__ACTION1__', 6725 7187 'lookahead' => 0, 6726 'line' => 35,7188 'line' => 47, 6727 7189 'code' => '{ 6728 7190 my $field = { … … 6759 7221 'name' => 'field', 6760 7222 'vars' => '', 6761 'line' => 347223 'line' => 46 6762 7224 }, 'Parse::RecDescent::Rule' ), 6763 7225 '_alternation_1_of_production_1_of_rule_form_spec' => bless( { … … 6785 7247 'argcode' => undef, 6786 7248 'lookahead' => 0, 6787 'line' => 1 007249 'line' => 112 6788 7250 }, 'Parse::RecDescent::Subrule' ) 6789 7251 ], … … 6805 7267 'argcode' => undef, 6806 7268 'lookahead' => 0, 6807 'line' => 1 007269 'line' => 112 6808 7270 }, 'Parse::RecDescent::Subrule' ) 6809 7271 ], 6810 'line' => 1 007272 'line' => 112 6811 7273 }, 'Parse::RecDescent::Production' ) 6812 7274 ], 6813 7275 'name' => '_alternation_1_of_production_1_of_rule_form_spec', 6814 7276 'vars' => '', 6815 'line' => 1 007277 'line' => 112 6816 7278 }, 'Parse::RecDescent::Rule' ), 6817 7279 'line' => bless( { … … 6836 7298 'name' => '<skip:\'[ \\t]*\'>', 6837 7299 'lookahead' => 0, 6838 'line' => 19,7300 'line' => 31, 6839 7301 'code' => 'my $oldskip = $skip; $skip=\'[ \\t]*\'; $oldskip' 6840 7302 }, 'Parse::RecDescent::Directive' ), … … 6845 7307 'argcode' => undef, 6846 7308 'lookahead' => 0, 6847 'line' => 197309 'line' => 31 6848 7310 }, 'Parse::RecDescent::Subrule' ), 6849 7311 bless( { … … 6852 7314 'description' => '\'\\\\n\'', 6853 7315 'lookahead' => 0, 6854 'line' => 197316 'line' => 31 6855 7317 }, 'Parse::RecDescent::InterpLit' ) 6856 7318 ], … … 6860 7322 'name' => 'line', 6861 7323 'vars' => '', 6862 'line' => 197324 'line' => 31 6863 7325 }, 'Parse::RecDescent::Rule' ), 6864 7326 'option_list' => bless( { … … 6886 7348 'argcode' => undef, 6887 7349 'lookahead' => 0, 6888 'line' => 817350 'line' => 93 6889 7351 }, 'Parse::RecDescent::Subrule' ) 6890 7352 ], … … 6906 7368 'argcode' => undef, 6907 7369 'lookahead' => 0, 6908 'line' => 817370 'line' => 93 6909 7371 }, 'Parse::RecDescent::Subrule' ) 6910 7372 ], 6911 'line' => 817373 'line' => 93 6912 7374 }, 'Parse::RecDescent::Production' ) 6913 7375 ], 6914 7376 'name' => 'option_list', 6915 7377 'vars' => '', 6916 'line' => 817378 'line' => 93 6917 7379 }, 'Parse::RecDescent::Rule' ), 6918 7380 '_alternation_1_of_production_1_of_rule_line' => bless( { … … 6944 7406 'argcode' => undef, 6945 7407 'lookahead' => 0, 6946 'line' => 1 007408 'line' => 112 6947 7409 }, 'Parse::RecDescent::Subrule' ) 6948 7410 ], … … 6964 7426 'argcode' => undef, 6965 7427 'lookahead' => 0, 6966 'line' => 1 007428 'line' => 112 6967 7429 }, 'Parse::RecDescent::Subrule' ) 6968 7430 ], 6969 'line' => 1 007431 'line' => 112 6970 7432 }, 'Parse::RecDescent::Production' ), 6971 7433 bless( { … … 6984 7446 'argcode' => undef, 6985 7447 'lookahead' => 0, 6986 'line' => 1 007448 'line' => 112 6987 7449 }, 'Parse::RecDescent::Subrule' ) 6988 7450 ], 6989 'line' => 1 007451 'line' => 112 6990 7452 }, 'Parse::RecDescent::Production' ), 6991 7453 bless( { … … 7004 7466 'argcode' => undef, 7005 7467 'lookahead' => 0, 7006 'line' => 1 007468 'line' => 112 7007 7469 }, 'Parse::RecDescent::Subrule' ) 7008 7470 ], 7009 'line' => 1 007471 'line' => 112 7010 7472 }, 'Parse::RecDescent::Production' ), 7011 7473 bless( { … … 7024 7486 'argcode' => undef, 7025 7487 'lookahead' => 0, 7026 'line' => 1 007488 'line' => 112 7027 7489 }, 'Parse::RecDescent::Subrule' ) 7028 7490 ], 7029 'line' => 1 007491 'line' => 112 7030 7492 }, 'Parse::RecDescent::Production' ), 7031 7493 bless( { … … 7044 7506 'argcode' => undef, 7045 7507 'lookahead' => 0, 7046 'line' => 1 007508 'line' => 112 7047 7509 }, 'Parse::RecDescent::Subrule' ) 7048 7510 ], 7049 'line' => 1 007511 'line' => 112 7050 7512 }, 'Parse::RecDescent::Production' ) 7051 7513 ], 7052 7514 'name' => '_alternation_1_of_production_1_of_rule_line', 7053 7515 'vars' => '', 7054 'line' => 1 007516 'line' => 112 7055 7517 }, 'Parse::RecDescent::Rule' ), 7056 7518 'value' => bless( { … … 7077 7539 'argcode' => undef, 7078 7540 'lookahead' => 0, 7079 'line' => 907541 'line' => 102 7080 7542 }, 'Parse::RecDescent::Subrule' ) 7081 7543 ], … … 7085 7547 'name' => 'value', 7086 7548 'vars' => '', 7087 'line' => 907549 'line' => 102 7088 7550 }, 'Parse::RecDescent::Rule' ), 7089 7551 '_alternation_1_of_production_1_of_rule_field_size' => bless( { … … 7111 7573 'argcode' => undef, 7112 7574 'lookahead' => 0, 7113 'line' => 1 007575 'line' => 112 7114 7576 }, 'Parse::RecDescent::Subrule' ) 7115 7577 ], … … 7131 7593 'argcode' => undef, 7132 7594 'lookahead' => 0, 7133 'line' => 1 007595 'line' => 112 7134 7596 }, 'Parse::RecDescent::Subrule' ) 7135 7597 ], 7136 'line' => 1 007598 'line' => 112 7137 7599 }, 'Parse::RecDescent::Production' ) 7138 7600 ], 7139 7601 'name' => '_alternation_1_of_production_1_of_rule_field_size', 7140 7602 'vars' => '', 7141 'line' => 1 007603 'line' => 112 7142 7604 }, 'Parse::RecDescent::Rule' ), 7143 7605 'name' => bless( { … … 7164 7626 'argcode' => undef, 7165 7627 'lookahead' => 0, 7166 'line' => 637628 'line' => 75 7167 7629 }, 'Parse::RecDescent::Subrule' ) 7168 7630 ], … … 7172 7634 'name' => 'name', 7173 7635 'vars' => '', 7174 'line' => 637636 'line' => 75 7175 7637 }, 'Parse::RecDescent::Rule' ), 7176 7638 'display_text' => bless( { … … 7194 7656 'description' => '\'[\'', 7195 7657 'lookahead' => 0, 7196 'line' => 927658 'line' => 104 7197 7659 }, 'Parse::RecDescent::Literal' ), 7198 7660 bless( { … … 7202 7664 'lookahead' => 0, 7203 7665 'rdelim' => '/', 7204 'line' => 92,7666 'line' => 104, 7205 7667 'mod' => 'i', 7206 7668 'ldelim' => '/' … … 7211 7673 'description' => '\']\'', 7212 7674 'lookahead' => 0, 7213 'line' => 927675 'line' => 104 7214 7676 }, 'Parse::RecDescent::Literal' ), 7215 7677 bless( { 7216 7678 'hashname' => '__ACTION1__', 7217 7679 'lookahead' => 0, 7218 'line' => 92,7680 'line' => 104, 7219 7681 'code' => '{ $item[2] }' 7220 7682 }, 'Parse::RecDescent::Action' ) … … 7225 7687 'name' => 'display_text', 7226 7688 'vars' => '', 7227 'line' => 927689 'line' => 104 7228 7690 }, 'Parse::RecDescent::Rule' ), 7229 7691 'default' => bless( { … … 7247 7709 'description' => '\'=\'', 7248 7710 'lookahead' => 0, 7249 'line' => 797711 'line' => 91 7250 7712 }, 'Parse::RecDescent::Literal' ), 7251 7713 bless( { … … 7255 7717 'lookahead' => 0, 7256 7718 'rdelim' => '/', 7257 'line' => 79,7719 'line' => 91, 7258 7720 'mod' => '', 7259 7721 'ldelim' => '/' … … 7265 7727 'name' => 'default', 7266 7728 'vars' => '', 7267 'line' => 797729 'line' => 91 7268 7730 }, 'Parse::RecDescent::Rule' ), 7731 '_alternation_1_of_production_1_of_rule_list_def' => bless( { 7732 'impcount' => 0, 7733 'calls' => [ 7734 'static_list', 7735 'dynamic_list' 7736 ], 7737 'changed' => 0, 7738 'opcount' => 0, 7739 'prods' => [ 7740 bless( { 7741 'number' => '0', 7742 'strcount' => 0, 7743 'dircount' => 0, 7744 'uncommit' => undef, 7745 'error' => undef, 7746 'patcount' => 0, 7747 'actcount' => 0, 7748 'items' => [ 7749 bless( { 7750 'subrule' => 'static_list', 7751 'matchrule' => 0, 7752 'implicit' => undef, 7753 'argcode' => undef, 7754 'lookahead' => 0, 7755 'line' => 112 7756 }, 'Parse::RecDescent::Subrule' ) 7757 ], 7758 'line' => undef 7759 }, 'Parse::RecDescent::Production' ), 7760 bless( { 7761 'number' => '1', 7762 'strcount' => 0, 7763 'dircount' => 0, 7764 'uncommit' => undef, 7765 'error' => undef, 7766 'patcount' => 0, 7767 'actcount' => 0, 7768 'items' => [ 7769 bless( { 7770 'subrule' => 'dynamic_list', 7771 'matchrule' => 0, 7772 'implicit' => undef, 7773 'argcode' => undef, 7774 'lookahead' => 0, 7775 'line' => 112 7776 }, 'Parse::RecDescent::Subrule' ) 7777 ], 7778 'line' => 112 7779 }, 'Parse::RecDescent::Production' ) 7780 ], 7781 'name' => '_alternation_1_of_production_1_of_rule_list_def', 7782 'vars' => '', 7783 'line' => 112 7784 }, 'Parse::RecDescent::Rule' ), 7269 7785 'form_spec' => bless( { 7270 7786 'impcount' => 1, … … 7338 7854 'lookahead' => 0, 7339 7855 'rdelim' => '/', 7340 'line' => 32,7856 'line' => 44, 7341 7857 'mod' => '', 7342 7858 'ldelim' => '/' … … 7348 7864 'name' => 'pattern', 7349 7865 'vars' => '', 7350 'line' => 327866 'line' => 44 7351 7867 }, 'Parse::RecDescent::Rule' ), 7352 7868 'comment' => bless( { … … 7370 7886 'description' => '\'#\'', 7371 7887 'lookahead' => 0, 7372 'line' => 967888 'line' => 108 7373 7889 }, 'Parse::RecDescent::Literal' ), 7374 7890 bless( { … … 7378 7894 'lookahead' => 0, 7379 7895 'rdelim' => '/', 7380 'line' => 96,7896 'line' => 108, 7381 7897 'mod' => '', 7382 7898 'ldelim' => '/' … … 7388 7904 'name' => 'comment', 7389 7905 'vars' => '', 7390 'line' => 967906 'line' => 108 7391 7907 }, 'Parse::RecDescent::Rule' ), 7392 7908 'hint' => bless( { … … 7410 7926 'description' => '\'[\'', 7411 7927 'lookahead' => 0, 7412 'line' => 757928 'line' => 87 7413 7929 }, 'Parse::RecDescent::Literal' ), 7414 7930 bless( { … … 7418 7934 'lookahead' => 0, 7419 7935 'rdelim' => '/', 7420 'line' => 75,7936 'line' => 87, 7421 7937 'mod' => '', 7422 7938 'ldelim' => '/' … … 7427 7943 'description' => '\']\'', 7428 7944 'lookahead' => 0, 7429 'line' => 757945 'line' => 87 7430 7946 }, 'Parse::RecDescent::Literal' ), 7431 7947 bless( { 7432 7948 'hashname' => '__ACTION1__', 7433 7949 'lookahead' => 0, 7434 'line' => 75,7950 'line' => 87, 7435 7951 'code' => '{ $item[2] }' 7436 7952 }, 'Parse::RecDescent::Action' ) … … 7441 7957 'name' => 'hint', 7442 7958 'vars' => '', 7443 'line' => 757959 'line' => 87 7444 7960 }, 'Parse::RecDescent::Rule' ), 7445 7961 'type' => bless( { … … 7463 7979 'description' => '\':\'', 7464 7980 'lookahead' => 0, 7465 'line' => 777981 'line' => 89 7466 7982 }, 'Parse::RecDescent::Literal' ), 7467 7983 bless( { … … 7471 7987 'lookahead' => 0, 7472 7988 'rdelim' => '/', 7473 'line' => 77,7989 'line' => 89, 7474 7990 'mod' => '', 7475 7991 'ldelim' => '/' … … 7481 7997 'name' => 'type', 7482 7998 'vars' => '', 7483 'line' => 777999 'line' => 89 7484 8000 }, 'Parse::RecDescent::Rule' ), 8001 'label' => bless( { 8002 'impcount' => 0, 8003 'calls' => [], 8004 'changed' => 0, 8005 'opcount' => 0, 8006 'prods' => [ 8007 bless( { 8008 'number' => '0', 8009 'strcount' => 1, 8010 'dircount' => 0, 8011 'uncommit' => undef, 8012 'error' => undef, 8013 'patcount' => 1, 8014 'actcount' => 0, 8015 'items' => [ 8016 bless( { 8017 'pattern' => '|', 8018 'hashname' => '__STRING1__', 8019 'description' => '\'|\'', 8020 'lookahead' => 0, 8021 'line' => 85 8022 }, 'Parse::RecDescent::Literal' ), 8023 bless( { 8024 'pattern' => '[^:\\[\\{\\/]+', 8025 'hashname' => '__PATTERN1__', 8026 'description' => '/[^:\\\\[\\\\\\{\\\\/]+/i', 8027 'lookahead' => 0, 8028 'rdelim' => '/', 8029 'line' => 85, 8030 'mod' => 'i', 8031 'ldelim' => '/' 8032 }, 'Parse::RecDescent::Token' ) 8033 ], 8034 'line' => undef 8035 }, 'Parse::RecDescent::Production' ) 8036 ], 8037 'name' => 'label', 8038 'vars' => '', 8039 'line' => 85 8040 }, 'Parse::RecDescent::Rule' ), 7485 8041 'title' => bless( { 7486 8042 'impcount' => 0, … … 7503 8059 'description' => '\'!title\'', 7504 8060 'lookahead' => 0, 7505 'line' => 218061 'line' => 33 7506 8062 }, 'Parse::RecDescent::Literal' ), 7507 8063 bless( { … … 7511 8067 'lookahead' => 0, 7512 8068 'rdelim' => '/', 7513 'line' => 21,8069 'line' => 33, 7514 8070 'mod' => '', 7515 8071 'ldelim' => '/' … … 7518 8074 'hashname' => '__ACTION1__', 7519 8075 'lookahead' => 0, 7520 'line' => 22,8076 'line' => 34, 7521 8077 'code' => '{ warn "[Text::Formbuilder] Title redefined at input text line $thisline\\n" if defined $title; 7522 8078 $title = $item[2] }' … … 7528 8084 'name' => 'title', 7529 8085 'vars' => '', 7530 'line' => 21 7531 }, 'Parse::RecDescent::Rule' ), 7532 'label' => bless( { 7533 'impcount' => 0, 7534 'calls' => [], 7535 'changed' => 0, 7536 'opcount' => 0, 7537 'prods' => [ 7538 bless( { 7539 'number' => '0', 7540 'strcount' => 1, 7541 'dircount' => 0, 7542 'uncommit' => undef, 7543 'error' => undef, 7544 'patcount' => 1, 7545 'actcount' => 0, 7546 'items' => [ 7547 bless( { 7548 'pattern' => '|', 7549 'hashname' => '__STRING1__', 7550 'description' => '\'|\'', 7551 'lookahead' => 0, 7552 'line' => 73 7553 }, 'Parse::RecDescent::Literal' ), 7554 bless( { 7555 'pattern' => '[^:\\[\\{\\/]+', 7556 'hashname' => '__PATTERN1__', 7557 'description' => '/[^:\\\\[\\\\\\{\\\\/]+/i', 7558 'lookahead' => 0, 7559 'rdelim' => '/', 7560 'line' => 73, 7561 'mod' => 'i', 7562 'ldelim' => '/' 7563 }, 'Parse::RecDescent::Token' ) 7564 ], 7565 'line' => undef 7566 }, 'Parse::RecDescent::Production' ) 7567 ], 7568 'name' => 'label', 7569 'vars' => '', 7570 'line' => 73 8086 'line' => 33 7571 8087 }, 'Parse::RecDescent::Rule' ), 7572 8088 'pattern_def' => bless( { … … 7593 8109 'description' => '\'!pattern\'', 7594 8110 'lookahead' => 0, 7595 'line' => 288111 'line' => 40 7596 8112 }, 'Parse::RecDescent::Literal' ), 7597 8113 bless( { … … 7601 8117 'argcode' => undef, 7602 8118 'lookahead' => 0, 7603 'line' => 288119 'line' => 40 7604 8120 }, 'Parse::RecDescent::Subrule' ), 7605 8121 bless( { … … 7609 8125 'argcode' => undef, 7610 8126 'lookahead' => 0, 7611 'line' => 288127 'line' => 40 7612 8128 }, 'Parse::RecDescent::Subrule' ), 7613 8129 bless( { 7614 8130 'hashname' => '__ACTION1__', 7615 8131 'lookahead' => 0, 7616 'line' => 29,8132 'line' => 41, 7617 8133 'code' => '{ $patterns{$item{pattern_name}} = $item{pattern} }' 7618 8134 }, 'Parse::RecDescent::Action' ) … … 7623 8139 'name' => 'pattern_def', 7624 8140 'vars' => '', 7625 'line' => 28 8141 'line' => 40 8142 }, 'Parse::RecDescent::Rule' ), 8143 'dynamic_list' => bless( { 8144 'impcount' => 0, 8145 'calls' => [], 8146 'changed' => 0, 8147 'opcount' => 0, 8148 'prods' => [ 8149 bless( { 8150 'number' => '0', 8151 'strcount' => 1, 8152 'dircount' => 1, 8153 'uncommit' => undef, 8154 'error' => undef, 8155 'patcount' => 0, 8156 'actcount' => 1, 8157 'items' => [ 8158 bless( { 8159 'pattern' => '&', 8160 'hashname' => '__STRING1__', 8161 'description' => '\'&\'', 8162 'lookahead' => 0, 8163 'line' => 19 8164 }, 'Parse::RecDescent::Literal' ), 8165 bless( { 8166 'hashname' => '__DIRECTIVE1__', 8167 'name' => '<perl_codeblock>', 8168 'lookahead' => 0, 8169 'line' => 19, 8170 'code' => 'Text::Balanced::extract_codeblock($text,undef,$skip,\'{}\'); 8171 ' 8172 }, 'Parse::RecDescent::Directive' ), 8173 bless( { 8174 'hashname' => '__ACTION1__', 8175 'lookahead' => 0, 8176 'line' => 20, 8177 'code' => '{ 8178 my @results = (eval $item[2]); 8179 if (ref $results[0] eq \'HASH\') { 8180 @options = @results; 8181 } else { 8182 @options = map { { $_ => $_ } } @results; 8183 } 8184 }' 8185 }, 'Parse::RecDescent::Action' ) 8186 ], 8187 'line' => undef 8188 }, 'Parse::RecDescent::Production' ) 8189 ], 8190 'name' => 'dynamic_list', 8191 'vars' => '', 8192 'line' => 19 8193 }, 'Parse::RecDescent::Rule' ), 8194 'static_list' => bless( { 8195 'impcount' => 0, 8196 'calls' => [ 8197 'option' 8198 ], 8199 'changed' => 0, 8200 'opcount' => 0, 8201 'prods' => [ 8202 bless( { 8203 'number' => '0', 8204 'strcount' => 2, 8205 'dircount' => 1, 8206 'uncommit' => undef, 8207 'error' => undef, 8208 'patcount' => 2, 8209 'actcount' => 0, 8210 'op' => [], 8211 'items' => [ 8212 bless( { 8213 'pattern' => '{', 8214 'hashname' => '__STRING1__', 8215 'description' => '\'\\{\'', 8216 'lookahead' => 0, 8217 'line' => 17 8218 }, 'Parse::RecDescent::Literal' ), 8219 bless( { 8220 'expected' => '<leftop: option /,\\\\s*/ option>', 8221 'min' => 1, 8222 'name' => '\'option(s)\'', 8223 'max' => 100000000, 8224 'leftarg' => bless( { 8225 'subrule' => 'option', 8226 'matchrule' => 0, 8227 'implicit' => undef, 8228 'argcode' => undef, 8229 'lookahead' => 0, 8230 'line' => 17 8231 }, 'Parse::RecDescent::Subrule' ), 8232 'rightarg' => bless( { 8233 'subrule' => 'option', 8234 'matchrule' => 0, 8235 'implicit' => undef, 8236 'argcode' => undef, 8237 'lookahead' => 0, 8238 'line' => 17 8239 }, 'Parse::RecDescent::Subrule' ), 8240 'hashname' => '__DIRECTIVE1__', 8241 'type' => 'leftop', 8242 'op' => bless( { 8243 'pattern' => ',\\s*', 8244 'hashname' => '__PATTERN1__', 8245 'description' => '/,\\\\s*/', 8246 'lookahead' => 0, 8247 'rdelim' => '/', 8248 'line' => 17, 8249 'mod' => '', 8250 'ldelim' => '/' 8251 }, 'Parse::RecDescent::Token' ) 8252 }, 'Parse::RecDescent::Operator' ), 8253 bless( { 8254 'pattern' => ',?', 8255 'hashname' => '__PATTERN2__', 8256 'description' => '/,?/', 8257 'lookahead' => 0, 8258 'rdelim' => '/', 8259 'line' => 17, 8260 'mod' => '', 8261 'ldelim' => '/' 8262 }, 'Parse::RecDescent::Token' ), 8263 bless( { 8264 'pattern' => '}', 8265 'hashname' => '__STRING2__', 8266 'description' => '\'\\}\'', 8267 'lookahead' => 0, 8268 'line' => 17 8269 }, 'Parse::RecDescent::Literal' ) 8270 ], 8271 'line' => undef 8272 }, 'Parse::RecDescent::Production' ) 8273 ], 8274 'name' => 'static_list', 8275 'vars' => '', 8276 'line' => 17 7626 8277 }, 'Parse::RecDescent::Rule' ) 7627 8278 } -
trunk/lib/Text/FormBuilder/grammar
r1 r10 12 12 } 13 13 14 list_def: '!list' list_name '{' option(s /,\s*/) /,?/ '}'14 list_def: '!list' list_name (static_list | dynamic_list) 15 15 { $lists{$item{list_name}} = [ @options ]; @options = () } 16 17 static_list: '{' option(s /,\s*/) /,?/ '}' 18 19 dynamic_list: '&' <perl_codeblock> 20 { 21 my @results = (eval $item[2]); 22 if (ref $results[0] eq 'HASH') { 23 @options = @results; 24 } else { 25 @options = map { { $_ => $_ } } @results; 26 } 27 } 16 28 17 29 list_name: /[A-Z_]+/
Note: See TracChangeset
for help on using the changeset viewer.