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

Log of /trunk/pg/lib/Parser/List

View Directory Listing Directory Listing

Sticky Revision:

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 5118 - Directory Listing
Modified Wed Jul 4 01:18:52 2007 UTC (12 years, 7 months ago) by dpvc
Make string() method use the separator specified in the List
definition rather than a hard coded comma.

Revision 5107 - Directory Listing
Modified Sun Jul 1 18:25:24 2007 UTC (12 years, 7 months ago) by dpvc
Arrange for creation of constant Matrices to produce 1 x n matrices
(rather than vectors) properly.  (This involves including an extra
array reference in List.pm, which must be removed in list types that
don't need them, namely intervals and absolute value.)

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 4488 - Directory Listing
Modified Mon Sep 11 22:23:45 2006 UTC (13 years, 5 months ago) by dpvc
Allow matrices to set their own templates (instead of using "c" for
all columns), and handle missing open and close delimiters better.

Revision 3915 - Directory Listing
Modified Tue Jan 17 02:20:19 2006 UTC (14 years, 1 month ago) by dpvc
Fixed problem with formula-valued matrices producing an error message
incorrectly.  (Was checking the wrong attribute of the entries.)

Revision 3763 - Directory Listing
Modified Thu Nov 17 13:21:43 2005 UTC (14 years, 3 months ago) by dpvc
Give better error messages when the entries in Points, Vectors and
Matrices are not of the right type.

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 3466 - Directory Listing
Modified Thu Aug 11 14:19:26 2005 UTC (14 years, 6 months ago) by dpvc
Added new Set object class to the Parser.  It implements a finite set
of real numbers, for use with unions and intervals.  E.g., (1,2) U {3}
or (1,2) U {3,4,5}.  You can created Set objects in your perl code via
the Set() command, e.g, Set(3,4,5) or Set("{1,2,3}").  You should set
the Context to Context("Interval") if you plan to use Set objects, as
this defined the braces to form sets (rather than using them as
parentheses, which is the default WW behavior).  Note that in Interval
context, you can NOT use braces as parentheses.

Current, Set objects are only allowed to be sets of numbers.  It would
be possible to extend that in the future.

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

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 3210 - Directory Listing
Modified Thu Mar 31 19:44:49 2005 UTC (14 years, 10 months ago) by dpvc
Added a check that the coordinates are numeric.  This avoids an error
were <i+j+k> was accepted as OK.

Revision 2668 - Directory Listing
Modified Sun Aug 22 02:55:38 2004 UTC (15 years, 6 months ago) by dpvc
Fixed TeX output of Matrices to use \array rather than \matrix for
matrices with formulas as entries (this had already been fixed for
constant matrices).  Made intervals produce formulas when of of the
endpoints is a formula.  Removed unneeded comment.

Revision 2660 - Directory Listing
Modified Fri Aug 20 15:52:32 2004 UTC (15 years, 6 months ago) by dpvc
A number of adjustments to get negative infinities to work better.
They used to be stored as separate Parser strings, but now they are
flagged versions of a single string.

All of the problems are really due to the fact that there is no
Infinity class in the Parser (only a Value version).  That should be
changed, but will require some work, and can be put off for now.

It would be best if the classes within the two packages would match up
nearly 1-to-1, but for historical reasons, they don't.  Since the
introduction of Real, String and Infinity classes to the Value
package, The Infinity class is the one main difference between the
two, and once that is fixed, everything needs to be looked over to
check for unnecessary complications due to the historical lack of classes
in one or the other package.

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

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 2624 - Directory Listing
Modified Mon Aug 16 13:44:45 2004 UTC (15 years, 6 months ago) by dpvc
Added support for unorderd list or formulas with partial credit.
Fixed type mismatch reporting in formula answer checker.
Fixed an error with Unions producing incorrect perl versions under
some circumstances.

Revision 2621 - Directory Listing
Modified Sun Aug 15 17:05:41 2004 UTC (15 years, 6 months ago) by dpvc
Improved error messages, particularly when the student enters a
formula in an answer that should be constant, and also for incorrect
answers in lists of answers.  There are a few other miscellaneous output
improvements as well.

Revision 2592 - Directory Listing
Modified Thu Aug 12 16:40:47 2004 UTC (15 years, 6 months ago) by dpvc
A number of small fixes.  Most were to fix minor bugs in string and
TeX output, particulary for the various list-based objects (like
vectors, intervals, etc.).  There were also some bug fixes in the
comparison routines.  Some additional checks were added for valid
intervals when the coordinates are formulas.

Revision 2579 - Directory Listing
Modified Mon Aug 9 21:38:01 2004 UTC (15 years, 6 months ago) by dpvc
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 - 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