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

Log of /trunk/pg/lib/Parser/UOP

View Directory Listing Directory Listing


Sticky Revision:

Revision 5510 - Directory Listing
Modified Sat Sep 15 14:44:03 2007 UTC (12 years, 5 months ago) by dpvc
Reduce -0 to 0.

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 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 3591 - Directory Listing
Modified Tue Aug 30 12:21:36 2005 UTC (14 years, 5 months ago) by dpvc
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 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 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 2679 - Directory Listing
Modified Tue Aug 24 03:31:47 2004 UTC (15 years, 5 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, 5 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 2607 - Directory Listing
Modified Sat Aug 14 11:26:49 2004 UTC (15 years, 6 months ago) by dpvc
Allow unary + and - to work on infinities.

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