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

View of /trunk/pg/macros/contextLimitedNumeric.pl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 5441 - (download) (as text) (annotate)
Tue Aug 28 22:40:15 2007 UTC (12 years, 5 months ago) by dpvc
File size: 929 byte(s)
Add context names for the context(s) created here.

    1 
    2 loadMacros("MathObjects.pl");
    3 
    4 =head3 Context("LimitedNumeric")
    5 
    6  ##########################################################
    7  #
    8  #  Implements a context in which numbers can be entered,
    9  #  but no operations are permitted between them.
   10  #
   11  #  There are two versions:  one for lists of numbers
   12  #  and one for a single number.  Select them using
   13  #  one of the following commands:
   14  #
   15  #      Context("LimitedNumeric-list");
   16  #      Context("LimiteNumeric");
   17  #
   18  #  (Now uses Parcer::Legacy::LimitedNumeric to implement
   19  #  these contexts.)
   20 
   21 =cut
   22 
   23 ##################################################
   24 
   25 sub _contextLimitedNumeric_init {
   26 
   27   my $context = $main::context{"LimitedNumeric-List"} = Parser::Context->getCopy("LimitedNumeric");
   28   $context->{name} = "LimitedNumeric-List";
   29   $context->operators->redefine(',');
   30 
   31   main::Context("LimitedNumeric");  ### FIXME:  probably should require the author to set this explicitly
   32 }
   33 
   34 1;

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9