[system] / trunk / pg / macros / contextFraction.pl Repository:
ViewVC logotype

Diff of /trunk/pg/macros/contextFraction.pl

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 6207 Revision 6208
216# Initialize the contexts and make the creator function. 216# Initialize the contexts and make the creator function.
217# 217#
218sub Init { 218sub Init {
219 my $context = $main::context{Fraction} = Parser::Context->getCopy("Numeric"); 219 my $context = $main::context{Fraction} = Parser::Context->getCopy("Numeric");
220 $context->{name} = "Fraction"; 220 $context->{name} = "Fraction";
221 $context->{pattern}{signedNumber} .= '|-?\d+/\d+'; 221 $context->{pattern}{signedNumber} = '(?:'.$context->{pattern}{signedNumber}.'|-?\d+/-?\d+)';
222 $context->operators->set( 222 $context->operators->set(
223 "/" => {class => "context::Fraction::BOP::divide"}, 223 "/" => {class => "context::Fraction::BOP::divide"},
224 "//" => {class => "context::Fraction::BOP::divide"}, 224 "//" => {class => "context::Fraction::BOP::divide"},
225 "/ " => {class => "context::Fraction::BOP::divide"}, 225 "/ " => {class => "context::Fraction::BOP::divide"},
226 " /" => {class => "context::Fraction::BOP::divide"}, 226 " /" => {class => "context::Fraction::BOP::divide"},

Legend:
Removed from v.6207  
changed lines
  Added in v.6208

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9