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

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

View Directory Listing Directory Listing


Sticky Revision:

Revision 5581 - Directory Listing
Modified Tue Nov 6 16:23:33 2007 UTC (12 years, 3 months ago) by dpvc
When (-x)*y or x*(-y) reductions are performed, don't print extra
parentheses in string and TeX version.  I.e., display as -xy not
-(xy).  This makes reduction with polynomials work better.

Revision 5511 - Directory Listing
Modified Sat Sep 15 14:45:22 2007 UTC (12 years, 5 months ago) by dpvc
Cosmetic changes.

Revision 5331 - Directory Listing
Modified Wed Aug 15 04:10:41 2007 UTC (12 years, 6 months ago) by dpvc
Added a reduce flag for x^1 processing (it was not able to be
disabled before).

Revision 5132 - Directory Listing
Modified Mon Jul 9 19:54:21 2007 UTC (12 years, 7 months ago) by dpvc
Better control over when extra parentheses are added.

Revision 5131 - Directory Listing
Modified Mon Jul 9 19:53:15 2007 UTC (12 years, 7 months ago) by dpvc
Remove the space inserted by \left...\right when it appears in a
multiplication operation (so function calls look better, for example).

Revision 5130 - Directory Listing
Modified Mon Jul 9 12:45:06 2007 UTC (12 years, 7 months ago) by dpvc
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 5067 - Directory Listing
Modified Thu Jun 28 22:33:31 2007 UTC (12 years, 7 months ago) by dpvc
Added perl method so that the result is always a number (not a blank
when it is false).

Revision 5024 - Directory Listing
Modified Sat Jun 23 19:46:00 2007 UTC (12 years, 8 months ago) by dpvc
Fix typo, and handle case where Allow is called from package.

Revision 5013 - Directory Listing
Modified Thu Jun 21 23:29:10 2007 UTC (12 years, 8 months ago) by dpvc
Don't use \cdot with things like 3i.

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 4996 - Directory Listing
Modified Sun Jun 10 11:34:27 2007 UTC (12 years, 8 months ago) by dpvc
Allow promote() to accept a context as the first argument so that the
promoted object can be forced into the given context.

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 4729 - Directory Listing
Modified Sat Dec 16 14:10:12 2006 UTC (13 years, 2 months ago) by dpvc
Add a new operator // to be the same as / except its TeX form is a/b
rather than \frac{a}{b}.  This makes it possible get horizontal
fractions in exponents, for example, where vertical fractions often
don't look so good.

Revision 4583 - Directory Listing
Modified Mon Oct 23 11:43:40 2006 UTC (13 years, 4 months ago) by dpvc
Make sure \cdot is only used for a numeric right-hand part (finishes
fix of bug 1114).

Revision 4582 - Directory Listing
Modified Mon Oct 23 11:38:14 2006 UTC (13 years, 4 months ago) by dpvc
Use \cdot when a number is followed by a numeric fraction.
(Fixes bug 1114.)

Revision 3531 - Directory Listing
Modified Mon Aug 15 22:42:37 2005 UTC (14 years, 6 months ago) by dpvc
Fixed more undefined values

Revision 3523 - Directory Listing
Modified Sat Aug 13 22:38:39 2005 UTC (14 years, 6 months ago) by dpvc
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 3500 - Directory Listing
Modified Sat Aug 13 01:39:14 2005 UTC (14 years, 6 months ago) by dpvc
Fixed typo in previous update.

Revision 3495 - Directory Listing
Modified Fri Aug 12 23:21:52 2005 UTC (14 years, 6 months ago) by dpvc
Fixed use of undefined value for $position in TeX and String methods.

Revision 3477 - Directory Listing
Modified Thu Aug 11 20:57:18 2005 UTC (14 years, 6 months ago) by dpvc
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 3473 - Directory Listing
Modified Thu Aug 11 14:34:24 2005 UTC (14 years, 6 months ago) by dpvc
Changes needt for Set object, and fixed a bug with unions containing
constant intervals with non-constant ones.

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 3369 - Directory Listing
Modified Tue Jul 12 21:05:37 2005 UTC (14 years, 7 months ago) by dpvc
Fixed various perl compiler warnings (due to extra "my", and so on).

Revision 3352 - Directory Listing
Modified Tue Jul 5 01:38:19 2005 UTC (14 years, 7 months ago) by dpvc
Modified the perl() method to make calles to Value:: directly rather
than to the main:: stubs for creating Value objects.  This will make
it work better from within packages or when Parser.pl hasn't been
loaded.

A few things still won't work in this case; e.g., calls to Closed()
for intervals (these could be handled better using ->with()) and to
functions like Factorial and log10 that are defined in Parser.pl.

Finally, there should be better object-based control over what
routines are called to create these objects, so that subclasses of the
Value objects will be able to be generated correctly.

Revision 2938 - Directory Listing
Modified Tue Oct 19 00:24:47 2004 UTC (15 years, 4 months ago) by dpvc
Added reduction rules to remove redundent negatives.
Override string and TeX methods that avoid redundent parentheses.

Revision 2908 - Directory Listing
Modified Tue Oct 12 20:46:43 2004 UTC (15 years, 4 months ago) by dpvc
Report errors for powers of negative numbers rather than return 'nan'.
Don't allow 'nan' to be made into a Real object.

Revision 2802 - Directory Listing
Modified Sun Sep 19 14:43:32 2004 UTC (15 years, 5 months ago) by dpvc
Eliminated unneeded parentheses in TeX output when unary minus and
plus are used with fractions.

Revision 2796 - Directory Listing
Modified Sun Sep 19 01:15:03 2004 UTC (15 years, 5 months ago) by dpvc
Added flags that control the reductions performed by
Formula()->reduce.  Each reduction operation can be individually
enabled or disabled in the context, and in the reduce() call itself.

More complex reductions need to be developed.

Revision 2789 - Directory Listing
Modified Thu Sep 16 22:24:32 2004 UTC (15 years, 5 months ago) by dpvc
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 2701 - Directory Listing
Modified Sat Aug 28 15:53:09 2004 UTC (15 years, 5 months ago) by dpvc
Only convert (f(x))^2 to f^2(x) for specified functions f
(as marked in the Context).

Revision 2697 - Directory Listing
Modified Sat Aug 28 12:43:57 2004 UTC (15 years, 5 months ago) by dpvc
Two more minor TeX improvements.

Revision 2696 - Directory Listing
Modified Sat Aug 28 12:34:56 2004 UTC (15 years, 5 months ago) by dpvc
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 2681 - Directory Listing
Modified Tue Aug 24 03:34:47 2004 UTC (15 years, 6 months ago) by dpvc
TeX mode now adds parentheses around fractions, when needed.

Revision 2679 - Directory Listing
Modified Tue Aug 24 03:31:47 2004 UTC (15 years, 6 months ago) by dpvc
Fixed wrong error messages when operators are undefined in a context.

Revision 2678 - Directory Listing
Modified Mon Aug 23 23:55:37 2004 UTC (15 years, 6 months ago) by dpvc
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 2645 - Directory Listing
Modified Thu Aug 19 12:02:15 2004 UTC (15 years, 6 months ago) by dpvc
Make sure equality always returns a defined value, and
put spaces around the equal sign in string output.

Revision 2625 - Directory Listing
Modified Mon Aug 16 18:35:12 2004 UTC (15 years, 6 months ago) by dpvc
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
formulas).

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 2616 - Directory Listing
Modified Sat Aug 14 21:29:21 2004 UTC (15 years, 6 months ago) by dpvc
Added an equality operator (not active initially) that can be used for
things like equations of planes and so on.  I'm working on the answer
checker for that.

Revision 2615 - Directory Listing
Modified Sat Aug 14 21:27:45 2004 UTC (15 years, 6 months ago) by dpvc
*** empty log message ***

Revision 2594 - Directory Listing
Modified Thu Aug 12 20:17:18 2004 UTC (15 years, 6 months ago) by dpvc
Fixes for handling intervals better.  In particular, deal better with
ambiguous situations, like (1,2) that could be a point.

You can use [a,a] to specify the single point a.  I'd like to make {a}
represent this (and maybe even {a,b,c} to form finite sets), but this
would interfere with the use of { and } as alternative parentheses.
(Does anyone really use these?)

Do we need a cross product for intervals (and sets) as a means of
representing regions in R^2 (or higher)?

Revision 2558 - Directory Listing
Added Wed Jul 28 20:32:33 2004 UTC (15 years, 6 months ago) by sh002i
merged changes from rel-2-1-a1 -- stop using that branch.

Sort log by:

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9