[system] / trunk / pg / lib / Parser / BOP.pm Repository:
ViewVC logotype

Log of /trunk/pg/lib/Parser/BOP.pm

Parent Directory Parent Directory


Links to HEAD: (view) (download) (as text) (annotate)
Sticky Revision:

Revision 5509 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sat Sep 15 00:56:51 2007 UTC (12 years, 2 months ago) by dpvc
File length: 10748 byte(s)
Diff to previous 5132
Formula objects and Context objects contain reference loops, which
prevent them from being freed properly by perl when they are no longer
needed.  This is a source of an important memory leak in WeBWorK.  The
problem has been fixed by using Scalar::Util::weaken for these
recursive references, so these objects can be freed properly when they
go out of scope.  This should cause an improvement in the memory usage
of the httpd child processes.

Revision 5132 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Jul 9 19:54:21 2007 UTC (12 years, 5 months ago) by dpvc
File length: 10732 byte(s)
Diff to previous 5130
Better control over when extra parentheses are added.

Revision 5130 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Jul 9 12:45:06 2007 UTC (12 years, 5 months ago) by dpvc
File length: 10717 byte(s)
Diff to previous 5119
Added new flags to error checking of operands and function arguments.
This is so that a context can be developed that is more forgiving
about what can be put next to what.  Such a context can NOT be used
for evaluation or answer checking, but can be used to generate TeX
output in more sophisticated situations.

Revision 5119 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Jul 4 01:19:18 2007 UTC (12 years, 5 months ago) by dpvc
File length: 10500 byte(s)
Diff to previous 5001
Removed some unneeded spaces in the comments.

Revision 5001 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Jun 12 04:05:56 2007 UTC (12 years, 6 months ago) by dpvc
File length: 10502 byte(s)
Diff to previous 4994
More fixes for creating items in the corret context.  Also added a
method for looking up the package associated with a particular Parser
class (for consistency with the Value->Package call).

Revision 4994 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sun Jun 10 01:17:29 2007 UTC (12 years, 6 months ago) by dpvc
File length: 10548 byte(s)
Diff to previous 4487
Update to handle the fact that the Value package now includes the
context with all MathObjects.  (This may still need some work.)

Revision 4487 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Sep 11 22:21:49 2006 UTC (13 years, 3 months ago) by dpvc
File length: 10535 byte(s)
Diff to previous 3591
Allow the _check subroutine to affect the {isConstant} field.

Revision 3591 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Aug 30 12:21:36 2005 UTC (14 years, 3 months ago) by dpvc
File length: 10535 byte(s)
Diff to previous 3531
The perl method for UOP and BOP now put spaces around the operator, to
prevent Perl from thinking that things like -e is a file test and
*Parser::Function->call is a name reference.  (Some of these had been
done by hand earlier, but now the base BOP and UOP classes handle it,
so we should not have problems in the future).  I removed the ad hoc
fixes from several other locations (Parser/Function.pm,
Parser/Context/Default.pm).

Also extended the operator definitions to allow operators to create
function-call syntax in perl mode (for when the operator doesn't
correspond to a perl operator).

Revision 3531 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Aug 15 22:42:37 2005 UTC (14 years, 3 months ago) by dpvc
File length: 10476 byte(s)
Diff to previous 3495
Fixed more undefined values

Revision 3495 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Aug 12 23:21:52 2005 UTC (14 years, 4 months ago) by dpvc
File length: 10376 byte(s)
Diff to previous 3370
Fixed use of undefined value for $position in TeX and String methods.

Revision 3370 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Jul 12 22:29:53 2005 UTC (14 years, 5 months ago) by dpvc
File length: 10292 byte(s)
Diff to previous 3369
A first pass at making parser error messages localizable.  The
Context()->{error}{msg} hash can be used to specify translations of
the standard messages.  For example,

    Context()->{error}{msg}{'Division by zero'} = "Don't divide by zero, dude!";
    Context()->{error}{msg}{'Function '%s' has too many inputs'} =
        "You passed too many arguments to '%s'";

(I didn't translate into another language, here, but you could do
that, too.)

The msg hash could also be used within answer checkers to make certain
answer messages more appropriate for the given type of expected answer.

Revision 3369 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Jul 12 21:05:37 2005 UTC (14 years, 5 months ago) by dpvc
File length: 10267 byte(s)
Diff to previous 3203
Fixed various perl compiler warnings (due to extra "my", and so on).

Revision 3203 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Mar 28 23:46:06 2005 UTC (14 years, 8 months ago) by dpvc
File length: 10273 byte(s)
Diff to previous 2789
Handle extra parentheses better.

Revision 2789 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Sep 16 22:24:32 2004 UTC (15 years, 2 months ago) by dpvc
File length: 10247 byte(s)
Diff to previous 2696
Added context flags to control automatic reduction of operations that
involve only constant values.  The default is to combine constants,
but this can now be disabled.

Also added a new flag to control the addition of extra parentheses
that make string values painfully unambiguous (these are for
situations that students tend to get wrong).  By default this is
turned off (so that professor answers won't contain excessive
parentheses), but the answer checker will be made to turn this on for
student answers.

Finally, when extra parens are added to formulas, they alternate
between ( ) and [ ] to make it easier to read.

Revision 2696 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sat Aug 28 12:34:56 2004 UTC (15 years, 3 months ago) by dpvc
File length: 10043 byte(s)
Diff to previous 2678
Improved TeX and string output in a number of situations.  Improved
use of parentheses to avoid things like x+-3.  Fixed wrong parentheses
in powers.  Display (sin(x))^2 as sin^2(x) in TeX output.

Revision 2678 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Aug 23 23:55:37 2004 UTC (15 years, 3 months ago) by dpvc
File length: 9866 byte(s)
Diff to previous 2671
Modified the parser so that the classes for the various object
constructors are stored in the context table rather than hard-coded
into the parser.  That way, you can override the default classes with
your own.  This gives you even more complete control to modify the
parser.  (You had been able to replace the definitions of operators,
functions and list-like objects, but could not override the behaviour
of numbers, strings, variables, and so on.  Now you can.)

This effects most of the files, but only by changing the name of the
calls that create the various objects.

There are also a couple of other minor fixes.

Revision 2671 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sun Aug 22 21:18:06 2004 UTC (15 years, 3 months ago) by dpvc
File length: 9690 byte(s)
Diff to previous 2615
Fixed some inconsistencies between handing of matrices within the
parser and Value packages.  Added a predefined Matrix context.

Revision 2615 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sat Aug 14 21:27:45 2004 UTC (15 years, 3 months ago) by dpvc
File length: 9500 byte(s)
Diff to previous 2612
*** empty log message ***

Revision 2612 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sat Aug 14 19:29:42 2004 UTC (15 years, 3 months ago) by dpvc
File length: 9473 byte(s)
Diff to previous 2605
Fixed some bugs in the handle of the context in ->string and ->TeX
methods of Value objects.

Revision 2605 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sat Aug 14 02:50:18 2004 UTC (15 years, 3 months ago) by dpvc
File length: 9551 byte(s)
Diff to previous 2558
Incorporated infinities into Parser package better.  They have been
stored as String objects (with extra data) in the parser, and I've
left it that way, but now they convert to/from Vallue::Infinity
objects correctly, and these are used for generating the output.

Also added the Infinity answer checker, and adjusted the error
messages produces by type mismatches in the answer checkers and
elsewhere.

Revision 2558 - (view) (download) (as text) (annotate) - [select for diffs]
Added Wed Jul 28 20:32:33 2004 UTC (15 years, 4 months ago) by sh002i
File length: 9196 byte(s)
merged changes from rel-2-1-a1 -- stop using that branch.

This form allows you to request diffs between any two revisions of this file. For each of the two "sides" of the diff, enter a numeric revision.

  Diffs between and
  Type of Diff should be a

Sort log by:

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9