> I need to parse utf-8 data and want to use P::RD module. Is there option > to switch generated parser code to character data representation instead > of default byte representation?
I've picked a copy of P::RD module, add 'use utf8;' to the code generation routine and use sed to replace all occurences of 'RecDescent' with 'RecDescentUtf' to have new module. Complete diff added as attachement. Used version 1.80 of R::RD. -- best regards Ing. Roman Vasicek software developer +----------------------------------------------------------------------------+ PetaMem s.r.o., Drahobejlova 27/1019, 190 00 Praha 9 - Liben, Czech republic http://www.petamem.com/
2c2 < # SEE RecDescent.pod FOR FULL DETAILS --- > # SEE RecDescentUtf.pod FOR FULL DETAILS 7c7 < package Parse::RecDescent; --- > package Parse::RecDescentUtf; 19c19 < # perl -MParse::RecDescent - <grammarfile> <classname> --- > # perl -MParse::RecDescentUtf - <grammarfile> <classname> 36c36 < Parse::RecDescent->Precompile($grammar, $class, $sourcefile); --- > Parse::RecDescentUtf->Precompile($grammar, $class, $sourcefile); 67c67 < $self = Parse::RecDescent->new($grammar,1) --- > $self = Parse::RecDescentUtf->new($grammar,1) 74c74 < print OUT "package $class;\nuse Parse::RecDescent;\n\n"; --- > print OUT "package $class;\nuse Parse::RecDescentUtf;\n\n"; 93c93 < package Parse::RecDescent::LineCounter; --- > package Parse::RecDescentUtf::LineCounter; 110c110 < - Parse::RecDescent::_linecount(substr($parser->{fulltext},$from)) --- > - >Parse::RecDescentUtf::_linecount(substr($parser->{fulltext},$from)) 125c125 < unless $self =~ /Parse::RecDescent::LineCounter/; --- > unless $self =~ /Parse::RecDescentUtf::LineCounter/; 129c129 < - Parse::RecDescent::_linecount(${$self->{text}}) --- > - Parse::RecDescentUtf::_linecount(${$self->{text}}) 136c136 < package Parse::RecDescent::ColCounter; --- > package Parse::RecDescentUtf::ColCounter; 161c161 < package Parse::RecDescent::OffsetCounter; --- > package Parse::RecDescentUtf::OffsetCounter; 185c185 < package Parse::RecDescent::Rule; --- > package Parse::RecDescentUtf::Rule; 359,360c359,360 < Parse::RecDescent::_trace(q{Trying rule: [' . $self->{"name"} . ']}, < Parse::RecDescent::_tracefirst($_[1]), --- > Parse::RecDescentUtf::_trace(q{Trying rule: [' . $self->{"name"} . ']}, > Parse::RecDescentUtf::_tracefirst($_[1]), 384c384 < my $expectation = new Parse::RecDescent::Expectation($thisrule->expected()); --- > my $expectation = new >Parse::RecDescentUtf::Expectation($thisrule->expected()); 388c388 < tie $thisoffset, q{Parse::RecDescent::OffsetCounter}, \$text, $thisparser; --- > tie $thisoffset, q{Parse::RecDescentUtf::OffsetCounter}, \$text, $thisparser; 391c391 < tie $prevoffset, q{Parse::RecDescent::OffsetCounter}, \$text, $thisparser, 1; --- > tie $prevoffset, q{Parse::RecDescentUtf::OffsetCounter}, \$text, $thisparser, >1; 394c394 < tie $thiscolumn, q{Parse::RecDescent::ColCounter}, \$text, $thisparser; --- > tie $thiscolumn, q{Parse::RecDescentUtf::ColCounter}, \$text, $thisparser; 397c397 < tie $prevcolumn, q{Parse::RecDescent::ColCounter}, \$text, $thisparser, 1; --- > tie $prevcolumn, q{Parse::RecDescentUtf::ColCounter}, \$text, $thisparser, 1; 400c400 < tie $prevline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser, 1; --- > tie $prevline, q{Parse::RecDescentUtf::LineCounter}, \$text, $thisparser, 1; 403c403 < tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; --- > tie $thisline, q{Parse::RecDescentUtf::LineCounter}, \$text, $thisparser; 432,433c432,433 < Parse::RecDescent::_trace(q{<<Didn\'t match rule>>}, < Parse::RecDescent::_tracefirst($_[1]), --- > Parse::RecDescentUtf::_trace(q{<<Didn\'t match rule>>}, > Parse::RecDescentUtf::_tracefirst($_[1]), 440c440 < Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", --- > Parse::RecDescentUtf::_trace(q{>>Accepted scored production<<}, "", 449c449 < Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . --- > Parse::RecDescentUtf::_trace(q{>>Matched rule<< (return value: [} . 452,454c452,454 < Parse::RecDescent::_trace(q{(consumed: [} . < Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, < Parse::RecDescent::_tracefirst($text), --- > Parse::RecDescentUtf::_trace(q{(consumed: [} . > >Parse::RecDescentUtf::_tracemax(substr($_[1],0,-length($text))) . q{])}, > Parse::RecDescentUtf::_tracefirst($text), 486c486 < package Parse::RecDescent::Production; --- > package Parse::RecDescentUtf::Production; 540c540 < if (@items==1 && ref($items[0]) =~ /\AParse::RecDescent::Error/ --- > if (@items==1 && ref($items[0]) =~ /\AParse::RecDescentUtf::Error/ 543c543 < Parse::RecDescent::_warn(2,"Lone <error?> in production treated --- > Parse::RecDescentUtf::_warn(2,"Lone <error?> in production treated 545c545 < Parse::RecDescent::_hint("A production consisting of a single --- > Parse::RecDescentUtf::_hint("A production consisting of a single 550c550 < '<error?> <reject>' Parse::RecDescent --- > '<error?> <reject>' Parse::RecDescentUtf 553c553 < Parse::RecDescent::UncondReject->new(0,0,'<reject>'); --- > Parse::RecDescentUtf::UncondReject->new(0,0,'<reject>'); 560c560 < ( ref($items[0]) =~ /\AParse::RecDescent::UncondReject/ --- > ( ref($items[0]) =~ /\AParse::RecDescentUtf::UncondReject/ 564c564 < Parse::RecDescent::_warn(1,"Optimizing away production: [". $_[0]->describe ."]"); --- > Parse::RecDescentUtf::_warn(1,"Optimizing away production: [". >$_[0]->describe ."]"); 578c578 < Parse::RecDescent::_hint("The production starts with $what. That means that the --- > Parse::RecDescentUtf::_hint("The production starts with $what. That >means that the 591c591 < if (ref($item) =~ /Parse::RecDescent::(Action|Directive)/) --- > if (ref($item) =~ /Parse::RecDescentUtf::(Action|Directive)/) 610c610 < $self->additem(Parse::RecDescent::Directive->new( --- > $self->additem(Parse::RecDescentUtf::Directive->new( 627,628c627,628 < Parse::RecDescent::_error("Incomplete <$next->{type}op:...>.", $line); < Parse::RecDescent::_hint( --- > Parse::RecDescentUtf::_error("Incomplete <$next->{type}op:...>.", >$line); > Parse::RecDescentUtf::_hint( 642,643c642,643 < Parse::RecDescent::_error("Unmatched > found.", $line); < Parse::RecDescent::_hint( --- > Parse::RecDescentUtf::_error("Unmatched > found.", $line); > Parse::RecDescentUtf::_hint( 657c657 < Parse::RecDescent::_error( --- > Parse::RecDescentUtf::_error( 660c660 < Parse::RecDescent::_hint( --- > Parse::RecDescentUtf::_hint( 668c668 < Parse::RecDescent::Operator->new( --- > Parse::RecDescentUtf::Operator->new( 680c680 < Parse::RecDescent::_error( --- > Parse::RecDescentUtf::_error( 683c683 < Parse::RecDescent::_hint( --- > Parse::RecDescentUtf::_hint( 690c690 < Parse::RecDescent::Result->new(); --- > Parse::RecDescentUtf::Result->new(); 743c743 < ? 'local $skip = defined($skip) ? $skip : $Parse::RecDescent::skip;' --- > ? 'local $skip = defined($skip) ? $skip : >$Parse::RecDescentUtf::skip;' 745c745 < Parse::RecDescent::_trace(q{Trying production: [' --- > Parse::RecDescentUtf::_trace(q{Trying production: [' 747c747 < Parse::RecDescent::_tracefirst($_[1]), --- > Parse::RecDescentUtf::_tracefirst($_[1]), 777c777 < if ($parser->{_AUTOACTION} && defined($item) && !$item->isa("Parse::RecDescent::Action")) --- > if ($parser->{_AUTOACTION} && defined($item) && >!$item->isa("Parse::RecDescentUtf::Action")) 780c780 < Parse::RecDescent::_warn(1,"Autogenerating action in rule --- > Parse::RecDescentUtf::_warn(1,"Autogenerating action in rule 784c784 < Parse::RecDescent::_hint("The \$::RD_AUTOACTION was defined, --- > Parse::RecDescentUtf::_hint("The \$::RD_AUTOACTION was defined, 790c790 < elsif ($parser->{_AUTOTREE} && defined($item) && !$item->isa("Parse::RecDescent::Action")) --- > elsif ($parser->{_AUTOTREE} && defined($item) && >!$item->isa("Parse::RecDescentUtf::Action")) 800c800 < Parse::RecDescent::_warn(1,"Autogenerating tree-building action in rule --- > Parse::RecDescentUtf::_warn(1,"Autogenerating tree-building action in >rule 803c803 < Parse::RecDescent::_hint("The directive <autotree> was specified, --- > Parse::RecDescentUtf::_hint("The directive <autotree> was specified, 813c813 < Parse::RecDescent::_trace(q{>>Matched production: [' --- > Parse::RecDescentUtf::_trace(q{>>Matched production: [' 815c815 < Parse::RecDescent::_tracefirst($text), --- > Parse::RecDescentUtf::_tracefirst($text), 828c828 < package Parse::RecDescent::Action; --- > package Parse::RecDescentUtf::Action; 853,854c853,854 < Parse::RecDescent::_trace(q{Trying action}, < Parse::RecDescent::_tracefirst($text), --- > Parse::RecDescentUtf::_trace(q{Trying action}, > Parse::RecDescentUtf::_tracefirst($text), 862c862 < Parse::RecDescent::_trace(q{<<Didn\'t match action>> (return value: [undef])}) --- > Parse::RecDescentUtf::_trace(q{<<Didn\'t match action>> >(return value: [undef])}) 866c866 < Parse::RecDescent::_trace(q{>>Matched action<< (return value: [} --- > Parse::RecDescentUtf::_trace(q{>>Matched action<< (return value: [} 878c878 < package Parse::RecDescent::Directive; --- > package Parse::RecDescentUtf::Directive; 905c905 < Parse::RecDescent::_trace(q{Trying directive: [' --- > Parse::RecDescentUtf::_trace(q{Trying directive: [' 907c907 < Parse::RecDescent::_tracefirst($text), --- > Parse::RecDescentUtf::_tracefirst($text), 913c913 < Parse::RecDescent::_trace(q{>>Matched directive<< (return value: [} --- > Parse::RecDescentUtf::_trace(q{>>Matched directive<< (return >value: [} 915c915 < Parse::RecDescent::_tracefirst($text)) --- > >Parse::RecDescentUtf::_tracefirst($text)) 920,921c920,921 < Parse::RecDescent::_trace(q{<<Didn\'t match directive>>}, < Parse::RecDescent::_tracefirst($text)) --- > Parse::RecDescentUtf::_trace(q{<<Didn\'t match directive>>}, > >Parse::RecDescentUtf::_tracefirst($text)) 934c934 < package Parse::RecDescent::UncondReject; --- > package Parse::RecDescentUtf::UncondReject; 960c960 < Parse::RecDescent::_trace(q{>>Rejecting production<< (found ' --- > Parse::RecDescentUtf::_trace(q{>>Rejecting production<< (found ' 962c962 < Parse::RecDescent::_tracefirst($text), --- > Parse::RecDescentUtf::_tracefirst($text), 976c976 < package Parse::RecDescent::Error; --- > package Parse::RecDescentUtf::Error; 1003c1003 < #WAS: $action .= "Parse::RecDescent::_error(qq{$self->{msg}}" . ',$thisline);'; --- > #WAS: $action .= "Parse::RecDescentUtf::_error(qq{$self->{msg}}" . >',$thisline);'; 1012c1012 < #WAS: Parse::RecDescent::_error("Invalid $rule: " . $expectation->message() ,$thisline); --- > #WAS: Parse::RecDescentUtf::_error("Invalid $rule: " . >$expectation->message() ,$thisline); 1018c1018 < new Parse::RecDescent::Directive('if (' . --- > new Parse::RecDescentUtf::Directive('if (' . 1028c1028 < package Parse::RecDescent::Token; --- > package Parse::RecDescentUtf::Token; 1062c1062 < Parse::RecDescent::_warn(3, "Token pattern \"m$ldel$pattern$rdel\" --- > Parse::RecDescentUtf::_warn(3, "Token pattern \"m$ldel$pattern$rdel\" 1066c1066 < Parse::RecDescent::_hint($@); --- > Parse::RecDescentUtf::_hint($@); 1097,1098c1097,1098 < Parse::RecDescent::_trace(q{Trying terminal: [' . $self->describe < . ']}, Parse::RecDescent::_tracefirst($text), --- > Parse::RecDescentUtf::_trace(q{Trying terminal: [' . $self->describe > . ']}, >Parse::RecDescentUtf::_tracefirst($text), 1108c1108 < . ($check->{itempos}? 'do {'.Parse::RecDescent::Production::incitempos().' 1} and ' : '') --- > . ($check->{itempos}? 'do >{'.Parse::RecDescentUtf::Production::incitempos().' 1} and ' : '') 1114,1115c1114,1115 < Parse::RecDescent::_trace(q{<<Didn\'t match terminal>>}, < Parse::RecDescent::_tracefirst($text)) --- > Parse::RecDescentUtf::_trace(q{<<Didn\'t match terminal>>}, > >Parse::RecDescentUtf::_tracefirst($text)) 1120c1120 < Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} --- > Parse::RecDescentUtf::_trace(q{>>Matched terminal<< (return value: [} 1122c1122 < Parse::RecDescent::_tracefirst($text)) --- > >Parse::RecDescentUtf::_tracefirst($text)) 1133c1133 < package Parse::RecDescent::Literal; --- > package Parse::RecDescentUtf::Literal; 1167c1167 < Parse::RecDescent::_trace(q{Trying terminal: [' . $self->describe --- > Parse::RecDescentUtf::_trace(q{Trying terminal: [' . $self->describe 1169c1169 < Parse::RecDescent::_tracefirst($text), --- > Parse::RecDescentUtf::_tracefirst($text), 1179c1179 < . ($check->{itempos}? 'do {'.Parse::RecDescent::Production::incitempos().' 1} and ' : '') --- > . ($check->{itempos}? 'do >{'.Parse::RecDescentUtf::Production::incitempos().' 1} and ' : '') 1184,1185c1184,1185 < Parse::RecDescent::_trace(qq{<<Didn\'t match terminal>>}, < Parse::RecDescent::_tracefirst($text)) --- > Parse::RecDescentUtf::_trace(qq{<<Didn\'t match terminal>>}, > >Parse::RecDescentUtf::_tracefirst($text)) 1189c1189 < Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} --- > Parse::RecDescentUtf::_trace(q{>>Matched terminal<< (return value: [} 1191c1191 < Parse::RecDescent::_tracefirst($text)) --- > >Parse::RecDescentUtf::_tracefirst($text)) 1202c1202 < package Parse::RecDescent::InterpLit; --- > package Parse::RecDescentUtf::InterpLit; 1236c1236 < Parse::RecDescent::_trace(q{Trying terminal: [' . $self->describe --- > Parse::RecDescentUtf::_trace(q{Trying terminal: [' . $self->describe 1238c1238 < Parse::RecDescent::_tracefirst($text), --- > Parse::RecDescentUtf::_tracefirst($text), 1248c1248 < . ($check->{itempos}? 'do {'.Parse::RecDescent::Production::incitempos().' 1} and ' : '') --- > . ($check->{itempos}? 'do >{'.Parse::RecDescentUtf::Production::incitempos().' 1} and ' : '') 1256,1257c1256,1257 < Parse::RecDescent::_trace(q{<<Didn\'t match terminal>>}, < Parse::RecDescent::_tracefirst($text)) --- > Parse::RecDescentUtf::_trace(q{<<Didn\'t match terminal>>}, > >Parse::RecDescentUtf::_tracefirst($text)) 1261c1261 < Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} --- > Parse::RecDescentUtf::_trace(q{>>Matched terminal<< (return value: [} 1263c1263 < Parse::RecDescent::_tracefirst($text)) --- > >Parse::RecDescentUtf::_tracefirst($text)) 1274c1274 < package Parse::RecDescent::Subrule; --- > package Parse::RecDescentUtf::Subrule; 1319,1320c1319,1320 < Parse::RecDescent::_trace(q{Trying subrule: [' . $self->{"subrule"} . ']}, < Parse::RecDescent::_tracefirst($text), --- > Parse::RecDescentUtf::_trace(q{Trying subrule: [' . $self->{"subrule"} >. ']}, > Parse::RecDescentUtf::_tracefirst($text), 1338c1338 < Parse::RecDescent::_trace(q{<<Didn\'t match subrule: [' --- > Parse::RecDescentUtf::_trace(q{<<Didn\'t match subrule: [' 1340c1340 < Parse::RecDescent::_tracefirst($text), --- > >Parse::RecDescentUtf::_tracefirst($text), 1346c1346 < Parse::RecDescent::_trace(q{>>Matched subrule: [' --- > Parse::RecDescentUtf::_trace(q{>>Matched subrule: [' 1350c1350 < Parse::RecDescent::_tracefirst($text), --- > Parse::RecDescentUtf::_tracefirst($text), 1360c1360 < package Parse::RecDescent::Repetition; --- > package Parse::RecDescentUtf::Repetition; 1395c1395 < return new Parse::RecDescent::Subrule($subrule,$lookahead,$line,$desc,$matchrule,$argcode); --- > return new >Parse::RecDescentUtf::Subrule($subrule,$lookahead,$line,$desc,$matchrule,$argcode); 1399c1399 < Parse::RecDescent::_error("Not symbol (\"!\") before --- > Parse::RecDescentUtf::_error("Not symbol (\"!\") before 1402c1402 < Parse::RecDescent::_hint("Lookahead for negated optional --- > Parse::RecDescentUtf::_hint("Lookahead for negated optional 1433,1434c1433,1434 < Parse::RecDescent::_trace(q{Trying repeated subrule: [' . $self->describe . ']}, < Parse::RecDescent::_tracefirst($text), --- > Parse::RecDescentUtf::_trace(q{Trying repeated subrule: [' . >$self->describe . ']}, > Parse::RecDescentUtf::_tracefirst($text), 1450c1450 < Parse::RecDescent::_trace(q{<<Didn\'t match repeated subrule: [' --- > Parse::RecDescentUtf::_trace(q{<<Didn\'t match repeated >subrule: [' 1452c1452 < Parse::RecDescent::_tracefirst($text), --- > >Parse::RecDescentUtf::_tracefirst($text), 1457c1457 < Parse::RecDescent::_trace(q{>>Matched repeated subrule: [' --- > Parse::RecDescentUtf::_trace(q{>>Matched repeated subrule: [' 1461c1461 < Parse::RecDescent::_tracefirst($text), --- > Parse::RecDescentUtf::_tracefirst($text), 1471c1471 < package Parse::RecDescent::Result; --- > package Parse::RecDescentUtf::Result; 1493c1493 < package Parse::RecDescent::Operator; --- > package Parse::RecDescentUtf::Operator; 1528,1529c1528,1529 < Parse::RecDescent::_trace(q{Trying operator: [' . $self->describe . ']}, < Parse::RecDescent::_tracefirst($text), --- > Parse::RecDescentUtf::_trace(q{Trying operator: [' . $self->describe . >']}, > Parse::RecDescentUtf::_tracefirst($text), 1560c1560 < ' . (ref($op) eq 'Parse::RecDescent::Token' --- > ' . (ref($op) eq 'Parse::RecDescentUtf::Token' 1587c1587 < ' . (ref($op) eq 'Parse::RecDescent::Token' ? 'do { push @item, $item{'.$self->{hashname}.'}=$1; } if defined $1;' : "" ) . ' --- > ' . (ref($op) eq 'Parse::RecDescentUtf::Token' ? 'do { push >@item, $item{'.$self->{hashname}.'}=$1; } if defined $1;' : "" ) . ' 1607c1607 < Parse::RecDescent::_trace(q{<<Didn\'t match operator: [' --- > Parse::RecDescentUtf::_trace(q{<<Didn\'t match operator: [' 1610c1610 < Parse::RecDescent::_tracefirst($text), --- > >Parse::RecDescentUtf::_tracefirst($text), 1616c1616 < Parse::RecDescent::_trace(q{>>Matched operator: [' --- > Parse::RecDescentUtf::_trace(q{>>Matched operator: [' 1620c1620 < Parse::RecDescent::_tracefirst($text), --- > Parse::RecDescentUtf::_tracefirst($text), 1631c1631 < package Parse::RecDescent::Expectation; --- > package Parse::RecDescentUtf::Expectation; 1681c1681 < package Parse::RecDescent; --- > package Parse::RecDescentUtf; 1696c1696 < return "Parse::RecDescent::" . $nextnamespace++; --- > return "Parse::RecDescentUtf::" . $nextnamespace++; 1702c1702 < local $Parse::RecDescent::compiling = $_[2], --- > local $Parse::RecDescentUtf::compiling = $_[2], 1718c1718 < = new Parse::RecDescent::Action($sourcecode,0,-1) --- > = new Parse::RecDescentUtf::Action($sourcecode,0,-1) 1728c1728 < die "Compilation of Parse::RecDescent grammars not yet implemented\n"; --- > die "Compilation of Parse::RecDescentUtf grammars not yet implemented\n"; 1860c1860 < $item = new Parse::RecDescent::Action($code,$lookahead,$line); --- > $item = new >Parse::RecDescentUtf::Action($code,$lookahead,$line); 1926c1926 < $item = new Parse::RecDescent::Directive('$commit=0;1', --- > $item = new >Parse::RecDescentUtf::Directive('$commit=0;1', 1934c1934 < $item = new Parse::RecDescent::Directive( --- > $item = new Parse::RecDescentUtf::Directive( 1946c1946 < $item = new Parse::RecDescent::Directive( --- > $item = new Parse::RecDescentUtf::Directive( 1955c1955 < $item = new Parse::RecDescent::Directive( --- > $item = new Parse::RecDescentUtf::Directive( 1997c1997 < = new Parse::RecDescent::Action(q{{bless \%item, $item[0]}},0,-1); --- > = new >Parse::RecDescentUtf::Action(q{{bless \%item, $item[0]}},0,-1); 1999c1999 < = new Parse::RecDescent::Action(q{{bless {__VALUE__=>$item[1]}, $item[0]}},0,-1); --- > = new >Parse::RecDescentUtf::Action(q{{bless {__VALUE__=>$item[1]}, $item[0]}},0,-1); 2006c2006 < $item = new Parse::RecDescent::UncondReject($lookahead,$line,"<reject>"); --- > $item = new >Parse::RecDescentUtf::UncondReject($lookahead,$line,"<reject>"); 2016c2016 < $item = new Parse::RecDescent::Directive( --- > $item = new Parse::RecDescentUtf::Directive( 2041c2041 < $item = new Parse::RecDescent::UncondReject($lookahead,$line,$code); --- > $item = new >Parse::RecDescentUtf::UncondReject($lookahead,$line,$code); 2048c2048 < $item = new Parse::RecDescent::Directive( --- > $item = new Parse::RecDescentUtf::Directive( 2060c2060 < $item = new Parse::RecDescent::Directive( --- > $item = new Parse::RecDescentUtf::Directive( 2072c2072 < $item = new Parse::RecDescent::Directive( --- > $item = new Parse::RecDescentUtf::Directive( 2089c2089 < $item = new Parse::RecDescent::UncondReject($lookahead,$line,$code); --- > $item = new >Parse::RecDescentUtf::UncondReject($lookahead,$line,$code); 2105c2105 < $item = new Parse::RecDescent::Directive( --- > $item = new Parse::RecDescentUtf::Directive( 2132c2132 < $item = new Parse::RecDescent::Directive( --- > $item = new Parse::RecDescentUtf::Directive( 2144c2144 < $item = new Parse::RecDescent::Directive('$commit = 1', --- > $item = new Parse::RecDescentUtf::Directive('$commit = >1', 2153c2153 < $item = new Parse::RecDescent::Error('',$lookahead,$1,$line); --- > $item = new >Parse::RecDescentUtf::Error('',$lookahead,$1,$line); 2165c2165 < $item = new Parse::RecDescent::Error($1,$lookahead,$commitonly,$line); --- > $item = new >Parse::RecDescentUtf::Error($1,$lookahead,$commitonly,$line); 2204c2204 < Parse::RecDescent::$rulename",$line) --- > Parse::RecDescentUtf::$rulename",$line) 2207c2207 < called through the Parse::RecDescent object --- > called through the Parse::RecDescentUtf >object 2211c2211 < Parse::RecDescent::$rulename is already defined (it --- > Parse::RecDescentUtf::$rulename is already >defined (it 2215c2215 < $rule = new Parse::RecDescent::Rule($rulename,$self,$line,$replace); --- > $rule = new >Parse::RecDescentUtf::Rule($rulename,$self,$line,$replace); 2217c2217 < $prod = $rule->addprod( new Parse::RecDescent::Production ); --- > $prod = $rule->addprod( new Parse::RecDescentUtf::Production >); 2227c2227 < $prod = new Parse::RecDescent::Production($line,1,0); --- > $prod = new Parse::RecDescentUtf::Production($line,1,0); 2238c2238 < $prod = new Parse::RecDescent::Production($line,0,1); --- > $prod = new Parse::RecDescentUtf::Production($line,0,1); 2249c2249 < and $prod = $rule->addprod(new Parse::RecDescent::Production($line)) --- > and $prod = $rule->addprod(new >Parse::RecDescentUtf::Production($line)) 2257c2257 < $item = new Parse::RecDescent::Literal($code,$lookahead,$line); --- > $item = new >Parse::RecDescentUtf::Literal($code,$lookahead,$line); 2264c2264 < $item = new Parse::RecDescent::InterpLit($1,$lookahead,$line); --- > $item = new >Parse::RecDescentUtf::InterpLit($1,$lookahead,$line); 2271c2271 < $item = new Parse::RecDescent::Token($1,'/',$3?$3:'',$lookahead,$line); --- > $item = new >Parse::RecDescentUtf::Token($1,'/',$3?$3:'',$lookahead,$line); 2283c2283 < $item = new Parse::RecDescent::Token(@components[3,2,8], --- > $item = new Parse::RecDescentUtf::Token(@components[3,2,8], 2317c2317 < $item = new Parse::RecDescent::Repetition($name,$1,0,1, --- > $item = new >Parse::RecDescentUtf::Repetition($name,$1,0,1, 2340c2340 < $item = new Parse::RecDescent::Repetition($name,$1,0,$MAXREP, --- > $item = new >Parse::RecDescentUtf::Repetition($name,$1,0,$MAXREP, 2366c2366 < $item = new Parse::RecDescent::Repetition($name,$1,1,$MAXREP, --- > $item = new >Parse::RecDescentUtf::Repetition($name,$1,1,$MAXREP, 2393c2393 < $item = new Parse::RecDescent::Repetition($name,$1,$1,$1, --- > $item = new >Parse::RecDescentUtf::Repetition($name,$1,$1,$1, 2417c2417 < $item = new Parse::RecDescent::Repetition($name,"$1..$2",$1,$2, --- > $item = new >Parse::RecDescentUtf::Repetition($name,"$1..$2",$1,$2, 2441c2441 < $item = new Parse::RecDescent::Repetition($name,"$1..",$1,$MAXREP, --- > $item = new >Parse::RecDescentUtf::Repetition($name,"$1..",$1,$MAXREP, 2466c2466 < $item = new Parse::RecDescent::Repetition($name,"..$1",1,$1, --- > $item = new >Parse::RecDescentUtf::Repetition($name,"..$1",1,$1, 2493c2493 < $item = new Parse::RecDescent::Subrule($name, --- > $item = new Parse::RecDescentUtf::Subrule($name, 2556c2556 < unless ($ERRORS or $isimplicit or $Parse::RecDescent::compiling) --- > unless ($ERRORS or $isimplicit or $Parse::RecDescentUtf::compiling) 2636c2636 < &&!defined &{"Parse::RecDescent::$call"}) --- > &&!defined &{"Parse::RecDescentUtf::$call"}) 2688a2689 > use utf8; 2695c2696 < # PRETEND TO BE IN Parse::RecDescent NAMESPACE --- > # PRETEND TO BE IN Parse::RecDescentUtf NAMESPACE 2699c2700 < \$AUTOLOAD =~ s/^$self->{namespace}/Parse::RecDescent/; --- > \$AUTOLOAD =~ s/^$self->{namespace}/Parse::RecDescentUtf/; 2705c2706 < $code .= "push \@$self->{namespace}\::ISA, 'Parse::RecDescent';"; --- > $code .= "push \@$self->{namespace}\::ISA, 'Parse::RecDescentUtf';"; 2971c2972 < $errorprefix = "Parse::RecDescent"; --- > $errorprefix = "Parse::RecDescentUtf";