[system] / trunk / pg / lib / Parser / Legacy Repository:
ViewVC logotype

Log of /trunk/pg/lib/Parser/Legacy

View Directory Listing Directory Listing


Sticky Revision:

Revision 5949 - Directory Listing
Modified Tue Dec 30 00:41:40 2008 UTC (11 years, 1 month ago) by dpvc
Fixed the name stored in the StrictFraction context (removed the
trailling s).

Revision 5439 - Directory Listing
Modified Tue Aug 28 21:53:42 2007 UTC (12 years, 5 months ago) by dpvc
Updated contexts to include a "name" field that at least tracks what
context you started with (though it can be modified and no longer be
the same as the original context).

Remove the individual named variables in the Default.pm file; they are
now available only through the %Parser::Context::Default::context
hash.

Remove the >< and . operators, the <...> parentheses, the norm and
unit functions, and the i, j, and k constants from the Point context.
So the Point context no longer includes vectors and vector
operaterations.

Revision 5387 - Directory Listing
Modified Sun Aug 19 21:31:17 2007 UTC (12 years, 6 months ago) by dpvc
Always make units be in \textstyle (in particular, in the preview display).

Revision 5323 - Directory Listing
Modified Tue Aug 14 15:57:19 2007 UTC (12 years, 6 months ago) by dpvc
Fixed a problem where Real's were being promoted to NumberWithReals
during the numeric comparison (when units should be ignored).  This
error was a result of the changes made this summer.

[This class should probably be redesigned to implement the overloaded
operators and, in particular, handle the equality check in compare()
rather than an over-ridden cmp_parse.  That would make it possible to
manipulate numbers-with-units via perl code in a natural way, just
like all the other MathObjects.]

Revision 5015 - Directory Listing
Modified Fri Jun 22 01:56:06 2007 UTC (12 years, 8 months ago) by dpvc
more fixes to handle the contexts properly.

Revision 5014 - Directory Listing
Modified Fri Jun 22 00:26:47 2007 UTC (12 years, 8 months ago) by dpvc
Fixed context issues and a typo (must have been interrupted when
editing this file earlier).  Also modified the units pattern to allow
trailing spaces.

Revision 5001 - Directory Listing
Modified Tue Jun 12 04:05:56 2007 UTC (12 years, 8 months ago) by dpvc
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 - Directory Listing
Modified Sun Jun 10 01:17:29 2007 UTC (12 years, 8 months ago) by dpvc
Update to handle the fact that the Value package now includes the
context with all MathObjects.  (This may still need some work.)

Revision 4980 - Directory Listing
Modified Thu Jun 7 12:30:28 2007 UTC (12 years, 8 months ago) by dpvc
Updated to include some recent changes in documentation and removal of
old commented-out code.

Revision 4928 - Directory Listing
Modified Tue Apr 17 00:36:16 2007 UTC (12 years, 10 months ago) by dpvc
Modified the way the Parser-based versions of the traditional answer
checkers get copies of their contexts.  They now use a new method
getCopy to obtain the copy either from the problem's context table or
the default table (rather than only from the default).  That way the
instructor can use parserCustomization.pl to customize the contexts
used by the answer checkers.

Revision 4672 - Directory Listing
Modified Mon Nov 27 04:20:40 2006 UTC (13 years, 2 months ago) by dpvc
Abstracted the NumberWithUnits to a more general ObjectWithUnits and
moved the FormulaWithUnits to this file as well, since most of the
code is common.  Although, strictly speaking, FormulaWithUnits is not
legacy code, since the general object-with-units is here, it will be
easier to maintain FormulaWithUnits here as well.  When the Parser
gets a real units class, all of this can be removed.

Also fixed the unit lookup code to use the actual names from the Units
library, so we can now be more accurate about determining the extent
of the units, and can handle things like '5 kg m / s' now.  In the
case of ambiguous formulas with units, e.g., '5m kg' where m is a
variable, use '5*m kg' or '(5m) kg'.

Revision 4669 - Directory Listing
Modified Mon Nov 27 00:00:46 2006 UTC (13 years, 2 months ago) by dpvc
The Units.pm library only accepts one division within the units, and
the Parser wasn't taking that into account, so students could enter
m/s/s and still get credit even if the units were m/s.  This have been
fixed.

Revision 4667 - Directory Listing
Modified Sun Nov 26 21:58:43 2006 UTC (13 years, 2 months ago) by dpvc
Fixed a problem where the TeX version included two copies of the units
(one in TeX mode and one from the string() output).

Revision 4528 - Directory Listing
Modified Wed Sep 27 17:15:18 2006 UTC (13 years, 4 months ago) by dpvc
Fixed problem where a zero with units would me marked as "not looking
like anumber with units".

Revision 4511 - Directory Listing
Modified Wed Sep 20 23:38:38 2006 UTC (13 years, 5 months ago) by dpvc
Make a more sophisticated unit check so that it will handle things
like "3ft / s" (that don't have a space before the units).

Really need to make a units class for the Parser.

Revision 4510 - Directory Listing
Modified Wed Sep 20 21:50:56 2006 UTC (13 years, 5 months ago) by dpvc
Fixed unit checking so that units can include spaces (like 4 ft /
min).  Also fixed a problem where units were not being reported as
part of the student's entered answer.

Revision 4044 - Directory Listing
Modified Thu Apr 6 00:23:59 2006 UTC (13 years, 10 months ago) by dpvc
Fixed a bug that caused can error when a Complex1 object was passed to
the answer checker (rather than a string that needs to be parsed).

Revision 3603 - Directory Listing
Modified Wed Sep 7 01:10:58 2005 UTC (14 years, 5 months ago) by dpvc
Added support for cplx_cmp() using the Parser.  Move
lib/Parser/Legacy/PGcomplexmacros.pl to the pg/macros directory to use
it.  As with the other legacy macros, $useOldAnswerMacros can be
controlled to determine whether the new or the old macros are used.

There is a new mode 'strict_cartesian' that is parallel to
'strict_polar'.  You must enter a+bi form, but the a and b can have
operations within them.

Revision 3574 - Directory Listing
Modified Thu Aug 25 18:32:01 2005 UTC (14 years, 5 months ago) by jj
Updated instructions to match changes to global.conf.dist and the move
or PGanswermacros.pl.

Revision 3573 - Directory Listing
Modified Thu Aug 25 18:24:55 2005 UTC (14 years, 5 months ago) by jj
A separate copy of this file is no longer needed.

Revision 3560 - Directory Listing
Modified Wed Aug 24 11:44:49 2005 UTC (14 years, 6 months ago) by dpvc
Made relative tolerances the default for when the tolType is not one
of 'relative' or 'absolute'.

Revision 3536 - Directory Listing
Modified Sat Aug 20 23:07:13 2005 UTC (14 years, 6 months ago) by dpvc
Added code to handle the case where the professor's answer is in
expondential notation using a little e instead of a big one.  (Perl
will convert .0000001 to 1E-07, for example, before it is passed to
num_cmp.)

Revision 3529 - Directory Listing
Modified Mon Aug 15 01:50:21 2005 UTC (14 years, 6 months ago) by dpvc
Changed Context() call to direct reference to context, so as not to
leave the wrong content selected as the current one.

Revision 3458 - Directory Listing
Modified Wed Aug 10 14:28:59 2005 UTC (14 years, 6 months ago) by dpvc
The Parser versions of num_cmp and fun_cmp incorrectly left the
current Context set to the base context used by the answer checker.
The Context is now correctly reset to the one in effect before the
call to num_cmp or fun_cmp.

Also removed some redundant values in if-then checks.

Revision 3446 - Directory Listing
Modified Mon Aug 1 15:14:20 2005 UTC (14 years, 6 months ago) by dpvc
Fixed a bug that would cause step() to produce an error when called on
a constant value.  Also, added fact() function that was defined in
Algparser but not in Parser (which uses x! notation).

Revision 3445 - Directory Listing
Modified Mon Aug 1 14:20:16 2005 UTC (14 years, 6 months ago) by dpvc
Added missing "step" function that was defined in the AlgParser but
not in the Parser.

Be sure to copy the updated PGanswermacros.pl to the pg/macros directory.

Revision 3443 - Directory Listing
Modified Mon Aug 1 12:42:21 2005 UTC (14 years, 6 months ago) by dpvc
Added postfilter to Parser-based implementation of NUM_CMP so that the
student's answer is updated to be the result of evaluating the answer
(when there is no error in evaluating the answer).  This correctly
reflects the behaviour of the original NUM_CMP.

Revision 3441 - Directory Listing
Modified Mon Aug 1 12:04:23 2005 UTC (14 years, 6 months ago) by dpvc
Updates to make mode=>'frac' properly emulate the original num_cmp
behavior (it now allows decimals and fractions instead of requiring a
fraction).  There is also a new LimitedNumeric-StrictFraction context
(not currently used) that disallows decimals and requires fractions.

Revision 3440 - Directory Listing
Modified Mon Aug 1 12:01:39 2005 UTC (14 years, 6 months ago) by dpvc
Folded in Mike's changes for status messages.

Revision 3370 - Directory Listing
Modified Tue Jul 12 22:29:53 2005 UTC (14 years, 7 months ago) by dpvc
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 3364 - Directory Listing
Modified Fri Jul 8 21:45:14 2005 UTC (14 years, 7 months ago) by jj
Fixed typo in installation instructions.

Revision 3353 - Directory Listing
Modified Tue Jul 5 01:43:30 2005 UTC (14 years, 7 months ago) by dpvc
Don't load Parser.pl (it causes trouble with the Matrix.pm module).
We only needed it because of the calls to Real() that were being used
by Formula objects, so have them call Value::Real directly.

be sure to get the latest versions of Parser and Value (including the
top-level Parser.pm and Value.pm) in order to use this update.

Revision 3351 - Directory Listing
Modified Tue Jul 5 00:31:57 2005 UTC (14 years, 7 months ago) by gage
Modified formatting

Revision 3348 - Directory Listing
Modified Mon Jul 4 20:18:40 2005 UTC (14 years, 7 months ago) by dpvc
Folded in Mike's changes to checkbox_cmp.

Revision 3347 - Directory Listing
Added Mon Jul 4 20:12:22 2005 UTC (14 years, 7 months ago) by dpvc
This is an attempt at making the traditional answer checkers call the
new Parser in place of their original ones.  That is, if you follow
the instructions in the README file, then problems that use
std_num_cmp(), fun_cmp(), etc. will really be using the new Parser
instead of the original PGanswermacros.pl versions.

The old answer checkers are still available, and can be switched back
on a site-wide, course-wide, or problem-by-problem basis.  See the
README for details.

Sort log by:

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9