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

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

Parent Directory Parent Directory


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

Revision 5120 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Jul 4 17:00:18 2007 UTC (12 years, 5 months ago) by dpvc
File length: 2560 byte(s)
Diff to previous 5004
Allow constants to override their string representations.

Revision 5004 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Jun 15 03:17:31 2007 UTC (12 years, 6 months ago) by dpvc
File length: 2467 byte(s)
Diff to previous 5001
Only set the context if the data is a MathObject.

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: 2423 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: 2399 byte(s)
Diff to previous 3523
Update to handle the fact that the Value package now includes the
context with all MathObjects.  (This may still need some work.)

Revision 3523 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sat Aug 13 22:38:39 2005 UTC (14 years, 4 months ago) by dpvc
File length: 2257 byte(s)
Diff to previous 3477
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 3477 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Aug 11 20:57:18 2005 UTC (14 years, 4 months ago) by dpvc
File length: 2187 byte(s)
Diff to previous 2771
Added ability to subtract intervals, sets and unions.  Adjusted the
precedence of the union 'U' to be above _ and + so that things like
(1,5) U (7,10) - {8} U (2,3) will do ((1,5) U (7,10)) - ({8} U (2,3))
rather than the previous (1,5) U ((7,10) - {8}) U (2,3).  Finally,
added a constant 'R' to the Interval context that is equivalent to
(-inf,inf), so you can do things like R-{0} now.

Still need to work out reducing unions so that things like (1,3)U(2,4)
can become (1,4).

Revision 2771 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sat Sep 11 17:11:29 2004 UTC (15 years, 3 months ago) by dpvc
File length: 2087 byte(s)
Diff to previous 2678
Fixed a bug with constants where the values were being cached so that
changes in the context were not being reflected in the formulas that
use them.

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: 2103 byte(s)
Diff to previous 2655
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 2655 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Aug 20 02:11:50 2004 UTC (15 years, 3 months ago) by dpvc
File length: 2053 byte(s)
Diff to previous 2628
Fixed typo.

Revision 2628 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Aug 16 21:41:05 2004 UTC (15 years, 4 months ago) by dpvc
File length: 2053 byte(s)
Diff to previous 2626
Allow parser "constants" to be (in reality) formulas.  That way, for
example, you can defined T, N and B to be the formulas for the unit
tangent, normal and binormal of a space curve (as functions of "t")
and the student can write anwers in terms of T, N and B (without
having to compute them).

You could have created FUNCTIONS T(t), N(t) and B(t), and added them
to the parser to get almost the same effect, but the students would
have had to include the "(t)".  (If you want that, go ahead and do it
that way.)

Revision 2626 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Aug 16 19:44:26 2004 UTC (15 years, 4 months ago) by dpvc
File length: 1509 byte(s)
Diff to previous 2558
One more fix for handling intervals properly (I think it's really
right this time).  Also, named constants that end in numbers will
produce TeX output with the number as a subscript (this was already
true for variable names).

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: 1435 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