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

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

Parent Directory Parent Directory

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

Revision 5026 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sat Jun 23 20:08:07 2007 UTC (12 years, 7 months ago) by dpvc
File length: 4163 byte(s)
Diff to previous 5023
Make the Package method really be a method of the context rather than
the Value objects, and make the Value method call the context one.
This means it is not necessary to pass the context as a parameter any

Revision 5023 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sat Jun 23 19:45:17 2007 UTC (12 years, 7 months ago) by dpvc
File length: 4169 byte(s)
Diff to previous 5001
Make context method work when called from package rather than blessed object.

Revision 5001 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Jun 12 04:05:56 2007 UTC (12 years, 8 months ago) by dpvc
File length: 4112 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, 8 months ago) by dpvc
File length: 3555 byte(s)
Diff to previous 4979
Update to handle the fact that the Value package now includes the
context with all MathObjects.  (This may still need some work.)

Revision 4979 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Jun 7 11:59:05 2007 UTC (12 years, 8 months ago) by dpvc
File length: 3449 byte(s)
Diff to previous 3523
More updates for marking MathObjects with the context in which they
were created, so they should now work like the Formula objects in that
respect.  As they are combined via overloaded operators, they should
pass on their contexts correctly.

Also normalized the use of getFlag() to obtain flags from the
MathObject's context rather than looking in the context directly.
This allows the math object to override the flag by setting the flag
value in the object's hash (e.g., $f->{tolerance} = .001).  I've also
added the ability to override context flags via the answerHash (e.g.,
$f->cmp(tolerance => .001)), though some filtering may need to be
added to this at some point.  Note that ONLY the context flags can be
overridden, not other parts of the context.

Revision 3523 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sat Aug 13 22:38:39 2005 UTC (14 years, 6 months ago) by dpvc
File length: 3450 byte(s)
Diff to previous 3370
Added canBeInUnion and isSetOfReals methods to the Parser package
(similar to the ones in the Value package), replacing the
canBeInterval flag and other ad hoc checks.

Removed ability to form interval like [a] now that we have sets.

Revision 3370 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Jul 12 22:29:53 2005 UTC (14 years, 7 months ago) by dpvc
File length: 3271 byte(s)
Diff to previous 2789
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 2789 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Sep 16 22:24:32 2004 UTC (15 years, 5 months ago) by dpvc
File length: 3193 byte(s)
Diff to previous 2625
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 2625 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Aug 16 18:35:12 2004 UTC (15 years, 6 months ago) by dpvc
File length: 2985 byte(s)
Diff to previous 2607
Added string comparison to all Value object classes (to compare the
string value of an object to another string).

Overloaded perl '.' operator to do dot product when the operands are
formulas returning vectors.  (Part of the auto-generation of

A few improvements to real and complex class output results.

Made Union class slightly more robust and removed need for makeUnion
method other than in the Union itself.

Revision 2607 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sat Aug 14 11:26:49 2004 UTC (15 years, 6 months ago) by dpvc
File length: 3062 byte(s)
Diff to previous 2579
Allow unary + and - to work on infinities.

Revision 2579 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Aug 9 21:38:01 2004 UTC (15 years, 6 months ago) by dpvc
File length: 3032 byte(s)
Diff to previous 2558
Significant update to new parser.

New features include:

  Better control over format of vector output (you can now
    specify ijk-format rather than <...> format)

  "Fuzzy" reals, where the relations like == return true when the
    two values are "close enough".  (This is controlable using
    parameters similar to those used in NUM_CMP).

  The fuzzy reals are now used in vectors/points/matrices/complexes/intervals
    and so on so that their relations will also be fuzzy.  E.g.,
    (1E-13,2) == (0,3) will be true, and norm(Vector(0,1E-13)) will
    equal 0.

  The two main portions of the parser (the Parser and Value packages)
    now share a common context object for configuration purposes.

Revision 2558 - (view) (download) (as text) (annotate) - [select for diffs]
Added Wed Jul 28 20:32:33 2004 UTC (15 years, 6 months ago) by sh002i
File length: 2918 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