I have now updated MathML format and also did a few changes to
TeX and Texmacs format.  The changes should fix few
problems.  First, long standing problem with missing
parenthesis.  Second, most relational operators were
missing -- I have added them.  Third, MathML used
(sub)string match to parse OutputForm: this is inherently
unreliable.  Now MathML, TeX and Texmacs use symbols,
I eliminated nontrival parsing from MathML (due to PRIME
form there is relatively easy to recognize derivatives).
There are two symbol-based parsing routines in Texmacs
format, one to reconstruct continuous fractions from ZAG,
the other to find 'dx' part of an integral.  Ideally
Texmacs should support ZAG directly, but for time beeing
both routines show how one could "parse" OutputForm if
really needed.

I also tried to make the three formatters reasonably similar.
Currently about half of lines in each formatter is common and
about half is specific to given format.  ATM it is not clear
for me if it makes sense to factor out common category
and try to keep only differences in specific domains.  Namely,
main flow of control and priority handling (needed for insertiong
parenhteses when needed) is common.  But the format-specific
lines are quite spread out in common part and there are
also some differences in logic.  If we put each difference
as a tiny routine in format specific part then we will end
up with several routines and a lot of (duplicated!) boilerplate
for function headers.  Using bigger routines we would duplicate
control code and get someting quite similar to current version.
Since main reason for differences is due to various format
specific strings we could try to parametrize routines.  But
that looks problematic because extra indirection would reduce
clarity and there are also changes to logic...

So for now I consider big changes to MathML, TeX and Texmacs
as finished.  Please try the formatters and report any new
problems.

-- 
                              Waldek Hebisch
[email protected] 

-- 
You received this message because you are subscribed to the Google Groups 
"FriCAS - computer algebra system" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/fricas-devel?hl=en.

Reply via email to